From b47972a741efd27b55ef99835eb77a624670b35d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 25 Apr 2023 15:45:43 -0400 Subject: [PATCH] feat: [cloudresourcemanager] add TagHolds, GetNamespacedTagKey, and GetNamespacedTagValue APIs. Adds support for project parented tags (#9369) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add TagHolds, GetNamespacedTagKey, and GetNamespacedTagValue APIs. Adds support for project parented tags PiperOrigin-RevId: 525509112 Source-Link: https://github.com/googleapis/googleapis/commit/4a23200a0370844439de83b01143857fa61a3955 Source-Link: https://github.com/googleapis/googleapis-gen/commit/95969877eca837f9b6db32fce95665649cbd8c90 Copy-Tag: eyJwIjoiamF2YS1yZXNvdXJjZW1hbmFnZXIvLk93bEJvdC55YW1sIiwiaCI6Ijk1OTY5ODc3ZWNhODM3ZjliNmRiMzJmY2U5NTY2NTY0OWNiZDhjOTAifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- java-resourcemanager/README.md | 4 +- .../resourcemanager/v3/FoldersClient.java | 20 +- .../resourcemanager/v3/ProjectsClient.java | 163 +- .../resourcemanager/v3/TagBindingsClient.java | 239 ++- .../v3/TagBindingsSettings.java | 15 + .../resourcemanager/v3/TagHoldsClient.java | 780 +++++++++ .../resourcemanager/v3/TagHoldsSettings.java | 257 +++ .../resourcemanager/v3/TagKeysClient.java | 129 +- .../resourcemanager/v3/TagKeysSettings.java | 11 + .../resourcemanager/v3/TagValuesClient.java | 158 +- .../resourcemanager/v3/TagValuesSettings.java | 11 + .../resourcemanager/v3/gapic_metadata.json | 27 + .../resourcemanager/v3/package-info.java | 25 +- .../v3/stub/GrpcTagBindingsStub.java | 45 + .../v3/stub/GrpcTagHoldsCallableFactory.java | 113 ++ .../v3/stub/GrpcTagHoldsStub.java | 263 +++ .../v3/stub/GrpcTagKeysStub.java | 26 + .../v3/stub/GrpcTagValuesStub.java | 27 + .../v3/stub/HttpJsonTagBindingsStub.java | 72 + .../stub/HttpJsonTagHoldsCallableFactory.java | 105 ++ .../v3/stub/HttpJsonTagHoldsStub.java | 378 ++++ .../v3/stub/HttpJsonTagKeysStub.java | 52 + .../v3/stub/HttpJsonTagValuesStub.java | 53 + .../v3/stub/TagBindingsStub.java | 13 + .../v3/stub/TagBindingsStubSettings.java | 106 +- .../resourcemanager/v3/stub/TagHoldsStub.java | 81 + .../v3/stub/TagHoldsStubSettings.java | 528 ++++++ .../resourcemanager/v3/stub/TagKeysStub.java | 5 + .../v3/stub/TagKeysStubSettings.java | 31 +- .../v3/stub/TagValuesStub.java | 5 + .../v3/stub/TagValuesStubSettings.java | 32 +- .../v3/MockTagBindingsImpl.java | 22 + .../resourcemanager/v3/MockTagHolds.java | 59 + .../resourcemanager/v3/MockTagHoldsImpl.java | 124 ++ .../resourcemanager/v3/MockTagKeysImpl.java | 21 + .../resourcemanager/v3/MockTagValuesImpl.java | 21 + .../v3/TagBindingsClientHttpJsonTest.java | 52 + .../v3/TagBindingsClientTest.java | 46 + .../v3/TagHoldsClientHttpJsonTest.java | 381 ++++ .../v3/TagHoldsClientTest.java | 364 ++++ .../v3/TagKeysClientHttpJsonTest.java | 123 ++ .../resourcemanager/v3/TagKeysClientTest.java | 107 ++ .../v3/TagValuesClientHttpJsonTest.java | 102 ++ .../v3/TagValuesClientTest.java | 92 + .../cloud/resourcemanager/v3/FoldersGrpc.java | 160 +- .../resourcemanager/v3/ProjectsGrpc.java | 104 +- .../resourcemanager/v3/TagBindingsGrpc.java | 166 +- .../resourcemanager/v3/TagHoldsGrpc.java | 627 +++++++ .../cloud/resourcemanager/v3/TagKeysGrpc.java | 156 +- .../resourcemanager/v3/TagValuesGrpc.java | 171 +- .../v3/CreateFolderRequest.java | 48 +- .../v3/CreateFolderRequestOrBuilder.java | 12 +- .../v3/CreateProjectRequest.java | 24 +- .../v3/CreateProjectRequestOrBuilder.java | 6 +- .../v3/CreateTagBindingRequest.java | 16 +- .../v3/CreateTagBindingRequestOrBuilder.java | 4 +- .../v3/CreateTagHoldMetadata.java | 441 +++++ .../v3/CreateTagHoldMetadataOrBuilder.java | 24 + .../v3/CreateTagHoldRequest.java | 1036 +++++++++++ .../v3/CreateTagHoldRequestOrBuilder.java | 111 ++ .../v3/CreateTagKeyRequest.java | 64 +- .../v3/CreateTagKeyRequestOrBuilder.java | 16 +- .../v3/CreateTagValueRequest.java | 64 +- .../v3/CreateTagValueRequestOrBuilder.java | 16 +- .../v3/DeleteTagHoldMetadata.java | 441 +++++ .../v3/DeleteTagHoldMetadataOrBuilder.java | 24 + .../v3/DeleteTagHoldRequest.java | 748 ++++++++ .../v3/DeleteTagHoldRequestOrBuilder.java | 70 + .../v3/DeleteTagKeyRequest.java | 86 +- .../v3/DeleteTagKeyRequestOrBuilder.java | 24 +- .../v3/DeleteTagValueRequest.java | 65 +- .../v3/DeleteTagValueRequestOrBuilder.java | 18 +- .../resourcemanager/v3/EffectiveTag.java | 1512 ++++++++++++++++ .../v3/EffectiveTagOrBuilder.java | 178 ++ .../cloud/resourcemanager/v3/Folder.java | 42 +- .../resourcemanager/v3/FolderOrBuilder.java | 12 +- .../v3/GetNamespacedTagKeyRequest.java | 671 ++++++++ .../GetNamespacedTagKeyRequestOrBuilder.java | 60 + .../v3/GetNamespacedTagValueRequest.java | 693 ++++++++ ...GetNamespacedTagValueRequestOrBuilder.java | 66 + .../v3/GetOrganizationRequest.java | 42 +- .../v3/GetOrganizationRequestOrBuilder.java | 12 +- .../v3/GetTagValueRequest.java | 21 +- .../v3/GetTagValueRequestOrBuilder.java | 6 +- .../v3/ListEffectiveTagsRequest.java | 938 ++++++++++ .../v3/ListEffectiveTagsRequestOrBuilder.java | 96 ++ .../v3/ListEffectiveTagsResponse.java | 1189 +++++++++++++ .../ListEffectiveTagsResponseOrBuilder.java | 116 ++ .../v3/ListFoldersRequest.java | 76 +- .../v3/ListFoldersRequestOrBuilder.java | 21 +- .../v3/ListProjectsRequest.java | 114 +- .../v3/ListProjectsRequestOrBuilder.java | 32 +- .../v3/ListTagBindingsRequest.java | 94 +- .../v3/ListTagBindingsRequestOrBuilder.java | 26 +- .../v3/ListTagBindingsResponse.java | 69 +- .../v3/ListTagBindingsResponseOrBuilder.java | 15 +- .../v3/ListTagHoldsRequest.java | 1186 +++++++++++++ .../v3/ListTagHoldsRequestOrBuilder.java | 141 ++ .../v3/ListTagHoldsResponse.java | 1173 +++++++++++++ .../v3/ListTagHoldsResponseOrBuilder.java | 116 ++ .../v3/ListTagKeysRequest.java | 24 +- .../v3/ListTagKeysRequestOrBuilder.java | 6 +- .../v3/ListTagValuesRequest.java | 77 +- .../v3/ListTagValuesRequestOrBuilder.java | 20 +- .../resourcemanager/v3/MoveFolderRequest.java | 42 +- .../v3/MoveFolderRequestOrBuilder.java | 12 +- .../resourcemanager/v3/Organization.java | 42 +- .../v3/OrganizationOrBuilder.java | 12 +- .../cloud/resourcemanager/v3/Project.java | 92 +- .../resourcemanager/v3/ProjectOrBuilder.java | 30 +- .../cloud/resourcemanager/v3/Purpose.java | 172 ++ .../v3/SearchFoldersRequest.java | 48 +- .../v3/SearchFoldersRequestOrBuilder.java | 13 +- .../v3/SearchOrganizationsRequest.java | 68 +- .../SearchOrganizationsRequestOrBuilder.java | 19 +- .../v3/SearchProjectsRequest.java | 210 +-- .../v3/SearchProjectsRequestOrBuilder.java | 60 +- .../cloud/resourcemanager/v3/TagBinding.java | 227 ++- .../v3/TagBindingOrBuilder.java | 35 + .../resourcemanager/v3/TagBindingsProto.java | 147 +- .../cloud/resourcemanager/v3/TagHold.java | 1531 +++++++++++++++++ .../cloud/resourcemanager/v3/TagHoldName.java | 192 +++ .../resourcemanager/v3/TagHoldOrBuilder.java | 183 ++ .../resourcemanager/v3/TagHoldsProto.java | 209 +++ .../cloud/resourcemanager/v3/TagKey.java | 650 ++++++- .../resourcemanager/v3/TagKeyOrBuilder.java | 136 +- .../resourcemanager/v3/TagKeysProto.java | 183 +- .../cloud/resourcemanager/v3/TagValue.java | 105 +- .../resourcemanager/v3/TagValueOrBuilder.java | 30 +- .../resourcemanager/v3/TagValuesProto.java | 145 +- .../v3/UpdateFolderRequest.java | 48 +- .../v3/UpdateFolderRequestOrBuilder.java | 12 +- .../v3/UpdateTagKeyRequest.java | 96 +- .../v3/UpdateTagKeyRequestOrBuilder.java | 24 +- .../v3/UpdateTagValueRequest.java | 112 +- .../v3/UpdateTagValueRequestOrBuilder.java | 28 +- .../cloud/resourcemanager/v3/folders.proto | 130 +- .../resourcemanager/v3/organizations.proto | 55 +- .../cloud/resourcemanager/v3/projects.proto | 150 +- .../resourcemanager/v3/tag_bindings.proto | 154 +- .../cloud/resourcemanager/v3/tag_holds.proto | 216 +++ .../cloud/resourcemanager/v3/tag_keys.proto | 142 +- .../cloud/resourcemanager/v3/tag_values.proto | 145 +- .../createtaghold/SyncCreateTagHold.java | 48 + .../AsyncListEffectiveTags.java | 53 + .../AsyncListEffectiveTagsPaged.java | 61 + .../SyncListEffectiveTags.java | 49 + .../SyncListEffectiveTagsString.java | 43 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 39 + .../create/SyncCreateSetEndpoint.java | 41 + .../createtaghold/AsyncCreateTagHold.java | 52 + .../createtaghold/AsyncCreateTagHoldLRO.java | 53 + .../createtaghold/SyncCreateTagHold.java | 48 + .../SyncCreateTagHoldStringTaghold.java | 43 + .../SyncCreateTagHoldTagvaluenameTaghold.java | 43 + .../deletetaghold/AsyncDeleteTagHold.java | 50 + .../deletetaghold/AsyncDeleteTagHoldLRO.java | 52 + .../deletetaghold/SyncDeleteTagHold.java | 47 + .../SyncDeleteTagHoldString.java | 42 + .../SyncDeleteTagHoldTagholdname.java | 42 + .../listtagholds/AsyncListTagHolds.java | 54 + .../listtagholds/AsyncListTagHoldsPaged.java | 62 + .../listtagholds/SyncListTagHolds.java | 51 + .../listtagholds/SyncListTagHoldsString.java | 44 + .../SyncListTagHoldsTagvaluename.java | 44 + .../createtaghold/SyncCreateTagHold.java | 48 + .../AsyncGetNamespacedTagKey.java | 49 + .../SyncGetNamespacedTagKey.java | 46 + .../SyncGetNamespacedTagKeyString.java | 42 + .../SyncGetNamespacedTagKeyTagkeyname.java | 42 + .../AsyncGetNamespacedTagValue.java | 50 + .../SyncGetNamespacedTagValue.java | 46 + .../SyncGetNamespacedTagValueString.java | 42 + ...SyncGetNamespacedTagValueTagvaluename.java | 42 + 175 files changed, 24374 insertions(+), 1917 deletions(-) create mode 100644 java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsClient.java create mode 100644 java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsSettings.java create mode 100644 java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagHoldsCallableFactory.java create mode 100644 java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagHoldsStub.java create mode 100644 java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagHoldsCallableFactory.java create mode 100644 java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagHoldsStub.java create mode 100644 java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagHoldsStub.java create mode 100644 java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagHoldsStubSettings.java create mode 100644 java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagHolds.java create mode 100644 java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagHoldsImpl.java create mode 100644 java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagHoldsClientHttpJsonTest.java create mode 100644 java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagHoldsClientTest.java create mode 100644 java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsGrpc.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldMetadata.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldMetadataOrBuilder.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldRequest.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldRequestOrBuilder.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldMetadata.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldMetadataOrBuilder.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldRequest.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldRequestOrBuilder.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/EffectiveTag.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/EffectiveTagOrBuilder.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagKeyRequest.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagKeyRequestOrBuilder.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagValueRequest.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagValueRequestOrBuilder.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsRequest.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsRequestOrBuilder.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsResponse.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsResponseOrBuilder.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsRequest.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsRequestOrBuilder.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsResponse.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsResponseOrBuilder.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Purpose.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHold.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldName.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldOrBuilder.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsProto.java create mode 100644 java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_holds.proto create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/stub/tagholdsstubsettings/createtaghold/SyncCreateTagHold.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/AsyncListEffectiveTags.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/AsyncListEffectiveTagsPaged.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/SyncListEffectiveTags.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/SyncListEffectiveTagsString.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/create/SyncCreateSetEndpoint.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/AsyncCreateTagHold.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/AsyncCreateTagHoldLRO.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/SyncCreateTagHold.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/SyncCreateTagHoldStringTaghold.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/SyncCreateTagHoldTagvaluenameTaghold.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/AsyncDeleteTagHold.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/AsyncDeleteTagHoldLRO.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/SyncDeleteTagHold.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/SyncDeleteTagHoldString.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/SyncDeleteTagHoldTagholdname.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/AsyncListTagHolds.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/AsyncListTagHoldsPaged.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/SyncListTagHolds.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/SyncListTagHoldsString.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/SyncListTagHoldsTagvaluename.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholdssettings/createtaghold/SyncCreateTagHold.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/AsyncGetNamespacedTagKey.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/SyncGetNamespacedTagKey.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/SyncGetNamespacedTagKeyString.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/SyncGetNamespacedTagKeyTagkeyname.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/AsyncGetNamespacedTagValue.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/SyncGetNamespacedTagValue.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/SyncGetNamespacedTagValueString.java create mode 100644 java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/SyncGetNamespacedTagValueTagvaluename.java diff --git a/java-resourcemanager/README.md b/java-resourcemanager/README.md index 5966cdb295fa..cbdb64eaa739 100644 --- a/java-resourcemanager/README.md +++ b/java-resourcemanager/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.11.0 + 26.12.0 pom import @@ -336,7 +336,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-resourcemanager.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-resourcemanager/1.16.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-resourcemanager/1.17.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersClient.java index f87eb458c74c..c39b56e6dfb2 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/FoldersClient.java @@ -342,10 +342,12 @@ public final UnaryCallable getFolderCallable() { * } * } * - * @param parent Required. The resource name of the organization or folder whose folders are being - * listed. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. Access to - * this method is controlled by checking the `resourcemanager.folders.list` permission on the - * `parent`. + * @param parent Required. The name of the parent resource whose folders are being listed. Only + * children of this parent resource are listed; descendants are not listed. + *

If the parent is a folder, use the value `folders/{folder_id}`. If the parent is an + * organization, use the value `organizations/{org_id}`. + *

Access to this method is controlled by checking the `resourcemanager.folders.list` + * permission on the `parent`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListFoldersPagedResponse listFolders(ResourceName parent) { @@ -379,10 +381,12 @@ public final ListFoldersPagedResponse listFolders(ResourceName parent) { * } * } * - * @param parent Required. The resource name of the organization or folder whose folders are being - * listed. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. Access to - * this method is controlled by checking the `resourcemanager.folders.list` permission on the - * `parent`. + * @param parent Required. The name of the parent resource whose folders are being listed. Only + * children of this parent resource are listed; descendants are not listed. + *

If the parent is a folder, use the value `folders/{folder_id}`. If the parent is an + * organization, use the value `organizations/{org_id}`. + *

Access to this method is controlled by checking the `resourcemanager.folders.list` + * permission on the `parent`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListFoldersPagedResponse listFolders(String parent) { diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsClient.java index 8c463a4ab1de..293d797bf825 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsClient.java @@ -345,9 +345,10 @@ public final UnaryCallable getProjectCallable() { * } * } * - * @param parent Required. The name of the parent resource to list projects under. - *

For example, setting this field to 'folders/1234' would list all projects directly under - * that folder. + * @param parent Required. The name of the parent resource whose projects are being listed. Only + * children of this parent resource are listed; descendants are not listed. + *

If the parent is a folder, use the value `folders/{folder_id}`. If the parent is an + * organization, use the value `organizations/{org_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListProjectsPagedResponse listProjects(ResourceName parent) { @@ -382,9 +383,10 @@ public final ListProjectsPagedResponse listProjects(ResourceName parent) { * } * } * - * @param parent Required. The name of the parent resource to list projects under. - *

For example, setting this field to 'folders/1234' would list all projects directly under - * that folder. + * @param parent Required. The name of the parent resource whose projects are being listed. Only + * children of this parent resource are listed; descendants are not listed. + *

If the parent is a folder, use the value `folders/{folder_id}`. If the parent is an + * organization, use the value `organizations/{org_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListProjectsPagedResponse listProjects(String parent) { @@ -539,15 +541,15 @@ public final UnaryCallable listProjec * * @param query Optional. A query string for searching for projects that the caller has * `resourcemanager.projects.get` permission to. If multiple fields are included in the query, - * the it will return results that match any of the fields. Some eligible fields are: + * then it will return results that match any of the fields. Some eligible fields are: *

``` | Field | Description | * |-------------------------|----------------------------------------------| | displayName, - * name | Filters by displayName. | | parent | Project's parent. (for example: folders/123, - * organizations/*) Prefer parent field over parent.type and parent.id. | | parent.type | + * name | Filters by displayName. | | parent | Project's parent (for example: folders/123, + * organizations/*). Prefer parent field over parent.type and parent.id.| | parent.type | * Parent's type: `folder` or `organization`. | | parent.id | Parent's id number (for example: * 123) | | id, projectId | Filters by projectId. | | state, lifecycleState | Filters by - * state. | | labels | Filters by label name or value. | | labels.<key> (where - * *key* is the name of a label) | Filters by label name. | ``` + * state. | | labels | Filters by label name or value. | | labels.\\<key\\> (where + * *key* is the name of a label) | Filters by label name.| ``` *

Search expressions are case insensitive. *

Some examples queries: *

``` | Query | Description | @@ -555,9 +557,8 @@ public final UnaryCallable listProjec * | The project's name starts with "how". | | name:Howl | The project's name is `Howl` or * `howl`. | | name:HOWL | Equivalent to above. | | NAME:howl | Equivalent to above. | | * labels.color:* | The project has the label `color`. | | labels.color:red | The - * project's label `color` has the value `red`. | | labels.color:red&nbsp;labels.size:big - * | The project's label `color` has the value `red` and its label `size` has the value `big`. - * | ``` + * project's label `color` has the value `red`. | | labels.color:red labels.size:big | The + * project's label `color` has the value `red` or its label `size` has the value `big`. | ``` *

If no query is specified, the call will return projects for which the user has the * `resourcemanager.projects.get` permission. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -719,7 +720,7 @@ public final SearchProjectsPagedResponse searchProjects(SearchProjectsRequest re *

Project ID is required. If the requested ID is unavailable, the request fails. *

If the `parent` field is set, the `resourcemanager.projects.create` permission is * checked on the parent resource. If no parent is set and the authorization credentials - * belong to an Organziation, the parent will be set to that Organization. + * belong to an Organization, the parent will be set to that Organization. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createProjectAsync(Project project) { @@ -956,8 +957,12 @@ public final UnaryCallable updateProjectCallabl *

Returns an operation which can be used to track the process of the project move workflow. * Upon success, the `Operation.response` field will be populated with the moved project. * - *

The caller must have `resourcemanager.projects.update` permission on the project and have - * `resourcemanager.projects.move` permission on the project's current and proposed new parent. + *

The caller must have `resourcemanager.projects.move` permission on the project, on the + * project's current and proposed new parent. + * + *

If project has no current parent, or it currently does not have an associated organization + * resource, you will also need the `resourcemanager.projects.setIamPolicy` permission in the + * project. * *

Sample code: * @@ -995,8 +1000,12 @@ public final OperationFuture moveProjectAsync( *

Returns an operation which can be used to track the process of the project move workflow. * Upon success, the `Operation.response` field will be populated with the moved project. * - *

The caller must have `resourcemanager.projects.update` permission on the project and have - * `resourcemanager.projects.move` permission on the project's current and proposed new parent. + *

The caller must have `resourcemanager.projects.move` permission on the project, on the + * project's current and proposed new parent. + * + *

If project has no current parent, or it currently does not have an associated organization + * resource, you will also need the `resourcemanager.projects.setIamPolicy` permission in the + * project. * *

Sample code: * @@ -1034,8 +1043,12 @@ public final OperationFuture moveProjectAsync( *

Returns an operation which can be used to track the process of the project move workflow. * Upon success, the `Operation.response` field will be populated with the moved project. * - *

The caller must have `resourcemanager.projects.update` permission on the project and have - * `resourcemanager.projects.move` permission on the project's current and proposed new parent. + *

The caller must have `resourcemanager.projects.move` permission on the project, on the + * project's current and proposed new parent. + * + *

If project has no current parent, or it currently does not have an associated organization + * resource, you will also need the `resourcemanager.projects.setIamPolicy` permission in the + * project. * *

Sample code: * @@ -1073,8 +1086,12 @@ public final OperationFuture moveProjectAsync( *

Returns an operation which can be used to track the process of the project move workflow. * Upon success, the `Operation.response` field will be populated with the moved project. * - *

The caller must have `resourcemanager.projects.update` permission on the project and have - * `resourcemanager.projects.move` permission on the project's current and proposed new parent. + *

The caller must have `resourcemanager.projects.move` permission on the project, on the + * project's current and proposed new parent. + * + *

If project has no current parent, or it currently does not have an associated organization + * resource, you will also need the `resourcemanager.projects.setIamPolicy` permission in the + * project. * *

Sample code: * @@ -1112,8 +1129,12 @@ public final OperationFuture moveProjectAsync( *

Returns an operation which can be used to track the process of the project move workflow. * Upon success, the `Operation.response` field will be populated with the moved project. * - *

The caller must have `resourcemanager.projects.update` permission on the project and have - * `resourcemanager.projects.move` permission on the project's current and proposed new parent. + *

The caller must have `resourcemanager.projects.move` permission on the project, on the + * project's current and proposed new parent. + * + *

If project has no current parent, or it currently does not have an associated organization + * resource, you will also need the `resourcemanager.projects.setIamPolicy` permission in the + * project. * *

Sample code: * @@ -1148,8 +1169,12 @@ public final OperationFuture moveProjectAsync( *

Returns an operation which can be used to track the process of the project move workflow. * Upon success, the `Operation.response` field will be populated with the moved project. * - *

The caller must have `resourcemanager.projects.update` permission on the project and have - * `resourcemanager.projects.move` permission on the project's current and proposed new parent. + *

The caller must have `resourcemanager.projects.move` permission on the project, on the + * project's current and proposed new parent. + * + *

If project has no current parent, or it currently does not have an associated organization + * resource, you will also need the `resourcemanager.projects.setIamPolicy` permission in the + * project. * *

Sample code: * @@ -1184,8 +1209,12 @@ public final OperationFuture moveProjectAsync( *

Returns an operation which can be used to track the process of the project move workflow. * Upon success, the `Operation.response` field will be populated with the moved project. * - *

The caller must have `resourcemanager.projects.update` permission on the project and have - * `resourcemanager.projects.move` permission on the project's current and proposed new parent. + *

The caller must have `resourcemanager.projects.move` permission on the project, on the + * project's current and proposed new parent. + * + *

If project has no current parent, or it currently does not have an associated organization + * resource, you will also need the `resourcemanager.projects.setIamPolicy` permission in the + * project. * *

Sample code: * @@ -1632,8 +1661,9 @@ public final UnaryCallable undeleteProjectCal // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the IAM access control policy for the specified project. Permission is denied if the - * policy or the resource do not exist. + * Returns the IAM access control policy for the specified project, in the format + * `projects/{ProjectIdOrNumber}` e.g. projects/123. Permission is denied if the policy or the + * resource do not exist. * *

Sample code: * @@ -1663,8 +1693,9 @@ public final Policy getIamPolicy(ResourceName resource) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the IAM access control policy for the specified project. Permission is denied if the - * policy or the resource do not exist. + * Returns the IAM access control policy for the specified project, in the format + * `projects/{ProjectIdOrNumber}` e.g. projects/123. Permission is denied if the policy or the + * resource do not exist. * *

Sample code: * @@ -1691,8 +1722,9 @@ public final Policy getIamPolicy(String resource) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the IAM access control policy for the specified project. Permission is denied if the - * policy or the resource do not exist. + * Returns the IAM access control policy for the specified project, in the format + * `projects/{ProjectIdOrNumber}` e.g. projects/123. Permission is denied if the policy or the + * resource do not exist. * *

Sample code: * @@ -1721,8 +1753,9 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns the IAM access control policy for the specified project. Permission is denied if the - * policy or the resource do not exist. + * Returns the IAM access control policy for the specified project, in the format + * `projects/{ProjectIdOrNumber}` e.g. projects/123. Permission is denied if the policy or the + * resource do not exist. * *

Sample code: * @@ -1750,7 +1783,8 @@ public final UnaryCallable getIamPolicyCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the IAM access control policy for the specified project. + * Sets the IAM access control policy for the specified project, in the format + * `projects/{ProjectIdOrNumber}` e.g. projects/123. * *

CAUTION: This method will replace the existing policy, and cannot be used to append * additional IAM settings. @@ -1779,16 +1813,12 @@ public final UnaryCallable getIamPolicyCallable() { *

+ Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be * sent only using the Cloud Platform Console. * - *

+ Membership changes that leave the project without any owners that have accepted the Terms - * of Service (ToS) will be rejected. - * *

+ If the project is not part of an organization, there must be at least one owner who has * accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove * the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy * projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be - * rejected until the lack of a ToS-accepting owner is rectified. - * - *

+ Calling this method requires enabling the App Engine Admin API. + * rejected until the lack of a ToS-accepting owner is rectified. If the project is part of an + * organization, you can remove all owners, potentially making the organization inaccessible. * *

Sample code: * @@ -1823,7 +1853,8 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the IAM access control policy for the specified project. + * Sets the IAM access control policy for the specified project, in the format + * `projects/{ProjectIdOrNumber}` e.g. projects/123. * *

CAUTION: This method will replace the existing policy, and cannot be used to append * additional IAM settings. @@ -1852,16 +1883,12 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) { *

+ Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be * sent only using the Cloud Platform Console. * - *

+ Membership changes that leave the project without any owners that have accepted the Terms - * of Service (ToS) will be rejected. - * *

+ If the project is not part of an organization, there must be at least one owner who has * accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove * the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy * projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be - * rejected until the lack of a ToS-accepting owner is rectified. - * - *

+ Calling this method requires enabling the App Engine Admin API. + * rejected until the lack of a ToS-accepting owner is rectified. If the project is part of an + * organization, you can remove all owners, potentially making the organization inaccessible. * *

Sample code: * @@ -1893,7 +1920,8 @@ public final Policy setIamPolicy(String resource, Policy policy) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the IAM access control policy for the specified project. + * Sets the IAM access control policy for the specified project, in the format + * `projects/{ProjectIdOrNumber}` e.g. projects/123. * *

CAUTION: This method will replace the existing policy, and cannot be used to append * additional IAM settings. @@ -1922,16 +1950,12 @@ public final Policy setIamPolicy(String resource, Policy policy) { *

+ Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be * sent only using the Cloud Platform Console. * - *

+ Membership changes that leave the project without any owners that have accepted the Terms - * of Service (ToS) will be rejected. - * *

+ If the project is not part of an organization, there must be at least one owner who has * accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove * the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy * projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be - * rejected until the lack of a ToS-accepting owner is rectified. - * - *

+ Calling this method requires enabling the App Engine Admin API. + * rejected until the lack of a ToS-accepting owner is rectified. If the project is part of an + * organization, you can remove all owners, potentially making the organization inaccessible. * *

Sample code: * @@ -1961,7 +1985,8 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the IAM access control policy for the specified project. + * Sets the IAM access control policy for the specified project, in the format + * `projects/{ProjectIdOrNumber}` e.g. projects/123. * *

CAUTION: This method will replace the existing policy, and cannot be used to append * additional IAM settings. @@ -1990,16 +2015,12 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { *

+ Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be * sent only using the Cloud Platform Console. * - *

+ Membership changes that leave the project without any owners that have accepted the Terms - * of Service (ToS) will be rejected. - * *

+ If the project is not part of an organization, there must be at least one owner who has * accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove * the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy * projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be - * rejected until the lack of a ToS-accepting owner is rectified. - * - *

+ Calling this method requires enabling the App Engine Admin API. + * rejected until the lack of a ToS-accepting owner is rectified. If the project is part of an + * organization, you can remove all owners, potentially making the organization inaccessible. * *

Sample code: * @@ -2028,7 +2049,8 @@ public final UnaryCallable setIamPolicyCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns permissions that a caller has on the specified project. + * Returns permissions that a caller has on the specified project, in the format + * `projects/{ProjectIdOrNumber}` e.g. projects/123.. * *

Sample code: * @@ -2065,7 +2087,8 @@ public final TestIamPermissionsResponse testIamPermissions( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns permissions that a caller has on the specified project. + * Returns permissions that a caller has on the specified project, in the format + * `projects/{ProjectIdOrNumber}` e.g. projects/123.. * *

Sample code: * @@ -2102,7 +2125,8 @@ public final TestIamPermissionsResponse testIamPermissions( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns permissions that a caller has on the specified project. + * Returns permissions that a caller has on the specified project, in the format + * `projects/{ProjectIdOrNumber}` e.g. projects/123.. * *

Sample code: * @@ -2131,7 +2155,8 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns permissions that a caller has on the specified project. + * Returns permissions that a caller has on the specified project, in the format + * `projects/{ProjectIdOrNumber}` e.g. projects/123.. * *

Sample code: * diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsClient.java index dd8bbd6800cd..534e4db7ad49 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsClient.java @@ -42,7 +42,7 @@ // AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Service Description: Allow users to create and manage TagBindings between TagValues and different - * cloud resources throughout the GCP resource hierarchy. + * Google Cloud resources throughout the GCP resource hierarchy. * *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: @@ -206,7 +206,7 @@ public final OperationsClient getHttpJsonOperationsClient() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists the TagBindings for the given cloud resource, as specified with `parent`. + * Lists the TagBindings for the given Google Cloud resource, as specified with `parent`. * *

NOTE: The `parent` field is expected to be a full resource name: * https://cloud.google.com/apis/design/resource_names#full_resource_name @@ -241,7 +241,7 @@ public final ListTagBindingsPagedResponse listTagBindings(ResourceName parent) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists the TagBindings for the given cloud resource, as specified with `parent`. + * Lists the TagBindings for the given Google Cloud resource, as specified with `parent`. * *

NOTE: The `parent` field is expected to be a full resource name: * https://cloud.google.com/apis/design/resource_names#full_resource_name @@ -273,7 +273,7 @@ public final ListTagBindingsPagedResponse listTagBindings(String parent) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists the TagBindings for the given cloud resource, as specified with `parent`. + * Lists the TagBindings for the given Google Cloud resource, as specified with `parent`. * *

NOTE: The `parent` field is expected to be a full resource name: * https://cloud.google.com/apis/design/resource_names#full_resource_name @@ -308,7 +308,7 @@ public final ListTagBindingsPagedResponse listTagBindings(ListTagBindingsRequest // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists the TagBindings for the given cloud resource, as specified with `parent`. + * Lists the TagBindings for the given Google Cloud resource, as specified with `parent`. * *

NOTE: The `parent` field is expected to be a full resource name: * https://cloud.google.com/apis/design/resource_names#full_resource_name @@ -344,7 +344,7 @@ public final ListTagBindingsPagedResponse listTagBindings(ListTagBindingsRequest // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists the TagBindings for the given cloud resource, as specified with `parent`. + * Lists the TagBindings for the given Google Cloud resource, as specified with `parent`. * *

NOTE: The `parent` field is expected to be a full resource name: * https://cloud.google.com/apis/design/resource_names#full_resource_name @@ -387,8 +387,7 @@ public final ListTagBindingsPagedResponse listTagBindings(ListTagBindingsRequest // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a TagBinding between a TagValue and a cloud resource (currently project, folder, or - * organization). + * Creates a TagBinding between a TagValue and a Google Cloud resource. * *

Sample code: * @@ -416,8 +415,7 @@ public final OperationFuture createTagBind // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a TagBinding between a TagValue and a cloud resource (currently project, folder, or - * organization). + * Creates a TagBinding between a TagValue and a Google Cloud resource. * *

Sample code: * @@ -447,8 +445,7 @@ public final OperationFuture createTagBind // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a TagBinding between a TagValue and a cloud resource (currently project, folder, or - * organization). + * Creates a TagBinding between a TagValue and a Google Cloud resource. * *

Sample code: * @@ -478,8 +475,7 @@ public final OperationFuture createTagBind // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a TagBinding between a TagValue and a cloud resource (currently project, folder, or - * organization). + * Creates a TagBinding between a TagValue and a Google Cloud resource. * *

Sample code: * @@ -650,6 +646,141 @@ public final UnaryCallable deleteTagBindingC return stub.deleteTagBindingCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Return a list of effective tags for the given Google Cloud resource, as specified in `parent`. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (EffectiveTag element : tagBindingsClient.listEffectiveTags(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The full resource name of a resource for which you want to list the + * effective tags. E.g. "//cloudresourcemanager.googleapis.com/projects/123" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEffectiveTagsPagedResponse listEffectiveTags(String parent) { + ListEffectiveTagsRequest request = + ListEffectiveTagsRequest.newBuilder().setParent(parent).build(); + return listEffectiveTags(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Return a list of effective tags for the given Google Cloud resource, as specified in `parent`. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+   *   ListEffectiveTagsRequest request =
+   *       ListEffectiveTagsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (EffectiveTag element : tagBindingsClient.listEffectiveTags(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEffectiveTagsPagedResponse listEffectiveTags(ListEffectiveTagsRequest request) { + return listEffectiveTagsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Return a list of effective tags for the given Google Cloud resource, as specified in `parent`. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+   *   ListEffectiveTagsRequest request =
+   *       ListEffectiveTagsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       tagBindingsClient.listEffectiveTagsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (EffectiveTag element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEffectiveTagsPagedCallable() { + return stub.listEffectiveTagsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Return a list of effective tags for the given Google Cloud resource, as specified in `parent`. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) {
+   *   ListEffectiveTagsRequest request =
+   *       ListEffectiveTagsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListEffectiveTagsResponse response =
+   *         tagBindingsClient.listEffectiveTagsCallable().call(request);
+   *     for (EffectiveTag element : response.getEffectiveTagsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEffectiveTagsCallable() { + return stub.listEffectiveTagsCallable(); + } + @Override public final void close() { stub.close(); @@ -756,4 +887,84 @@ protected ListTagBindingsFixedSizeCollection createCollection( return new ListTagBindingsFixedSizeCollection(pages, collectionSize); } } + + public static class ListEffectiveTagsPagedResponse + extends AbstractPagedListResponse< + ListEffectiveTagsRequest, + ListEffectiveTagsResponse, + EffectiveTag, + ListEffectiveTagsPage, + ListEffectiveTagsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListEffectiveTagsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListEffectiveTagsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListEffectiveTagsPagedResponse(ListEffectiveTagsPage page) { + super(page, ListEffectiveTagsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListEffectiveTagsPage + extends AbstractPage< + ListEffectiveTagsRequest, + ListEffectiveTagsResponse, + EffectiveTag, + ListEffectiveTagsPage> { + + private ListEffectiveTagsPage( + PageContext context, + ListEffectiveTagsResponse response) { + super(context, response); + } + + private static ListEffectiveTagsPage createEmptyPage() { + return new ListEffectiveTagsPage(null, null); + } + + @Override + protected ListEffectiveTagsPage createPage( + PageContext context, + ListEffectiveTagsResponse response) { + return new ListEffectiveTagsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListEffectiveTagsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListEffectiveTagsRequest, + ListEffectiveTagsResponse, + EffectiveTag, + ListEffectiveTagsPage, + ListEffectiveTagsFixedSizeCollection> { + + private ListEffectiveTagsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListEffectiveTagsFixedSizeCollection createEmptyCollection() { + return new ListEffectiveTagsFixedSizeCollection(null, 0); + } + + @Override + protected ListEffectiveTagsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListEffectiveTagsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsSettings.java index 7bb2b231857a..b9655988b169 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.resourcemanager.v3; +import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListEffectiveTagsPagedResponse; import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListTagBindingsPagedResponse; import com.google.api.core.ApiFunction; @@ -107,6 +108,13 @@ public UnaryCallSettings deleteTagBindingSet return ((TagBindingsStubSettings) getStubSettings()).deleteTagBindingOperationSettings(); } + /** Returns the object with the settings used for calls to listEffectiveTags. */ + public PagedCallSettings< + ListEffectiveTagsRequest, ListEffectiveTagsResponse, ListEffectiveTagsPagedResponse> + listEffectiveTagsSettings() { + return ((TagBindingsStubSettings) getStubSettings()).listEffectiveTagsSettings(); + } + public static final TagBindingsSettings create(TagBindingsStubSettings stub) throws IOException { return new TagBindingsSettings.Builder(stub.toBuilder()).build(); } @@ -253,6 +261,13 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().deleteTagBindingOperationSettings(); } + /** Returns the builder for the settings used for calls to listEffectiveTags. */ + public PagedCallSettings.Builder< + ListEffectiveTagsRequest, ListEffectiveTagsResponse, ListEffectiveTagsPagedResponse> + listEffectiveTagsSettings() { + return getStubSettingsBuilder().listEffectiveTagsSettings(); + } + @Override public TagBindingsSettings build() throws IOException { return new TagBindingsSettings(this); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsClient.java new file mode 100644 index 000000000000..9e8ffed1616e --- /dev/null +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsClient.java @@ -0,0 +1,780 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.resourcemanager.v3.stub.TagHoldsStub; +import com.google.cloud.resourcemanager.v3.stub.TagHoldsStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Allow users to create and manage TagHolds for TagValues. TagHolds represent + * the use of a Tag Value that is not captured by TagBindings but should still block TagValue + * deletion (such as a reference in a policy condition). This service provides isolated failure + * domains by cloud location so that TagHolds can be managed in the same location as their usage. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+ *   TagValueName parent = TagValueName.of("[TAG_VALUE]");
+ *   TagHold tagHold = TagHold.newBuilder().build();
+ *   TagHold response = tagHoldsClient.createTagHoldAsync(parent, tagHold).get();
+ * }
+ * }
+ * + *

Note: close() needs to be called on the TagHoldsClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of TagHoldsSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TagHoldsSettings tagHoldsSettings =
+ *     TagHoldsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * TagHoldsClient tagHoldsClient = TagHoldsClient.create(tagHoldsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TagHoldsSettings tagHoldsSettings =
+ *     TagHoldsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * TagHoldsClient tagHoldsClient = TagHoldsClient.create(tagHoldsSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TagHoldsSettings tagHoldsSettings = TagHoldsSettings.newHttpJsonBuilder().build();
+ * TagHoldsClient tagHoldsClient = TagHoldsClient.create(tagHoldsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class TagHoldsClient implements BackgroundResource { + private final TagHoldsSettings settings; + private final TagHoldsStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of TagHoldsClient with default settings. */ + public static final TagHoldsClient create() throws IOException { + return create(TagHoldsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of TagHoldsClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final TagHoldsClient create(TagHoldsSettings settings) throws IOException { + return new TagHoldsClient(settings); + } + + /** + * Constructs an instance of TagHoldsClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(TagHoldsSettings). + */ + public static final TagHoldsClient create(TagHoldsStub stub) { + return new TagHoldsClient(stub); + } + + /** + * Constructs an instance of TagHoldsClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected TagHoldsClient(TagHoldsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((TagHoldsStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected TagHoldsClient(TagHoldsStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final TagHoldsSettings getSettings() { + return settings; + } + + public TagHoldsStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same resource and origin exists + * under the same TagValue. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   TagValueName parent = TagValueName.of("[TAG_VALUE]");
+   *   TagHold tagHold = TagHold.newBuilder().build();
+   *   TagHold response = tagHoldsClient.createTagHoldAsync(parent, tagHold).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the TagHold's parent TagValue. Must be of the + * form: `tagValues/{tag-value-id}`. + * @param tagHold Required. The TagHold to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createTagHoldAsync( + TagValueName parent, TagHold tagHold) { + CreateTagHoldRequest request = + CreateTagHoldRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTagHold(tagHold) + .build(); + return createTagHoldAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same resource and origin exists + * under the same TagValue. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   String parent = TagValueName.of("[TAG_VALUE]").toString();
+   *   TagHold tagHold = TagHold.newBuilder().build();
+   *   TagHold response = tagHoldsClient.createTagHoldAsync(parent, tagHold).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the TagHold's parent TagValue. Must be of the + * form: `tagValues/{tag-value-id}`. + * @param tagHold Required. The TagHold to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createTagHoldAsync( + String parent, TagHold tagHold) { + CreateTagHoldRequest request = + CreateTagHoldRequest.newBuilder().setParent(parent).setTagHold(tagHold).build(); + return createTagHoldAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same resource and origin exists + * under the same TagValue. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   CreateTagHoldRequest request =
+   *       CreateTagHoldRequest.newBuilder()
+   *           .setParent(TagValueName.of("[TAG_VALUE]").toString())
+   *           .setTagHold(TagHold.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   TagHold response = tagHoldsClient.createTagHoldAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createTagHoldAsync( + CreateTagHoldRequest request) { + return createTagHoldOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same resource and origin exists + * under the same TagValue. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   CreateTagHoldRequest request =
+   *       CreateTagHoldRequest.newBuilder()
+   *           .setParent(TagValueName.of("[TAG_VALUE]").toString())
+   *           .setTagHold(TagHold.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       tagHoldsClient.createTagHoldOperationCallable().futureCall(request);
+   *   // Do something.
+   *   TagHold response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createTagHoldOperationCallable() { + return stub.createTagHoldOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same resource and origin exists + * under the same TagValue. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   CreateTagHoldRequest request =
+   *       CreateTagHoldRequest.newBuilder()
+   *           .setParent(TagValueName.of("[TAG_VALUE]").toString())
+   *           .setTagHold(TagHold.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future = tagHoldsClient.createTagHoldCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createTagHoldCallable() { + return stub.createTagHoldCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a TagHold. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   TagHoldName name = TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]");
+   *   tagHoldsClient.deleteTagHoldAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the TagHold to delete. Must be of the form: + * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteTagHoldAsync(TagHoldName name) { + DeleteTagHoldRequest request = + DeleteTagHoldRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteTagHoldAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a TagHold. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   String name = TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]").toString();
+   *   tagHoldsClient.deleteTagHoldAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the TagHold to delete. Must be of the form: + * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteTagHoldAsync(String name) { + DeleteTagHoldRequest request = DeleteTagHoldRequest.newBuilder().setName(name).build(); + return deleteTagHoldAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a TagHold. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   DeleteTagHoldRequest request =
+   *       DeleteTagHoldRequest.newBuilder()
+   *           .setName(TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]").toString())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   tagHoldsClient.deleteTagHoldAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteTagHoldAsync( + DeleteTagHoldRequest request) { + return deleteTagHoldOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a TagHold. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   DeleteTagHoldRequest request =
+   *       DeleteTagHoldRequest.newBuilder()
+   *           .setName(TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]").toString())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       tagHoldsClient.deleteTagHoldOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteTagHoldOperationCallable() { + return stub.deleteTagHoldOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a TagHold. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   DeleteTagHoldRequest request =
+   *       DeleteTagHoldRequest.newBuilder()
+   *           .setName(TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]").toString())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future = tagHoldsClient.deleteTagHoldCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteTagHoldCallable() { + return stub.deleteTagHoldCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TagHolds under a TagValue. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   TagValueName parent = TagValueName.of("[TAG_VALUE]");
+   *   for (TagHold element : tagHoldsClient.listTagHolds(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent TagValue. Must be of the form: + * `tagValues/{tag-value-id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTagHoldsPagedResponse listTagHolds(TagValueName parent) { + ListTagHoldsRequest request = + ListTagHoldsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTagHolds(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TagHolds under a TagValue. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   String parent = TagValueName.of("[TAG_VALUE]").toString();
+   *   for (TagHold element : tagHoldsClient.listTagHolds(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent TagValue. Must be of the form: + * `tagValues/{tag-value-id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTagHoldsPagedResponse listTagHolds(String parent) { + ListTagHoldsRequest request = ListTagHoldsRequest.newBuilder().setParent(parent).build(); + return listTagHolds(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TagHolds under a TagValue. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   ListTagHoldsRequest request =
+   *       ListTagHoldsRequest.newBuilder()
+   *           .setParent(TagValueName.of("[TAG_VALUE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (TagHold element : tagHoldsClient.listTagHolds(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTagHoldsPagedResponse listTagHolds(ListTagHoldsRequest request) { + return listTagHoldsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TagHolds under a TagValue. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   ListTagHoldsRequest request =
+   *       ListTagHoldsRequest.newBuilder()
+   *           .setParent(TagValueName.of("[TAG_VALUE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future = tagHoldsClient.listTagHoldsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (TagHold element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listTagHoldsPagedCallable() { + return stub.listTagHoldsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TagHolds under a TagValue. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+   *   ListTagHoldsRequest request =
+   *       ListTagHoldsRequest.newBuilder()
+   *           .setParent(TagValueName.of("[TAG_VALUE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListTagHoldsResponse response = tagHoldsClient.listTagHoldsCallable().call(request);
+   *     for (TagHold element : response.getTagHoldsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listTagHoldsCallable() { + return stub.listTagHoldsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListTagHoldsPagedResponse + extends AbstractPagedListResponse< + ListTagHoldsRequest, + ListTagHoldsResponse, + TagHold, + ListTagHoldsPage, + ListTagHoldsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTagHoldsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListTagHoldsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListTagHoldsPagedResponse(ListTagHoldsPage page) { + super(page, ListTagHoldsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTagHoldsPage + extends AbstractPage { + + private ListTagHoldsPage( + PageContext context, + ListTagHoldsResponse response) { + super(context, response); + } + + private static ListTagHoldsPage createEmptyPage() { + return new ListTagHoldsPage(null, null); + } + + @Override + protected ListTagHoldsPage createPage( + PageContext context, + ListTagHoldsResponse response) { + return new ListTagHoldsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTagHoldsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTagHoldsRequest, + ListTagHoldsResponse, + TagHold, + ListTagHoldsPage, + ListTagHoldsFixedSizeCollection> { + + private ListTagHoldsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTagHoldsFixedSizeCollection createEmptyCollection() { + return new ListTagHoldsFixedSizeCollection(null, 0); + } + + @Override + protected ListTagHoldsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTagHoldsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsSettings.java new file mode 100644 index 000000000000..ae4dfea7468a --- /dev/null +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsSettings.java @@ -0,0 +1,257 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3; + +import static com.google.cloud.resourcemanager.v3.TagHoldsClient.ListTagHoldsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.resourcemanager.v3.stub.TagHoldsStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link TagHoldsClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudresourcemanager.googleapis.com) and default port (443) + * are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createTagHold to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TagHoldsSettings.Builder tagHoldsSettingsBuilder = TagHoldsSettings.newBuilder();
+ * tagHoldsSettingsBuilder
+ *     .createTagHoldSettings()
+ *     .setRetrySettings(
+ *         tagHoldsSettingsBuilder
+ *             .createTagHoldSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * TagHoldsSettings tagHoldsSettings = tagHoldsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class TagHoldsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createTagHold. */ + public UnaryCallSettings createTagHoldSettings() { + return ((TagHoldsStubSettings) getStubSettings()).createTagHoldSettings(); + } + + /** Returns the object with the settings used for calls to createTagHold. */ + public OperationCallSettings + createTagHoldOperationSettings() { + return ((TagHoldsStubSettings) getStubSettings()).createTagHoldOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteTagHold. */ + public UnaryCallSettings deleteTagHoldSettings() { + return ((TagHoldsStubSettings) getStubSettings()).deleteTagHoldSettings(); + } + + /** Returns the object with the settings used for calls to deleteTagHold. */ + public OperationCallSettings + deleteTagHoldOperationSettings() { + return ((TagHoldsStubSettings) getStubSettings()).deleteTagHoldOperationSettings(); + } + + /** Returns the object with the settings used for calls to listTagHolds. */ + public PagedCallSettings + listTagHoldsSettings() { + return ((TagHoldsStubSettings) getStubSettings()).listTagHoldsSettings(); + } + + public static final TagHoldsSettings create(TagHoldsStubSettings stub) throws IOException { + return new TagHoldsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return TagHoldsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return TagHoldsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return TagHoldsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return TagHoldsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return TagHoldsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return TagHoldsStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return TagHoldsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return TagHoldsStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected TagHoldsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for TagHoldsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(TagHoldsStubSettings.newBuilder(clientContext)); + } + + protected Builder(TagHoldsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(TagHoldsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(TagHoldsStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(TagHoldsStubSettings.newHttpJsonBuilder()); + } + + public TagHoldsStubSettings.Builder getStubSettingsBuilder() { + return ((TagHoldsStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createTagHold. */ + public UnaryCallSettings.Builder createTagHoldSettings() { + return getStubSettingsBuilder().createTagHoldSettings(); + } + + /** Returns the builder for the settings used for calls to createTagHold. */ + public OperationCallSettings.Builder + createTagHoldOperationSettings() { + return getStubSettingsBuilder().createTagHoldOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTagHold. */ + public UnaryCallSettings.Builder deleteTagHoldSettings() { + return getStubSettingsBuilder().deleteTagHoldSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTagHold. */ + public OperationCallSettings.Builder + deleteTagHoldOperationSettings() { + return getStubSettingsBuilder().deleteTagHoldOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listTagHolds. */ + public PagedCallSettings.Builder< + ListTagHoldsRequest, ListTagHoldsResponse, ListTagHoldsPagedResponse> + listTagHoldsSettings() { + return getStubSettingsBuilder().listTagHoldsSettings(); + } + + @Override + public TagHoldsSettings build() throws IOException { + return new TagHoldsSettings(this); + } + } +} diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysClient.java index cdb7cb8313ba..95bf894d5803 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysClient.java @@ -475,10 +475,129 @@ public final UnaryCallable getTagKeyCallable() { return stub.getTagKeyCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a TagKey by its namespaced name. This method will return `PERMISSION_DENIED` if the + * key does not exist or the user does not have permission to view it. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagKeysClient tagKeysClient = TagKeysClient.create()) {
+   *   TagKeyName name = TagKeyName.of("[TAG_KEY]");
+   *   TagKey response = tagKeysClient.getNamespacedTagKey(name);
+   * }
+   * }
+ * + * @param name Required. A namespaced tag key name in the format `{parentId}/{tagKeyShort}`, such + * as `42/foo` for a key with short name "foo" under the organization with ID 42 or + * `r2-d2/bar` for a key with short name "bar" under the project `r2-d2`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagKey getNamespacedTagKey(TagKeyName name) { + GetNamespacedTagKeyRequest request = + GetNamespacedTagKeyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getNamespacedTagKey(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a TagKey by its namespaced name. This method will return `PERMISSION_DENIED` if the + * key does not exist or the user does not have permission to view it. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagKeysClient tagKeysClient = TagKeysClient.create()) {
+   *   String name = TagKeyName.of("[TAG_KEY]").toString();
+   *   TagKey response = tagKeysClient.getNamespacedTagKey(name);
+   * }
+   * }
+ * + * @param name Required. A namespaced tag key name in the format `{parentId}/{tagKeyShort}`, such + * as `42/foo` for a key with short name "foo" under the organization with ID 42 or + * `r2-d2/bar` for a key with short name "bar" under the project `r2-d2`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagKey getNamespacedTagKey(String name) { + GetNamespacedTagKeyRequest request = + GetNamespacedTagKeyRequest.newBuilder().setName(name).build(); + return getNamespacedTagKey(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a TagKey by its namespaced name. This method will return `PERMISSION_DENIED` if the + * key does not exist or the user does not have permission to view it. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagKeysClient tagKeysClient = TagKeysClient.create()) {
+   *   GetNamespacedTagKeyRequest request =
+   *       GetNamespacedTagKeyRequest.newBuilder()
+   *           .setName(TagKeyName.of("[TAG_KEY]").toString())
+   *           .build();
+   *   TagKey response = tagKeysClient.getNamespacedTagKey(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagKey getNamespacedTagKey(GetNamespacedTagKeyRequest request) { + return getNamespacedTagKeyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a TagKey by its namespaced name. This method will return `PERMISSION_DENIED` if the + * key does not exist or the user does not have permission to view it. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagKeysClient tagKeysClient = TagKeysClient.create()) {
+   *   GetNamespacedTagKeyRequest request =
+   *       GetNamespacedTagKeyRequest.newBuilder()
+   *           .setName(TagKeyName.of("[TAG_KEY]").toString())
+   *           .build();
+   *   ApiFuture future = tagKeysClient.getNamespacedTagKeyCallable().futureCall(request);
+   *   // Do something.
+   *   TagKey response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getNamespacedTagKeyCallable() { + return stub.getNamespacedTagKeyCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new TagKey. If another request with the same parameters is sent while the original - * request is in process, the second request will receive an error. A maximum of 300 TagKeys can + * request is in process, the second request will receive an error. A maximum of 1000 TagKeys can * exist under a parent at any given time. * *

Sample code: @@ -507,7 +626,7 @@ public final OperationFuture createTagKeyAsync(Tag // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new TagKey. If another request with the same parameters is sent while the original - * request is in process, the second request will receive an error. A maximum of 300 TagKeys can + * request is in process, the second request will receive an error. A maximum of 1000 TagKeys can * exist under a parent at any given time. * *

Sample code: @@ -539,7 +658,7 @@ public final OperationFuture createTagKeyAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new TagKey. If another request with the same parameters is sent while the original - * request is in process, the second request will receive an error. A maximum of 300 TagKeys can + * request is in process, the second request will receive an error. A maximum of 1000 TagKeys can * exist under a parent at any given time. * *

Sample code: @@ -571,7 +690,7 @@ public final OperationFuture createTagKeyAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new TagKey. If another request with the same parameters is sent while the original - * request is in process, the second request will receive an error. A maximum of 300 TagKeys can + * request is in process, the second request will receive an error. A maximum of 1000 TagKeys can * exist under a parent at any given time. * *

Sample code: @@ -619,7 +738,7 @@ public final UnaryCallable createTagKeyCallable( * * @param tagKey Required. The new definition of the TagKey. Only the `description` and `etag` * fields can be updated by this request. If the `etag` field is not empty, it must match the - * `etag` field of the existing tag key. Otherwise, `FAILED_PRECONDITION` will be returned. + * `etag` field of the existing tag key. Otherwise, `ABORTED` will be returned. * @param updateMask Fields to be updated. The mask may only contain `description` or `etag`. If * omitted entirely, both `description` and `etag` are assumed to be significant. * @throws com.google.api.gax.rpc.ApiException if the remote call fails diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysSettings.java index eb704cf4bb12..f56cc0bc10f0 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysSettings.java @@ -93,6 +93,11 @@ public UnaryCallSettings getTagKeySettings() { return ((TagKeysStubSettings) getStubSettings()).getTagKeySettings(); } + /** Returns the object with the settings used for calls to getNamespacedTagKey. */ + public UnaryCallSettings getNamespacedTagKeySettings() { + return ((TagKeysStubSettings) getStubSettings()).getNamespacedTagKeySettings(); + } + /** Returns the object with the settings used for calls to createTagKey. */ public UnaryCallSettings createTagKeySettings() { return ((TagKeysStubSettings) getStubSettings()).createTagKeySettings(); @@ -268,6 +273,12 @@ public UnaryCallSettings.Builder getTagKeySettings() { return getStubSettingsBuilder().getTagKeySettings(); } + /** Returns the builder for the settings used for calls to getNamespacedTagKey. */ + public UnaryCallSettings.Builder + getNamespacedTagKeySettings() { + return getStubSettingsBuilder().getNamespacedTagKeySettings(); + } + /** Returns the builder for the settings used for calls to createTagKey. */ public UnaryCallSettings.Builder createTagKeySettings() { return getStubSettingsBuilder().createTagKeySettings(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesClient.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesClient.java index 793f3f364563..bde301b343aa 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesClient.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesClient.java @@ -225,8 +225,7 @@ public final OperationsClient getHttpJsonOperationsClient() { * } * } * - * @param parent Required. Resource name for TagKey, parent of the TagValues to be listed, in the - * format `tagKeys/123`. + * @param parent Required. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTagValuesPagedResponse listTagValues(ResourceName parent) { @@ -257,8 +256,7 @@ public final ListTagValuesPagedResponse listTagValues(ResourceName parent) { * } * } * - * @param parent Required. Resource name for TagKey, parent of the TagValues to be listed, in the - * format `tagKeys/123`. + * @param parent Required. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTagValuesPagedResponse listTagValues(String parent) { @@ -370,8 +368,8 @@ public final UnaryCallable listTagV // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Retrieves TagValue. If the TagValue or namespaced name does not exist, or if the user does not - * have permission to view it, this method will return `PERMISSION_DENIED`. + * Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the value does not exist + * or the user does not have permission to view it. * *

Sample code: * @@ -398,8 +396,8 @@ public final TagValue getTagValue(TagValueName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Retrieves TagValue. If the TagValue or namespaced name does not exist, or if the user does not - * have permission to view it, this method will return `PERMISSION_DENIED`. + * Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the value does not exist + * or the user does not have permission to view it. * *

Sample code: * @@ -425,8 +423,8 @@ public final TagValue getTagValue(String name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Retrieves TagValue. If the TagValue or namespaced name does not exist, or if the user does not - * have permission to view it, this method will return `PERMISSION_DENIED`. + * Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the value does not exist + * or the user does not have permission to view it. * *

Sample code: * @@ -454,8 +452,8 @@ public final TagValue getTagValue(GetTagValueRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Retrieves TagValue. If the TagValue or namespaced name does not exist, or if the user does not - * have permission to view it, this method will return `PERMISSION_DENIED`. + * Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the value does not exist + * or the user does not have permission to view it. * *

Sample code: * @@ -480,11 +478,136 @@ public final UnaryCallable getTagValueCallable() { return stub.getTagValueCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a TagValue by its namespaced name. This method will return `PERMISSION_DENIED` if the + * value does not exist or the user does not have permission to view it. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagValuesClient tagValuesClient = TagValuesClient.create()) {
+   *   TagValueName name = TagValueName.of("[TAG_VALUE]");
+   *   TagValue response = tagValuesClient.getNamespacedTagValue(name);
+   * }
+   * }
+ * + * @param name Required. A namespaced tag value name in the following format: + *

`{parentId}/{tagKeyShort}/{tagValueShort}` + *

Examples: - `42/foo/abc` for a value with short name "abc" under the key with short name + * "foo" under the organization with ID 42 - `r2-d2/bar/xyz` for a value with short name "xyz" + * under the key with short name "bar" under the project with ID "r2-d2" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagValue getNamespacedTagValue(TagValueName name) { + GetNamespacedTagValueRequest request = + GetNamespacedTagValueRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getNamespacedTagValue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a TagValue by its namespaced name. This method will return `PERMISSION_DENIED` if the + * value does not exist or the user does not have permission to view it. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagValuesClient tagValuesClient = TagValuesClient.create()) {
+   *   String name = TagValueName.of("[TAG_VALUE]").toString();
+   *   TagValue response = tagValuesClient.getNamespacedTagValue(name);
+   * }
+   * }
+ * + * @param name Required. A namespaced tag value name in the following format: + *

`{parentId}/{tagKeyShort}/{tagValueShort}` + *

Examples: - `42/foo/abc` for a value with short name "abc" under the key with short name + * "foo" under the organization with ID 42 - `r2-d2/bar/xyz` for a value with short name "xyz" + * under the key with short name "bar" under the project with ID "r2-d2" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagValue getNamespacedTagValue(String name) { + GetNamespacedTagValueRequest request = + GetNamespacedTagValueRequest.newBuilder().setName(name).build(); + return getNamespacedTagValue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a TagValue by its namespaced name. This method will return `PERMISSION_DENIED` if the + * value does not exist or the user does not have permission to view it. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagValuesClient tagValuesClient = TagValuesClient.create()) {
+   *   GetNamespacedTagValueRequest request =
+   *       GetNamespacedTagValueRequest.newBuilder()
+   *           .setName(TagValueName.of("[TAG_VALUE]").toString())
+   *           .build();
+   *   TagValue response = tagValuesClient.getNamespacedTagValue(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TagValue getNamespacedTagValue(GetNamespacedTagValueRequest request) { + return getNamespacedTagValueCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a TagValue by its namespaced name. This method will return `PERMISSION_DENIED` if the + * value does not exist or the user does not have permission to view it. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TagValuesClient tagValuesClient = TagValuesClient.create()) {
+   *   GetNamespacedTagValueRequest request =
+   *       GetNamespacedTagValueRequest.newBuilder()
+   *           .setName(TagValueName.of("[TAG_VALUE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       tagValuesClient.getNamespacedTagValueCallable().futureCall(request);
+   *   // Do something.
+   *   TagValue response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getNamespacedTagValueCallable() { + return stub.getNamespacedTagValueCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a TagValue as a child of the specified TagKey. If a another request with the same * parameters is sent while the original request is in process the second request will receive an - * error. A maximum of 300 TagValues can exist under a TagKey at any given time. + * error. A maximum of 1000 TagValues can exist under a TagKey at any given time. * *

Sample code: * @@ -515,7 +638,7 @@ public final OperationFuture createTagValueAsy /** * Creates a TagValue as a child of the specified TagKey. If a another request with the same * parameters is sent while the original request is in process the second request will receive an - * error. A maximum of 300 TagValues can exist under a TagKey at any given time. + * error. A maximum of 1000 TagValues can exist under a TagKey at any given time. * *

Sample code: * @@ -547,7 +670,7 @@ public final OperationFuture createTagValueAsy /** * Creates a TagValue as a child of the specified TagKey. If a another request with the same * parameters is sent while the original request is in process the second request will receive an - * error. A maximum of 300 TagValues can exist under a TagKey at any given time. + * error. A maximum of 1000 TagValues can exist under a TagKey at any given time. * *

Sample code: * @@ -579,7 +702,7 @@ public final OperationFuture createTagValueAsy /** * Creates a TagValue as a child of the specified TagKey. If a another request with the same * parameters is sent while the original request is in process the second request will receive an - * error. A maximum of 300 TagValues can exist under a TagKey at any given time. + * error. A maximum of 1000 TagValues can exist under a TagKey at any given time. * *

Sample code: * @@ -626,8 +749,7 @@ public final UnaryCallable createTagValueCalla * * @param tagValue Required. The new definition of the TagValue. Only fields `description` and * `etag` fields can be updated by this request. If the `etag` field is nonempty, it must - * match the `etag` field of the existing ControlGroup. Otherwise, `FAILED_PRECONDITION` will - * be returned. + * match the `etag` field of the existing ControlGroup. Otherwise, `ABORTED` will be returned. * @param updateMask Optional. Fields to be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesSettings.java index b769500a1a74..569368dddd5a 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesSettings.java @@ -93,6 +93,11 @@ public UnaryCallSettings getTagValueSettings() { return ((TagValuesStubSettings) getStubSettings()).getTagValueSettings(); } + /** Returns the object with the settings used for calls to getNamespacedTagValue. */ + public UnaryCallSettings getNamespacedTagValueSettings() { + return ((TagValuesStubSettings) getStubSettings()).getNamespacedTagValueSettings(); + } + /** Returns the object with the settings used for calls to createTagValue. */ public UnaryCallSettings createTagValueSettings() { return ((TagValuesStubSettings) getStubSettings()).createTagValueSettings(); @@ -268,6 +273,12 @@ public UnaryCallSettings.Builder getTagValueSettin return getStubSettingsBuilder().getTagValueSettings(); } + /** Returns the builder for the settings used for calls to getNamespacedTagValue. */ + public UnaryCallSettings.Builder + getNamespacedTagValueSettings() { + return getStubSettingsBuilder().getNamespacedTagValueSettings(); + } + /** Returns the builder for the settings used for calls to createTagValue. */ public UnaryCallSettings.Builder createTagValueSettings() { return getStubSettingsBuilder().createTagValueSettings(); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/gapic_metadata.json b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/gapic_metadata.json index 87f00f3eda12..8bf6689725c7 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/gapic_metadata.json +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/gapic_metadata.json @@ -124,6 +124,9 @@ "DeleteTagBinding": { "methods": ["deleteTagBindingAsync", "deleteTagBindingAsync", "deleteTagBindingAsync", "deleteTagBindingOperationCallable", "deleteTagBindingCallable"] }, + "ListEffectiveTags": { + "methods": ["listEffectiveTags", "listEffectiveTags", "listEffectiveTagsPagedCallable", "listEffectiveTagsCallable"] + }, "ListTagBindings": { "methods": ["listTagBindings", "listTagBindings", "listTagBindings", "listTagBindingsPagedCallable", "listTagBindingsCallable"] } @@ -131,6 +134,24 @@ } } }, + "TagHolds": { + "clients": { + "grpc": { + "libraryClient": "TagHoldsClient", + "rpcs": { + "CreateTagHold": { + "methods": ["createTagHoldAsync", "createTagHoldAsync", "createTagHoldAsync", "createTagHoldOperationCallable", "createTagHoldCallable"] + }, + "DeleteTagHold": { + "methods": ["deleteTagHoldAsync", "deleteTagHoldAsync", "deleteTagHoldAsync", "deleteTagHoldOperationCallable", "deleteTagHoldCallable"] + }, + "ListTagHolds": { + "methods": ["listTagHolds", "listTagHolds", "listTagHolds", "listTagHoldsPagedCallable", "listTagHoldsCallable"] + } + } + } + } + }, "TagKeys": { "clients": { "grpc": { @@ -145,6 +166,9 @@ "GetIamPolicy": { "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] }, + "GetNamespacedTagKey": { + "methods": ["getNamespacedTagKey", "getNamespacedTagKey", "getNamespacedTagKey", "getNamespacedTagKeyCallable"] + }, "GetTagKey": { "methods": ["getTagKey", "getTagKey", "getTagKey", "getTagKeyCallable"] }, @@ -178,6 +202,9 @@ "GetIamPolicy": { "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] }, + "GetNamespacedTagValue": { + "methods": ["getNamespacedTagValue", "getNamespacedTagValue", "getNamespacedTagValue", "getNamespacedTagValueCallable"] + }, "GetTagValue": { "methods": ["getTagValue", "getTagValue", "getTagValue", "getTagValueCallable"] }, diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/package-info.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/package-info.java index b9dd156621a3..099832d1ff6d 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/package-info.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/package-info.java @@ -77,7 +77,7 @@ *

======================= TagBindingsClient ======================= * *

Service Description: Allow users to create and manage TagBindings between TagValues and - * different cloud resources throughout the GCP resource hierarchy. + * different Google Cloud resources throughout the GCP resource hierarchy. * *

Sample for TagBindingsClient: * @@ -95,6 +95,29 @@ * } * } * + *

======================= TagHoldsClient ======================= + * + *

Service Description: Allow users to create and manage TagHolds for TagValues. TagHolds + * represent the use of a Tag Value that is not captured by TagBindings but should still block + * TagValue deletion (such as a reference in a policy condition). This service provides isolated + * failure domains by cloud location so that TagHolds can be managed in the same location as their + * usage. + * + *

Sample for TagHoldsClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) {
+ *   TagValueName parent = TagValueName.of("[TAG_VALUE]");
+ *   TagHold tagHold = TagHold.newBuilder().build();
+ *   TagHold response = tagHoldsClient.createTagHoldAsync(parent, tagHold).get();
+ * }
+ * }
+ * *

======================= TagKeysClient ======================= * *

Service Description: Allow users to create and manage tag keys. diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagBindingsStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagBindingsStub.java index a2bc89172807..efa58982922d 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagBindingsStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagBindingsStub.java @@ -16,6 +16,7 @@ package com.google.cloud.resourcemanager.v3.stub; +import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListEffectiveTagsPagedResponse; import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListTagBindingsPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -29,6 +30,8 @@ import com.google.cloud.resourcemanager.v3.CreateTagBindingRequest; import com.google.cloud.resourcemanager.v3.DeleteTagBindingMetadata; import com.google.cloud.resourcemanager.v3.DeleteTagBindingRequest; +import com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest; +import com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse; import com.google.cloud.resourcemanager.v3.ListTagBindingsRequest; import com.google.cloud.resourcemanager.v3.ListTagBindingsResponse; import com.google.cloud.resourcemanager.v3.TagBinding; @@ -81,6 +84,17 @@ public class GrpcTagBindingsStub extends TagBindingsStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + listEffectiveTagsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.resourcemanager.v3.TagBindings/ListEffectiveTags") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEffectiveTagsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEffectiveTagsResponse.getDefaultInstance())) + .build(); + private final UnaryCallable listTagBindingsCallable; private final UnaryCallable @@ -91,6 +105,10 @@ public class GrpcTagBindingsStub extends TagBindingsStub { private final UnaryCallable deleteTagBindingCallable; private final OperationCallable deleteTagBindingOperationCallable; + private final UnaryCallable + listEffectiveTagsCallable; + private final UnaryCallable + listEffectiveTagsPagedCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -153,6 +171,11 @@ protected GrpcTagBindingsStub( return params.build(); }) .build(); + GrpcCallSettings + listEffectiveTagsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEffectiveTagsMethodDescriptor) + .build(); this.listTagBindingsCallable = callableFactory.createUnaryCallable( @@ -178,6 +201,16 @@ protected GrpcTagBindingsStub( settings.deleteTagBindingOperationSettings(), clientContext, operationsStub); + this.listEffectiveTagsCallable = + callableFactory.createUnaryCallable( + listEffectiveTagsTransportSettings, + settings.listEffectiveTagsSettings(), + clientContext); + this.listEffectiveTagsPagedCallable = + callableFactory.createPagedCallable( + listEffectiveTagsTransportSettings, + settings.listEffectiveTagsSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -220,6 +253,18 @@ public UnaryCallable deleteTagBindingCallabl return deleteTagBindingOperationCallable; } + @Override + public UnaryCallable + listEffectiveTagsCallable() { + return listEffectiveTagsCallable; + } + + @Override + public UnaryCallable + listEffectiveTagsPagedCallable() { + return listEffectiveTagsPagedCallable; + } + @Override public final void close() { try { diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagHoldsCallableFactory.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagHoldsCallableFactory.java new file mode 100644 index 000000000000..b5d9497eb36a --- /dev/null +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagHoldsCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the TagHolds service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcTagHoldsCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagHoldsStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagHoldsStub.java new file mode 100644 index 000000000000..68fb68a2a91a --- /dev/null +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagHoldsStub.java @@ -0,0 +1,263 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.stub; + +import static com.google.cloud.resourcemanager.v3.TagHoldsClient.ListTagHoldsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata; +import com.google.cloud.resourcemanager.v3.CreateTagHoldRequest; +import com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata; +import com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest; +import com.google.cloud.resourcemanager.v3.ListTagHoldsRequest; +import com.google.cloud.resourcemanager.v3.ListTagHoldsResponse; +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the TagHolds service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcTagHoldsStub extends TagHoldsStub { + private static final MethodDescriptor + createTagHoldMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.resourcemanager.v3.TagHolds/CreateTagHold") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateTagHoldRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteTagHoldMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.resourcemanager.v3.TagHolds/DeleteTagHold") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteTagHoldRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listTagHoldsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.resourcemanager.v3.TagHolds/ListTagHolds") + .setRequestMarshaller(ProtoUtils.marshaller(ListTagHoldsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTagHoldsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable createTagHoldCallable; + private final OperationCallable + createTagHoldOperationCallable; + private final UnaryCallable deleteTagHoldCallable; + private final OperationCallable + deleteTagHoldOperationCallable; + private final UnaryCallable listTagHoldsCallable; + private final UnaryCallable + listTagHoldsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcTagHoldsStub create(TagHoldsStubSettings settings) throws IOException { + return new GrpcTagHoldsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcTagHoldsStub create(ClientContext clientContext) throws IOException { + return new GrpcTagHoldsStub(TagHoldsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcTagHoldsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcTagHoldsStub( + TagHoldsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcTagHoldsStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcTagHoldsStub(TagHoldsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcTagHoldsCallableFactory()); + } + + /** + * Constructs an instance of GrpcTagHoldsStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcTagHoldsStub( + TagHoldsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createTagHoldTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTagHoldMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteTagHoldTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTagHoldMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listTagHoldsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTagHoldsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + + this.createTagHoldCallable = + callableFactory.createUnaryCallable( + createTagHoldTransportSettings, settings.createTagHoldSettings(), clientContext); + this.createTagHoldOperationCallable = + callableFactory.createOperationCallable( + createTagHoldTransportSettings, + settings.createTagHoldOperationSettings(), + clientContext, + operationsStub); + this.deleteTagHoldCallable = + callableFactory.createUnaryCallable( + deleteTagHoldTransportSettings, settings.deleteTagHoldSettings(), clientContext); + this.deleteTagHoldOperationCallable = + callableFactory.createOperationCallable( + deleteTagHoldTransportSettings, + settings.deleteTagHoldOperationSettings(), + clientContext, + operationsStub); + this.listTagHoldsCallable = + callableFactory.createUnaryCallable( + listTagHoldsTransportSettings, settings.listTagHoldsSettings(), clientContext); + this.listTagHoldsPagedCallable = + callableFactory.createPagedCallable( + listTagHoldsTransportSettings, settings.listTagHoldsSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createTagHoldCallable() { + return createTagHoldCallable; + } + + @Override + public OperationCallable + createTagHoldOperationCallable() { + return createTagHoldOperationCallable; + } + + @Override + public UnaryCallable deleteTagHoldCallable() { + return deleteTagHoldCallable; + } + + @Override + public OperationCallable + deleteTagHoldOperationCallable() { + return deleteTagHoldOperationCallable; + } + + @Override + public UnaryCallable listTagHoldsCallable() { + return listTagHoldsCallable; + } + + @Override + public UnaryCallable listTagHoldsPagedCallable() { + return listTagHoldsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagKeysStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagKeysStub.java index 457c79facf67..6f20d868cb9b 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagKeysStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagKeysStub.java @@ -29,6 +29,7 @@ import com.google.cloud.resourcemanager.v3.CreateTagKeyRequest; import com.google.cloud.resourcemanager.v3.DeleteTagKeyMetadata; import com.google.cloud.resourcemanager.v3.DeleteTagKeyRequest; +import com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest; import com.google.cloud.resourcemanager.v3.GetTagKeyRequest; import com.google.cloud.resourcemanager.v3.ListTagKeysRequest; import com.google.cloud.resourcemanager.v3.ListTagKeysResponse; @@ -75,6 +76,16 @@ public class GrpcTagKeysStub extends TagKeysStub { .setResponseMarshaller(ProtoUtils.marshaller(TagKey.getDefaultInstance())) .build(); + private static final MethodDescriptor + getNamespacedTagKeyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.resourcemanager.v3.TagKeys/GetNamespacedTagKey") + .setRequestMarshaller( + ProtoUtils.marshaller(GetNamespacedTagKeyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TagKey.getDefaultInstance())) + .build(); + private static final MethodDescriptor createTagKeyMethodDescriptor = MethodDescriptor.newBuilder() @@ -133,6 +144,7 @@ public class GrpcTagKeysStub extends TagKeysStub { private final UnaryCallable listTagKeysPagedCallable; private final UnaryCallable getTagKeyCallable; + private final UnaryCallable getNamespacedTagKeyCallable; private final UnaryCallable createTagKeyCallable; private final OperationCallable createTagKeyOperationCallable; @@ -200,6 +212,10 @@ protected GrpcTagKeysStub( return params.build(); }) .build(); + GrpcCallSettings getNamespacedTagKeyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNamespacedTagKeyMethodDescriptor) + .build(); GrpcCallSettings createTagKeyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createTagKeyMethodDescriptor) @@ -265,6 +281,11 @@ protected GrpcTagKeysStub( this.getTagKeyCallable = callableFactory.createUnaryCallable( getTagKeyTransportSettings, settings.getTagKeySettings(), clientContext); + this.getNamespacedTagKeyCallable = + callableFactory.createUnaryCallable( + getNamespacedTagKeyTransportSettings, + settings.getNamespacedTagKeySettings(), + clientContext); this.createTagKeyCallable = callableFactory.createUnaryCallable( createTagKeyTransportSettings, settings.createTagKeySettings(), clientContext); @@ -327,6 +348,11 @@ public UnaryCallable getTagKeyCallable() { return getTagKeyCallable; } + @Override + public UnaryCallable getNamespacedTagKeyCallable() { + return getNamespacedTagKeyCallable; + } + @Override public UnaryCallable createTagKeyCallable() { return createTagKeyCallable; diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagValuesStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagValuesStub.java index 20e9bfc4b2e6..e693eed95b5c 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagValuesStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/GrpcTagValuesStub.java @@ -29,6 +29,7 @@ import com.google.cloud.resourcemanager.v3.CreateTagValueRequest; import com.google.cloud.resourcemanager.v3.DeleteTagValueMetadata; import com.google.cloud.resourcemanager.v3.DeleteTagValueRequest; +import com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest; import com.google.cloud.resourcemanager.v3.GetTagValueRequest; import com.google.cloud.resourcemanager.v3.ListTagValuesRequest; import com.google.cloud.resourcemanager.v3.ListTagValuesResponse; @@ -76,6 +77,16 @@ public class GrpcTagValuesStub extends TagValuesStub { .setResponseMarshaller(ProtoUtils.marshaller(TagValue.getDefaultInstance())) .build(); + private static final MethodDescriptor + getNamespacedTagValueMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.resourcemanager.v3.TagValues/GetNamespacedTagValue") + .setRequestMarshaller( + ProtoUtils.marshaller(GetNamespacedTagValueRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TagValue.getDefaultInstance())) + .build(); + private static final MethodDescriptor createTagValueMethodDescriptor = MethodDescriptor.newBuilder() @@ -137,6 +148,7 @@ public class GrpcTagValuesStub extends TagValuesStub { private final UnaryCallable listTagValuesPagedCallable; private final UnaryCallable getTagValueCallable; + private final UnaryCallable getNamespacedTagValueCallable; private final UnaryCallable createTagValueCallable; private final OperationCallable createTagValueOperationCallable; @@ -206,6 +218,11 @@ protected GrpcTagValuesStub( return params.build(); }) .build(); + GrpcCallSettings + getNamespacedTagValueTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNamespacedTagValueMethodDescriptor) + .build(); GrpcCallSettings createTagValueTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createTagValueMethodDescriptor) @@ -271,6 +288,11 @@ protected GrpcTagValuesStub( this.getTagValueCallable = callableFactory.createUnaryCallable( getTagValueTransportSettings, settings.getTagValueSettings(), clientContext); + this.getNamespacedTagValueCallable = + callableFactory.createUnaryCallable( + getNamespacedTagValueTransportSettings, + settings.getNamespacedTagValueSettings(), + clientContext); this.createTagValueCallable = callableFactory.createUnaryCallable( createTagValueTransportSettings, settings.createTagValueSettings(), clientContext); @@ -334,6 +356,11 @@ public UnaryCallable getTagValueCallable() { return getTagValueCallable; } + @Override + public UnaryCallable getNamespacedTagValueCallable() { + return getNamespacedTagValueCallable; + } + @Override public UnaryCallable createTagValueCallable() { return createTagValueCallable; diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagBindingsStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagBindingsStub.java index 6114a5900325..975a05a012a5 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagBindingsStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagBindingsStub.java @@ -16,6 +16,7 @@ package com.google.cloud.resourcemanager.v3.stub; +import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListEffectiveTagsPagedResponse; import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListTagBindingsPagedResponse; import com.google.api.HttpRule; @@ -38,6 +39,8 @@ import com.google.cloud.resourcemanager.v3.CreateTagBindingRequest; import com.google.cloud.resourcemanager.v3.DeleteTagBindingMetadata; import com.google.cloud.resourcemanager.v3.DeleteTagBindingRequest; +import com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest; +import com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse; import com.google.cloud.resourcemanager.v3.ListTagBindingsRequest; import com.google.cloud.resourcemanager.v3.ListTagBindingsResponse; import com.google.cloud.resourcemanager.v3.TagBinding; @@ -184,6 +187,42 @@ public class HttpJsonTagBindingsStub extends TagBindingsStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + listEffectiveTagsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.resourcemanager.v3.TagBindings/ListEffectiveTags") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/effectiveTags", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "parent", request.getParent()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListEffectiveTagsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable listTagBindingsCallable; private final UnaryCallable @@ -194,6 +233,10 @@ public class HttpJsonTagBindingsStub extends TagBindingsStub { private final UnaryCallable deleteTagBindingCallable; private final OperationCallable deleteTagBindingOperationCallable; + private final UnaryCallable + listEffectiveTagsCallable; + private final UnaryCallable + listEffectiveTagsPagedCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; @@ -264,6 +307,12 @@ protected HttpJsonTagBindingsStub( .setMethodDescriptor(deleteTagBindingMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + listEffectiveTagsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listEffectiveTagsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); this.listTagBindingsCallable = callableFactory.createUnaryCallable( @@ -289,6 +338,16 @@ protected HttpJsonTagBindingsStub( settings.deleteTagBindingOperationSettings(), clientContext, httpJsonOperationsStub); + this.listEffectiveTagsCallable = + callableFactory.createUnaryCallable( + listEffectiveTagsTransportSettings, + settings.listEffectiveTagsSettings(), + clientContext); + this.listEffectiveTagsPagedCallable = + callableFactory.createPagedCallable( + listEffectiveTagsTransportSettings, + settings.listEffectiveTagsSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -300,6 +359,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(listTagBindingsMethodDescriptor); methodDescriptors.add(createTagBindingMethodDescriptor); methodDescriptors.add(deleteTagBindingMethodDescriptor); + methodDescriptors.add(listEffectiveTagsMethodDescriptor); return methodDescriptors; } @@ -340,6 +400,18 @@ public UnaryCallable deleteTagBindingCallabl return deleteTagBindingOperationCallable; } + @Override + public UnaryCallable + listEffectiveTagsCallable() { + return listEffectiveTagsCallable; + } + + @Override + public UnaryCallable + listEffectiveTagsPagedCallable() { + return listEffectiveTagsPagedCallable; + } + @Override public final void close() { try { diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagHoldsCallableFactory.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagHoldsCallableFactory.java new file mode 100644 index 000000000000..a0f2c2ad815e --- /dev/null +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagHoldsCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the TagHolds service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonTagHoldsCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagHoldsStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagHoldsStub.java new file mode 100644 index 000000000000..3f4810849475 --- /dev/null +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagHoldsStub.java @@ -0,0 +1,378 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.stub; + +import static com.google.cloud.resourcemanager.v3.TagHoldsClient.ListTagHoldsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata; +import com.google.cloud.resourcemanager.v3.CreateTagHoldRequest; +import com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata; +import com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest; +import com.google.cloud.resourcemanager.v3.ListTagHoldsRequest; +import com.google.cloud.resourcemanager.v3.ListTagHoldsResponse; +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the TagHolds service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonTagHoldsStub extends TagHoldsStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(CreateTagHoldMetadata.getDescriptor()) + .add(TagHold.getDescriptor()) + .add(DeleteTagHoldMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createTagHoldMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.resourcemanager.v3.TagHolds/CreateTagHold") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=tagValues/*}/tagHolds", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("tagHold", request.getTagHold(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateTagHoldRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteTagHoldMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.resourcemanager.v3.TagHolds/DeleteTagHold") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{name=tagValues/*/tagHolds/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteTagHoldRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listTagHoldsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.resourcemanager.v3.TagHolds/ListTagHolds") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=tagValues/*}/tagHolds", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListTagHoldsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createTagHoldCallable; + private final OperationCallable + createTagHoldOperationCallable; + private final UnaryCallable deleteTagHoldCallable; + private final OperationCallable + deleteTagHoldOperationCallable; + private final UnaryCallable listTagHoldsCallable; + private final UnaryCallable + listTagHoldsPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonTagHoldsStub create(TagHoldsStubSettings settings) + throws IOException { + return new HttpJsonTagHoldsStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonTagHoldsStub create(ClientContext clientContext) throws IOException { + return new HttpJsonTagHoldsStub( + TagHoldsStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonTagHoldsStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonTagHoldsStub( + TagHoldsStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonTagHoldsStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonTagHoldsStub(TagHoldsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonTagHoldsCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonTagHoldsStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonTagHoldsStub( + TagHoldsStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder().setGet("/v3/{name=operations/**}").build()) + .build()); + + HttpJsonCallSettings createTagHoldTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createTagHoldMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteTagHoldTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteTagHoldMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listTagHoldsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listTagHoldsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.createTagHoldCallable = + callableFactory.createUnaryCallable( + createTagHoldTransportSettings, settings.createTagHoldSettings(), clientContext); + this.createTagHoldOperationCallable = + callableFactory.createOperationCallable( + createTagHoldTransportSettings, + settings.createTagHoldOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteTagHoldCallable = + callableFactory.createUnaryCallable( + deleteTagHoldTransportSettings, settings.deleteTagHoldSettings(), clientContext); + this.deleteTagHoldOperationCallable = + callableFactory.createOperationCallable( + deleteTagHoldTransportSettings, + settings.deleteTagHoldOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listTagHoldsCallable = + callableFactory.createUnaryCallable( + listTagHoldsTransportSettings, settings.listTagHoldsSettings(), clientContext); + this.listTagHoldsPagedCallable = + callableFactory.createPagedCallable( + listTagHoldsTransportSettings, settings.listTagHoldsSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createTagHoldMethodDescriptor); + methodDescriptors.add(deleteTagHoldMethodDescriptor); + methodDescriptors.add(listTagHoldsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createTagHoldCallable() { + return createTagHoldCallable; + } + + @Override + public OperationCallable + createTagHoldOperationCallable() { + return createTagHoldOperationCallable; + } + + @Override + public UnaryCallable deleteTagHoldCallable() { + return deleteTagHoldCallable; + } + + @Override + public OperationCallable + deleteTagHoldOperationCallable() { + return deleteTagHoldOperationCallable; + } + + @Override + public UnaryCallable listTagHoldsCallable() { + return listTagHoldsCallable; + } + + @Override + public UnaryCallable listTagHoldsPagedCallable() { + return listTagHoldsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagKeysStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagKeysStub.java index fe2728c7a0f4..49890de0a9a7 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagKeysStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagKeysStub.java @@ -38,6 +38,7 @@ import com.google.cloud.resourcemanager.v3.CreateTagKeyRequest; import com.google.cloud.resourcemanager.v3.DeleteTagKeyMetadata; import com.google.cloud.resourcemanager.v3.DeleteTagKeyRequest; +import com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest; import com.google.cloud.resourcemanager.v3.GetTagKeyRequest; import com.google.cloud.resourcemanager.v3.ListTagKeysRequest; import com.google.cloud.resourcemanager.v3.ListTagKeysResponse; @@ -146,6 +147,40 @@ public class HttpJsonTagKeysStub extends TagKeysStub { .build()) .build(); + private static final ApiMethodDescriptor + getNamespacedTagKeyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.resourcemanager.v3.TagKeys/GetNamespacedTagKey") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/tagKeys/namespaced", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "name", request.getName()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TagKey.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor createTagKeyMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -386,6 +421,7 @@ public class HttpJsonTagKeysStub extends TagKeysStub { private final UnaryCallable listTagKeysPagedCallable; private final UnaryCallable getTagKeyCallable; + private final UnaryCallable getNamespacedTagKeyCallable; private final UnaryCallable createTagKeyCallable; private final OperationCallable createTagKeyOperationCallable; @@ -460,6 +496,11 @@ protected HttpJsonTagKeysStub( .setMethodDescriptor(getTagKeyMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings getNamespacedTagKeyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getNamespacedTagKeyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings createTagKeyTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createTagKeyMethodDescriptor) @@ -501,6 +542,11 @@ protected HttpJsonTagKeysStub( this.getTagKeyCallable = callableFactory.createUnaryCallable( getTagKeyTransportSettings, settings.getTagKeySettings(), clientContext); + this.getNamespacedTagKeyCallable = + callableFactory.createUnaryCallable( + getNamespacedTagKeyTransportSettings, + settings.getNamespacedTagKeySettings(), + clientContext); this.createTagKeyCallable = callableFactory.createUnaryCallable( createTagKeyTransportSettings, settings.createTagKeySettings(), clientContext); @@ -549,6 +595,7 @@ public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(listTagKeysMethodDescriptor); methodDescriptors.add(getTagKeyMethodDescriptor); + methodDescriptors.add(getNamespacedTagKeyMethodDescriptor); methodDescriptors.add(createTagKeyMethodDescriptor); methodDescriptors.add(updateTagKeyMethodDescriptor); methodDescriptors.add(deleteTagKeyMethodDescriptor); @@ -577,6 +624,11 @@ public UnaryCallable getTagKeyCallable() { return getTagKeyCallable; } + @Override + public UnaryCallable getNamespacedTagKeyCallable() { + return getNamespacedTagKeyCallable; + } + @Override public UnaryCallable createTagKeyCallable() { return createTagKeyCallable; diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagValuesStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagValuesStub.java index 45a3b57b1d9f..3350f51a584d 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagValuesStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/HttpJsonTagValuesStub.java @@ -38,6 +38,7 @@ import com.google.cloud.resourcemanager.v3.CreateTagValueRequest; import com.google.cloud.resourcemanager.v3.DeleteTagValueMetadata; import com.google.cloud.resourcemanager.v3.DeleteTagValueRequest; +import com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest; import com.google.cloud.resourcemanager.v3.GetTagValueRequest; import com.google.cloud.resourcemanager.v3.ListTagValuesRequest; import com.google.cloud.resourcemanager.v3.ListTagValuesResponse; @@ -147,6 +148,40 @@ public class HttpJsonTagValuesStub extends TagValuesStub { .build()) .build(); + private static final ApiMethodDescriptor + getNamespacedTagValueMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.resourcemanager.v3.TagValues/GetNamespacedTagValue") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/tagValues/namespaced", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "name", request.getName()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TagValue.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor createTagValueMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -387,6 +422,7 @@ public class HttpJsonTagValuesStub extends TagValuesStub { private final UnaryCallable listTagValuesPagedCallable; private final UnaryCallable getTagValueCallable; + private final UnaryCallable getNamespacedTagValueCallable; private final UnaryCallable createTagValueCallable; private final OperationCallable createTagValueOperationCallable; @@ -464,6 +500,12 @@ protected HttpJsonTagValuesStub( .setMethodDescriptor(getTagValueMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + getNamespacedTagValueTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getNamespacedTagValueMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings createTagValueTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createTagValueMethodDescriptor) @@ -505,6 +547,11 @@ protected HttpJsonTagValuesStub( this.getTagValueCallable = callableFactory.createUnaryCallable( getTagValueTransportSettings, settings.getTagValueSettings(), clientContext); + this.getNamespacedTagValueCallable = + callableFactory.createUnaryCallable( + getNamespacedTagValueTransportSettings, + settings.getNamespacedTagValueSettings(), + clientContext); this.createTagValueCallable = callableFactory.createUnaryCallable( createTagValueTransportSettings, settings.createTagValueSettings(), clientContext); @@ -553,6 +600,7 @@ public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(listTagValuesMethodDescriptor); methodDescriptors.add(getTagValueMethodDescriptor); + methodDescriptors.add(getNamespacedTagValueMethodDescriptor); methodDescriptors.add(createTagValueMethodDescriptor); methodDescriptors.add(updateTagValueMethodDescriptor); methodDescriptors.add(deleteTagValueMethodDescriptor); @@ -582,6 +630,11 @@ public UnaryCallable getTagValueCallable() { return getTagValueCallable; } + @Override + public UnaryCallable getNamespacedTagValueCallable() { + return getNamespacedTagValueCallable; + } + @Override public UnaryCallable createTagValueCallable() { return createTagValueCallable; diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStub.java index 2fccfb9f5e6e..2c0abd981450 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStub.java @@ -16,6 +16,7 @@ package com.google.cloud.resourcemanager.v3.stub; +import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListEffectiveTagsPagedResponse; import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListTagBindingsPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -25,6 +26,8 @@ import com.google.cloud.resourcemanager.v3.CreateTagBindingRequest; import com.google.cloud.resourcemanager.v3.DeleteTagBindingMetadata; import com.google.cloud.resourcemanager.v3.DeleteTagBindingRequest; +import com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest; +import com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse; import com.google.cloud.resourcemanager.v3.ListTagBindingsRequest; import com.google.cloud.resourcemanager.v3.ListTagBindingsResponse; import com.google.cloud.resourcemanager.v3.TagBinding; @@ -77,6 +80,16 @@ public UnaryCallable deleteTagBindingCallabl throw new UnsupportedOperationException("Not implemented: deleteTagBindingCallable()"); } + public UnaryCallable + listEffectiveTagsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEffectiveTagsPagedCallable()"); + } + + public UnaryCallable + listEffectiveTagsCallable() { + throw new UnsupportedOperationException("Not implemented: listEffectiveTagsCallable()"); + } + @Override public abstract void close(); } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStubSettings.java index 5a576dce738f..fcfab3bcb27f 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagBindingsStubSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.resourcemanager.v3.stub; +import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListEffectiveTagsPagedResponse; import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListTagBindingsPagedResponse; import com.google.api.core.ApiFunction; @@ -51,6 +52,9 @@ import com.google.cloud.resourcemanager.v3.CreateTagBindingRequest; import com.google.cloud.resourcemanager.v3.DeleteTagBindingMetadata; import com.google.cloud.resourcemanager.v3.DeleteTagBindingRequest; +import com.google.cloud.resourcemanager.v3.EffectiveTag; +import com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest; +import com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse; import com.google.cloud.resourcemanager.v3.ListTagBindingsRequest; import com.google.cloud.resourcemanager.v3.ListTagBindingsResponse; import com.google.cloud.resourcemanager.v3.TagBinding; @@ -121,6 +125,9 @@ public class TagBindingsStubSettings extends StubSettings deleteTagBindingSettings; private final OperationCallSettings deleteTagBindingOperationSettings; + private final PagedCallSettings< + ListEffectiveTagsRequest, ListEffectiveTagsResponse, ListEffectiveTagsPagedResponse> + listEffectiveTagsSettings; private static final PagedListDescriptor< ListTagBindingsRequest, ListTagBindingsResponse, TagBinding> @@ -161,6 +168,46 @@ public Iterable extractResources(ListTagBindingsResponse payload) { } }; + private static final PagedListDescriptor< + ListEffectiveTagsRequest, ListEffectiveTagsResponse, EffectiveTag> + LIST_EFFECTIVE_TAGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListEffectiveTagsRequest, ListEffectiveTagsResponse, EffectiveTag>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListEffectiveTagsRequest injectToken( + ListEffectiveTagsRequest payload, String token) { + return ListEffectiveTagsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListEffectiveTagsRequest injectPageSize( + ListEffectiveTagsRequest payload, int pageSize) { + return ListEffectiveTagsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListEffectiveTagsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListEffectiveTagsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListEffectiveTagsResponse payload) { + return payload.getEffectiveTagsList() == null + ? ImmutableList.of() + : payload.getEffectiveTagsList(); + } + }; + private static final PagedListResponseFactory< ListTagBindingsRequest, ListTagBindingsResponse, ListTagBindingsPagedResponse> LIST_TAG_BINDINGS_PAGE_STR_FACT = @@ -178,6 +225,27 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListEffectiveTagsRequest, ListEffectiveTagsResponse, ListEffectiveTagsPagedResponse> + LIST_EFFECTIVE_TAGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListEffectiveTagsRequest, + ListEffectiveTagsResponse, + ListEffectiveTagsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListEffectiveTagsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_EFFECTIVE_TAGS_PAGE_STR_DESC, request, context); + return ListEffectiveTagsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to listTagBindings. */ public PagedCallSettings< ListTagBindingsRequest, ListTagBindingsResponse, ListTagBindingsPagedResponse> @@ -207,6 +275,13 @@ public UnaryCallSettings deleteTagBindingSet return deleteTagBindingOperationSettings; } + /** Returns the object with the settings used for calls to listEffectiveTags. */ + public PagedCallSettings< + ListEffectiveTagsRequest, ListEffectiveTagsResponse, ListEffectiveTagsPagedResponse> + listEffectiveTagsSettings() { + return listEffectiveTagsSettings; + } + public TagBindingsStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -318,6 +393,7 @@ protected TagBindingsStubSettings(Builder settingsBuilder) throws IOException { createTagBindingOperationSettings = settingsBuilder.createTagBindingOperationSettings().build(); deleteTagBindingSettings = settingsBuilder.deleteTagBindingSettings().build(); deleteTagBindingOperationSettings = settingsBuilder.deleteTagBindingOperationSettings().build(); + listEffectiveTagsSettings = settingsBuilder.listEffectiveTagsSettings().build(); } /** Builder for TagBindingsStubSettings. */ @@ -336,6 +412,9 @@ public static class Builder extends StubSettings.Builder deleteTagBindingOperationSettings; + private final PagedCallSettings.Builder< + ListEffectiveTagsRequest, ListEffectiveTagsResponse, ListEffectiveTagsPagedResponse> + listEffectiveTagsSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -347,6 +426,7 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE))); definitions.put( "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -374,6 +454,8 @@ public static class Builder extends StubSettings.Builder>of( - listTagBindingsSettings, createTagBindingSettings, deleteTagBindingSettings); + listTagBindingsSettings, + createTagBindingSettings, + deleteTagBindingSettings, + listEffectiveTagsSettings); initDefaults(this); } @@ -404,10 +490,14 @@ protected Builder(TagBindingsStubSettings settings) { createTagBindingOperationSettings = settings.createTagBindingOperationSettings.toBuilder(); deleteTagBindingSettings = settings.deleteTagBindingSettings.toBuilder(); deleteTagBindingOperationSettings = settings.deleteTagBindingOperationSettings.toBuilder(); + listEffectiveTagsSettings = settings.listEffectiveTagsSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( - listTagBindingsSettings, createTagBindingSettings, deleteTagBindingSettings); + listTagBindingsSettings, + createTagBindingSettings, + deleteTagBindingSettings, + listEffectiveTagsSettings); } private static Builder createDefault() { @@ -452,6 +542,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .listEffectiveTagsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .createTagBindingOperationSettings() .setInitialCallSettings( @@ -554,6 +649,13 @@ public Builder applyToAllUnaryMethods( return deleteTagBindingOperationSettings; } + /** Returns the builder for the settings used for calls to listEffectiveTags. */ + public PagedCallSettings.Builder< + ListEffectiveTagsRequest, ListEffectiveTagsResponse, ListEffectiveTagsPagedResponse> + listEffectiveTagsSettings() { + return listEffectiveTagsSettings; + } + @Override public TagBindingsStubSettings build() throws IOException { return new TagBindingsStubSettings(this); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagHoldsStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagHoldsStub.java new file mode 100644 index 000000000000..62e812b00c6b --- /dev/null +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagHoldsStub.java @@ -0,0 +1,81 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.stub; + +import static com.google.cloud.resourcemanager.v3.TagHoldsClient.ListTagHoldsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata; +import com.google.cloud.resourcemanager.v3.CreateTagHoldRequest; +import com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata; +import com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest; +import com.google.cloud.resourcemanager.v3.ListTagHoldsRequest; +import com.google.cloud.resourcemanager.v3.ListTagHoldsResponse; +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the TagHolds service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class TagHoldsStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable + createTagHoldOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createTagHoldOperationCallable()"); + } + + public UnaryCallable createTagHoldCallable() { + throw new UnsupportedOperationException("Not implemented: createTagHoldCallable()"); + } + + public OperationCallable + deleteTagHoldOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTagHoldOperationCallable()"); + } + + public UnaryCallable deleteTagHoldCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTagHoldCallable()"); + } + + public UnaryCallable listTagHoldsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTagHoldsPagedCallable()"); + } + + public UnaryCallable listTagHoldsCallable() { + throw new UnsupportedOperationException("Not implemented: listTagHoldsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagHoldsStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagHoldsStubSettings.java new file mode 100644 index 000000000000..f7dfbadcae1a --- /dev/null +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagHoldsStubSettings.java @@ -0,0 +1,528 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.stub; + +import static com.google.cloud.resourcemanager.v3.TagHoldsClient.ListTagHoldsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata; +import com.google.cloud.resourcemanager.v3.CreateTagHoldRequest; +import com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata; +import com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest; +import com.google.cloud.resourcemanager.v3.ListTagHoldsRequest; +import com.google.cloud.resourcemanager.v3.ListTagHoldsResponse; +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link TagHoldsStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudresourcemanager.googleapis.com) and default port (443) + * are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createTagHold to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TagHoldsStubSettings.Builder tagHoldsSettingsBuilder = TagHoldsStubSettings.newBuilder();
+ * tagHoldsSettingsBuilder
+ *     .createTagHoldSettings()
+ *     .setRetrySettings(
+ *         tagHoldsSettingsBuilder
+ *             .createTagHoldSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * TagHoldsStubSettings tagHoldsSettings = tagHoldsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class TagHoldsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-platform.read-only") + .build(); + + private final UnaryCallSettings createTagHoldSettings; + private final OperationCallSettings + createTagHoldOperationSettings; + private final UnaryCallSettings deleteTagHoldSettings; + private final OperationCallSettings + deleteTagHoldOperationSettings; + private final PagedCallSettings< + ListTagHoldsRequest, ListTagHoldsResponse, ListTagHoldsPagedResponse> + listTagHoldsSettings; + + private static final PagedListDescriptor + LIST_TAG_HOLDS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTagHoldsRequest injectToken(ListTagHoldsRequest payload, String token) { + return ListTagHoldsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTagHoldsRequest injectPageSize(ListTagHoldsRequest payload, int pageSize) { + return ListTagHoldsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTagHoldsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTagHoldsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTagHoldsResponse payload) { + return payload.getTagHoldsList() == null + ? ImmutableList.of() + : payload.getTagHoldsList(); + } + }; + + private static final PagedListResponseFactory< + ListTagHoldsRequest, ListTagHoldsResponse, ListTagHoldsPagedResponse> + LIST_TAG_HOLDS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTagHoldsRequest, ListTagHoldsResponse, ListTagHoldsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTagHoldsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TAG_HOLDS_PAGE_STR_DESC, request, context); + return ListTagHoldsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createTagHold. */ + public UnaryCallSettings createTagHoldSettings() { + return createTagHoldSettings; + } + + /** Returns the object with the settings used for calls to createTagHold. */ + public OperationCallSettings + createTagHoldOperationSettings() { + return createTagHoldOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteTagHold. */ + public UnaryCallSettings deleteTagHoldSettings() { + return deleteTagHoldSettings; + } + + /** Returns the object with the settings used for calls to deleteTagHold. */ + public OperationCallSettings + deleteTagHoldOperationSettings() { + return deleteTagHoldOperationSettings; + } + + /** Returns the object with the settings used for calls to listTagHolds. */ + public PagedCallSettings + listTagHoldsSettings() { + return listTagHoldsSettings; + } + + public TagHoldsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcTagHoldsStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonTagHoldsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "cloudresourcemanager.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "cloudresourcemanager.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(TagHoldsStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(TagHoldsStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return TagHoldsStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected TagHoldsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createTagHoldSettings = settingsBuilder.createTagHoldSettings().build(); + createTagHoldOperationSettings = settingsBuilder.createTagHoldOperationSettings().build(); + deleteTagHoldSettings = settingsBuilder.deleteTagHoldSettings().build(); + deleteTagHoldOperationSettings = settingsBuilder.deleteTagHoldOperationSettings().build(); + listTagHoldsSettings = settingsBuilder.listTagHoldsSettings().build(); + } + + /** Builder for TagHoldsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createTagHoldSettings; + private final OperationCallSettings.Builder< + CreateTagHoldRequest, TagHold, CreateTagHoldMetadata> + createTagHoldOperationSettings; + private final UnaryCallSettings.Builder deleteTagHoldSettings; + private final OperationCallSettings.Builder + deleteTagHoldOperationSettings; + private final PagedCallSettings.Builder< + ListTagHoldsRequest, ListTagHoldsResponse, ListTagHoldsPagedResponse> + listTagHoldsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createTagHoldSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createTagHoldOperationSettings = OperationCallSettings.newBuilder(); + deleteTagHoldSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteTagHoldOperationSettings = OperationCallSettings.newBuilder(); + listTagHoldsSettings = PagedCallSettings.newBuilder(LIST_TAG_HOLDS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createTagHoldSettings, deleteTagHoldSettings, listTagHoldsSettings); + initDefaults(this); + } + + protected Builder(TagHoldsStubSettings settings) { + super(settings); + + createTagHoldSettings = settings.createTagHoldSettings.toBuilder(); + createTagHoldOperationSettings = settings.createTagHoldOperationSettings.toBuilder(); + deleteTagHoldSettings = settings.deleteTagHoldSettings.toBuilder(); + deleteTagHoldOperationSettings = settings.deleteTagHoldOperationSettings.toBuilder(); + listTagHoldsSettings = settings.listTagHoldsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createTagHoldSettings, deleteTagHoldSettings, listTagHoldsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createTagHoldSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteTagHoldSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listTagHoldsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createTagHoldOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(TagHold.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(CreateTagHoldMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteTagHoldOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteTagHoldMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createTagHold. */ + public UnaryCallSettings.Builder createTagHoldSettings() { + return createTagHoldSettings; + } + + /** Returns the builder for the settings used for calls to createTagHold. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createTagHoldOperationSettings() { + return createTagHoldOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteTagHold. */ + public UnaryCallSettings.Builder deleteTagHoldSettings() { + return deleteTagHoldSettings; + } + + /** Returns the builder for the settings used for calls to deleteTagHold. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteTagHoldOperationSettings() { + return deleteTagHoldOperationSettings; + } + + /** Returns the builder for the settings used for calls to listTagHolds. */ + public PagedCallSettings.Builder< + ListTagHoldsRequest, ListTagHoldsResponse, ListTagHoldsPagedResponse> + listTagHoldsSettings() { + return listTagHoldsSettings; + } + + @Override + public TagHoldsStubSettings build() throws IOException { + return new TagHoldsStubSettings(this); + } + } +} diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStub.java index bce7aff7a8c3..c3044970294a 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStub.java @@ -25,6 +25,7 @@ import com.google.cloud.resourcemanager.v3.CreateTagKeyRequest; import com.google.cloud.resourcemanager.v3.DeleteTagKeyMetadata; import com.google.cloud.resourcemanager.v3.DeleteTagKeyRequest; +import com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest; import com.google.cloud.resourcemanager.v3.GetTagKeyRequest; import com.google.cloud.resourcemanager.v3.ListTagKeysRequest; import com.google.cloud.resourcemanager.v3.ListTagKeysResponse; @@ -69,6 +70,10 @@ public UnaryCallable getTagKeyCallable() { throw new UnsupportedOperationException("Not implemented: getTagKeyCallable()"); } + public UnaryCallable getNamespacedTagKeyCallable() { + throw new UnsupportedOperationException("Not implemented: getNamespacedTagKeyCallable()"); + } + public OperationCallable createTagKeyOperationCallable() { throw new UnsupportedOperationException("Not implemented: createTagKeyOperationCallable()"); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStubSettings.java index 3b1ef1f1beca..bad92fc13540 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagKeysStubSettings.java @@ -51,6 +51,7 @@ import com.google.cloud.resourcemanager.v3.CreateTagKeyRequest; import com.google.cloud.resourcemanager.v3.DeleteTagKeyMetadata; import com.google.cloud.resourcemanager.v3.DeleteTagKeyRequest; +import com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest; import com.google.cloud.resourcemanager.v3.GetTagKeyRequest; import com.google.cloud.resourcemanager.v3.ListTagKeysRequest; import com.google.cloud.resourcemanager.v3.ListTagKeysResponse; @@ -121,6 +122,7 @@ public class TagKeysStubSettings extends StubSettings { private final PagedCallSettings listTagKeysSettings; private final UnaryCallSettings getTagKeySettings; + private final UnaryCallSettings getNamespacedTagKeySettings; private final UnaryCallSettings createTagKeySettings; private final OperationCallSettings createTagKeyOperationSettings; @@ -199,6 +201,11 @@ public UnaryCallSettings getTagKeySettings() { return getTagKeySettings; } + /** Returns the object with the settings used for calls to getNamespacedTagKey. */ + public UnaryCallSettings getNamespacedTagKeySettings() { + return getNamespacedTagKeySettings; + } + /** Returns the object with the settings used for calls to createTagKey. */ public UnaryCallSettings createTagKeySettings() { return createTagKeySettings; @@ -354,6 +361,7 @@ protected TagKeysStubSettings(Builder settingsBuilder) throws IOException { listTagKeysSettings = settingsBuilder.listTagKeysSettings().build(); getTagKeySettings = settingsBuilder.getTagKeySettings().build(); + getNamespacedTagKeySettings = settingsBuilder.getNamespacedTagKeySettings().build(); createTagKeySettings = settingsBuilder.createTagKeySettings().build(); createTagKeyOperationSettings = settingsBuilder.createTagKeyOperationSettings().build(); updateTagKeySettings = settingsBuilder.updateTagKeySettings().build(); @@ -372,6 +380,8 @@ public static class Builder extends StubSettings.Builder listTagKeysSettings; private final UnaryCallSettings.Builder getTagKeySettings; + private final UnaryCallSettings.Builder + getNamespacedTagKeySettings; private final UnaryCallSettings.Builder createTagKeySettings; private final OperationCallSettings.Builder createTagKeyOperationSettings; @@ -394,9 +404,9 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -416,6 +426,8 @@ public static class Builder extends StubSettings.Builder>of( listTagKeysSettings, getTagKeySettings, + getNamespacedTagKeySettings, createTagKeySettings, updateTagKeySettings, deleteTagKeySettings, @@ -466,6 +478,7 @@ protected Builder(TagKeysStubSettings settings) { listTagKeysSettings = settings.listTagKeysSettings.toBuilder(); getTagKeySettings = settings.getTagKeySettings.toBuilder(); + getNamespacedTagKeySettings = settings.getNamespacedTagKeySettings.toBuilder(); createTagKeySettings = settings.createTagKeySettings.toBuilder(); createTagKeyOperationSettings = settings.createTagKeyOperationSettings.toBuilder(); updateTagKeySettings = settings.updateTagKeySettings.toBuilder(); @@ -480,6 +493,7 @@ protected Builder(TagKeysStubSettings settings) { ImmutableList.>of( listTagKeysSettings, getTagKeySettings, + getNamespacedTagKeySettings, createTagKeySettings, updateTagKeySettings, deleteTagKeySettings, @@ -525,6 +539,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .getNamespacedTagKeySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .createTagKeySettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) @@ -657,6 +676,12 @@ public UnaryCallSettings.Builder getTagKeySettings() { return getTagKeySettings; } + /** Returns the builder for the settings used for calls to getNamespacedTagKey. */ + public UnaryCallSettings.Builder + getNamespacedTagKeySettings() { + return getNamespacedTagKeySettings; + } + /** Returns the builder for the settings used for calls to createTagKey. */ public UnaryCallSettings.Builder createTagKeySettings() { return createTagKeySettings; diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStub.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStub.java index 7bfa0f9bf1ac..7ec0544da54c 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStub.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStub.java @@ -25,6 +25,7 @@ import com.google.cloud.resourcemanager.v3.CreateTagValueRequest; import com.google.cloud.resourcemanager.v3.DeleteTagValueMetadata; import com.google.cloud.resourcemanager.v3.DeleteTagValueRequest; +import com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest; import com.google.cloud.resourcemanager.v3.GetTagValueRequest; import com.google.cloud.resourcemanager.v3.ListTagValuesRequest; import com.google.cloud.resourcemanager.v3.ListTagValuesResponse; @@ -70,6 +71,10 @@ public UnaryCallable getTagValueCallable() { throw new UnsupportedOperationException("Not implemented: getTagValueCallable()"); } + public UnaryCallable getNamespacedTagValueCallable() { + throw new UnsupportedOperationException("Not implemented: getNamespacedTagValueCallable()"); + } + public OperationCallable createTagValueOperationCallable() { throw new UnsupportedOperationException("Not implemented: createTagValueOperationCallable()"); diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStubSettings.java b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStubSettings.java index b6937fc8ccd2..1d4eaabf144c 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStubSettings.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/v3/stub/TagValuesStubSettings.java @@ -51,6 +51,7 @@ import com.google.cloud.resourcemanager.v3.CreateTagValueRequest; import com.google.cloud.resourcemanager.v3.DeleteTagValueMetadata; import com.google.cloud.resourcemanager.v3.DeleteTagValueRequest; +import com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest; import com.google.cloud.resourcemanager.v3.GetTagValueRequest; import com.google.cloud.resourcemanager.v3.ListTagValuesRequest; import com.google.cloud.resourcemanager.v3.ListTagValuesResponse; @@ -122,6 +123,8 @@ public class TagValuesStubSettings extends StubSettings { ListTagValuesRequest, ListTagValuesResponse, ListTagValuesPagedResponse> listTagValuesSettings; private final UnaryCallSettings getTagValueSettings; + private final UnaryCallSettings + getNamespacedTagValueSettings; private final UnaryCallSettings createTagValueSettings; private final OperationCallSettings createTagValueOperationSettings; @@ -200,6 +203,11 @@ public UnaryCallSettings getTagValueSettings() { return getTagValueSettings; } + /** Returns the object with the settings used for calls to getNamespacedTagValue. */ + public UnaryCallSettings getNamespacedTagValueSettings() { + return getNamespacedTagValueSettings; + } + /** Returns the object with the settings used for calls to createTagValue. */ public UnaryCallSettings createTagValueSettings() { return createTagValueSettings; @@ -355,6 +363,7 @@ protected TagValuesStubSettings(Builder settingsBuilder) throws IOException { listTagValuesSettings = settingsBuilder.listTagValuesSettings().build(); getTagValueSettings = settingsBuilder.getTagValueSettings().build(); + getNamespacedTagValueSettings = settingsBuilder.getNamespacedTagValueSettings().build(); createTagValueSettings = settingsBuilder.createTagValueSettings().build(); createTagValueOperationSettings = settingsBuilder.createTagValueOperationSettings().build(); updateTagValueSettings = settingsBuilder.updateTagValueSettings().build(); @@ -373,6 +382,8 @@ public static class Builder extends StubSettings.Builder listTagValuesSettings; private final UnaryCallSettings.Builder getTagValueSettings; + private final UnaryCallSettings.Builder + getNamespacedTagValueSettings; private final UnaryCallSettings.Builder createTagValueSettings; private final OperationCallSettings.Builder< @@ -401,9 +412,9 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -423,6 +434,8 @@ public static class Builder extends StubSettings.Builder>of( listTagValuesSettings, getTagValueSettings, + getNamespacedTagValueSettings, createTagValueSettings, updateTagValueSettings, deleteTagValueSettings, @@ -473,6 +486,7 @@ protected Builder(TagValuesStubSettings settings) { listTagValuesSettings = settings.listTagValuesSettings.toBuilder(); getTagValueSettings = settings.getTagValueSettings.toBuilder(); + getNamespacedTagValueSettings = settings.getNamespacedTagValueSettings.toBuilder(); createTagValueSettings = settings.createTagValueSettings.toBuilder(); createTagValueOperationSettings = settings.createTagValueOperationSettings.toBuilder(); updateTagValueSettings = settings.updateTagValueSettings.toBuilder(); @@ -487,6 +501,7 @@ protected Builder(TagValuesStubSettings settings) { ImmutableList.>of( listTagValuesSettings, getTagValueSettings, + getNamespacedTagValueSettings, createTagValueSettings, updateTagValueSettings, deleteTagValueSettings, @@ -532,6 +547,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .getNamespacedTagValueSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .createTagValueSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) @@ -664,6 +684,12 @@ public UnaryCallSettings.Builder getTagValueSettin return getTagValueSettings; } + /** Returns the builder for the settings used for calls to getNamespacedTagValue. */ + public UnaryCallSettings.Builder + getNamespacedTagValueSettings() { + return getNamespacedTagValueSettings; + } + /** Returns the builder for the settings used for calls to createTagValue. */ public UnaryCallSettings.Builder createTagValueSettings() { return createTagValueSettings; diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagBindingsImpl.java b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagBindingsImpl.java index d1005abe7a50..20598f78c393 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagBindingsImpl.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagBindingsImpl.java @@ -121,4 +121,26 @@ public void deleteTagBinding( Exception.class.getName()))); } } + + @Override + public void listEffectiveTags( + ListEffectiveTagsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListEffectiveTagsResponse) { + requests.add(request); + responseObserver.onNext(((ListEffectiveTagsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListEffectiveTags, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListEffectiveTagsResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagHolds.java b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagHolds.java new file mode 100644 index 000000000000..2eee03b47d15 --- /dev/null +++ b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagHolds.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockTagHolds implements MockGrpcService { + private final MockTagHoldsImpl serviceImpl; + + public MockTagHolds() { + serviceImpl = new MockTagHoldsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagHoldsImpl.java b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagHoldsImpl.java new file mode 100644 index 000000000000..fc0d4c642a7e --- /dev/null +++ b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagHoldsImpl.java @@ -0,0 +1,124 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3; + +import com.google.api.core.BetaApi; +import com.google.cloud.resourcemanager.v3.TagHoldsGrpc.TagHoldsImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockTagHoldsImpl extends TagHoldsImplBase { + private List requests; + private Queue responses; + + public MockTagHoldsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createTagHold( + CreateTagHoldRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateTagHold, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteTagHold( + DeleteTagHoldRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteTagHold, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listTagHolds( + ListTagHoldsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListTagHoldsResponse) { + requests.add(request); + responseObserver.onNext(((ListTagHoldsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTagHolds, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListTagHoldsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagKeysImpl.java b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagKeysImpl.java index 4ec2e06e08b9..cb0c6b3506b6 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagKeysImpl.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagKeysImpl.java @@ -105,6 +105,27 @@ public void getTagKey(GetTagKeyRequest request, StreamObserver responseO } } + @Override + public void getNamespacedTagKey( + GetNamespacedTagKeyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TagKey) { + requests.add(request); + responseObserver.onNext(((TagKey) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetNamespacedTagKey, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TagKey.class.getName(), + Exception.class.getName()))); + } + } + @Override public void createTagKey( CreateTagKeyRequest request, StreamObserver responseObserver) { diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagValuesImpl.java b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagValuesImpl.java index adbaff869fcd..de63710f3061 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagValuesImpl.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/MockTagValuesImpl.java @@ -105,6 +105,27 @@ public void getTagValue(GetTagValueRequest request, StreamObserver res } } + @Override + public void getNamespacedTagValue( + GetNamespacedTagValueRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TagValue) { + requests.add(request); + responseObserver.onNext(((TagValue) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetNamespacedTagValue, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TagValue.class.getName(), + Exception.class.getName()))); + } + } + @Override public void createTagValue( CreateTagValueRequest request, StreamObserver responseObserver) { diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagBindingsClientHttpJsonTest.java b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagBindingsClientHttpJsonTest.java index 314c2001fc77..78c2afa25904 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagBindingsClientHttpJsonTest.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagBindingsClientHttpJsonTest.java @@ -16,6 +16,7 @@ package com.google.cloud.resourcemanager.v3; +import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListEffectiveTagsPagedResponse; import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListTagBindingsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -187,6 +188,7 @@ public void createTagBindingTest() throws Exception { .setName(TagBindingName.of("[TAG_BINDING]").toString()) .setParent("parent-995424086") .setTagValue("tagValue-772697609") + .setTagValueNamespacedName("tagValueNamespacedName1718815339") .build(); Operation resultOperation = Operation.newBuilder() @@ -320,4 +322,54 @@ public void deleteTagBindingExceptionTest2() throws Exception { } catch (ExecutionException e) { } } + + @Test + public void listEffectiveTagsTest() throws Exception { + EffectiveTag responsesElement = EffectiveTag.newBuilder().build(); + ListEffectiveTagsResponse expectedResponse = + ListEffectiveTagsResponse.newBuilder() + .setNextPageToken("") + .addAllEffectiveTags(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListEffectiveTagsPagedResponse pagedListResponse = client.listEffectiveTags(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEffectiveTagsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listEffectiveTagsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listEffectiveTags(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagBindingsClientTest.java b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagBindingsClientTest.java index a4641443ffb4..3ed0c8310412 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagBindingsClientTest.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagBindingsClientTest.java @@ -16,6 +16,7 @@ package com.google.cloud.resourcemanager.v3; +import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListEffectiveTagsPagedResponse; import static com.google.cloud.resourcemanager.v3.TagBindingsClient.ListTagBindingsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -179,6 +180,7 @@ public void createTagBindingTest() throws Exception { .setName(TagBindingName.of("[TAG_BINDING]").toString()) .setParent("parent-995424086") .setTagValue("tagValue-772697609") + .setTagValueNamespacedName("tagValueNamespacedName1718815339") .build(); Operation resultOperation = Operation.newBuilder() @@ -303,4 +305,48 @@ public void deleteTagBindingExceptionTest2() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void listEffectiveTagsTest() throws Exception { + EffectiveTag responsesElement = EffectiveTag.newBuilder().build(); + ListEffectiveTagsResponse expectedResponse = + ListEffectiveTagsResponse.newBuilder() + .setNextPageToken("") + .addAllEffectiveTags(Arrays.asList(responsesElement)) + .build(); + mockTagBindings.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListEffectiveTagsPagedResponse pagedListResponse = client.listEffectiveTags(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEffectiveTagsList().get(0), resources.get(0)); + + List actualRequests = mockTagBindings.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEffectiveTagsRequest actualRequest = ((ListEffectiveTagsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEffectiveTagsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTagBindings.addException(exception); + + try { + String parent = "parent-995424086"; + client.listEffectiveTags(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagHoldsClientHttpJsonTest.java b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagHoldsClientHttpJsonTest.java new file mode 100644 index 000000000000..71ff067a2561 --- /dev/null +++ b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagHoldsClientHttpJsonTest.java @@ -0,0 +1,381 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3; + +import static com.google.cloud.resourcemanager.v3.TagHoldsClient.ListTagHoldsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.resourcemanager.v3.stub.HttpJsonTagHoldsStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class TagHoldsClientHttpJsonTest { + private static MockHttpService mockService; + private static TagHoldsClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonTagHoldsStub.getMethodDescriptors(), TagHoldsSettings.getDefaultEndpoint()); + TagHoldsSettings settings = + TagHoldsSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + TagHoldsSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = TagHoldsClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createTagHoldTest() throws Exception { + TagHold expectedResponse = + TagHold.newBuilder() + .setName(TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]").toString()) + .setHolder("holder-1211707988") + .setOrigin("origin-1008619738") + .setHelpLink("helpLink-790009125") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createTagHoldTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + TagValueName parent = TagValueName.of("[TAG_VALUE]"); + TagHold tagHold = TagHold.newBuilder().build(); + + TagHold actualResponse = client.createTagHoldAsync(parent, tagHold).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createTagHoldExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TagValueName parent = TagValueName.of("[TAG_VALUE]"); + TagHold tagHold = TagHold.newBuilder().build(); + client.createTagHoldAsync(parent, tagHold).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createTagHoldTest2() throws Exception { + TagHold expectedResponse = + TagHold.newBuilder() + .setName(TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]").toString()) + .setHolder("holder-1211707988") + .setOrigin("origin-1008619738") + .setHelpLink("helpLink-790009125") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createTagHoldTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "tagValues/tagValue-9277"; + TagHold tagHold = TagHold.newBuilder().build(); + + TagHold actualResponse = client.createTagHoldAsync(parent, tagHold).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createTagHoldExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "tagValues/tagValue-9277"; + TagHold tagHold = TagHold.newBuilder().build(); + client.createTagHoldAsync(parent, tagHold).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteTagHoldTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteTagHoldTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + TagHoldName name = TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]"); + + client.deleteTagHoldAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteTagHoldExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TagHoldName name = TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]"); + client.deleteTagHoldAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteTagHoldTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteTagHoldTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "tagValues/tagValue-3240/tagHolds/tagHold-3240"; + + client.deleteTagHoldAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteTagHoldExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "tagValues/tagValue-3240/tagHolds/tagHold-3240"; + client.deleteTagHoldAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listTagHoldsTest() throws Exception { + TagHold responsesElement = TagHold.newBuilder().build(); + ListTagHoldsResponse expectedResponse = + ListTagHoldsResponse.newBuilder() + .setNextPageToken("") + .addAllTagHolds(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + TagValueName parent = TagValueName.of("[TAG_VALUE]"); + + ListTagHoldsPagedResponse pagedListResponse = client.listTagHolds(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTagHoldsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listTagHoldsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TagValueName parent = TagValueName.of("[TAG_VALUE]"); + client.listTagHolds(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTagHoldsTest2() throws Exception { + TagHold responsesElement = TagHold.newBuilder().build(); + ListTagHoldsResponse expectedResponse = + ListTagHoldsResponse.newBuilder() + .setNextPageToken("") + .addAllTagHolds(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "tagValues/tagValue-9277"; + + ListTagHoldsPagedResponse pagedListResponse = client.listTagHolds(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTagHoldsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listTagHoldsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "tagValues/tagValue-9277"; + client.listTagHolds(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagHoldsClientTest.java b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagHoldsClientTest.java new file mode 100644 index 000000000000..0f7dd78bcf69 --- /dev/null +++ b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagHoldsClientTest.java @@ -0,0 +1,364 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3; + +import static com.google.cloud.resourcemanager.v3.TagHoldsClient.ListTagHoldsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class TagHoldsClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockTagHolds mockTagHolds; + private LocalChannelProvider channelProvider; + private TagHoldsClient client; + + @BeforeClass + public static void startStaticServer() { + mockTagHolds = new MockTagHolds(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockTagHolds)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + TagHoldsSettings settings = + TagHoldsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = TagHoldsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createTagHoldTest() throws Exception { + TagHold expectedResponse = + TagHold.newBuilder() + .setName(TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]").toString()) + .setHolder("holder-1211707988") + .setOrigin("origin-1008619738") + .setHelpLink("helpLink-790009125") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createTagHoldTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTagHolds.addResponse(resultOperation); + + TagValueName parent = TagValueName.of("[TAG_VALUE]"); + TagHold tagHold = TagHold.newBuilder().build(); + + TagHold actualResponse = client.createTagHoldAsync(parent, tagHold).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTagHolds.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTagHoldRequest actualRequest = ((CreateTagHoldRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(tagHold, actualRequest.getTagHold()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTagHoldExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTagHolds.addException(exception); + + try { + TagValueName parent = TagValueName.of("[TAG_VALUE]"); + TagHold tagHold = TagHold.newBuilder().build(); + client.createTagHoldAsync(parent, tagHold).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createTagHoldTest2() throws Exception { + TagHold expectedResponse = + TagHold.newBuilder() + .setName(TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]").toString()) + .setHolder("holder-1211707988") + .setOrigin("origin-1008619738") + .setHelpLink("helpLink-790009125") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createTagHoldTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTagHolds.addResponse(resultOperation); + + String parent = "parent-995424086"; + TagHold tagHold = TagHold.newBuilder().build(); + + TagHold actualResponse = client.createTagHoldAsync(parent, tagHold).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTagHolds.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTagHoldRequest actualRequest = ((CreateTagHoldRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(tagHold, actualRequest.getTagHold()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTagHoldExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTagHolds.addException(exception); + + try { + String parent = "parent-995424086"; + TagHold tagHold = TagHold.newBuilder().build(); + client.createTagHoldAsync(parent, tagHold).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteTagHoldTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteTagHoldTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTagHolds.addResponse(resultOperation); + + TagHoldName name = TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]"); + + client.deleteTagHoldAsync(name).get(); + + List actualRequests = mockTagHolds.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTagHoldRequest actualRequest = ((DeleteTagHoldRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteTagHoldExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTagHolds.addException(exception); + + try { + TagHoldName name = TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]"); + client.deleteTagHoldAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteTagHoldTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteTagHoldTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTagHolds.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteTagHoldAsync(name).get(); + + List actualRequests = mockTagHolds.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTagHoldRequest actualRequest = ((DeleteTagHoldRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteTagHoldExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTagHolds.addException(exception); + + try { + String name = "name3373707"; + client.deleteTagHoldAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listTagHoldsTest() throws Exception { + TagHold responsesElement = TagHold.newBuilder().build(); + ListTagHoldsResponse expectedResponse = + ListTagHoldsResponse.newBuilder() + .setNextPageToken("") + .addAllTagHolds(Arrays.asList(responsesElement)) + .build(); + mockTagHolds.addResponse(expectedResponse); + + TagValueName parent = TagValueName.of("[TAG_VALUE]"); + + ListTagHoldsPagedResponse pagedListResponse = client.listTagHolds(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTagHoldsList().get(0), resources.get(0)); + + List actualRequests = mockTagHolds.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTagHoldsRequest actualRequest = ((ListTagHoldsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTagHoldsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTagHolds.addException(exception); + + try { + TagValueName parent = TagValueName.of("[TAG_VALUE]"); + client.listTagHolds(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTagHoldsTest2() throws Exception { + TagHold responsesElement = TagHold.newBuilder().build(); + ListTagHoldsResponse expectedResponse = + ListTagHoldsResponse.newBuilder() + .setNextPageToken("") + .addAllTagHolds(Arrays.asList(responsesElement)) + .build(); + mockTagHolds.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListTagHoldsPagedResponse pagedListResponse = client.listTagHolds(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTagHoldsList().get(0), resources.get(0)); + + List actualRequests = mockTagHolds.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTagHoldsRequest actualRequest = ((ListTagHoldsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTagHoldsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTagHolds.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTagHolds(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagKeysClientHttpJsonTest.java b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagKeysClientHttpJsonTest.java index 15fdd068af1d..ee7ac4f9ac01 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagKeysClientHttpJsonTest.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagKeysClientHttpJsonTest.java @@ -42,6 +42,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.concurrent.ExecutionException; import javax.annotation.Generated; @@ -198,6 +199,8 @@ public void getTagKeyTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -249,6 +252,8 @@ public void getTagKeyTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -288,6 +293,112 @@ public void getTagKeyExceptionTest2() throws Exception { } } + @Test + public void getNamespacedTagKeyTest() throws Exception { + TagKey expectedResponse = + TagKey.newBuilder() + .setName(TagKeyName.of("[TAG_KEY]").toString()) + .setParent("parent-995424086") + .setShortName("shortName-2028219097") + .setNamespacedName("namespacedName-1877415788") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + TagKeyName name = TagKeyName.of("[TAG_KEY]"); + + TagKey actualResponse = client.getNamespacedTagKey(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNamespacedTagKeyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TagKeyName name = TagKeyName.of("[TAG_KEY]"); + client.getNamespacedTagKey(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNamespacedTagKeyTest2() throws Exception { + TagKey expectedResponse = + TagKey.newBuilder() + .setName(TagKeyName.of("[TAG_KEY]").toString()) + .setParent("parent-995424086") + .setShortName("shortName-2028219097") + .setNamespacedName("namespacedName-1877415788") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "name3373707"; + + TagKey actualResponse = client.getNamespacedTagKey(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNamespacedTagKeyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "name3373707"; + client.getNamespacedTagKey(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void createTagKeyTest() throws Exception { TagKey expectedResponse = @@ -300,6 +411,8 @@ public void createTagKeyTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() @@ -356,6 +469,8 @@ public void updateTagKeyTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() @@ -375,6 +490,8 @@ public void updateTagKeyTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -414,6 +531,8 @@ public void updateTagKeyExceptionTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateTagKeyAsync(tagKey, updateMask).get(); @@ -434,6 +553,8 @@ public void deleteTagKeyTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() @@ -490,6 +611,8 @@ public void deleteTagKeyTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagKeysClientTest.java b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagKeysClientTest.java index ca0b1d48dc98..1be8a44054c4 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagKeysClientTest.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagKeysClientTest.java @@ -45,6 +45,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import java.util.concurrent.ExecutionException; @@ -194,6 +195,8 @@ public void getTagKeyTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); mockTagKeys.addResponse(expectedResponse); @@ -239,6 +242,8 @@ public void getTagKeyTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); mockTagKeys.addResponse(expectedResponse); @@ -272,6 +277,100 @@ public void getTagKeyExceptionTest2() throws Exception { } } + @Test + public void getNamespacedTagKeyTest() throws Exception { + TagKey expectedResponse = + TagKey.newBuilder() + .setName(TagKeyName.of("[TAG_KEY]").toString()) + .setParent("parent-995424086") + .setShortName("shortName-2028219097") + .setNamespacedName("namespacedName-1877415788") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) + .build(); + mockTagKeys.addResponse(expectedResponse); + + TagKeyName name = TagKeyName.of("[TAG_KEY]"); + + TagKey actualResponse = client.getNamespacedTagKey(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTagKeys.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNamespacedTagKeyRequest actualRequest = ((GetNamespacedTagKeyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNamespacedTagKeyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTagKeys.addException(exception); + + try { + TagKeyName name = TagKeyName.of("[TAG_KEY]"); + client.getNamespacedTagKey(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNamespacedTagKeyTest2() throws Exception { + TagKey expectedResponse = + TagKey.newBuilder() + .setName(TagKeyName.of("[TAG_KEY]").toString()) + .setParent("parent-995424086") + .setShortName("shortName-2028219097") + .setNamespacedName("namespacedName-1877415788") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) + .build(); + mockTagKeys.addResponse(expectedResponse); + + String name = "name3373707"; + + TagKey actualResponse = client.getNamespacedTagKey(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTagKeys.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNamespacedTagKeyRequest actualRequest = ((GetNamespacedTagKeyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNamespacedTagKeyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTagKeys.addException(exception); + + try { + String name = "name3373707"; + client.getNamespacedTagKey(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void createTagKeyTest() throws Exception { TagKey expectedResponse = @@ -284,6 +383,8 @@ public void createTagKeyTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() @@ -337,6 +438,8 @@ public void updateTagKeyTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() @@ -393,6 +496,8 @@ public void deleteTagKeyTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() @@ -446,6 +551,8 @@ public void deleteTagKeyTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .setEtag("etag3123477") + .setPurpose(Purpose.forNumber(0)) + .putAllPurposeData(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagValuesClientHttpJsonTest.java b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagValuesClientHttpJsonTest.java index 63759066bfee..cffacb5dc92a 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagValuesClientHttpJsonTest.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagValuesClientHttpJsonTest.java @@ -288,6 +288,108 @@ public void getTagValueExceptionTest2() throws Exception { } } + @Test + public void getNamespacedTagValueTest() throws Exception { + TagValue expectedResponse = + TagValue.newBuilder() + .setName(TagValueName.of("[TAG_VALUE]").toString()) + .setParent("parent-995424086") + .setShortName("shortName-2028219097") + .setNamespacedName("namespacedName-1877415788") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockService.addResponse(expectedResponse); + + TagValueName name = TagValueName.of("[TAG_VALUE]"); + + TagValue actualResponse = client.getNamespacedTagValue(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNamespacedTagValueExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TagValueName name = TagValueName.of("[TAG_VALUE]"); + client.getNamespacedTagValue(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNamespacedTagValueTest2() throws Exception { + TagValue expectedResponse = + TagValue.newBuilder() + .setName(TagValueName.of("[TAG_VALUE]").toString()) + .setParent("parent-995424086") + .setShortName("shortName-2028219097") + .setNamespacedName("namespacedName-1877415788") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockService.addResponse(expectedResponse); + + String name = "name3373707"; + + TagValue actualResponse = client.getNamespacedTagValue(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getNamespacedTagValueExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "name3373707"; + client.getNamespacedTagValue(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void createTagValueTest() throws Exception { TagValue expectedResponse = diff --git a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagValuesClientTest.java b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagValuesClientTest.java index d35faaf84f99..42267b0605bb 100644 --- a/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagValuesClientTest.java +++ b/java-resourcemanager/google-cloud-resourcemanager/src/test/java/com/google/cloud/resourcemanager/v3/TagValuesClientTest.java @@ -272,6 +272,98 @@ public void getTagValueExceptionTest2() throws Exception { } } + @Test + public void getNamespacedTagValueTest() throws Exception { + TagValue expectedResponse = + TagValue.newBuilder() + .setName(TagValueName.of("[TAG_VALUE]").toString()) + .setParent("parent-995424086") + .setShortName("shortName-2028219097") + .setNamespacedName("namespacedName-1877415788") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockTagValues.addResponse(expectedResponse); + + TagValueName name = TagValueName.of("[TAG_VALUE]"); + + TagValue actualResponse = client.getNamespacedTagValue(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTagValues.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNamespacedTagValueRequest actualRequest = + ((GetNamespacedTagValueRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNamespacedTagValueExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTagValues.addException(exception); + + try { + TagValueName name = TagValueName.of("[TAG_VALUE]"); + client.getNamespacedTagValue(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNamespacedTagValueTest2() throws Exception { + TagValue expectedResponse = + TagValue.newBuilder() + .setName(TagValueName.of("[TAG_VALUE]").toString()) + .setParent("parent-995424086") + .setShortName("shortName-2028219097") + .setNamespacedName("namespacedName-1877415788") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockTagValues.addResponse(expectedResponse); + + String name = "name3373707"; + + TagValue actualResponse = client.getNamespacedTagValue(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTagValues.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNamespacedTagValueRequest actualRequest = + ((GetNamespacedTagValueRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNamespacedTagValueExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTagValues.addException(exception); + + try { + String name = "name3373707"; + client.getNamespacedTagValue(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void createTagValueTest() throws Exception { TagValue expectedResponse = diff --git a/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/FoldersGrpc.java b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/FoldersGrpc.java index 2890e95f802f..e1f4747ccd81 100644 --- a/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/FoldersGrpc.java +++ b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/FoldersGrpc.java @@ -660,7 +660,9 @@ default void createFolder( * Updates a folder, changing its `display_name`. * Changes to the folder `display_name` will be rejected if they violate * either the `display_name` formatting rules or the naming constraints - * described in the [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. + * described in the + * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + * documentation. * The folder's `display_name` must start and end with a letter or digit, * may contain letters, digits, spaces, hyphens and underscores and can be * between 3 and 30 characters. This is captured by the regular expression: @@ -697,9 +699,9 @@ default void updateFolder( * `FolderOperation` message as an aid to stateless clients. * Folder moves will be rejected if they violate either the naming, height, * or fanout constraints described in the - * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. - * The caller must have `resourcemanager.folders.move` permission on the - * folder's current and proposed new parent. + * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + * documentation. The caller must have `resourcemanager.folders.move` + * permission on the folder's current and proposed new parent. * */ default void moveFolder( @@ -713,11 +715,13 @@ default void moveFolder( * *
      * Requests deletion of a folder. The folder is moved into the
-     * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] state
-     * immediately, and is deleted approximately 30 days later. This method may
-     * only be called on an empty folder, where a folder is empty if it doesn't
-     * contain any folders or projects in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state.
-     * If called on a folder in [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
+     * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
+     * state immediately, and is deleted approximately 30 days later. This method
+     * may only be called on an empty folder, where a folder is empty if it
+     * doesn't contain any folders or projects in the
+     * [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. If
+     * called on a folder in
+     * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
      * state the operation will result in a no-op success.
      * The caller must have `resourcemanager.folders.delete` permission on the
      * identified folder.
@@ -735,14 +739,16 @@ default void deleteFolder(
      *
      * 
      * Cancels the deletion request for a folder. This method may be called on a
-     * folder in any state. If the folder is in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE]
-     * state the result will be a no-op success. In order to succeed, the folder's
-     * parent must be in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In addition,
-     * reintroducing the folder into the tree must not violate folder naming,
-     * height, and fanout constraints described in the
-     * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation.
-     * The caller must have `resourcemanager.folders.undelete` permission on the
-     * identified folder.
+     * folder in any state. If the folder is in the
+     * [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state the
+     * result will be a no-op success. In order to succeed, the folder's parent
+     * must be in the
+     * [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In
+     * addition, reintroducing the folder into the tree must not violate folder
+     * naming, height, and fanout constraints described in the
+     * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder]
+     * documentation. The caller must have `resourcemanager.folders.undelete`
+     * permission on the identified folder.
      * 
*/ default void undeleteFolder( @@ -950,7 +956,9 @@ public void createFolder( * Updates a folder, changing its `display_name`. * Changes to the folder `display_name` will be rejected if they violate * either the `display_name` formatting rules or the naming constraints - * described in the [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. + * described in the + * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + * documentation. * The folder's `display_name` must start and end with a letter or digit, * may contain letters, digits, spaces, hyphens and underscores and can be * between 3 and 30 characters. This is captured by the regular expression: @@ -989,9 +997,9 @@ public void updateFolder( * `FolderOperation` message as an aid to stateless clients. * Folder moves will be rejected if they violate either the naming, height, * or fanout constraints described in the - * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. - * The caller must have `resourcemanager.folders.move` permission on the - * folder's current and proposed new parent. + * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + * documentation. The caller must have `resourcemanager.folders.move` + * permission on the folder's current and proposed new parent. *
*/ public void moveFolder( @@ -1006,11 +1014,13 @@ public void moveFolder( * *
      * Requests deletion of a folder. The folder is moved into the
-     * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] state
-     * immediately, and is deleted approximately 30 days later. This method may
-     * only be called on an empty folder, where a folder is empty if it doesn't
-     * contain any folders or projects in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state.
-     * If called on a folder in [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
+     * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
+     * state immediately, and is deleted approximately 30 days later. This method
+     * may only be called on an empty folder, where a folder is empty if it
+     * doesn't contain any folders or projects in the
+     * [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. If
+     * called on a folder in
+     * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
      * state the operation will result in a no-op success.
      * The caller must have `resourcemanager.folders.delete` permission on the
      * identified folder.
@@ -1030,14 +1040,16 @@ public void deleteFolder(
      *
      * 
      * Cancels the deletion request for a folder. This method may be called on a
-     * folder in any state. If the folder is in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE]
-     * state the result will be a no-op success. In order to succeed, the folder's
-     * parent must be in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In addition,
-     * reintroducing the folder into the tree must not violate folder naming,
-     * height, and fanout constraints described in the
-     * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation.
-     * The caller must have `resourcemanager.folders.undelete` permission on the
-     * identified folder.
+     * folder in any state. If the folder is in the
+     * [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state the
+     * result will be a no-op success. In order to succeed, the folder's parent
+     * must be in the
+     * [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In
+     * addition, reintroducing the folder into the tree must not violate folder
+     * naming, height, and fanout constraints described in the
+     * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder]
+     * documentation. The caller must have `resourcemanager.folders.undelete`
+     * permission on the identified folder.
      * 
*/ public void undeleteFolder( @@ -1225,7 +1237,9 @@ public com.google.longrunning.Operation createFolder( * Updates a folder, changing its `display_name`. * Changes to the folder `display_name` will be rejected if they violate * either the `display_name` formatting rules or the naming constraints - * described in the [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. + * described in the + * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + * documentation. * The folder's `display_name` must start and end with a letter or digit, * may contain letters, digits, spaces, hyphens and underscores and can be * between 3 and 30 characters. This is captured by the regular expression: @@ -1261,9 +1275,9 @@ public com.google.longrunning.Operation updateFolder( * `FolderOperation` message as an aid to stateless clients. * Folder moves will be rejected if they violate either the naming, height, * or fanout constraints described in the - * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. - * The caller must have `resourcemanager.folders.move` permission on the - * folder's current and proposed new parent. + * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + * documentation. The caller must have `resourcemanager.folders.move` + * permission on the folder's current and proposed new parent. *
*/ public com.google.longrunning.Operation moveFolder( @@ -1277,11 +1291,13 @@ public com.google.longrunning.Operation moveFolder( * *
      * Requests deletion of a folder. The folder is moved into the
-     * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] state
-     * immediately, and is deleted approximately 30 days later. This method may
-     * only be called on an empty folder, where a folder is empty if it doesn't
-     * contain any folders or projects in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state.
-     * If called on a folder in [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
+     * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
+     * state immediately, and is deleted approximately 30 days later. This method
+     * may only be called on an empty folder, where a folder is empty if it
+     * doesn't contain any folders or projects in the
+     * [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. If
+     * called on a folder in
+     * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
      * state the operation will result in a no-op success.
      * The caller must have `resourcemanager.folders.delete` permission on the
      * identified folder.
@@ -1298,14 +1314,16 @@ public com.google.longrunning.Operation deleteFolder(
      *
      * 
      * Cancels the deletion request for a folder. This method may be called on a
-     * folder in any state. If the folder is in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE]
-     * state the result will be a no-op success. In order to succeed, the folder's
-     * parent must be in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In addition,
-     * reintroducing the folder into the tree must not violate folder naming,
-     * height, and fanout constraints described in the
-     * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation.
-     * The caller must have `resourcemanager.folders.undelete` permission on the
-     * identified folder.
+     * folder in any state. If the folder is in the
+     * [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state the
+     * result will be a no-op success. In order to succeed, the folder's parent
+     * must be in the
+     * [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In
+     * addition, reintroducing the folder into the tree must not violate folder
+     * naming, height, and fanout constraints described in the
+     * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder]
+     * documentation. The caller must have `resourcemanager.folders.undelete`
+     * permission on the identified folder.
      * 
*/ public com.google.longrunning.Operation undeleteFolder( @@ -1481,7 +1499,9 @@ protected FoldersFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c * Updates a folder, changing its `display_name`. * Changes to the folder `display_name` will be rejected if they violate * either the `display_name` formatting rules or the naming constraints - * described in the [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. + * described in the + * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + * documentation. * The folder's `display_name` must start and end with a letter or digit, * may contain letters, digits, spaces, hyphens and underscores and can be * between 3 and 30 characters. This is captured by the regular expression: @@ -1517,9 +1537,9 @@ protected FoldersFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c * `FolderOperation` message as an aid to stateless clients. * Folder moves will be rejected if they violate either the naming, height, * or fanout constraints described in the - * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. - * The caller must have `resourcemanager.folders.move` permission on the - * folder's current and proposed new parent. + * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + * documentation. The caller must have `resourcemanager.folders.move` + * permission on the folder's current and proposed new parent. *
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1533,11 +1553,13 @@ protected FoldersFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c * *
      * Requests deletion of a folder. The folder is moved into the
-     * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] state
-     * immediately, and is deleted approximately 30 days later. This method may
-     * only be called on an empty folder, where a folder is empty if it doesn't
-     * contain any folders or projects in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state.
-     * If called on a folder in [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
+     * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
+     * state immediately, and is deleted approximately 30 days later. This method
+     * may only be called on an empty folder, where a folder is empty if it
+     * doesn't contain any folders or projects in the
+     * [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. If
+     * called on a folder in
+     * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
      * state the operation will result in a no-op success.
      * The caller must have `resourcemanager.folders.delete` permission on the
      * identified folder.
@@ -1554,14 +1576,16 @@ protected FoldersFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c
      *
      * 
      * Cancels the deletion request for a folder. This method may be called on a
-     * folder in any state. If the folder is in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE]
-     * state the result will be a no-op success. In order to succeed, the folder's
-     * parent must be in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In addition,
-     * reintroducing the folder into the tree must not violate folder naming,
-     * height, and fanout constraints described in the
-     * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation.
-     * The caller must have `resourcemanager.folders.undelete` permission on the
-     * identified folder.
+     * folder in any state. If the folder is in the
+     * [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state the
+     * result will be a no-op success. In order to succeed, the folder's parent
+     * must be in the
+     * [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In
+     * addition, reintroducing the folder into the tree must not violate folder
+     * naming, height, and fanout constraints described in the
+     * [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder]
+     * documentation. The caller must have `resourcemanager.folders.undelete`
+     * permission on the identified folder.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture diff --git a/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsGrpc.java b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsGrpc.java index b931538eba7f..0a47d81d3b0b 100644 --- a/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsGrpc.java +++ b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ProjectsGrpc.java @@ -667,9 +667,11 @@ default void updateProject( * move workflow. * Upon success, the `Operation.response` field will be populated with the * moved project. - * The caller must have `resourcemanager.projects.update` permission on the - * project and have `resourcemanager.projects.move` permission on the - * project's current and proposed new parent. + * The caller must have `resourcemanager.projects.move` permission on the + * project, on the project's current and proposed new parent. + * If project has no current parent, or it currently does not have an + * associated organization resource, you will also need the + * `resourcemanager.projects.setIamPolicy` permission in the project. *
*/ default void moveProject( @@ -689,7 +691,8 @@ default void moveProject( * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE]. * This method changes the Project's lifecycle state from * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] - * to [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. + * to + * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. * The deletion starts at an unspecified time, * at which point the Project is no longer accessible. * Until the deletion completes, you can check the lifecycle state @@ -743,7 +746,8 @@ default void undeleteProject( * * *
-     * Returns the IAM access control policy for the specified project.
+     * Returns the IAM access control policy for the specified project, in the
+     * format `projects/{ProjectIdOrNumber}` e.g. projects/123.
      * Permission is denied if the policy or the resource do not exist.
      * 
*/ @@ -758,7 +762,8 @@ default void getIamPolicy( * * *
-     * Sets the IAM access control policy for the specified project.
+     * Sets the IAM access control policy for the specified project, in the
+     * format `projects/{ProjectIdOrNumber}` e.g. projects/123.
      * CAUTION: This method will replace the existing policy, and cannot be used
      * to append additional IAM settings.
      * Note: Removing service accounts from policies or changing their roles can
@@ -781,16 +786,14 @@ default void getIamPolicy(
      * + Invitations to grant the owner role cannot be sent using
      * `setIamPolicy()`;
      * they must be sent only using the Cloud Platform Console.
-     * + Membership changes that leave the project without any owners that have
-     * accepted the Terms of Service (ToS) will be rejected.
      * + If the project is not part of an organization, there must be at least
      * one owner who has accepted the Terms of Service (ToS) agreement in the
      * policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner
      * from the policy will fail. This restriction also applies to legacy
      * projects that no longer have owners who have accepted the ToS. Edits to
      * IAM policies will be rejected until the lack of a ToS-accepting owner is
-     * rectified.
-     * + Calling this method requires enabling the App Engine Admin API.
+     * rectified. If the project is part of an organization, you can remove all
+     * owners, potentially making the organization inaccessible.
      * 
*/ default void setIamPolicy( @@ -804,7 +807,8 @@ default void setIamPolicy( * * *
-     * Returns permissions that a caller has on the specified project.
+     * Returns permissions that a caller has on the specified project, in the
+     * format `projects/{ProjectIdOrNumber}` e.g. projects/123..
      * 
*/ default void testIamPermissions( @@ -961,9 +965,11 @@ public void updateProject( * move workflow. * Upon success, the `Operation.response` field will be populated with the * moved project. - * The caller must have `resourcemanager.projects.update` permission on the - * project and have `resourcemanager.projects.move` permission on the - * project's current and proposed new parent. + * The caller must have `resourcemanager.projects.move` permission on the + * project, on the project's current and proposed new parent. + * If project has no current parent, or it currently does not have an + * associated organization resource, you will also need the + * `resourcemanager.projects.setIamPolicy` permission in the project. * */ public void moveProject( @@ -985,7 +991,8 @@ public void moveProject( * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE]. * This method changes the Project's lifecycle state from * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] - * to [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. + * to + * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. * The deletion starts at an unspecified time, * at which point the Project is no longer accessible. * Until the deletion completes, you can check the lifecycle state @@ -1043,7 +1050,8 @@ public void undeleteProject( * * *
-     * Returns the IAM access control policy for the specified project.
+     * Returns the IAM access control policy for the specified project, in the
+     * format `projects/{ProjectIdOrNumber}` e.g. projects/123.
      * Permission is denied if the policy or the resource do not exist.
      * 
*/ @@ -1060,7 +1068,8 @@ public void getIamPolicy( * * *
-     * Sets the IAM access control policy for the specified project.
+     * Sets the IAM access control policy for the specified project, in the
+     * format `projects/{ProjectIdOrNumber}` e.g. projects/123.
      * CAUTION: This method will replace the existing policy, and cannot be used
      * to append additional IAM settings.
      * Note: Removing service accounts from policies or changing their roles can
@@ -1083,16 +1092,14 @@ public void getIamPolicy(
      * + Invitations to grant the owner role cannot be sent using
      * `setIamPolicy()`;
      * they must be sent only using the Cloud Platform Console.
-     * + Membership changes that leave the project without any owners that have
-     * accepted the Terms of Service (ToS) will be rejected.
      * + If the project is not part of an organization, there must be at least
      * one owner who has accepted the Terms of Service (ToS) agreement in the
      * policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner
      * from the policy will fail. This restriction also applies to legacy
      * projects that no longer have owners who have accepted the ToS. Edits to
      * IAM policies will be rejected until the lack of a ToS-accepting owner is
-     * rectified.
-     * + Calling this method requires enabling the App Engine Admin API.
+     * rectified. If the project is part of an organization, you can remove all
+     * owners, potentially making the organization inaccessible.
      * 
*/ public void setIamPolicy( @@ -1108,7 +1115,8 @@ public void setIamPolicy( * * *
-     * Returns permissions that a caller has on the specified project.
+     * Returns permissions that a caller has on the specified project, in the
+     * format `projects/{ProjectIdOrNumber}` e.g. projects/123..
      * 
*/ public void testIamPermissions( @@ -1238,9 +1246,11 @@ public com.google.longrunning.Operation updateProject( * move workflow. * Upon success, the `Operation.response` field will be populated with the * moved project. - * The caller must have `resourcemanager.projects.update` permission on the - * project and have `resourcemanager.projects.move` permission on the - * project's current and proposed new parent. + * The caller must have `resourcemanager.projects.move` permission on the + * project, on the project's current and proposed new parent. + * If project has no current parent, or it currently does not have an + * associated organization resource, you will also need the + * `resourcemanager.projects.setIamPolicy` permission in the project. * */ public com.google.longrunning.Operation moveProject( @@ -1259,7 +1269,8 @@ public com.google.longrunning.Operation moveProject( * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE]. * This method changes the Project's lifecycle state from * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] - * to [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. + * to + * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. * The deletion starts at an unspecified time, * at which point the Project is no longer accessible. * Until the deletion completes, you can check the lifecycle state @@ -1311,7 +1322,8 @@ public com.google.longrunning.Operation undeleteProject( * * *
-     * Returns the IAM access control policy for the specified project.
+     * Returns the IAM access control policy for the specified project, in the
+     * format `projects/{ProjectIdOrNumber}` e.g. projects/123.
      * Permission is denied if the policy or the resource do not exist.
      * 
*/ @@ -1324,7 +1336,8 @@ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyReque * * *
-     * Sets the IAM access control policy for the specified project.
+     * Sets the IAM access control policy for the specified project, in the
+     * format `projects/{ProjectIdOrNumber}` e.g. projects/123.
      * CAUTION: This method will replace the existing policy, and cannot be used
      * to append additional IAM settings.
      * Note: Removing service accounts from policies or changing their roles can
@@ -1347,16 +1360,14 @@ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyReque
      * + Invitations to grant the owner role cannot be sent using
      * `setIamPolicy()`;
      * they must be sent only using the Cloud Platform Console.
-     * + Membership changes that leave the project without any owners that have
-     * accepted the Terms of Service (ToS) will be rejected.
      * + If the project is not part of an organization, there must be at least
      * one owner who has accepted the Terms of Service (ToS) agreement in the
      * policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner
      * from the policy will fail. This restriction also applies to legacy
      * projects that no longer have owners who have accepted the ToS. Edits to
      * IAM policies will be rejected until the lack of a ToS-accepting owner is
-     * rectified.
-     * + Calling this method requires enabling the App Engine Admin API.
+     * rectified. If the project is part of an organization, you can remove all
+     * owners, potentially making the organization inaccessible.
      * 
*/ public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { @@ -1368,7 +1379,8 @@ public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyReque * * *
-     * Returns permissions that a caller has on the specified project.
+     * Returns permissions that a caller has on the specified project, in the
+     * format `projects/{ProjectIdOrNumber}` e.g. projects/123..
      * 
*/ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( @@ -1497,9 +1509,11 @@ protected ProjectsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * move workflow. * Upon success, the `Operation.response` field will be populated with the * moved project. - * The caller must have `resourcemanager.projects.update` permission on the - * project and have `resourcemanager.projects.move` permission on the - * project's current and proposed new parent. + * The caller must have `resourcemanager.projects.move` permission on the + * project, on the project's current and proposed new parent. + * If project has no current parent, or it currently does not have an + * associated organization resource, you will also need the + * `resourcemanager.projects.setIamPolicy` permission in the project. * */ public com.google.common.util.concurrent.ListenableFuture @@ -1518,7 +1532,8 @@ protected ProjectsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE]. * This method changes the Project's lifecycle state from * [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] - * to [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. + * to + * [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. * The deletion starts at an unspecified time, * at which point the Project is no longer accessible. * Until the deletion completes, you can check the lifecycle state @@ -1570,7 +1585,8 @@ protected ProjectsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * * *
-     * Returns the IAM access control policy for the specified project.
+     * Returns the IAM access control policy for the specified project, in the
+     * format `projects/{ProjectIdOrNumber}` e.g. projects/123.
      * Permission is denied if the policy or the resource do not exist.
      * 
*/ @@ -1584,7 +1600,8 @@ protected ProjectsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * * *
-     * Sets the IAM access control policy for the specified project.
+     * Sets the IAM access control policy for the specified project, in the
+     * format `projects/{ProjectIdOrNumber}` e.g. projects/123.
      * CAUTION: This method will replace the existing policy, and cannot be used
      * to append additional IAM settings.
      * Note: Removing service accounts from policies or changing their roles can
@@ -1607,16 +1624,14 @@ protected ProjectsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions
      * + Invitations to grant the owner role cannot be sent using
      * `setIamPolicy()`;
      * they must be sent only using the Cloud Platform Console.
-     * + Membership changes that leave the project without any owners that have
-     * accepted the Terms of Service (ToS) will be rejected.
      * + If the project is not part of an organization, there must be at least
      * one owner who has accepted the Terms of Service (ToS) agreement in the
      * policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner
      * from the policy will fail. This restriction also applies to legacy
      * projects that no longer have owners who have accepted the ToS. Edits to
      * IAM policies will be rejected until the lack of a ToS-accepting owner is
-     * rectified.
-     * + Calling this method requires enabling the App Engine Admin API.
+     * rectified. If the project is part of an organization, you can remove all
+     * owners, potentially making the organization inaccessible.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1629,7 +1644,8 @@ protected ProjectsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * * *
-     * Returns permissions that a caller has on the specified project.
+     * Returns permissions that a caller has on the specified project, in the
+     * format `projects/{ProjectIdOrNumber}` e.g. projects/123..
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< diff --git a/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsGrpc.java b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsGrpc.java index 11eea9524182..b44b99fb976c 100644 --- a/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsGrpc.java +++ b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsGrpc.java @@ -22,7 +22,7 @@ * *
  * Allow users to create and manage TagBindings between TagValues and
- * different cloud resources throughout the GCP resource hierarchy.
+ * different Google Cloud resources throughout the GCP resource hierarchy.
  * 
*/ @javax.annotation.Generated( @@ -175,6 +175,53 @@ private TagBindingsGrpc() {} return getDeleteTagBindingMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest, + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse> + getListEffectiveTagsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEffectiveTags", + requestType = com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest.class, + responseType = com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest, + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse> + getListEffectiveTagsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest, + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse> + getListEffectiveTagsMethod; + if ((getListEffectiveTagsMethod = TagBindingsGrpc.getListEffectiveTagsMethod) == null) { + synchronized (TagBindingsGrpc.class) { + if ((getListEffectiveTagsMethod = TagBindingsGrpc.getListEffectiveTagsMethod) == null) { + TagBindingsGrpc.getListEffectiveTagsMethod = + getListEffectiveTagsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEffectiveTags")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new TagBindingsMethodDescriptorSupplier("ListEffectiveTags")) + .build(); + } + } + } + return getListEffectiveTagsMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static TagBindingsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -220,7 +267,7 @@ public TagBindingsFutureStub newStub( * *
    * Allow users to create and manage TagBindings between TagValues and
-   * different cloud resources throughout the GCP resource hierarchy.
+   * different Google Cloud resources throughout the GCP resource hierarchy.
    * 
*/ public interface AsyncService { @@ -229,8 +276,8 @@ public interface AsyncService { * * *
-     * Lists the TagBindings for the given cloud resource, as specified with
-     * `parent`.
+     * Lists the TagBindings for the given Google Cloud resource, as specified
+     * with `parent`.
      * NOTE: The `parent` field is expected to be a full resource name:
      * https://cloud.google.com/apis/design/resource_names#full_resource_name
      * 
@@ -247,8 +294,7 @@ default void listTagBindings( * * *
-     * Creates a TagBinding between a TagValue and a cloud resource
-     * (currently project, folder, or organization).
+     * Creates a TagBinding between a TagValue and a Google Cloud resource.
      * 
*/ default void createTagBinding( @@ -271,6 +317,22 @@ default void deleteTagBinding( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getDeleteTagBindingMethod(), responseObserver); } + + /** + * + * + *
+     * Return a list of effective tags for the given Google Cloud resource, as
+     * specified in `parent`.
+     * 
+ */ + default void listEffectiveTags( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListEffectiveTagsMethod(), responseObserver); + } } /** @@ -278,7 +340,7 @@ default void deleteTagBinding( * *
    * Allow users to create and manage TagBindings between TagValues and
-   * different cloud resources throughout the GCP resource hierarchy.
+   * different Google Cloud resources throughout the GCP resource hierarchy.
    * 
*/ public abstract static class TagBindingsImplBase @@ -295,7 +357,7 @@ public final io.grpc.ServerServiceDefinition bindService() { * *
    * Allow users to create and manage TagBindings between TagValues and
-   * different cloud resources throughout the GCP resource hierarchy.
+   * different Google Cloud resources throughout the GCP resource hierarchy.
    * 
*/ public static final class TagBindingsStub @@ -313,8 +375,8 @@ protected TagBindingsStub build(io.grpc.Channel channel, io.grpc.CallOptions cal * * *
-     * Lists the TagBindings for the given cloud resource, as specified with
-     * `parent`.
+     * Lists the TagBindings for the given Google Cloud resource, as specified
+     * with `parent`.
      * NOTE: The `parent` field is expected to be a full resource name:
      * https://cloud.google.com/apis/design/resource_names#full_resource_name
      * 
@@ -333,8 +395,7 @@ public void listTagBindings( * * *
-     * Creates a TagBinding between a TagValue and a cloud resource
-     * (currently project, folder, or organization).
+     * Creates a TagBinding between a TagValue and a Google Cloud resource.
      * 
*/ public void createTagBinding( @@ -361,6 +422,24 @@ public void deleteTagBinding( request, responseObserver); } + + /** + * + * + *
+     * Return a list of effective tags for the given Google Cloud resource, as
+     * specified in `parent`.
+     * 
+ */ + public void listEffectiveTags( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListEffectiveTagsMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -368,7 +447,7 @@ public void deleteTagBinding( * *
    * Allow users to create and manage TagBindings between TagValues and
-   * different cloud resources throughout the GCP resource hierarchy.
+   * different Google Cloud resources throughout the GCP resource hierarchy.
    * 
*/ public static final class TagBindingsBlockingStub @@ -387,8 +466,8 @@ protected TagBindingsBlockingStub build( * * *
-     * Lists the TagBindings for the given cloud resource, as specified with
-     * `parent`.
+     * Lists the TagBindings for the given Google Cloud resource, as specified
+     * with `parent`.
      * NOTE: The `parent` field is expected to be a full resource name:
      * https://cloud.google.com/apis/design/resource_names#full_resource_name
      * 
@@ -403,8 +482,7 @@ public com.google.cloud.resourcemanager.v3.ListTagBindingsResponse listTagBindin * * *
-     * Creates a TagBinding between a TagValue and a cloud resource
-     * (currently project, folder, or organization).
+     * Creates a TagBinding between a TagValue and a Google Cloud resource.
      * 
*/ public com.google.longrunning.Operation createTagBinding( @@ -425,6 +503,20 @@ public com.google.longrunning.Operation deleteTagBinding( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteTagBindingMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Return a list of effective tags for the given Google Cloud resource, as
+     * specified in `parent`.
+     * 
+ */ + public com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse listEffectiveTags( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListEffectiveTagsMethod(), getCallOptions(), request); + } } /** @@ -432,7 +524,7 @@ public com.google.longrunning.Operation deleteTagBinding( * *
    * Allow users to create and manage TagBindings between TagValues and
-   * different cloud resources throughout the GCP resource hierarchy.
+   * different Google Cloud resources throughout the GCP resource hierarchy.
    * 
*/ public static final class TagBindingsFutureStub @@ -451,8 +543,8 @@ protected TagBindingsFutureStub build( * * *
-     * Lists the TagBindings for the given cloud resource, as specified with
-     * `parent`.
+     * Lists the TagBindings for the given Google Cloud resource, as specified
+     * with `parent`.
      * NOTE: The `parent` field is expected to be a full resource name:
      * https://cloud.google.com/apis/design/resource_names#full_resource_name
      * 
@@ -468,8 +560,7 @@ protected TagBindingsFutureStub build( * * *
-     * Creates a TagBinding between a TagValue and a cloud resource
-     * (currently project, folder, or organization).
+     * Creates a TagBinding between a TagValue and a Google Cloud resource.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -490,11 +581,27 @@ protected TagBindingsFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteTagBindingMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Return a list of effective tags for the given Google Cloud resource, as
+     * specified in `parent`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse> + listEffectiveTags(com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListEffectiveTagsMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_TAG_BINDINGS = 0; private static final int METHODID_CREATE_TAG_BINDING = 1; private static final int METHODID_DELETE_TAG_BINDING = 2; + private static final int METHODID_LIST_EFFECTIVE_TAGS = 3; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -530,6 +637,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.resourcemanager.v3.DeleteTagBindingRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_EFFECTIVE_TAGS: + serviceImpl.listEffectiveTags( + (com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -567,6 +681,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.resourcemanager.v3.DeleteTagBindingRequest, com.google.longrunning.Operation>(service, METHODID_DELETE_TAG_BINDING))) + .addMethod( + getListEffectiveTagsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest, + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse>( + service, METHODID_LIST_EFFECTIVE_TAGS))) .build(); } @@ -621,6 +742,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListTagBindingsMethod()) .addMethod(getCreateTagBindingMethod()) .addMethod(getDeleteTagBindingMethod()) + .addMethod(getListEffectiveTagsMethod()) .build(); } } diff --git a/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsGrpc.java b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsGrpc.java new file mode 100644 index 000000000000..902c9efc61d5 --- /dev/null +++ b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsGrpc.java @@ -0,0 +1,627 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.resourcemanager.v3; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Allow users to create and manage TagHolds for TagValues. TagHolds represent
+ * the use of a Tag Value that is not captured by TagBindings but
+ * should still block TagValue deletion (such as a reference in a policy
+ * condition). This service provides isolated failure domains by cloud location
+ * so that TagHolds can be managed in the same location as their usage.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/resourcemanager/v3/tag_holds.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class TagHoldsGrpc { + + private TagHoldsGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.resourcemanager.v3.TagHolds"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest, + com.google.longrunning.Operation> + getCreateTagHoldMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTagHold", + requestType = com.google.cloud.resourcemanager.v3.CreateTagHoldRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest, + com.google.longrunning.Operation> + getCreateTagHoldMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest, + com.google.longrunning.Operation> + getCreateTagHoldMethod; + if ((getCreateTagHoldMethod = TagHoldsGrpc.getCreateTagHoldMethod) == null) { + synchronized (TagHoldsGrpc.class) { + if ((getCreateTagHoldMethod = TagHoldsGrpc.getCreateTagHoldMethod) == null) { + TagHoldsGrpc.getCreateTagHoldMethod = + getCreateTagHoldMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTagHold")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TagHoldsMethodDescriptorSupplier("CreateTagHold")) + .build(); + } + } + } + return getCreateTagHoldMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest, + com.google.longrunning.Operation> + getDeleteTagHoldMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTagHold", + requestType = com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest, + com.google.longrunning.Operation> + getDeleteTagHoldMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest, + com.google.longrunning.Operation> + getDeleteTagHoldMethod; + if ((getDeleteTagHoldMethod = TagHoldsGrpc.getDeleteTagHoldMethod) == null) { + synchronized (TagHoldsGrpc.class) { + if ((getDeleteTagHoldMethod = TagHoldsGrpc.getDeleteTagHoldMethod) == null) { + TagHoldsGrpc.getDeleteTagHoldMethod = + getDeleteTagHoldMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTagHold")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new TagHoldsMethodDescriptorSupplier("DeleteTagHold")) + .build(); + } + } + } + return getDeleteTagHoldMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest, + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse> + getListTagHoldsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTagHolds", + requestType = com.google.cloud.resourcemanager.v3.ListTagHoldsRequest.class, + responseType = com.google.cloud.resourcemanager.v3.ListTagHoldsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest, + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse> + getListTagHoldsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest, + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse> + getListTagHoldsMethod; + if ((getListTagHoldsMethod = TagHoldsGrpc.getListTagHoldsMethod) == null) { + synchronized (TagHoldsGrpc.class) { + if ((getListTagHoldsMethod = TagHoldsGrpc.getListTagHoldsMethod) == null) { + TagHoldsGrpc.getListTagHoldsMethod = + getListTagHoldsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTagHolds")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new TagHoldsMethodDescriptorSupplier("ListTagHolds")) + .build(); + } + } + } + return getListTagHoldsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static TagHoldsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TagHoldsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TagHoldsStub(channel, callOptions); + } + }; + return TagHoldsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static TagHoldsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TagHoldsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TagHoldsBlockingStub(channel, callOptions); + } + }; + return TagHoldsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static TagHoldsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TagHoldsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TagHoldsFutureStub(channel, callOptions); + } + }; + return TagHoldsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Allow users to create and manage TagHolds for TagValues. TagHolds represent
+   * the use of a Tag Value that is not captured by TagBindings but
+   * should still block TagValue deletion (such as a reference in a policy
+   * condition). This service provides isolated failure domains by cloud location
+   * so that TagHolds can be managed in the same location as their usage.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same
+     * resource and origin exists under the same TagValue.
+     * 
+ */ + default void createTagHold( + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateTagHoldMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a TagHold.
+     * 
+ */ + default void deleteTagHold( + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteTagHoldMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists TagHolds under a TagValue.
+     * 
+ */ + default void listTagHolds( + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListTagHoldsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service TagHolds. + * + *
+   * Allow users to create and manage TagHolds for TagValues. TagHolds represent
+   * the use of a Tag Value that is not captured by TagBindings but
+   * should still block TagValue deletion (such as a reference in a policy
+   * condition). This service provides isolated failure domains by cloud location
+   * so that TagHolds can be managed in the same location as their usage.
+   * 
+ */ + public abstract static class TagHoldsImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return TagHoldsGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service TagHolds. + * + *
+   * Allow users to create and manage TagHolds for TagValues. TagHolds represent
+   * the use of a Tag Value that is not captured by TagBindings but
+   * should still block TagValue deletion (such as a reference in a policy
+   * condition). This service provides isolated failure domains by cloud location
+   * so that TagHolds can be managed in the same location as their usage.
+   * 
+ */ + public static final class TagHoldsStub extends io.grpc.stub.AbstractAsyncStub { + private TagHoldsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TagHoldsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TagHoldsStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same
+     * resource and origin exists under the same TagValue.
+     * 
+ */ + public void createTagHold( + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateTagHoldMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a TagHold.
+     * 
+ */ + public void deleteTagHold( + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteTagHoldMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists TagHolds under a TagValue.
+     * 
+ */ + public void listTagHolds( + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTagHoldsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service TagHolds. + * + *
+   * Allow users to create and manage TagHolds for TagValues. TagHolds represent
+   * the use of a Tag Value that is not captured by TagBindings but
+   * should still block TagValue deletion (such as a reference in a policy
+   * condition). This service provides isolated failure domains by cloud location
+   * so that TagHolds can be managed in the same location as their usage.
+   * 
+ */ + public static final class TagHoldsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private TagHoldsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TagHoldsBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TagHoldsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same
+     * resource and origin exists under the same TagValue.
+     * 
+ */ + public com.google.longrunning.Operation createTagHold( + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateTagHoldMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a TagHold.
+     * 
+ */ + public com.google.longrunning.Operation deleteTagHold( + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteTagHoldMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists TagHolds under a TagValue.
+     * 
+ */ + public com.google.cloud.resourcemanager.v3.ListTagHoldsResponse listTagHolds( + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTagHoldsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service TagHolds. + * + *
+   * Allow users to create and manage TagHolds for TagValues. TagHolds represent
+   * the use of a Tag Value that is not captured by TagBindings but
+   * should still block TagValue deletion (such as a reference in a policy
+   * condition). This service provides isolated failure domains by cloud location
+   * so that TagHolds can be managed in the same location as their usage.
+   * 
+ */ + public static final class TagHoldsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private TagHoldsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TagHoldsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TagHoldsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same
+     * resource and origin exists under the same TagValue.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createTagHold(com.google.cloud.resourcemanager.v3.CreateTagHoldRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateTagHoldMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a TagHold.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteTagHold(com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteTagHoldMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists TagHolds under a TagValue.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse> + listTagHolds(com.google.cloud.resourcemanager.v3.ListTagHoldsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTagHoldsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_TAG_HOLD = 0; + private static final int METHODID_DELETE_TAG_HOLD = 1; + private static final int METHODID_LIST_TAG_HOLDS = 2; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_TAG_HOLD: + serviceImpl.createTagHold( + (com.google.cloud.resourcemanager.v3.CreateTagHoldRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_TAG_HOLD: + serviceImpl.deleteTagHold( + (com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TAG_HOLDS: + serviceImpl.listTagHolds( + (com.google.cloud.resourcemanager.v3.ListTagHoldsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateTagHoldMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_TAG_HOLD))) + .addMethod( + getDeleteTagHoldMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_TAG_HOLD))) + .addMethod( + getListTagHoldsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest, + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse>( + service, METHODID_LIST_TAG_HOLDS))) + .build(); + } + + private abstract static class TagHoldsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + TagHoldsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("TagHolds"); + } + } + + private static final class TagHoldsFileDescriptorSupplier extends TagHoldsBaseDescriptorSupplier { + TagHoldsFileDescriptorSupplier() {} + } + + private static final class TagHoldsMethodDescriptorSupplier extends TagHoldsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + TagHoldsMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (TagHoldsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new TagHoldsFileDescriptorSupplier()) + .addMethod(getCreateTagHoldMethod()) + .addMethod(getDeleteTagHoldMethod()) + .addMethod(getListTagHoldsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysGrpc.java b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysGrpc.java index 571702cc203d..f1eccc31dc37 100644 --- a/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysGrpc.java +++ b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysGrpc.java @@ -126,6 +126,53 @@ private TagKeysGrpc() {} return getGetTagKeyMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest, + com.google.cloud.resourcemanager.v3.TagKey> + getGetNamespacedTagKeyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNamespacedTagKey", + requestType = com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest.class, + responseType = com.google.cloud.resourcemanager.v3.TagKey.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest, + com.google.cloud.resourcemanager.v3.TagKey> + getGetNamespacedTagKeyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest, + com.google.cloud.resourcemanager.v3.TagKey> + getGetNamespacedTagKeyMethod; + if ((getGetNamespacedTagKeyMethod = TagKeysGrpc.getGetNamespacedTagKeyMethod) == null) { + synchronized (TagKeysGrpc.class) { + if ((getGetNamespacedTagKeyMethod = TagKeysGrpc.getGetNamespacedTagKeyMethod) == null) { + TagKeysGrpc.getGetNamespacedTagKeyMethod = + getGetNamespacedTagKeyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetNamespacedTagKey")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.resourcemanager.v3.TagKey.getDefaultInstance())) + .setSchemaDescriptor( + new TagKeysMethodDescriptorSupplier("GetNamespacedTagKey")) + .build(); + } + } + } + return getGetNamespacedTagKeyMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.resourcemanager.v3.CreateTagKeyRequest, com.google.longrunning.Operation> getCreateTagKeyMethod; @@ -452,14 +499,30 @@ default void getTagKey( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTagKeyMethod(), responseObserver); } + /** + * + * + *
+     * Retrieves a TagKey by its namespaced name.
+     * This method will return `PERMISSION_DENIED` if the key does not exist
+     * or the user does not have permission to view it.
+     * 
+ */ + default void getNamespacedTagKey( + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetNamespacedTagKeyMethod(), responseObserver); + } + /** * * *
      * Creates a new TagKey. If another request with the same parameters is
      * sent while the original request is in process, the second request
-     * will receive an error. A maximum of 300 TagKeys can exist under a parent at
-     * any given time.
+     * will receive an error. A maximum of 1000 TagKeys can exist under a parent
+     * at any given time.
      * 
*/ default void createTagKey( @@ -618,14 +681,32 @@ public void getTagKey( getChannel().newCall(getGetTagKeyMethod(), getCallOptions()), request, responseObserver); } + /** + * + * + *
+     * Retrieves a TagKey by its namespaced name.
+     * This method will return `PERMISSION_DENIED` if the key does not exist
+     * or the user does not have permission to view it.
+     * 
+ */ + public void getNamespacedTagKey( + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNamespacedTagKeyMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * *
      * Creates a new TagKey. If another request with the same parameters is
      * sent while the original request is in process, the second request
-     * will receive an error. A maximum of 300 TagKeys can exist under a parent at
-     * any given time.
+     * will receive an error. A maximum of 1000 TagKeys can exist under a parent
+     * at any given time.
      * 
*/ public void createTagKey( @@ -777,14 +858,29 @@ public com.google.cloud.resourcemanager.v3.TagKey getTagKey( getChannel(), getGetTagKeyMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Retrieves a TagKey by its namespaced name.
+     * This method will return `PERMISSION_DENIED` if the key does not exist
+     * or the user does not have permission to view it.
+     * 
+ */ + public com.google.cloud.resourcemanager.v3.TagKey getNamespacedTagKey( + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNamespacedTagKeyMethod(), getCallOptions(), request); + } + /** * * *
      * Creates a new TagKey. If another request with the same parameters is
      * sent while the original request is in process, the second request
-     * will receive an error. A maximum of 300 TagKeys can exist under a parent at
-     * any given time.
+     * will receive an error. A maximum of 1000 TagKeys can exist under a parent
+     * at any given time.
      * 
*/ public com.google.longrunning.Operation createTagKey( @@ -917,14 +1013,31 @@ protected TagKeysFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c getChannel().newCall(getGetTagKeyMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Retrieves a TagKey by its namespaced name.
+     * This method will return `PERMISSION_DENIED` if the key does not exist
+     * or the user does not have permission to view it.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.resourcemanager.v3.TagKey> + getNamespacedTagKey( + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNamespacedTagKeyMethod(), getCallOptions()), request); + } + /** * * *
      * Creates a new TagKey. If another request with the same parameters is
      * sent while the original request is in process, the second request
-     * will receive an error. A maximum of 300 TagKeys can exist under a parent at
-     * any given time.
+     * will receive an error. A maximum of 1000 TagKeys can exist under a parent
+     * at any given time.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1015,12 +1128,13 @@ protected TagKeysFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c private static final int METHODID_LIST_TAG_KEYS = 0; private static final int METHODID_GET_TAG_KEY = 1; - private static final int METHODID_CREATE_TAG_KEY = 2; - private static final int METHODID_UPDATE_TAG_KEY = 3; - private static final int METHODID_DELETE_TAG_KEY = 4; - private static final int METHODID_GET_IAM_POLICY = 5; - private static final int METHODID_SET_IAM_POLICY = 6; - private static final int METHODID_TEST_IAM_PERMISSIONS = 7; + private static final int METHODID_GET_NAMESPACED_TAG_KEY = 2; + private static final int METHODID_CREATE_TAG_KEY = 3; + private static final int METHODID_UPDATE_TAG_KEY = 4; + private static final int METHODID_DELETE_TAG_KEY = 5; + private static final int METHODID_GET_IAM_POLICY = 6; + private static final int METHODID_SET_IAM_POLICY = 7; + private static final int METHODID_TEST_IAM_PERMISSIONS = 8; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1051,6 +1165,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_NAMESPACED_TAG_KEY: + serviceImpl.getNamespacedTagKey( + (com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_CREATE_TAG_KEY: serviceImpl.createTagKey( (com.google.cloud.resourcemanager.v3.CreateTagKeyRequest) request, @@ -1113,6 +1233,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.resourcemanager.v3.GetTagKeyRequest, com.google.cloud.resourcemanager.v3.TagKey>(service, METHODID_GET_TAG_KEY))) + .addMethod( + getGetNamespacedTagKeyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest, + com.google.cloud.resourcemanager.v3.TagKey>( + service, METHODID_GET_NAMESPACED_TAG_KEY))) .addMethod( getCreateTagKeyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1199,6 +1326,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .setSchemaDescriptor(new TagKeysFileDescriptorSupplier()) .addMethod(getListTagKeysMethod()) .addMethod(getGetTagKeyMethod()) + .addMethod(getGetNamespacedTagKeyMethod()) .addMethod(getCreateTagKeyMethod()) .addMethod(getUpdateTagKeyMethod()) .addMethod(getDeleteTagKeyMethod()) diff --git a/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesGrpc.java b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesGrpc.java index 128343ac398a..860d04e17dec 100644 --- a/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesGrpc.java +++ b/java-resourcemanager/grpc-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesGrpc.java @@ -126,6 +126,54 @@ private TagValuesGrpc() {} return getGetTagValueMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest, + com.google.cloud.resourcemanager.v3.TagValue> + getGetNamespacedTagValueMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNamespacedTagValue", + requestType = com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest.class, + responseType = com.google.cloud.resourcemanager.v3.TagValue.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest, + com.google.cloud.resourcemanager.v3.TagValue> + getGetNamespacedTagValueMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest, + com.google.cloud.resourcemanager.v3.TagValue> + getGetNamespacedTagValueMethod; + if ((getGetNamespacedTagValueMethod = TagValuesGrpc.getGetNamespacedTagValueMethod) == null) { + synchronized (TagValuesGrpc.class) { + if ((getGetNamespacedTagValueMethod = TagValuesGrpc.getGetNamespacedTagValueMethod) + == null) { + TagValuesGrpc.getGetNamespacedTagValueMethod = + getGetNamespacedTagValueMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetNamespacedTagValue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.resourcemanager.v3.TagValue.getDefaultInstance())) + .setSchemaDescriptor( + new TagValuesMethodDescriptorSupplier("GetNamespacedTagValue")) + .build(); + } + } + } + return getGetNamespacedTagValueMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.resourcemanager.v3.CreateTagValueRequest, com.google.longrunning.Operation> @@ -448,9 +496,8 @@ default void listTagValues( * * *
-     * Retrieves TagValue. If the TagValue or namespaced name does not exist, or
-     * if the user does not have permission to view it, this method will return
-     * `PERMISSION_DENIED`.
+     * Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the
+     * value does not exist or the user does not have permission to view it.
      * 
*/ default void getTagValue( @@ -461,13 +508,30 @@ default void getTagValue( getGetTagValueMethod(), responseObserver); } + /** + * + * + *
+     * Retrieves a TagValue by its namespaced name.
+     * This method will return `PERMISSION_DENIED` if the value does not exist
+     * or the user does not have permission to view it.
+     * 
+ */ + default void getNamespacedTagValue( + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetNamespacedTagValueMethod(), responseObserver); + } + /** * * *
      * Creates a TagValue as a child of the specified TagKey. If a another
      * request with the same parameters is sent while the original request is in
-     * process the second request will receive an error. A maximum of 300
+     * process the second request will receive an error. A maximum of 1000
      * TagValues can exist under a TagKey at any given time.
      * 
*/ @@ -616,9 +680,8 @@ public void listTagValues( * * *
-     * Retrieves TagValue. If the TagValue or namespaced name does not exist, or
-     * if the user does not have permission to view it, this method will return
-     * `PERMISSION_DENIED`.
+     * Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the
+     * value does not exist or the user does not have permission to view it.
      * 
*/ public void getTagValue( @@ -631,13 +694,32 @@ public void getTagValue( responseObserver); } + /** + * + * + *
+     * Retrieves a TagValue by its namespaced name.
+     * This method will return `PERMISSION_DENIED` if the value does not exist
+     * or the user does not have permission to view it.
+     * 
+ */ + public void getNamespacedTagValue( + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNamespacedTagValueMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * *
      * Creates a TagValue as a child of the specified TagKey. If a another
      * request with the same parameters is sent while the original request is in
-     * process the second request will receive an error. A maximum of 300
+     * process the second request will receive an error. A maximum of 1000
      * TagValues can exist under a TagKey at any given time.
      * 
*/ @@ -781,9 +863,8 @@ public com.google.cloud.resourcemanager.v3.ListTagValuesResponse listTagValues( * * *
-     * Retrieves TagValue. If the TagValue or namespaced name does not exist, or
-     * if the user does not have permission to view it, this method will return
-     * `PERMISSION_DENIED`.
+     * Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the
+     * value does not exist or the user does not have permission to view it.
      * 
*/ public com.google.cloud.resourcemanager.v3.TagValue getTagValue( @@ -792,13 +873,28 @@ public com.google.cloud.resourcemanager.v3.TagValue getTagValue( getChannel(), getGetTagValueMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Retrieves a TagValue by its namespaced name.
+     * This method will return `PERMISSION_DENIED` if the value does not exist
+     * or the user does not have permission to view it.
+     * 
+ */ + public com.google.cloud.resourcemanager.v3.TagValue getNamespacedTagValue( + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNamespacedTagValueMethod(), getCallOptions(), request); + } + /** * * *
      * Creates a TagValue as a child of the specified TagKey. If a another
      * request with the same parameters is sent while the original request is in
-     * process the second request will receive an error. A maximum of 300
+     * process the second request will receive an error. A maximum of 1000
      * TagValues can exist under a TagKey at any given time.
      * 
*/ @@ -921,9 +1017,8 @@ protected TagValuesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * * *
-     * Retrieves TagValue. If the TagValue or namespaced name does not exist, or
-     * if the user does not have permission to view it, this method will return
-     * `PERMISSION_DENIED`.
+     * Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the
+     * value does not exist or the user does not have permission to view it.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -933,13 +1028,30 @@ protected TagValuesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions getChannel().newCall(getGetTagValueMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Retrieves a TagValue by its namespaced name.
+     * This method will return `PERMISSION_DENIED` if the value does not exist
+     * or the user does not have permission to view it.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.resourcemanager.v3.TagValue> + getNamespacedTagValue( + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNamespacedTagValueMethod(), getCallOptions()), request); + } + /** * * *
      * Creates a TagValue as a child of the specified TagKey. If a another
      * request with the same parameters is sent while the original request is in
-     * process the second request will receive an error. A maximum of 300
+     * process the second request will receive an error. A maximum of 1000
      * TagValues can exist under a TagKey at any given time.
      * 
*/ @@ -1031,12 +1143,13 @@ protected TagValuesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions private static final int METHODID_LIST_TAG_VALUES = 0; private static final int METHODID_GET_TAG_VALUE = 1; - private static final int METHODID_CREATE_TAG_VALUE = 2; - private static final int METHODID_UPDATE_TAG_VALUE = 3; - private static final int METHODID_DELETE_TAG_VALUE = 4; - private static final int METHODID_GET_IAM_POLICY = 5; - private static final int METHODID_SET_IAM_POLICY = 6; - private static final int METHODID_TEST_IAM_PERMISSIONS = 7; + private static final int METHODID_GET_NAMESPACED_TAG_VALUE = 2; + private static final int METHODID_CREATE_TAG_VALUE = 3; + private static final int METHODID_UPDATE_TAG_VALUE = 4; + private static final int METHODID_DELETE_TAG_VALUE = 5; + private static final int METHODID_GET_IAM_POLICY = 6; + private static final int METHODID_SET_IAM_POLICY = 7; + private static final int METHODID_TEST_IAM_PERMISSIONS = 8; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1068,6 +1181,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_NAMESPACED_TAG_VALUE: + serviceImpl.getNamespacedTagValue( + (com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_CREATE_TAG_VALUE: serviceImpl.createTagValue( (com.google.cloud.resourcemanager.v3.CreateTagValueRequest) request, @@ -1130,6 +1249,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.resourcemanager.v3.GetTagValueRequest, com.google.cloud.resourcemanager.v3.TagValue>(service, METHODID_GET_TAG_VALUE))) + .addMethod( + getGetNamespacedTagValueMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest, + com.google.cloud.resourcemanager.v3.TagValue>( + service, METHODID_GET_NAMESPACED_TAG_VALUE))) .addMethod( getCreateTagValueMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1218,6 +1344,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .setSchemaDescriptor(new TagValuesFileDescriptorSupplier()) .addMethod(getListTagValuesMethod()) .addMethod(getGetTagValueMethod()) + .addMethod(getGetNamespacedTagValueMethod()) .addMethod(getCreateTagValueMethod()) .addMethod(getUpdateTagValueMethod()) .addMethod(getDeleteTagValueMethod()) diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateFolderRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateFolderRequest.java index d7613a6da9c2..58617e26b46b 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateFolderRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateFolderRequest.java @@ -71,8 +71,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The folder being created, only the display name and parent will be
-   * consulted. All other fields will be ignored.
+   * Required. The folder being created, only the display name and parent will
+   * be consulted. All other fields will be ignored.
    * 
* * @@ -89,8 +89,8 @@ public boolean hasFolder() { * * *
-   * Required. The folder being created, only the display name and parent will be
-   * consulted. All other fields will be ignored.
+   * Required. The folder being created, only the display name and parent will
+   * be consulted. All other fields will be ignored.
    * 
* * @@ -109,8 +109,8 @@ public com.google.cloud.resourcemanager.v3.Folder getFolder() { * * *
-   * Required. The folder being created, only the display name and parent will be
-   * consulted. All other fields will be ignored.
+   * Required. The folder being created, only the display name and parent will
+   * be consulted. All other fields will be ignored.
    * 
* * @@ -484,8 +484,8 @@ public Builder mergeFrom( * * *
-     * Required. The folder being created, only the display name and parent will be
-     * consulted. All other fields will be ignored.
+     * Required. The folder being created, only the display name and parent will
+     * be consulted. All other fields will be ignored.
      * 
* * @@ -501,8 +501,8 @@ public boolean hasFolder() { * * *
-     * Required. The folder being created, only the display name and parent will be
-     * consulted. All other fields will be ignored.
+     * Required. The folder being created, only the display name and parent will
+     * be consulted. All other fields will be ignored.
      * 
* * @@ -524,8 +524,8 @@ public com.google.cloud.resourcemanager.v3.Folder getFolder() { * * *
-     * Required. The folder being created, only the display name and parent will be
-     * consulted. All other fields will be ignored.
+     * Required. The folder being created, only the display name and parent will
+     * be consulted. All other fields will be ignored.
      * 
* * @@ -549,8 +549,8 @@ public Builder setFolder(com.google.cloud.resourcemanager.v3.Folder value) { * * *
-     * Required. The folder being created, only the display name and parent will be
-     * consulted. All other fields will be ignored.
+     * Required. The folder being created, only the display name and parent will
+     * be consulted. All other fields will be ignored.
      * 
* * @@ -571,8 +571,8 @@ public Builder setFolder(com.google.cloud.resourcemanager.v3.Folder.Builder buil * * *
-     * Required. The folder being created, only the display name and parent will be
-     * consulted. All other fields will be ignored.
+     * Required. The folder being created, only the display name and parent will
+     * be consulted. All other fields will be ignored.
      * 
* * @@ -599,8 +599,8 @@ public Builder mergeFolder(com.google.cloud.resourcemanager.v3.Folder value) { * * *
-     * Required. The folder being created, only the display name and parent will be
-     * consulted. All other fields will be ignored.
+     * Required. The folder being created, only the display name and parent will
+     * be consulted. All other fields will be ignored.
      * 
* * @@ -621,8 +621,8 @@ public Builder clearFolder() { * * *
-     * Required. The folder being created, only the display name and parent will be
-     * consulted. All other fields will be ignored.
+     * Required. The folder being created, only the display name and parent will
+     * be consulted. All other fields will be ignored.
      * 
* * @@ -638,8 +638,8 @@ public com.google.cloud.resourcemanager.v3.Folder.Builder getFolderBuilder() { * * *
-     * Required. The folder being created, only the display name and parent will be
-     * consulted. All other fields will be ignored.
+     * Required. The folder being created, only the display name and parent will
+     * be consulted. All other fields will be ignored.
      * 
* * @@ -659,8 +659,8 @@ public com.google.cloud.resourcemanager.v3.FolderOrBuilder getFolderOrBuilder() * * *
-     * Required. The folder being created, only the display name and parent will be
-     * consulted. All other fields will be ignored.
+     * Required. The folder being created, only the display name and parent will
+     * be consulted. All other fields will be ignored.
      * 
* * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateFolderRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateFolderRequestOrBuilder.java index 44b17d947a7a..7bf4c04d5c36 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateFolderRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateFolderRequestOrBuilder.java @@ -27,8 +27,8 @@ public interface CreateFolderRequestOrBuilder * * *
-   * Required. The folder being created, only the display name and parent will be
-   * consulted. All other fields will be ignored.
+   * Required. The folder being created, only the display name and parent will
+   * be consulted. All other fields will be ignored.
    * 
* * @@ -42,8 +42,8 @@ public interface CreateFolderRequestOrBuilder * * *
-   * Required. The folder being created, only the display name and parent will be
-   * consulted. All other fields will be ignored.
+   * Required. The folder being created, only the display name and parent will
+   * be consulted. All other fields will be ignored.
    * 
* * @@ -57,8 +57,8 @@ public interface CreateFolderRequestOrBuilder * * *
-   * Required. The folder being created, only the display name and parent will be
-   * consulted. All other fields will be ignored.
+   * Required. The folder being created, only the display name and parent will
+   * be consulted. All other fields will be ignored.
    * 
* * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateProjectRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateProjectRequest.java index 57d2d5d4553a..f20d2924862f 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateProjectRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateProjectRequest.java @@ -78,7 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * @@ -101,7 +101,7 @@ public boolean hasProject() { * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * @@ -126,7 +126,7 @@ public com.google.cloud.resourcemanager.v3.Project getProject() { * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * @@ -508,7 +508,7 @@ public Builder mergeFrom( * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * @@ -530,7 +530,7 @@ public boolean hasProject() { * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * @@ -558,7 +558,7 @@ public com.google.cloud.resourcemanager.v3.Project getProject() { * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * @@ -588,7 +588,7 @@ public Builder setProject(com.google.cloud.resourcemanager.v3.Project value) { * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * @@ -615,7 +615,7 @@ public Builder setProject(com.google.cloud.resourcemanager.v3.Project.Builder bu * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * @@ -648,7 +648,7 @@ public Builder mergeProject(com.google.cloud.resourcemanager.v3.Project value) { * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * @@ -675,7 +675,7 @@ public Builder clearProject() { * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * @@ -697,7 +697,7 @@ public com.google.cloud.resourcemanager.v3.Project.Builder getProjectBuilder() { * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * @@ -723,7 +723,7 @@ public com.google.cloud.resourcemanager.v3.ProjectOrBuilder getProjectOrBuilder( * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateProjectRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateProjectRequestOrBuilder.java index 1ab91a73145b..aa679cdb3c74 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateProjectRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateProjectRequestOrBuilder.java @@ -32,7 +32,7 @@ public interface CreateProjectRequestOrBuilder * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * @@ -52,7 +52,7 @@ public interface CreateProjectRequestOrBuilder * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * @@ -72,7 +72,7 @@ public interface CreateProjectRequestOrBuilder * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagBindingRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagBindingRequest.java index d3f066290929..e6b900b032b6 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagBindingRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagBindingRequest.java @@ -127,8 +127,8 @@ public com.google.cloud.resourcemanager.v3.TagBindingOrBuilder getTagBindingOrBu * * *
-   * Optional. Set to true to perform the validations necessary for creating the resource,
-   * but not actually perform the action.
+   * Optional. Set to true to perform the validations necessary for creating the
+   * resource, but not actually perform the action.
    * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -719,8 +719,8 @@ public com.google.cloud.resourcemanager.v3.TagBindingOrBuilder getTagBindingOrBu * * *
-     * Optional. Set to true to perform the validations necessary for creating the resource,
-     * but not actually perform the action.
+     * Optional. Set to true to perform the validations necessary for creating the
+     * resource, but not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -735,8 +735,8 @@ public boolean getValidateOnly() { * * *
-     * Optional. Set to true to perform the validations necessary for creating the resource,
-     * but not actually perform the action.
+     * Optional. Set to true to perform the validations necessary for creating the
+     * resource, but not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -755,8 +755,8 @@ public Builder setValidateOnly(boolean value) { * * *
-     * Optional. Set to true to perform the validations necessary for creating the resource,
-     * but not actually perform the action.
+     * Optional. Set to true to perform the validations necessary for creating the
+     * resource, but not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagBindingRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagBindingRequestOrBuilder.java index 45020e136a16..8b8053e4f3f6 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagBindingRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagBindingRequestOrBuilder.java @@ -68,8 +68,8 @@ public interface CreateTagBindingRequestOrBuilder * * *
-   * Optional. Set to true to perform the validations necessary for creating the resource,
-   * but not actually perform the action.
+   * Optional. Set to true to perform the validations necessary for creating the
+   * resource, but not actually perform the action.
    * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldMetadata.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldMetadata.java new file mode 100644 index 000000000000..4e586f896245 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldMetadata.java @@ -0,0 +1,441 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +/** + * + * + *
+ * Runtime operation information for creating a TagHold.
+ * (-- The metadata is currently empty, but may include information in the
+ * future. --)
+ * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.CreateTagHoldMetadata} + */ +public final class CreateTagHoldMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.resourcemanager.v3.CreateTagHoldMetadata) + CreateTagHoldMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTagHoldMetadata.newBuilder() to construct. + private CreateTagHoldMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTagHoldMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTagHoldMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_CreateTagHoldMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_CreateTagHoldMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata.class, + com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata)) { + return super.equals(obj); + } + com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata other = + (com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Runtime operation information for creating a TagHold.
+   * (-- The metadata is currently empty, but may include information in the
+   * future. --)
+   * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.CreateTagHoldMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.resourcemanager.v3.CreateTagHoldMetadata) + com.google.cloud.resourcemanager.v3.CreateTagHoldMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_CreateTagHoldMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_CreateTagHoldMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata.class, + com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata.Builder.class); + } + + // Construct using com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_CreateTagHoldMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata getDefaultInstanceForType() { + return com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata build() { + com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata buildPartial() { + com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata result = + new com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata) { + return mergeFrom((com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata other) { + if (other == com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.resourcemanager.v3.CreateTagHoldMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.resourcemanager.v3.CreateTagHoldMetadata) + private static final com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata(); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTagHoldMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldMetadataOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldMetadataOrBuilder.java new file mode 100644 index 000000000000..d2cc47dafaf3 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldMetadataOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +public interface CreateTagHoldMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.resourcemanager.v3.CreateTagHoldMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldRequest.java new file mode 100644 index 000000000000..9afabc09f450 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldRequest.java @@ -0,0 +1,1036 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +/** + * + * + *
+ * The request message to create a TagHold.
+ * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.CreateTagHoldRequest} + */ +public final class CreateTagHoldRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.resourcemanager.v3.CreateTagHoldRequest) + CreateTagHoldRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTagHoldRequest.newBuilder() to construct. + private CreateTagHoldRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTagHoldRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTagHoldRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_CreateTagHoldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_CreateTagHoldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest.class, + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the TagHold's parent TagValue. Must be of
+   * the form: `tagValues/{tag-value-id}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the TagHold's parent TagValue. Must be of
+   * the form: `tagValues/{tag-value-id}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAG_HOLD_FIELD_NUMBER = 2; + private com.google.cloud.resourcemanager.v3.TagHold tagHold_; + /** + * + * + *
+   * Required. The TagHold to be created.
+   * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagHold field is set. + */ + @java.lang.Override + public boolean hasTagHold() { + return tagHold_ != null; + } + /** + * + * + *
+   * Required. The TagHold to be created.
+   * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagHold. + */ + @java.lang.Override + public com.google.cloud.resourcemanager.v3.TagHold getTagHold() { + return tagHold_ == null + ? com.google.cloud.resourcemanager.v3.TagHold.getDefaultInstance() + : tagHold_; + } + /** + * + * + *
+   * Required. The TagHold to be created.
+   * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.resourcemanager.v3.TagHoldOrBuilder getTagHoldOrBuilder() { + return tagHold_ == null + ? com.google.cloud.resourcemanager.v3.TagHold.getDefaultInstance() + : tagHold_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + /** + * + * + *
+   * Optional. Set to true to perform the validations necessary for creating the
+   * resource, but not actually perform the action.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (tagHold_ != null) { + output.writeMessage(2, getTagHold()); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (tagHold_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTagHold()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.resourcemanager.v3.CreateTagHoldRequest)) { + return super.equals(obj); + } + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest other = + (com.google.cloud.resourcemanager.v3.CreateTagHoldRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasTagHold() != other.hasTagHold()) return false; + if (hasTagHold()) { + if (!getTagHold().equals(other.getTagHold())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasTagHold()) { + hash = (37 * hash) + TAG_HOLD_FIELD_NUMBER; + hash = (53 * hash) + getTagHold().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message to create a TagHold.
+   * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.CreateTagHoldRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.resourcemanager.v3.CreateTagHoldRequest) + com.google.cloud.resourcemanager.v3.CreateTagHoldRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_CreateTagHoldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_CreateTagHoldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest.class, + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest.Builder.class); + } + + // Construct using com.google.cloud.resourcemanager.v3.CreateTagHoldRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + tagHold_ = null; + if (tagHoldBuilder_ != null) { + tagHoldBuilder_.dispose(); + tagHoldBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_CreateTagHoldRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.CreateTagHoldRequest getDefaultInstanceForType() { + return com.google.cloud.resourcemanager.v3.CreateTagHoldRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.CreateTagHoldRequest build() { + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.CreateTagHoldRequest buildPartial() { + com.google.cloud.resourcemanager.v3.CreateTagHoldRequest result = + new com.google.cloud.resourcemanager.v3.CreateTagHoldRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.resourcemanager.v3.CreateTagHoldRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tagHold_ = tagHoldBuilder_ == null ? tagHold_ : tagHoldBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.resourcemanager.v3.CreateTagHoldRequest) { + return mergeFrom((com.google.cloud.resourcemanager.v3.CreateTagHoldRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.resourcemanager.v3.CreateTagHoldRequest other) { + if (other == com.google.cloud.resourcemanager.v3.CreateTagHoldRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTagHold()) { + mergeTagHold(other.getTagHold()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTagHoldFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the TagHold's parent TagValue. Must be of
+     * the form: `tagValues/{tag-value-id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the TagHold's parent TagValue. Must be of
+     * the form: `tagValues/{tag-value-id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the TagHold's parent TagValue. Must be of
+     * the form: `tagValues/{tag-value-id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the TagHold's parent TagValue. Must be of
+     * the form: `tagValues/{tag-value-id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the TagHold's parent TagValue. Must be of
+     * the form: `tagValues/{tag-value-id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.resourcemanager.v3.TagHold tagHold_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.resourcemanager.v3.TagHold, + com.google.cloud.resourcemanager.v3.TagHold.Builder, + com.google.cloud.resourcemanager.v3.TagHoldOrBuilder> + tagHoldBuilder_; + /** + * + * + *
+     * Required. The TagHold to be created.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagHold field is set. + */ + public boolean hasTagHold() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The TagHold to be created.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagHold. + */ + public com.google.cloud.resourcemanager.v3.TagHold getTagHold() { + if (tagHoldBuilder_ == null) { + return tagHold_ == null + ? com.google.cloud.resourcemanager.v3.TagHold.getDefaultInstance() + : tagHold_; + } else { + return tagHoldBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The TagHold to be created.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTagHold(com.google.cloud.resourcemanager.v3.TagHold value) { + if (tagHoldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tagHold_ = value; + } else { + tagHoldBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The TagHold to be created.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTagHold(com.google.cloud.resourcemanager.v3.TagHold.Builder builderForValue) { + if (tagHoldBuilder_ == null) { + tagHold_ = builderForValue.build(); + } else { + tagHoldBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The TagHold to be created.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTagHold(com.google.cloud.resourcemanager.v3.TagHold value) { + if (tagHoldBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && tagHold_ != null + && tagHold_ != com.google.cloud.resourcemanager.v3.TagHold.getDefaultInstance()) { + getTagHoldBuilder().mergeFrom(value); + } else { + tagHold_ = value; + } + } else { + tagHoldBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The TagHold to be created.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTagHold() { + bitField0_ = (bitField0_ & ~0x00000002); + tagHold_ = null; + if (tagHoldBuilder_ != null) { + tagHoldBuilder_.dispose(); + tagHoldBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The TagHold to be created.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.resourcemanager.v3.TagHold.Builder getTagHoldBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTagHoldFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The TagHold to be created.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.resourcemanager.v3.TagHoldOrBuilder getTagHoldOrBuilder() { + if (tagHoldBuilder_ != null) { + return tagHoldBuilder_.getMessageOrBuilder(); + } else { + return tagHold_ == null + ? com.google.cloud.resourcemanager.v3.TagHold.getDefaultInstance() + : tagHold_; + } + } + /** + * + * + *
+     * Required. The TagHold to be created.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.resourcemanager.v3.TagHold, + com.google.cloud.resourcemanager.v3.TagHold.Builder, + com.google.cloud.resourcemanager.v3.TagHoldOrBuilder> + getTagHoldFieldBuilder() { + if (tagHoldBuilder_ == null) { + tagHoldBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.resourcemanager.v3.TagHold, + com.google.cloud.resourcemanager.v3.TagHold.Builder, + com.google.cloud.resourcemanager.v3.TagHoldOrBuilder>( + getTagHold(), getParentForChildren(), isClean()); + tagHold_ = null; + } + return tagHoldBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. Set to true to perform the validations necessary for creating the
+     * resource, but not actually perform the action.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. Set to true to perform the validations necessary for creating the
+     * resource, but not actually perform the action.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Set to true to perform the validations necessary for creating the
+     * resource, but not actually perform the action.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.resourcemanager.v3.CreateTagHoldRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.resourcemanager.v3.CreateTagHoldRequest) + private static final com.google.cloud.resourcemanager.v3.CreateTagHoldRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.resourcemanager.v3.CreateTagHoldRequest(); + } + + public static com.google.cloud.resourcemanager.v3.CreateTagHoldRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTagHoldRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.CreateTagHoldRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldRequestOrBuilder.java new file mode 100644 index 000000000000..ef8b7995d085 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagHoldRequestOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +public interface CreateTagHoldRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.resourcemanager.v3.CreateTagHoldRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the TagHold's parent TagValue. Must be of
+   * the form: `tagValues/{tag-value-id}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the TagHold's parent TagValue. Must be of
+   * the form: `tagValues/{tag-value-id}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The TagHold to be created.
+   * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tagHold field is set. + */ + boolean hasTagHold(); + /** + * + * + *
+   * Required. The TagHold to be created.
+   * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tagHold. + */ + com.google.cloud.resourcemanager.v3.TagHold getTagHold(); + /** + * + * + *
+   * Required. The TagHold to be created.
+   * 
+ * + * + * .google.cloud.resourcemanager.v3.TagHold tag_hold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.resourcemanager.v3.TagHoldOrBuilder getTagHoldOrBuilder(); + + /** + * + * + *
+   * Optional. Set to true to perform the validations necessary for creating the
+   * resource, but not actually perform the action.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagKeyRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagKeyRequest.java index 226d9e954ba9..a6badd13bb4e 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagKeyRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagKeyRequest.java @@ -71,8 +71,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The TagKey to be created. Only fields `short_name`, `description`,
-   * and `parent` are considered during the creation request.
+   * Required. The TagKey to be created. Only fields `short_name`,
+   * `description`, and `parent` are considered during the creation request.
    * 
* * @@ -89,8 +89,8 @@ public boolean hasTagKey() { * * *
-   * Required. The TagKey to be created. Only fields `short_name`, `description`,
-   * and `parent` are considered during the creation request.
+   * Required. The TagKey to be created. Only fields `short_name`,
+   * `description`, and `parent` are considered during the creation request.
    * 
* * @@ -109,8 +109,8 @@ public com.google.cloud.resourcemanager.v3.TagKey getTagKey() { * * *
-   * Required. The TagKey to be created. Only fields `short_name`, `description`,
-   * and `parent` are considered during the creation request.
+   * Required. The TagKey to be created. Only fields `short_name`,
+   * `description`, and `parent` are considered during the creation request.
    * 
* * @@ -130,8 +130,8 @@ public com.google.cloud.resourcemanager.v3.TagKeyOrBuilder getTagKeyOrBuilder() * * *
-   * Optional. Set to true to perform validations necessary for creating the resource, but
-   * not actually perform the action.
+   * Optional. Set to true to perform validations necessary for creating the
+   * resource, but not actually perform the action.
    * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -525,8 +525,8 @@ public Builder mergeFrom( * * *
-     * Required. The TagKey to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagKey to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -542,8 +542,8 @@ public boolean hasTagKey() { * * *
-     * Required. The TagKey to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagKey to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -565,8 +565,8 @@ public com.google.cloud.resourcemanager.v3.TagKey getTagKey() { * * *
-     * Required. The TagKey to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagKey to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -590,8 +590,8 @@ public Builder setTagKey(com.google.cloud.resourcemanager.v3.TagKey value) { * * *
-     * Required. The TagKey to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagKey to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -612,8 +612,8 @@ public Builder setTagKey(com.google.cloud.resourcemanager.v3.TagKey.Builder buil * * *
-     * Required. The TagKey to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagKey to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -640,8 +640,8 @@ public Builder mergeTagKey(com.google.cloud.resourcemanager.v3.TagKey value) { * * *
-     * Required. The TagKey to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagKey to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -662,8 +662,8 @@ public Builder clearTagKey() { * * *
-     * Required. The TagKey to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagKey to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -679,8 +679,8 @@ public com.google.cloud.resourcemanager.v3.TagKey.Builder getTagKeyBuilder() { * * *
-     * Required. The TagKey to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagKey to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -700,8 +700,8 @@ public com.google.cloud.resourcemanager.v3.TagKeyOrBuilder getTagKeyOrBuilder() * * *
-     * Required. The TagKey to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagKey to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -730,8 +730,8 @@ public com.google.cloud.resourcemanager.v3.TagKeyOrBuilder getTagKeyOrBuilder() * * *
-     * Optional. Set to true to perform validations necessary for creating the resource, but
-     * not actually perform the action.
+     * Optional. Set to true to perform validations necessary for creating the
+     * resource, but not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -746,8 +746,8 @@ public boolean getValidateOnly() { * * *
-     * Optional. Set to true to perform validations necessary for creating the resource, but
-     * not actually perform the action.
+     * Optional. Set to true to perform validations necessary for creating the
+     * resource, but not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -766,8 +766,8 @@ public Builder setValidateOnly(boolean value) { * * *
-     * Optional. Set to true to perform validations necessary for creating the resource, but
-     * not actually perform the action.
+     * Optional. Set to true to perform validations necessary for creating the
+     * resource, but not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagKeyRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagKeyRequestOrBuilder.java index e9f51b0abe35..c38180482405 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagKeyRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagKeyRequestOrBuilder.java @@ -27,8 +27,8 @@ public interface CreateTagKeyRequestOrBuilder * * *
-   * Required. The TagKey to be created. Only fields `short_name`, `description`,
-   * and `parent` are considered during the creation request.
+   * Required. The TagKey to be created. Only fields `short_name`,
+   * `description`, and `parent` are considered during the creation request.
    * 
* * @@ -42,8 +42,8 @@ public interface CreateTagKeyRequestOrBuilder * * *
-   * Required. The TagKey to be created. Only fields `short_name`, `description`,
-   * and `parent` are considered during the creation request.
+   * Required. The TagKey to be created. Only fields `short_name`,
+   * `description`, and `parent` are considered during the creation request.
    * 
* * @@ -57,8 +57,8 @@ public interface CreateTagKeyRequestOrBuilder * * *
-   * Required. The TagKey to be created. Only fields `short_name`, `description`,
-   * and `parent` are considered during the creation request.
+   * Required. The TagKey to be created. Only fields `short_name`,
+   * `description`, and `parent` are considered during the creation request.
    * 
* * @@ -71,8 +71,8 @@ public interface CreateTagKeyRequestOrBuilder * * *
-   * Optional. Set to true to perform validations necessary for creating the resource, but
-   * not actually perform the action.
+   * Optional. Set to true to perform validations necessary for creating the
+   * resource, but not actually perform the action.
    * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagValueRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagValueRequest.java index 167a1871d58d..2e698727e0a0 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagValueRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagValueRequest.java @@ -71,8 +71,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The TagValue to be created. Only fields `short_name`, `description`,
-   * and `parent` are considered during the creation request.
+   * Required. The TagValue to be created. Only fields `short_name`,
+   * `description`, and `parent` are considered during the creation request.
    * 
* * @@ -89,8 +89,8 @@ public boolean hasTagValue() { * * *
-   * Required. The TagValue to be created. Only fields `short_name`, `description`,
-   * and `parent` are considered during the creation request.
+   * Required. The TagValue to be created. Only fields `short_name`,
+   * `description`, and `parent` are considered during the creation request.
    * 
* * @@ -109,8 +109,8 @@ public com.google.cloud.resourcemanager.v3.TagValue getTagValue() { * * *
-   * Required. The TagValue to be created. Only fields `short_name`, `description`,
-   * and `parent` are considered during the creation request.
+   * Required. The TagValue to be created. Only fields `short_name`,
+   * `description`, and `parent` are considered during the creation request.
    * 
* * @@ -130,8 +130,8 @@ public com.google.cloud.resourcemanager.v3.TagValueOrBuilder getTagValueOrBuilde * * *
-   * Optional. Set as true to perform the validations necessary for creating the resource,
-   * but not actually perform the action.
+   * Optional. Set as true to perform the validations necessary for creating the
+   * resource, but not actually perform the action.
    * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -525,8 +525,8 @@ public Builder mergeFrom( * * *
-     * Required. The TagValue to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagValue to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -542,8 +542,8 @@ public boolean hasTagValue() { * * *
-     * Required. The TagValue to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagValue to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -565,8 +565,8 @@ public com.google.cloud.resourcemanager.v3.TagValue getTagValue() { * * *
-     * Required. The TagValue to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagValue to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -590,8 +590,8 @@ public Builder setTagValue(com.google.cloud.resourcemanager.v3.TagValue value) { * * *
-     * Required. The TagValue to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagValue to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -613,8 +613,8 @@ public Builder setTagValue( * * *
-     * Required. The TagValue to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagValue to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -641,8 +641,8 @@ public Builder mergeTagValue(com.google.cloud.resourcemanager.v3.TagValue value) * * *
-     * Required. The TagValue to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagValue to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -663,8 +663,8 @@ public Builder clearTagValue() { * * *
-     * Required. The TagValue to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagValue to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -680,8 +680,8 @@ public com.google.cloud.resourcemanager.v3.TagValue.Builder getTagValueBuilder() * * *
-     * Required. The TagValue to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagValue to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -701,8 +701,8 @@ public com.google.cloud.resourcemanager.v3.TagValueOrBuilder getTagValueOrBuilde * * *
-     * Required. The TagValue to be created. Only fields `short_name`, `description`,
-     * and `parent` are considered during the creation request.
+     * Required. The TagValue to be created. Only fields `short_name`,
+     * `description`, and `parent` are considered during the creation request.
      * 
* * @@ -731,8 +731,8 @@ public com.google.cloud.resourcemanager.v3.TagValueOrBuilder getTagValueOrBuilde * * *
-     * Optional. Set as true to perform the validations necessary for creating the resource,
-     * but not actually perform the action.
+     * Optional. Set as true to perform the validations necessary for creating the
+     * resource, but not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -747,8 +747,8 @@ public boolean getValidateOnly() { * * *
-     * Optional. Set as true to perform the validations necessary for creating the resource,
-     * but not actually perform the action.
+     * Optional. Set as true to perform the validations necessary for creating the
+     * resource, but not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -767,8 +767,8 @@ public Builder setValidateOnly(boolean value) { * * *
-     * Optional. Set as true to perform the validations necessary for creating the resource,
-     * but not actually perform the action.
+     * Optional. Set as true to perform the validations necessary for creating the
+     * resource, but not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagValueRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagValueRequestOrBuilder.java index 17b9062935c3..1081327ff0e2 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagValueRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/CreateTagValueRequestOrBuilder.java @@ -27,8 +27,8 @@ public interface CreateTagValueRequestOrBuilder * * *
-   * Required. The TagValue to be created. Only fields `short_name`, `description`,
-   * and `parent` are considered during the creation request.
+   * Required. The TagValue to be created. Only fields `short_name`,
+   * `description`, and `parent` are considered during the creation request.
    * 
* * @@ -42,8 +42,8 @@ public interface CreateTagValueRequestOrBuilder * * *
-   * Required. The TagValue to be created. Only fields `short_name`, `description`,
-   * and `parent` are considered during the creation request.
+   * Required. The TagValue to be created. Only fields `short_name`,
+   * `description`, and `parent` are considered during the creation request.
    * 
* * @@ -57,8 +57,8 @@ public interface CreateTagValueRequestOrBuilder * * *
-   * Required. The TagValue to be created. Only fields `short_name`, `description`,
-   * and `parent` are considered during the creation request.
+   * Required. The TagValue to be created. Only fields `short_name`,
+   * `description`, and `parent` are considered during the creation request.
    * 
* * @@ -71,8 +71,8 @@ public interface CreateTagValueRequestOrBuilder * * *
-   * Optional. Set as true to perform the validations necessary for creating the resource,
-   * but not actually perform the action.
+   * Optional. Set as true to perform the validations necessary for creating the
+   * resource, but not actually perform the action.
    * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldMetadata.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldMetadata.java new file mode 100644 index 000000000000..979ec60b0069 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldMetadata.java @@ -0,0 +1,441 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +/** + * + * + *
+ * Runtime operation information for deleting a TagHold.
+ * (-- The metadata is currently empty, but may include information in the
+ * future. --)
+ * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.DeleteTagHoldMetadata} + */ +public final class DeleteTagHoldMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.resourcemanager.v3.DeleteTagHoldMetadata) + DeleteTagHoldMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteTagHoldMetadata.newBuilder() to construct. + private DeleteTagHoldMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteTagHoldMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteTagHoldMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata.class, + com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata)) { + return super.equals(obj); + } + com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata other = + (com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Runtime operation information for deleting a TagHold.
+   * (-- The metadata is currently empty, but may include information in the
+   * future. --)
+   * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.DeleteTagHoldMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.resourcemanager.v3.DeleteTagHoldMetadata) + com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata.class, + com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata.Builder.class); + } + + // Construct using com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata getDefaultInstanceForType() { + return com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata build() { + com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata buildPartial() { + com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata result = + new com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata) { + return mergeFrom((com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata other) { + if (other == com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.resourcemanager.v3.DeleteTagHoldMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.resourcemanager.v3.DeleteTagHoldMetadata) + private static final com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata(); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTagHoldMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldMetadataOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldMetadataOrBuilder.java new file mode 100644 index 000000000000..00c31da3d645 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldMetadataOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +public interface DeleteTagHoldMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.resourcemanager.v3.DeleteTagHoldMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldRequest.java new file mode 100644 index 000000000000..b30f62321844 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldRequest.java @@ -0,0 +1,748 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +/** + * + * + *
+ * The request message to delete a TagHold.
+ * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.DeleteTagHoldRequest} + */ +public final class DeleteTagHoldRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.resourcemanager.v3.DeleteTagHoldRequest) + DeleteTagHoldRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteTagHoldRequest.newBuilder() to construct. + private DeleteTagHoldRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteTagHoldRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteTagHoldRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest.class, + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the TagHold to delete. Must be of the form:
+   * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the TagHold to delete. Must be of the form:
+   * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_ = false; + /** + * + * + *
+   * Optional. Set to true to perform the validations necessary for deleting the
+   * resource, but not actually perform the action.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest)) { + return super.equals(obj); + } + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest other = + (com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message to delete a TagHold.
+   * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.DeleteTagHoldRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.resourcemanager.v3.DeleteTagHoldRequest) + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest.class, + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest.Builder.class); + } + + // Construct using com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest getDefaultInstanceForType() { + return com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest build() { + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest buildPartial() { + com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest result = + new com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest) { + return mergeFrom((com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest other) { + if (other == com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the TagHold to delete. Must be of the form:
+     * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the TagHold to delete. Must be of the form:
+     * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the TagHold to delete. Must be of the form:
+     * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the TagHold to delete. Must be of the form:
+     * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the TagHold to delete. Must be of the form:
+     * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. Set to true to perform the validations necessary for deleting the
+     * resource, but not actually perform the action.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. Set to true to perform the validations necessary for deleting the
+     * resource, but not actually perform the action.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Set to true to perform the validations necessary for deleting the
+     * resource, but not actually perform the action.
+     * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.resourcemanager.v3.DeleteTagHoldRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.resourcemanager.v3.DeleteTagHoldRequest) + private static final com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest(); + } + + public static com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTagHoldRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldRequestOrBuilder.java new file mode 100644 index 000000000000..2cedcf289ea5 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagHoldRequestOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +public interface DeleteTagHoldRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.resourcemanager.v3.DeleteTagHoldRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the TagHold to delete. Must be of the form:
+   * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the TagHold to delete. Must be of the form:
+   * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Set to true to perform the validations necessary for deleting the
+   * resource, but not actually perform the action.
+   * 
+ * + * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagKeyRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagKeyRequest.java index e450a4d0f844..22e496215c8e 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagKeyRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagKeyRequest.java @@ -76,9 +76,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`.
-   * The TagKey cannot be a parent of any existing TagValues or it will not be
-   * deleted successfully.
+   * Required. The resource name of a TagKey to be deleted in the format
+   * `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or
+   * it will not be deleted successfully.
    * 
* * @@ -103,9 +103,9 @@ public java.lang.String getName() { * * *
-   * Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`.
-   * The TagKey cannot be a parent of any existing TagValues or it will not be
-   * deleted successfully.
+   * Required. The resource name of a TagKey to be deleted in the format
+   * `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or
+   * it will not be deleted successfully.
    * 
* * @@ -133,8 +133,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Optional. Set as true to perform validations necessary for deletion, but not actually
-   * perform the action.
+   * Optional. Set as true to perform validations necessary for deletion, but
+   * not actually perform the action.
    * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -154,8 +154,8 @@ public boolean getValidateOnly() { * * *
-   * Optional. The etag known to the client for the expected state of the TagKey. This is
-   * to be used for optimistic concurrency.
+   * Optional. The etag known to the client for the expected state of the
+   * TagKey. This is to be used for optimistic concurrency.
    * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -178,8 +178,8 @@ public java.lang.String getEtag() { * * *
-   * Optional. The etag known to the client for the expected state of the TagKey. This is
-   * to be used for optimistic concurrency.
+   * Optional. The etag known to the client for the expected state of the
+   * TagKey. This is to be used for optimistic concurrency.
    * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -593,9 +593,9 @@ public Builder mergeFrom( * * *
-     * Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`.
-     * The TagKey cannot be a parent of any existing TagValues or it will not be
-     * deleted successfully.
+     * Required. The resource name of a TagKey to be deleted in the format
+     * `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or
+     * it will not be deleted successfully.
      * 
* * @@ -619,9 +619,9 @@ public java.lang.String getName() { * * *
-     * Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`.
-     * The TagKey cannot be a parent of any existing TagValues or it will not be
-     * deleted successfully.
+     * Required. The resource name of a TagKey to be deleted in the format
+     * `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or
+     * it will not be deleted successfully.
      * 
* * @@ -645,9 +645,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`.
-     * The TagKey cannot be a parent of any existing TagValues or it will not be
-     * deleted successfully.
+     * Required. The resource name of a TagKey to be deleted in the format
+     * `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or
+     * it will not be deleted successfully.
      * 
* * @@ -670,9 +670,9 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`.
-     * The TagKey cannot be a parent of any existing TagValues or it will not be
-     * deleted successfully.
+     * Required. The resource name of a TagKey to be deleted in the format
+     * `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or
+     * it will not be deleted successfully.
      * 
* * @@ -691,9 +691,9 @@ public Builder clearName() { * * *
-     * Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`.
-     * The TagKey cannot be a parent of any existing TagValues or it will not be
-     * deleted successfully.
+     * Required. The resource name of a TagKey to be deleted in the format
+     * `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or
+     * it will not be deleted successfully.
      * 
* * @@ -719,8 +719,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Set as true to perform validations necessary for deletion, but not actually
-     * perform the action.
+     * Optional. Set as true to perform validations necessary for deletion, but
+     * not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -735,8 +735,8 @@ public boolean getValidateOnly() { * * *
-     * Optional. Set as true to perform validations necessary for deletion, but not actually
-     * perform the action.
+     * Optional. Set as true to perform validations necessary for deletion, but
+     * not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -755,8 +755,8 @@ public Builder setValidateOnly(boolean value) { * * *
-     * Optional. Set as true to perform validations necessary for deletion, but not actually
-     * perform the action.
+     * Optional. Set as true to perform validations necessary for deletion, but
+     * not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -775,8 +775,8 @@ public Builder clearValidateOnly() { * * *
-     * Optional. The etag known to the client for the expected state of the TagKey. This is
-     * to be used for optimistic concurrency.
+     * Optional. The etag known to the client for the expected state of the
+     * TagKey. This is to be used for optimistic concurrency.
      * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -798,8 +798,8 @@ public java.lang.String getEtag() { * * *
-     * Optional. The etag known to the client for the expected state of the TagKey. This is
-     * to be used for optimistic concurrency.
+     * Optional. The etag known to the client for the expected state of the
+     * TagKey. This is to be used for optimistic concurrency.
      * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -821,8 +821,8 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-     * Optional. The etag known to the client for the expected state of the TagKey. This is
-     * to be used for optimistic concurrency.
+     * Optional. The etag known to the client for the expected state of the
+     * TagKey. This is to be used for optimistic concurrency.
      * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -843,8 +843,8 @@ public Builder setEtag(java.lang.String value) { * * *
-     * Optional. The etag known to the client for the expected state of the TagKey. This is
-     * to be used for optimistic concurrency.
+     * Optional. The etag known to the client for the expected state of the
+     * TagKey. This is to be used for optimistic concurrency.
      * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -861,8 +861,8 @@ public Builder clearEtag() { * * *
-     * Optional. The etag known to the client for the expected state of the TagKey. This is
-     * to be used for optimistic concurrency.
+     * Optional. The etag known to the client for the expected state of the
+     * TagKey. This is to be used for optimistic concurrency.
      * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagKeyRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagKeyRequestOrBuilder.java index 36ebc4e398db..dd8e36a3771f 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagKeyRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagKeyRequestOrBuilder.java @@ -27,9 +27,9 @@ public interface DeleteTagKeyRequestOrBuilder * * *
-   * Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`.
-   * The TagKey cannot be a parent of any existing TagValues or it will not be
-   * deleted successfully.
+   * Required. The resource name of a TagKey to be deleted in the format
+   * `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or
+   * it will not be deleted successfully.
    * 
* * @@ -43,9 +43,9 @@ public interface DeleteTagKeyRequestOrBuilder * * *
-   * Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`.
-   * The TagKey cannot be a parent of any existing TagValues or it will not be
-   * deleted successfully.
+   * Required. The resource name of a TagKey to be deleted in the format
+   * `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or
+   * it will not be deleted successfully.
    * 
* * @@ -60,8 +60,8 @@ public interface DeleteTagKeyRequestOrBuilder * * *
-   * Optional. Set as true to perform validations necessary for deletion, but not actually
-   * perform the action.
+   * Optional. Set as true to perform validations necessary for deletion, but
+   * not actually perform the action.
    * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -74,8 +74,8 @@ public interface DeleteTagKeyRequestOrBuilder * * *
-   * Optional. The etag known to the client for the expected state of the TagKey. This is
-   * to be used for optimistic concurrency.
+   * Optional. The etag known to the client for the expected state of the
+   * TagKey. This is to be used for optimistic concurrency.
    * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -87,8 +87,8 @@ public interface DeleteTagKeyRequestOrBuilder * * *
-   * Optional. The etag known to the client for the expected state of the TagKey. This is
-   * to be used for optimistic concurrency.
+   * Optional. The etag known to the client for the expected state of the
+   * TagKey. This is to be used for optimistic concurrency.
    * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagValueRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagValueRequest.java index bcff4470e31b..08e4a09f9f83 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagValueRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagValueRequest.java @@ -76,7 +76,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Resource name for TagValue to be deleted in the format tagValues/456.
+   * Required. Resource name for TagValue to be deleted in the format
+   * tagValues/456.
    * 
* * @@ -101,7 +102,8 @@ public java.lang.String getName() { * * *
-   * Required. Resource name for TagValue to be deleted in the format tagValues/456.
+   * Required. Resource name for TagValue to be deleted in the format
+   * tagValues/456.
    * 
* * @@ -129,8 +131,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Optional. Set as true to perform the validations necessary for deletion, but not
-   * actually perform the action.
+   * Optional. Set as true to perform the validations necessary for deletion,
+   * but not actually perform the action.
    * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -150,8 +152,8 @@ public boolean getValidateOnly() { * * *
-   * Optional. The etag known to the client for the expected state of the TagValue. This
-   * is to be used for optimistic concurrency.
+   * Optional. The etag known to the client for the expected state of the
+   * TagValue. This is to be used for optimistic concurrency.
    * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -174,8 +176,8 @@ public java.lang.String getEtag() { * * *
-   * Optional. The etag known to the client for the expected state of the TagValue. This
-   * is to be used for optimistic concurrency.
+   * Optional. The etag known to the client for the expected state of the
+   * TagValue. This is to be used for optimistic concurrency.
    * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -589,7 +591,8 @@ public Builder mergeFrom( * * *
-     * Required. Resource name for TagValue to be deleted in the format tagValues/456.
+     * Required. Resource name for TagValue to be deleted in the format
+     * tagValues/456.
      * 
* * @@ -613,7 +616,8 @@ public java.lang.String getName() { * * *
-     * Required. Resource name for TagValue to be deleted in the format tagValues/456.
+     * Required. Resource name for TagValue to be deleted in the format
+     * tagValues/456.
      * 
* * @@ -637,7 +641,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. Resource name for TagValue to be deleted in the format tagValues/456.
+     * Required. Resource name for TagValue to be deleted in the format
+     * tagValues/456.
      * 
* * @@ -660,7 +665,8 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. Resource name for TagValue to be deleted in the format tagValues/456.
+     * Required. Resource name for TagValue to be deleted in the format
+     * tagValues/456.
      * 
* * @@ -679,7 +685,8 @@ public Builder clearName() { * * *
-     * Required. Resource name for TagValue to be deleted in the format tagValues/456.
+     * Required. Resource name for TagValue to be deleted in the format
+     * tagValues/456.
      * 
* * @@ -705,8 +712,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Set as true to perform the validations necessary for deletion, but not
-     * actually perform the action.
+     * Optional. Set as true to perform the validations necessary for deletion,
+     * but not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -721,8 +728,8 @@ public boolean getValidateOnly() { * * *
-     * Optional. Set as true to perform the validations necessary for deletion, but not
-     * actually perform the action.
+     * Optional. Set as true to perform the validations necessary for deletion,
+     * but not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -741,8 +748,8 @@ public Builder setValidateOnly(boolean value) { * * *
-     * Optional. Set as true to perform the validations necessary for deletion, but not
-     * actually perform the action.
+     * Optional. Set as true to perform the validations necessary for deletion,
+     * but not actually perform the action.
      * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -761,8 +768,8 @@ public Builder clearValidateOnly() { * * *
-     * Optional. The etag known to the client for the expected state of the TagValue. This
-     * is to be used for optimistic concurrency.
+     * Optional. The etag known to the client for the expected state of the
+     * TagValue. This is to be used for optimistic concurrency.
      * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -784,8 +791,8 @@ public java.lang.String getEtag() { * * *
-     * Optional. The etag known to the client for the expected state of the TagValue. This
-     * is to be used for optimistic concurrency.
+     * Optional. The etag known to the client for the expected state of the
+     * TagValue. This is to be used for optimistic concurrency.
      * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -807,8 +814,8 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-     * Optional. The etag known to the client for the expected state of the TagValue. This
-     * is to be used for optimistic concurrency.
+     * Optional. The etag known to the client for the expected state of the
+     * TagValue. This is to be used for optimistic concurrency.
      * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -829,8 +836,8 @@ public Builder setEtag(java.lang.String value) { * * *
-     * Optional. The etag known to the client for the expected state of the TagValue. This
-     * is to be used for optimistic concurrency.
+     * Optional. The etag known to the client for the expected state of the
+     * TagValue. This is to be used for optimistic concurrency.
      * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -847,8 +854,8 @@ public Builder clearEtag() { * * *
-     * Optional. The etag known to the client for the expected state of the TagValue. This
-     * is to be used for optimistic concurrency.
+     * Optional. The etag known to the client for the expected state of the
+     * TagValue. This is to be used for optimistic concurrency.
      * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagValueRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagValueRequestOrBuilder.java index ea0ec41dd0f1..4cd6555da81c 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagValueRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/DeleteTagValueRequestOrBuilder.java @@ -27,7 +27,8 @@ public interface DeleteTagValueRequestOrBuilder * * *
-   * Required. Resource name for TagValue to be deleted in the format tagValues/456.
+   * Required. Resource name for TagValue to be deleted in the format
+   * tagValues/456.
    * 
* * @@ -41,7 +42,8 @@ public interface DeleteTagValueRequestOrBuilder * * *
-   * Required. Resource name for TagValue to be deleted in the format tagValues/456.
+   * Required. Resource name for TagValue to be deleted in the format
+   * tagValues/456.
    * 
* * @@ -56,8 +58,8 @@ public interface DeleteTagValueRequestOrBuilder * * *
-   * Optional. Set as true to perform the validations necessary for deletion, but not
-   * actually perform the action.
+   * Optional. Set as true to perform the validations necessary for deletion,
+   * but not actually perform the action.
    * 
* * bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -70,8 +72,8 @@ public interface DeleteTagValueRequestOrBuilder * * *
-   * Optional. The etag known to the client for the expected state of the TagValue. This
-   * is to be used for optimistic concurrency.
+   * Optional. The etag known to the client for the expected state of the
+   * TagValue. This is to be used for optimistic concurrency.
    * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -83,8 +85,8 @@ public interface DeleteTagValueRequestOrBuilder * * *
-   * Optional. The etag known to the client for the expected state of the TagValue. This
-   * is to be used for optimistic concurrency.
+   * Optional. The etag known to the client for the expected state of the
+   * TagValue. This is to be used for optimistic concurrency.
    * 
* * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/EffectiveTag.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/EffectiveTag.java new file mode 100644 index 000000000000..064aba20fd8c --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/EffectiveTag.java @@ -0,0 +1,1512 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_bindings.proto + +package com.google.cloud.resourcemanager.v3; + +/** + * + * + *
+ * An EffectiveTag represents a tag that applies to a resource during policy
+ * evaluation. Tags can be either directly bound to a resource or inherited from
+ * its ancestor. EffectiveTag contains the name and
+ * namespaced_name of the tag value and tag key, with additional fields of
+ * `inherited` to indicate the inheritance status of the effective tag.
+ * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.EffectiveTag} + */ +public final class EffectiveTag extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.resourcemanager.v3.EffectiveTag) + EffectiveTagOrBuilder { + private static final long serialVersionUID = 0L; + // Use EffectiveTag.newBuilder() to construct. + private EffectiveTag(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EffectiveTag() { + tagValue_ = ""; + namespacedTagValue_ = ""; + tagKey_ = ""; + namespacedTagKey_ = ""; + tagKeyParentName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EffectiveTag(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_EffectiveTag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_EffectiveTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.EffectiveTag.class, + com.google.cloud.resourcemanager.v3.EffectiveTag.Builder.class); + } + + public static final int TAG_VALUE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object tagValue_ = ""; + /** + * + * + *
+   * Resource name for TagValue in the format `tagValues/456`.
+   * 
+ * + * string tag_value = 1 [(.google.api.resource_reference) = { ... } + * + * @return The tagValue. + */ + @java.lang.Override + public java.lang.String getTagValue() { + java.lang.Object ref = tagValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tagValue_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name for TagValue in the format `tagValues/456`.
+   * 
+ * + * string tag_value = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for tagValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTagValueBytes() { + java.lang.Object ref = tagValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMESPACED_TAG_VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object namespacedTagValue_ = ""; + /** + * + * + *
+   * Namespaced name of the TagValue. Now only supported in the format
+   * `{organization_id}/{tag_key_short_name}/{tag_value_short_name}`.
+   * Other formats will be supported when we add non-org parented tags.
+   * 
+ * + * string namespaced_tag_value = 2; + * + * @return The namespacedTagValue. + */ + @java.lang.Override + public java.lang.String getNamespacedTagValue() { + java.lang.Object ref = namespacedTagValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespacedTagValue_ = s; + return s; + } + } + /** + * + * + *
+   * Namespaced name of the TagValue. Now only supported in the format
+   * `{organization_id}/{tag_key_short_name}/{tag_value_short_name}`.
+   * Other formats will be supported when we add non-org parented tags.
+   * 
+ * + * string namespaced_tag_value = 2; + * + * @return The bytes for namespacedTagValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNamespacedTagValueBytes() { + java.lang.Object ref = namespacedTagValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespacedTagValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAG_KEY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object tagKey_ = ""; + /** + * + * + *
+   * The name of the TagKey, in the format `tagKeys/{id}`, such as
+   * `tagKeys/123`.
+   * 
+ * + * string tag_key = 3 [(.google.api.resource_reference) = { ... } + * + * @return The tagKey. + */ + @java.lang.Override + public java.lang.String getTagKey() { + java.lang.Object ref = tagKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tagKey_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the TagKey, in the format `tagKeys/{id}`, such as
+   * `tagKeys/123`.
+   * 
+ * + * string tag_key = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for tagKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTagKeyBytes() { + java.lang.Object ref = tagKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMESPACED_TAG_KEY_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object namespacedTagKey_ = ""; + /** + * + * + *
+   * The namespaced_name of the TagKey. Now only supported in the format of
+   * `{organization_id}/{tag_key_short_name}`. Other formats will be
+   * supported when we add non-org parented tags.
+   * 
+ * + * string namespaced_tag_key = 4; + * + * @return The namespacedTagKey. + */ + @java.lang.Override + public java.lang.String getNamespacedTagKey() { + java.lang.Object ref = namespacedTagKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespacedTagKey_ = s; + return s; + } + } + /** + * + * + *
+   * The namespaced_name of the TagKey. Now only supported in the format of
+   * `{organization_id}/{tag_key_short_name}`. Other formats will be
+   * supported when we add non-org parented tags.
+   * 
+ * + * string namespaced_tag_key = 4; + * + * @return The bytes for namespacedTagKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNamespacedTagKeyBytes() { + java.lang.Object ref = namespacedTagKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespacedTagKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAG_KEY_PARENT_NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object tagKeyParentName_ = ""; + /** + * + * + *
+   * The parent name of the tag key.
+   * Must be in the format `organizations/{organization_id}`.
+   * 
+ * + * string tag_key_parent_name = 6; + * + * @return The tagKeyParentName. + */ + @java.lang.Override + public java.lang.String getTagKeyParentName() { + java.lang.Object ref = tagKeyParentName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tagKeyParentName_ = s; + return s; + } + } + /** + * + * + *
+   * The parent name of the tag key.
+   * Must be in the format `organizations/{organization_id}`.
+   * 
+ * + * string tag_key_parent_name = 6; + * + * @return The bytes for tagKeyParentName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTagKeyParentNameBytes() { + java.lang.Object ref = tagKeyParentName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagKeyParentName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INHERITED_FIELD_NUMBER = 5; + private boolean inherited_ = false; + /** + * + * + *
+   * Indicates the inheritance status of a tag value
+   * attached to the given resource. If the tag value is inherited from one of
+   * the resource's ancestors, inherited will be true. If false, then the tag
+   * value is directly attached to the resource, inherited will be false.
+   * 
+ * + * bool inherited = 5; + * + * @return The inherited. + */ + @java.lang.Override + public boolean getInherited() { + return inherited_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tagValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tagValue_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespacedTagValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespacedTagValue_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tagKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tagKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespacedTagKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, namespacedTagKey_); + } + if (inherited_ != false) { + output.writeBool(5, inherited_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tagKeyParentName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, tagKeyParentName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tagValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tagValue_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespacedTagValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, namespacedTagValue_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tagKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tagKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespacedTagKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, namespacedTagKey_); + } + if (inherited_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, inherited_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tagKeyParentName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, tagKeyParentName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.resourcemanager.v3.EffectiveTag)) { + return super.equals(obj); + } + com.google.cloud.resourcemanager.v3.EffectiveTag other = + (com.google.cloud.resourcemanager.v3.EffectiveTag) obj; + + if (!getTagValue().equals(other.getTagValue())) return false; + if (!getNamespacedTagValue().equals(other.getNamespacedTagValue())) return false; + if (!getTagKey().equals(other.getTagKey())) return false; + if (!getNamespacedTagKey().equals(other.getNamespacedTagKey())) return false; + if (!getTagKeyParentName().equals(other.getTagKeyParentName())) return false; + if (getInherited() != other.getInherited()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TAG_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getTagValue().hashCode(); + hash = (37 * hash) + NAMESPACED_TAG_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getNamespacedTagValue().hashCode(); + hash = (37 * hash) + TAG_KEY_FIELD_NUMBER; + hash = (53 * hash) + getTagKey().hashCode(); + hash = (37 * hash) + NAMESPACED_TAG_KEY_FIELD_NUMBER; + hash = (53 * hash) + getNamespacedTagKey().hashCode(); + hash = (37 * hash) + TAG_KEY_PARENT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTagKeyParentName().hashCode(); + hash = (37 * hash) + INHERITED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInherited()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.resourcemanager.v3.EffectiveTag parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.EffectiveTag parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.EffectiveTag parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.EffectiveTag parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.EffectiveTag parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.EffectiveTag parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.EffectiveTag parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.EffectiveTag parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.EffectiveTag parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.EffectiveTag parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.EffectiveTag parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.EffectiveTag parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.resourcemanager.v3.EffectiveTag prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An EffectiveTag represents a tag that applies to a resource during policy
+   * evaluation. Tags can be either directly bound to a resource or inherited from
+   * its ancestor. EffectiveTag contains the name and
+   * namespaced_name of the tag value and tag key, with additional fields of
+   * `inherited` to indicate the inheritance status of the effective tag.
+   * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.EffectiveTag} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.resourcemanager.v3.EffectiveTag) + com.google.cloud.resourcemanager.v3.EffectiveTagOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_EffectiveTag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_EffectiveTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.EffectiveTag.class, + com.google.cloud.resourcemanager.v3.EffectiveTag.Builder.class); + } + + // Construct using com.google.cloud.resourcemanager.v3.EffectiveTag.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tagValue_ = ""; + namespacedTagValue_ = ""; + tagKey_ = ""; + namespacedTagKey_ = ""; + tagKeyParentName_ = ""; + inherited_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_EffectiveTag_descriptor; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.EffectiveTag getDefaultInstanceForType() { + return com.google.cloud.resourcemanager.v3.EffectiveTag.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.EffectiveTag build() { + com.google.cloud.resourcemanager.v3.EffectiveTag result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.EffectiveTag buildPartial() { + com.google.cloud.resourcemanager.v3.EffectiveTag result = + new com.google.cloud.resourcemanager.v3.EffectiveTag(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.resourcemanager.v3.EffectiveTag result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tagValue_ = tagValue_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.namespacedTagValue_ = namespacedTagValue_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.tagKey_ = tagKey_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.namespacedTagKey_ = namespacedTagKey_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.tagKeyParentName_ = tagKeyParentName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.inherited_ = inherited_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.resourcemanager.v3.EffectiveTag) { + return mergeFrom((com.google.cloud.resourcemanager.v3.EffectiveTag) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.resourcemanager.v3.EffectiveTag other) { + if (other == com.google.cloud.resourcemanager.v3.EffectiveTag.getDefaultInstance()) + return this; + if (!other.getTagValue().isEmpty()) { + tagValue_ = other.tagValue_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getNamespacedTagValue().isEmpty()) { + namespacedTagValue_ = other.namespacedTagValue_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTagKey().isEmpty()) { + tagKey_ = other.tagKey_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getNamespacedTagKey().isEmpty()) { + namespacedTagKey_ = other.namespacedTagKey_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getTagKeyParentName().isEmpty()) { + tagKeyParentName_ = other.tagKeyParentName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getInherited() != false) { + setInherited(other.getInherited()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + tagValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + namespacedTagValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + tagKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + namespacedTagKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + inherited_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 40 + case 50: + { + tagKeyParentName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object tagValue_ = ""; + /** + * + * + *
+     * Resource name for TagValue in the format `tagValues/456`.
+     * 
+ * + * string tag_value = 1 [(.google.api.resource_reference) = { ... } + * + * @return The tagValue. + */ + public java.lang.String getTagValue() { + java.lang.Object ref = tagValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tagValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name for TagValue in the format `tagValues/456`.
+     * 
+ * + * string tag_value = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for tagValue. + */ + public com.google.protobuf.ByteString getTagValueBytes() { + java.lang.Object ref = tagValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name for TagValue in the format `tagValues/456`.
+     * 
+ * + * string tag_value = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The tagValue to set. + * @return This builder for chaining. + */ + public Builder setTagValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tagValue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name for TagValue in the format `tagValues/456`.
+     * 
+ * + * string tag_value = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearTagValue() { + tagValue_ = getDefaultInstance().getTagValue(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name for TagValue in the format `tagValues/456`.
+     * 
+ * + * string tag_value = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for tagValue to set. + * @return This builder for chaining. + */ + public Builder setTagValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tagValue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object namespacedTagValue_ = ""; + /** + * + * + *
+     * Namespaced name of the TagValue. Now only supported in the format
+     * `{organization_id}/{tag_key_short_name}/{tag_value_short_name}`.
+     * Other formats will be supported when we add non-org parented tags.
+     * 
+ * + * string namespaced_tag_value = 2; + * + * @return The namespacedTagValue. + */ + public java.lang.String getNamespacedTagValue() { + java.lang.Object ref = namespacedTagValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespacedTagValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Namespaced name of the TagValue. Now only supported in the format
+     * `{organization_id}/{tag_key_short_name}/{tag_value_short_name}`.
+     * Other formats will be supported when we add non-org parented tags.
+     * 
+ * + * string namespaced_tag_value = 2; + * + * @return The bytes for namespacedTagValue. + */ + public com.google.protobuf.ByteString getNamespacedTagValueBytes() { + java.lang.Object ref = namespacedTagValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespacedTagValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Namespaced name of the TagValue. Now only supported in the format
+     * `{organization_id}/{tag_key_short_name}/{tag_value_short_name}`.
+     * Other formats will be supported when we add non-org parented tags.
+     * 
+ * + * string namespaced_tag_value = 2; + * + * @param value The namespacedTagValue to set. + * @return This builder for chaining. + */ + public Builder setNamespacedTagValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + namespacedTagValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Namespaced name of the TagValue. Now only supported in the format
+     * `{organization_id}/{tag_key_short_name}/{tag_value_short_name}`.
+     * Other formats will be supported when we add non-org parented tags.
+     * 
+ * + * string namespaced_tag_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearNamespacedTagValue() { + namespacedTagValue_ = getDefaultInstance().getNamespacedTagValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Namespaced name of the TagValue. Now only supported in the format
+     * `{organization_id}/{tag_key_short_name}/{tag_value_short_name}`.
+     * Other formats will be supported when we add non-org parented tags.
+     * 
+ * + * string namespaced_tag_value = 2; + * + * @param value The bytes for namespacedTagValue to set. + * @return This builder for chaining. + */ + public Builder setNamespacedTagValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + namespacedTagValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object tagKey_ = ""; + /** + * + * + *
+     * The name of the TagKey, in the format `tagKeys/{id}`, such as
+     * `tagKeys/123`.
+     * 
+ * + * string tag_key = 3 [(.google.api.resource_reference) = { ... } + * + * @return The tagKey. + */ + public java.lang.String getTagKey() { + java.lang.Object ref = tagKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tagKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the TagKey, in the format `tagKeys/{id}`, such as
+     * `tagKeys/123`.
+     * 
+ * + * string tag_key = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for tagKey. + */ + public com.google.protobuf.ByteString getTagKeyBytes() { + java.lang.Object ref = tagKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the TagKey, in the format `tagKeys/{id}`, such as
+     * `tagKeys/123`.
+     * 
+ * + * string tag_key = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The tagKey to set. + * @return This builder for chaining. + */ + public Builder setTagKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tagKey_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the TagKey, in the format `tagKeys/{id}`, such as
+     * `tagKeys/123`.
+     * 
+ * + * string tag_key = 3 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearTagKey() { + tagKey_ = getDefaultInstance().getTagKey(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the TagKey, in the format `tagKeys/{id}`, such as
+     * `tagKeys/123`.
+     * 
+ * + * string tag_key = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for tagKey to set. + * @return This builder for chaining. + */ + public Builder setTagKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tagKey_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object namespacedTagKey_ = ""; + /** + * + * + *
+     * The namespaced_name of the TagKey. Now only supported in the format of
+     * `{organization_id}/{tag_key_short_name}`. Other formats will be
+     * supported when we add non-org parented tags.
+     * 
+ * + * string namespaced_tag_key = 4; + * + * @return The namespacedTagKey. + */ + public java.lang.String getNamespacedTagKey() { + java.lang.Object ref = namespacedTagKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespacedTagKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The namespaced_name of the TagKey. Now only supported in the format of
+     * `{organization_id}/{tag_key_short_name}`. Other formats will be
+     * supported when we add non-org parented tags.
+     * 
+ * + * string namespaced_tag_key = 4; + * + * @return The bytes for namespacedTagKey. + */ + public com.google.protobuf.ByteString getNamespacedTagKeyBytes() { + java.lang.Object ref = namespacedTagKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespacedTagKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The namespaced_name of the TagKey. Now only supported in the format of
+     * `{organization_id}/{tag_key_short_name}`. Other formats will be
+     * supported when we add non-org parented tags.
+     * 
+ * + * string namespaced_tag_key = 4; + * + * @param value The namespacedTagKey to set. + * @return This builder for chaining. + */ + public Builder setNamespacedTagKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + namespacedTagKey_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The namespaced_name of the TagKey. Now only supported in the format of
+     * `{organization_id}/{tag_key_short_name}`. Other formats will be
+     * supported when we add non-org parented tags.
+     * 
+ * + * string namespaced_tag_key = 4; + * + * @return This builder for chaining. + */ + public Builder clearNamespacedTagKey() { + namespacedTagKey_ = getDefaultInstance().getNamespacedTagKey(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The namespaced_name of the TagKey. Now only supported in the format of
+     * `{organization_id}/{tag_key_short_name}`. Other formats will be
+     * supported when we add non-org parented tags.
+     * 
+ * + * string namespaced_tag_key = 4; + * + * @param value The bytes for namespacedTagKey to set. + * @return This builder for chaining. + */ + public Builder setNamespacedTagKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + namespacedTagKey_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object tagKeyParentName_ = ""; + /** + * + * + *
+     * The parent name of the tag key.
+     * Must be in the format `organizations/{organization_id}`.
+     * 
+ * + * string tag_key_parent_name = 6; + * + * @return The tagKeyParentName. + */ + public java.lang.String getTagKeyParentName() { + java.lang.Object ref = tagKeyParentName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tagKeyParentName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The parent name of the tag key.
+     * Must be in the format `organizations/{organization_id}`.
+     * 
+ * + * string tag_key_parent_name = 6; + * + * @return The bytes for tagKeyParentName. + */ + public com.google.protobuf.ByteString getTagKeyParentNameBytes() { + java.lang.Object ref = tagKeyParentName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagKeyParentName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The parent name of the tag key.
+     * Must be in the format `organizations/{organization_id}`.
+     * 
+ * + * string tag_key_parent_name = 6; + * + * @param value The tagKeyParentName to set. + * @return This builder for chaining. + */ + public Builder setTagKeyParentName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tagKeyParentName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The parent name of the tag key.
+     * Must be in the format `organizations/{organization_id}`.
+     * 
+ * + * string tag_key_parent_name = 6; + * + * @return This builder for chaining. + */ + public Builder clearTagKeyParentName() { + tagKeyParentName_ = getDefaultInstance().getTagKeyParentName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The parent name of the tag key.
+     * Must be in the format `organizations/{organization_id}`.
+     * 
+ * + * string tag_key_parent_name = 6; + * + * @param value The bytes for tagKeyParentName to set. + * @return This builder for chaining. + */ + public Builder setTagKeyParentNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tagKeyParentName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean inherited_; + /** + * + * + *
+     * Indicates the inheritance status of a tag value
+     * attached to the given resource. If the tag value is inherited from one of
+     * the resource's ancestors, inherited will be true. If false, then the tag
+     * value is directly attached to the resource, inherited will be false.
+     * 
+ * + * bool inherited = 5; + * + * @return The inherited. + */ + @java.lang.Override + public boolean getInherited() { + return inherited_; + } + /** + * + * + *
+     * Indicates the inheritance status of a tag value
+     * attached to the given resource. If the tag value is inherited from one of
+     * the resource's ancestors, inherited will be true. If false, then the tag
+     * value is directly attached to the resource, inherited will be false.
+     * 
+ * + * bool inherited = 5; + * + * @param value The inherited to set. + * @return This builder for chaining. + */ + public Builder setInherited(boolean value) { + + inherited_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates the inheritance status of a tag value
+     * attached to the given resource. If the tag value is inherited from one of
+     * the resource's ancestors, inherited will be true. If false, then the tag
+     * value is directly attached to the resource, inherited will be false.
+     * 
+ * + * bool inherited = 5; + * + * @return This builder for chaining. + */ + public Builder clearInherited() { + bitField0_ = (bitField0_ & ~0x00000020); + inherited_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.resourcemanager.v3.EffectiveTag) + } + + // @@protoc_insertion_point(class_scope:google.cloud.resourcemanager.v3.EffectiveTag) + private static final com.google.cloud.resourcemanager.v3.EffectiveTag DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.resourcemanager.v3.EffectiveTag(); + } + + public static com.google.cloud.resourcemanager.v3.EffectiveTag getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EffectiveTag parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.EffectiveTag getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/EffectiveTagOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/EffectiveTagOrBuilder.java new file mode 100644 index 000000000000..52b2ad5503dc --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/EffectiveTagOrBuilder.java @@ -0,0 +1,178 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_bindings.proto + +package com.google.cloud.resourcemanager.v3; + +public interface EffectiveTagOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.resourcemanager.v3.EffectiveTag) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name for TagValue in the format `tagValues/456`.
+   * 
+ * + * string tag_value = 1 [(.google.api.resource_reference) = { ... } + * + * @return The tagValue. + */ + java.lang.String getTagValue(); + /** + * + * + *
+   * Resource name for TagValue in the format `tagValues/456`.
+   * 
+ * + * string tag_value = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for tagValue. + */ + com.google.protobuf.ByteString getTagValueBytes(); + + /** + * + * + *
+   * Namespaced name of the TagValue. Now only supported in the format
+   * `{organization_id}/{tag_key_short_name}/{tag_value_short_name}`.
+   * Other formats will be supported when we add non-org parented tags.
+   * 
+ * + * string namespaced_tag_value = 2; + * + * @return The namespacedTagValue. + */ + java.lang.String getNamespacedTagValue(); + /** + * + * + *
+   * Namespaced name of the TagValue. Now only supported in the format
+   * `{organization_id}/{tag_key_short_name}/{tag_value_short_name}`.
+   * Other formats will be supported when we add non-org parented tags.
+   * 
+ * + * string namespaced_tag_value = 2; + * + * @return The bytes for namespacedTagValue. + */ + com.google.protobuf.ByteString getNamespacedTagValueBytes(); + + /** + * + * + *
+   * The name of the TagKey, in the format `tagKeys/{id}`, such as
+   * `tagKeys/123`.
+   * 
+ * + * string tag_key = 3 [(.google.api.resource_reference) = { ... } + * + * @return The tagKey. + */ + java.lang.String getTagKey(); + /** + * + * + *
+   * The name of the TagKey, in the format `tagKeys/{id}`, such as
+   * `tagKeys/123`.
+   * 
+ * + * string tag_key = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for tagKey. + */ + com.google.protobuf.ByteString getTagKeyBytes(); + + /** + * + * + *
+   * The namespaced_name of the TagKey. Now only supported in the format of
+   * `{organization_id}/{tag_key_short_name}`. Other formats will be
+   * supported when we add non-org parented tags.
+   * 
+ * + * string namespaced_tag_key = 4; + * + * @return The namespacedTagKey. + */ + java.lang.String getNamespacedTagKey(); + /** + * + * + *
+   * The namespaced_name of the TagKey. Now only supported in the format of
+   * `{organization_id}/{tag_key_short_name}`. Other formats will be
+   * supported when we add non-org parented tags.
+   * 
+ * + * string namespaced_tag_key = 4; + * + * @return The bytes for namespacedTagKey. + */ + com.google.protobuf.ByteString getNamespacedTagKeyBytes(); + + /** + * + * + *
+   * The parent name of the tag key.
+   * Must be in the format `organizations/{organization_id}`.
+   * 
+ * + * string tag_key_parent_name = 6; + * + * @return The tagKeyParentName. + */ + java.lang.String getTagKeyParentName(); + /** + * + * + *
+   * The parent name of the tag key.
+   * Must be in the format `organizations/{organization_id}`.
+   * 
+ * + * string tag_key_parent_name = 6; + * + * @return The bytes for tagKeyParentName. + */ + com.google.protobuf.ByteString getTagKeyParentNameBytes(); + + /** + * + * + *
+   * Indicates the inheritance status of a tag value
+   * attached to the given resource. If the tag value is inherited from one of
+   * the resource's ancestors, inherited will be true. If false, then the tag
+   * value is directly attached to the resource, inherited will be false.
+   * 
+ * + * bool inherited = 5; + * + * @return The inherited. + */ + boolean getInherited(); +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Folder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Folder.java index 903ba5233637..37afbdc906af 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Folder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Folder.java @@ -600,9 +600,9 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { * * *
-   * Output only. A checksum computed by the server based on the current value of the folder
-   * resource. This may be sent on update and delete requests to ensure the
-   * client has an up-to-date value before proceeding.
+   * Output only. A checksum computed by the server based on the current value
+   * of the folder resource. This may be sent on update and delete requests to
+   * ensure the client has an up-to-date value before proceeding.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -625,9 +625,9 @@ public java.lang.String getEtag() { * * *
-   * Output only. A checksum computed by the server based on the current value of the folder
-   * resource. This may be sent on update and delete requests to ensure the
-   * client has an up-to-date value before proceeding.
+   * Output only. A checksum computed by the server based on the current value
+   * of the folder resource. This may be sent on update and delete requests to
+   * ensure the client has an up-to-date value before proceeding.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2264,9 +2264,9 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { * * *
-     * Output only. A checksum computed by the server based on the current value of the folder
-     * resource. This may be sent on update and delete requests to ensure the
-     * client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the folder resource. This may be sent on update and delete requests to
+     * ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2288,9 +2288,9 @@ public java.lang.String getEtag() { * * *
-     * Output only. A checksum computed by the server based on the current value of the folder
-     * resource. This may be sent on update and delete requests to ensure the
-     * client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the folder resource. This may be sent on update and delete requests to
+     * ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2312,9 +2312,9 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-     * Output only. A checksum computed by the server based on the current value of the folder
-     * resource. This may be sent on update and delete requests to ensure the
-     * client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the folder resource. This may be sent on update and delete requests to
+     * ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2335,9 +2335,9 @@ public Builder setEtag(java.lang.String value) { * * *
-     * Output only. A checksum computed by the server based on the current value of the folder
-     * resource. This may be sent on update and delete requests to ensure the
-     * client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the folder resource. This may be sent on update and delete requests to
+     * ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2354,9 +2354,9 @@ public Builder clearEtag() { * * *
-     * Output only. A checksum computed by the server based on the current value of the folder
-     * resource. This may be sent on update and delete requests to ensure the
-     * client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the folder resource. This may be sent on update and delete requests to
+     * ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/FolderOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/FolderOrBuilder.java index 65e3b2176894..4e50018b4b8f 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/FolderOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/FolderOrBuilder.java @@ -269,9 +269,9 @@ public interface FolderOrBuilder * * *
-   * Output only. A checksum computed by the server based on the current value of the folder
-   * resource. This may be sent on update and delete requests to ensure the
-   * client has an up-to-date value before proceeding.
+   * Output only. A checksum computed by the server based on the current value
+   * of the folder resource. This may be sent on update and delete requests to
+   * ensure the client has an up-to-date value before proceeding.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -283,9 +283,9 @@ public interface FolderOrBuilder * * *
-   * Output only. A checksum computed by the server based on the current value of the folder
-   * resource. This may be sent on update and delete requests to ensure the
-   * client has an up-to-date value before proceeding.
+   * Output only. A checksum computed by the server based on the current value
+   * of the folder resource. This may be sent on update and delete requests to
+   * ensure the client has an up-to-date value before proceeding.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagKeyRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagKeyRequest.java new file mode 100644 index 000000000000..e09b82ec4c8c --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagKeyRequest.java @@ -0,0 +1,671 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_keys.proto + +package com.google.cloud.resourcemanager.v3; + +/** + * + * + *
+ * The request message for getting a TagKey by its namespaced name.
+ * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest} + */ +public final class GetNamespacedTagKeyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest) + GetNamespacedTagKeyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNamespacedTagKeyRequest.newBuilder() to construct. + private GetNamespacedTagKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNamespacedTagKeyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNamespacedTagKeyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagKeysProto + .internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagKeysProto + .internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest.class, + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. A namespaced tag key name in the format
+   * `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name
+   * "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short
+   * name "bar" under the project `r2-d2`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A namespaced tag key name in the format
+   * `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name
+   * "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short
+   * name "bar" under the project `r2-d2`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest)) { + return super.equals(obj); + } + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest other = + (com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for getting a TagKey by its namespaced name.
+   * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest) + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagKeysProto + .internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagKeysProto + .internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest.class, + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest.Builder.class); + } + + // Construct using com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.resourcemanager.v3.TagKeysProto + .internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagKeyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest + getDefaultInstanceForType() { + return com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest build() { + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest buildPartial() { + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest result = + new com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest) { + return mergeFrom((com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest other) { + if (other + == com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. A namespaced tag key name in the format
+     * `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name
+     * "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short
+     * name "bar" under the project `r2-d2`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A namespaced tag key name in the format
+     * `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name
+     * "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short
+     * name "bar" under the project `r2-d2`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A namespaced tag key name in the format
+     * `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name
+     * "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short
+     * name "bar" under the project `r2-d2`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A namespaced tag key name in the format
+     * `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name
+     * "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short
+     * name "bar" under the project `r2-d2`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A namespaced tag key name in the format
+     * `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name
+     * "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short
+     * name "bar" under the project `r2-d2`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest) + private static final com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest(); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNamespacedTagKeyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagKeyRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagKeyRequestOrBuilder.java new file mode 100644 index 000000000000..f0737ece8207 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagKeyRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_keys.proto + +package com.google.cloud.resourcemanager.v3; + +public interface GetNamespacedTagKeyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A namespaced tag key name in the format
+   * `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name
+   * "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short
+   * name "bar" under the project `r2-d2`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. A namespaced tag key name in the format
+   * `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name
+   * "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short
+   * name "bar" under the project `r2-d2`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagValueRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagValueRequest.java new file mode 100644 index 000000000000..d41d5829c650 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagValueRequest.java @@ -0,0 +1,693 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_values.proto + +package com.google.cloud.resourcemanager.v3; + +/** + * + * + *
+ * The request message for getting a TagValue by its namespaced name.
+ * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest} + */ +public final class GetNamespacedTagValueRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest) + GetNamespacedTagValueRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNamespacedTagValueRequest.newBuilder() to construct. + private GetNamespacedTagValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNamespacedTagValueRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNamespacedTagValueRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagValuesProto + .internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagValuesProto + .internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest.class, + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. A namespaced tag value name in the following format:
+   *   `{parentId}/{tagKeyShort}/{tagValueShort}`
+   * Examples:
+   * - `42/foo/abc` for a value with short name "abc" under the key with short
+   *   name "foo" under the organization with ID 42
+   * - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with
+   *    short name "bar" under the project with ID "r2-d2"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A namespaced tag value name in the following format:
+   *   `{parentId}/{tagKeyShort}/{tagValueShort}`
+   * Examples:
+   * - `42/foo/abc` for a value with short name "abc" under the key with short
+   *   name "foo" under the organization with ID 42
+   * - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with
+   *    short name "bar" under the project with ID "r2-d2"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest)) { + return super.equals(obj); + } + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest other = + (com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for getting a TagValue by its namespaced name.
+   * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest) + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagValuesProto + .internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagValuesProto + .internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest.class, + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest.Builder.class); + } + + // Construct using com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.resourcemanager.v3.TagValuesProto + .internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagValueRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + getDefaultInstanceForType() { + return com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest build() { + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest buildPartial() { + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest result = + new com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest) { + return mergeFrom((com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest other) { + if (other + == com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. A namespaced tag value name in the following format:
+     *   `{parentId}/{tagKeyShort}/{tagValueShort}`
+     * Examples:
+     * - `42/foo/abc` for a value with short name "abc" under the key with short
+     *   name "foo" under the organization with ID 42
+     * - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with
+     *    short name "bar" under the project with ID "r2-d2"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A namespaced tag value name in the following format:
+     *   `{parentId}/{tagKeyShort}/{tagValueShort}`
+     * Examples:
+     * - `42/foo/abc` for a value with short name "abc" under the key with short
+     *   name "foo" under the organization with ID 42
+     * - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with
+     *    short name "bar" under the project with ID "r2-d2"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A namespaced tag value name in the following format:
+     *   `{parentId}/{tagKeyShort}/{tagValueShort}`
+     * Examples:
+     * - `42/foo/abc` for a value with short name "abc" under the key with short
+     *   name "foo" under the organization with ID 42
+     * - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with
+     *    short name "bar" under the project with ID "r2-d2"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A namespaced tag value name in the following format:
+     *   `{parentId}/{tagKeyShort}/{tagValueShort}`
+     * Examples:
+     * - `42/foo/abc` for a value with short name "abc" under the key with short
+     *   name "foo" under the organization with ID 42
+     * - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with
+     *    short name "bar" under the project with ID "r2-d2"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A namespaced tag value name in the following format:
+     *   `{parentId}/{tagKeyShort}/{tagValueShort}`
+     * Examples:
+     * - `42/foo/abc` for a value with short name "abc" under the key with short
+     *   name "foo" under the organization with ID 42
+     * - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with
+     *    short name "bar" under the project with ID "r2-d2"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest) + private static final com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest(); + } + + public static com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNamespacedTagValueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagValueRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagValueRequestOrBuilder.java new file mode 100644 index 000000000000..01f660dff92f --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetNamespacedTagValueRequestOrBuilder.java @@ -0,0 +1,66 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_values.proto + +package com.google.cloud.resourcemanager.v3; + +public interface GetNamespacedTagValueRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A namespaced tag value name in the following format:
+   *   `{parentId}/{tagKeyShort}/{tagValueShort}`
+   * Examples:
+   * - `42/foo/abc` for a value with short name "abc" under the key with short
+   *   name "foo" under the organization with ID 42
+   * - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with
+   *    short name "bar" under the project with ID "r2-d2"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. A namespaced tag value name in the following format:
+   *   `{parentId}/{tagKeyShort}/{tagValueShort}`
+   * Examples:
+   * - `42/foo/abc` for a value with short name "abc" under the key with short
+   *   name "foo" under the organization with ID 42
+   * - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with
+   *    short name "bar" under the project with ID "r2-d2"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetOrganizationRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetOrganizationRequest.java index 7fbb253dcbc8..00e8f30de8b4 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetOrganizationRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetOrganizationRequest.java @@ -76,9 +76,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The resource name of the Organization to fetch. This is the organization's
-   * relative path in the API, formatted as "organizations/[organizationId]".
-   * For example, "organizations/1234".
+   * Required. The resource name of the Organization to fetch. This is the
+   * organization's relative path in the API, formatted as
+   * "organizations/[organizationId]". For example, "organizations/1234".
    * 
* * @@ -103,9 +103,9 @@ public java.lang.String getName() { * * *
-   * Required. The resource name of the Organization to fetch. This is the organization's
-   * relative path in the API, formatted as "organizations/[organizationId]".
-   * For example, "organizations/1234".
+   * Required. The resource name of the Organization to fetch. This is the
+   * organization's relative path in the API, formatted as
+   * "organizations/[organizationId]". For example, "organizations/1234".
    * 
* * @@ -476,9 +476,9 @@ public Builder mergeFrom( * * *
-     * Required. The resource name of the Organization to fetch. This is the organization's
-     * relative path in the API, formatted as "organizations/[organizationId]".
-     * For example, "organizations/1234".
+     * Required. The resource name of the Organization to fetch. This is the
+     * organization's relative path in the API, formatted as
+     * "organizations/[organizationId]". For example, "organizations/1234".
      * 
* * @@ -502,9 +502,9 @@ public java.lang.String getName() { * * *
-     * Required. The resource name of the Organization to fetch. This is the organization's
-     * relative path in the API, formatted as "organizations/[organizationId]".
-     * For example, "organizations/1234".
+     * Required. The resource name of the Organization to fetch. This is the
+     * organization's relative path in the API, formatted as
+     * "organizations/[organizationId]". For example, "organizations/1234".
      * 
* * @@ -528,9 +528,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The resource name of the Organization to fetch. This is the organization's
-     * relative path in the API, formatted as "organizations/[organizationId]".
-     * For example, "organizations/1234".
+     * Required. The resource name of the Organization to fetch. This is the
+     * organization's relative path in the API, formatted as
+     * "organizations/[organizationId]". For example, "organizations/1234".
      * 
* * @@ -553,9 +553,9 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The resource name of the Organization to fetch. This is the organization's
-     * relative path in the API, formatted as "organizations/[organizationId]".
-     * For example, "organizations/1234".
+     * Required. The resource name of the Organization to fetch. This is the
+     * organization's relative path in the API, formatted as
+     * "organizations/[organizationId]". For example, "organizations/1234".
      * 
* * @@ -574,9 +574,9 @@ public Builder clearName() { * * *
-     * Required. The resource name of the Organization to fetch. This is the organization's
-     * relative path in the API, formatted as "organizations/[organizationId]".
-     * For example, "organizations/1234".
+     * Required. The resource name of the Organization to fetch. This is the
+     * organization's relative path in the API, formatted as
+     * "organizations/[organizationId]". For example, "organizations/1234".
      * 
* * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetOrganizationRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetOrganizationRequestOrBuilder.java index 1d9df446511a..d9ce1d2209c8 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetOrganizationRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetOrganizationRequestOrBuilder.java @@ -27,9 +27,9 @@ public interface GetOrganizationRequestOrBuilder * * *
-   * Required. The resource name of the Organization to fetch. This is the organization's
-   * relative path in the API, formatted as "organizations/[organizationId]".
-   * For example, "organizations/1234".
+   * Required. The resource name of the Organization to fetch. This is the
+   * organization's relative path in the API, formatted as
+   * "organizations/[organizationId]". For example, "organizations/1234".
    * 
* * @@ -43,9 +43,9 @@ public interface GetOrganizationRequestOrBuilder * * *
-   * Required. The resource name of the Organization to fetch. This is the organization's
-   * relative path in the API, formatted as "organizations/[organizationId]".
-   * For example, "organizations/1234".
+   * Required. The resource name of the Organization to fetch. This is the
+   * organization's relative path in the API, formatted as
+   * "organizations/[organizationId]". For example, "organizations/1234".
    * 
* * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetTagValueRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetTagValueRequest.java index bf046cc99d2d..020f2ebf1ef3 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetTagValueRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetTagValueRequest.java @@ -75,7 +75,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Resource name for TagValue to be fetched in the format `tagValues/456`.
+   * Required. Resource name for TagValue to be fetched in the format
+   * `tagValues/456`.
    * 
* * @@ -100,7 +101,8 @@ public java.lang.String getName() { * * *
-   * Required. Resource name for TagValue to be fetched in the format `tagValues/456`.
+   * Required. Resource name for TagValue to be fetched in the format
+   * `tagValues/456`.
    * 
* * @@ -470,7 +472,8 @@ public Builder mergeFrom( * * *
-     * Required. Resource name for TagValue to be fetched in the format `tagValues/456`.
+     * Required. Resource name for TagValue to be fetched in the format
+     * `tagValues/456`.
      * 
* * @@ -494,7 +497,8 @@ public java.lang.String getName() { * * *
-     * Required. Resource name for TagValue to be fetched in the format `tagValues/456`.
+     * Required. Resource name for TagValue to be fetched in the format
+     * `tagValues/456`.
      * 
* * @@ -518,7 +522,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. Resource name for TagValue to be fetched in the format `tagValues/456`.
+     * Required. Resource name for TagValue to be fetched in the format
+     * `tagValues/456`.
      * 
* * @@ -541,7 +546,8 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. Resource name for TagValue to be fetched in the format `tagValues/456`.
+     * Required. Resource name for TagValue to be fetched in the format
+     * `tagValues/456`.
      * 
* * @@ -560,7 +566,8 @@ public Builder clearName() { * * *
-     * Required. Resource name for TagValue to be fetched in the format `tagValues/456`.
+     * Required. Resource name for TagValue to be fetched in the format
+     * `tagValues/456`.
      * 
* * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetTagValueRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetTagValueRequestOrBuilder.java index 227b62db4c47..6b073812113a 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetTagValueRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/GetTagValueRequestOrBuilder.java @@ -27,7 +27,8 @@ public interface GetTagValueRequestOrBuilder * * *
-   * Required. Resource name for TagValue to be fetched in the format `tagValues/456`.
+   * Required. Resource name for TagValue to be fetched in the format
+   * `tagValues/456`.
    * 
* * @@ -41,7 +42,8 @@ public interface GetTagValueRequestOrBuilder * * *
-   * Required. Resource name for TagValue to be fetched in the format `tagValues/456`.
+   * Required. Resource name for TagValue to be fetched in the format
+   * `tagValues/456`.
    * 
* * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsRequest.java new file mode 100644 index 000000000000..165cbb5ab937 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsRequest.java @@ -0,0 +1,938 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_bindings.proto + +package com.google.cloud.resourcemanager.v3; + +/** + * + * + *
+ * The request message to ListEffectiveTags
+ * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.ListEffectiveTagsRequest} + */ +public final class ListEffectiveTagsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.resourcemanager.v3.ListEffectiveTagsRequest) + ListEffectiveTagsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEffectiveTagsRequest.newBuilder() to construct. + private ListEffectiveTagsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEffectiveTagsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEffectiveTagsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest.class, + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The full resource name of a resource for which you want to list
+   * the effective tags. E.g.
+   * "//cloudresourcemanager.googleapis.com/projects/123"
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The full resource name of a resource for which you want to list
+   * the effective tags. E.g.
+   * "//cloudresourcemanager.googleapis.com/projects/123"
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The maximum number of effective tags to return in the response.
+   * The server allows a maximum of 300 effective tags to return in a single
+   * page. If unspecified, the server will use 100 as the default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. A pagination token returned from a previous call to
+   * `ListEffectiveTags` that indicates from where this listing should continue.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A pagination token returned from a previous call to
+   * `ListEffectiveTags` that indicates from where this listing should continue.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest)) { + return super.equals(obj); + } + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest other = + (com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message to ListEffectiveTags
+   * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.ListEffectiveTagsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.resourcemanager.v3.ListEffectiveTagsRequest) + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest.class, + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest.Builder.class); + } + + // Construct using com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + getDefaultInstanceForType() { + return com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest build() { + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest buildPartial() { + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest result = + new com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest) { + return mergeFrom((com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest other) { + if (other + == com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The full resource name of a resource for which you want to list
+     * the effective tags. E.g.
+     * "//cloudresourcemanager.googleapis.com/projects/123"
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The full resource name of a resource for which you want to list
+     * the effective tags. E.g.
+     * "//cloudresourcemanager.googleapis.com/projects/123"
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The full resource name of a resource for which you want to list
+     * the effective tags. E.g.
+     * "//cloudresourcemanager.googleapis.com/projects/123"
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The full resource name of a resource for which you want to list
+     * the effective tags. E.g.
+     * "//cloudresourcemanager.googleapis.com/projects/123"
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The full resource name of a resource for which you want to list
+     * the effective tags. E.g.
+     * "//cloudresourcemanager.googleapis.com/projects/123"
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of effective tags to return in the response.
+     * The server allows a maximum of 300 effective tags to return in a single
+     * page. If unspecified, the server will use 100 as the default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of effective tags to return in the response.
+     * The server allows a maximum of 300 effective tags to return in a single
+     * page. If unspecified, the server will use 100 as the default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of effective tags to return in the response.
+     * The server allows a maximum of 300 effective tags to return in a single
+     * page. If unspecified, the server will use 100 as the default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to
+     * `ListEffectiveTags` that indicates from where this listing should continue.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to
+     * `ListEffectiveTags` that indicates from where this listing should continue.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to
+     * `ListEffectiveTags` that indicates from where this listing should continue.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to
+     * `ListEffectiveTags` that indicates from where this listing should continue.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to
+     * `ListEffectiveTags` that indicates from where this listing should continue.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.resourcemanager.v3.ListEffectiveTagsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.resourcemanager.v3.ListEffectiveTagsRequest) + private static final com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest(); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEffectiveTagsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsRequestOrBuilder.java new file mode 100644 index 000000000000..9304d0e93629 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsRequestOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_bindings.proto + +package com.google.cloud.resourcemanager.v3; + +public interface ListEffectiveTagsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.resourcemanager.v3.ListEffectiveTagsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full resource name of a resource for which you want to list
+   * the effective tags. E.g.
+   * "//cloudresourcemanager.googleapis.com/projects/123"
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The full resource name of a resource for which you want to list
+   * the effective tags. E.g.
+   * "//cloudresourcemanager.googleapis.com/projects/123"
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of effective tags to return in the response.
+   * The server allows a maximum of 300 effective tags to return in a single
+   * page. If unspecified, the server will use 100 as the default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A pagination token returned from a previous call to
+   * `ListEffectiveTags` that indicates from where this listing should continue.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A pagination token returned from a previous call to
+   * `ListEffectiveTags` that indicates from where this listing should continue.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsResponse.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsResponse.java new file mode 100644 index 000000000000..dceeffe6612c --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsResponse.java @@ -0,0 +1,1189 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_bindings.proto + +package com.google.cloud.resourcemanager.v3; + +/** + * + * + *
+ * The response of ListEffectiveTags.
+ * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.ListEffectiveTagsResponse} + */ +public final class ListEffectiveTagsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.resourcemanager.v3.ListEffectiveTagsResponse) + ListEffectiveTagsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEffectiveTagsResponse.newBuilder() to construct. + private ListEffectiveTagsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEffectiveTagsResponse() { + effectiveTags_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEffectiveTagsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.class, + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.Builder.class); + } + + public static final int EFFECTIVE_TAGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List effectiveTags_; + /** + * + * + *
+   * A possibly paginated list of effective tags for the specified resource.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + @java.lang.Override + public java.util.List getEffectiveTagsList() { + return effectiveTags_; + } + /** + * + * + *
+   * A possibly paginated list of effective tags for the specified resource.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + @java.lang.Override + public java.util.List + getEffectiveTagsOrBuilderList() { + return effectiveTags_; + } + /** + * + * + *
+   * A possibly paginated list of effective tags for the specified resource.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + @java.lang.Override + public int getEffectiveTagsCount() { + return effectiveTags_.size(); + } + /** + * + * + *
+   * A possibly paginated list of effective tags for the specified resource.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + @java.lang.Override + public com.google.cloud.resourcemanager.v3.EffectiveTag getEffectiveTags(int index) { + return effectiveTags_.get(index); + } + /** + * + * + *
+   * A possibly paginated list of effective tags for the specified resource.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + @java.lang.Override + public com.google.cloud.resourcemanager.v3.EffectiveTagOrBuilder getEffectiveTagsOrBuilder( + int index) { + return effectiveTags_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Pagination token.
+   * If the result set is too large to fit in a single response, this token
+   * is returned. It encodes the position of the current result cursor.
+   * Feeding this value into a new list request with the `page_token` parameter
+   * gives the next page of the results.
+   * When `next_page_token` is not filled in, there is no next page and
+   * the list returned is the last page in the result set.
+   * Pagination tokens have a limited lifetime.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Pagination token.
+   * If the result set is too large to fit in a single response, this token
+   * is returned. It encodes the position of the current result cursor.
+   * Feeding this value into a new list request with the `page_token` parameter
+   * gives the next page of the results.
+   * When `next_page_token` is not filled in, there is no next page and
+   * the list returned is the last page in the result set.
+   * Pagination tokens have a limited lifetime.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < effectiveTags_.size(); i++) { + output.writeMessage(1, effectiveTags_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < effectiveTags_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, effectiveTags_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse)) { + return super.equals(obj); + } + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse other = + (com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse) obj; + + if (!getEffectiveTagsList().equals(other.getEffectiveTagsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEffectiveTagsCount() > 0) { + hash = (37 * hash) + EFFECTIVE_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getEffectiveTagsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response of ListEffectiveTags.
+   * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.ListEffectiveTagsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.resourcemanager.v3.ListEffectiveTagsResponse) + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.class, + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.Builder.class); + } + + // Construct using com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (effectiveTagsBuilder_ == null) { + effectiveTags_ = java.util.Collections.emptyList(); + } else { + effectiveTags_ = null; + effectiveTagsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.resourcemanager.v3.TagBindingsProto + .internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + getDefaultInstanceForType() { + return com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse build() { + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse buildPartial() { + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse result = + new com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse result) { + if (effectiveTagsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + effectiveTags_ = java.util.Collections.unmodifiableList(effectiveTags_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.effectiveTags_ = effectiveTags_; + } else { + result.effectiveTags_ = effectiveTagsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse) { + return mergeFrom((com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse other) { + if (other + == com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.getDefaultInstance()) + return this; + if (effectiveTagsBuilder_ == null) { + if (!other.effectiveTags_.isEmpty()) { + if (effectiveTags_.isEmpty()) { + effectiveTags_ = other.effectiveTags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEffectiveTagsIsMutable(); + effectiveTags_.addAll(other.effectiveTags_); + } + onChanged(); + } + } else { + if (!other.effectiveTags_.isEmpty()) { + if (effectiveTagsBuilder_.isEmpty()) { + effectiveTagsBuilder_.dispose(); + effectiveTagsBuilder_ = null; + effectiveTags_ = other.effectiveTags_; + bitField0_ = (bitField0_ & ~0x00000001); + effectiveTagsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEffectiveTagsFieldBuilder() + : null; + } else { + effectiveTagsBuilder_.addAllMessages(other.effectiveTags_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.resourcemanager.v3.EffectiveTag m = + input.readMessage( + com.google.cloud.resourcemanager.v3.EffectiveTag.parser(), + extensionRegistry); + if (effectiveTagsBuilder_ == null) { + ensureEffectiveTagsIsMutable(); + effectiveTags_.add(m); + } else { + effectiveTagsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List effectiveTags_ = + java.util.Collections.emptyList(); + + private void ensureEffectiveTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + effectiveTags_ = + new java.util.ArrayList( + effectiveTags_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.resourcemanager.v3.EffectiveTag, + com.google.cloud.resourcemanager.v3.EffectiveTag.Builder, + com.google.cloud.resourcemanager.v3.EffectiveTagOrBuilder> + effectiveTagsBuilder_; + + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public java.util.List getEffectiveTagsList() { + if (effectiveTagsBuilder_ == null) { + return java.util.Collections.unmodifiableList(effectiveTags_); + } else { + return effectiveTagsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public int getEffectiveTagsCount() { + if (effectiveTagsBuilder_ == null) { + return effectiveTags_.size(); + } else { + return effectiveTagsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public com.google.cloud.resourcemanager.v3.EffectiveTag getEffectiveTags(int index) { + if (effectiveTagsBuilder_ == null) { + return effectiveTags_.get(index); + } else { + return effectiveTagsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public Builder setEffectiveTags( + int index, com.google.cloud.resourcemanager.v3.EffectiveTag value) { + if (effectiveTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectiveTagsIsMutable(); + effectiveTags_.set(index, value); + onChanged(); + } else { + effectiveTagsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public Builder setEffectiveTags( + int index, com.google.cloud.resourcemanager.v3.EffectiveTag.Builder builderForValue) { + if (effectiveTagsBuilder_ == null) { + ensureEffectiveTagsIsMutable(); + effectiveTags_.set(index, builderForValue.build()); + onChanged(); + } else { + effectiveTagsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public Builder addEffectiveTags(com.google.cloud.resourcemanager.v3.EffectiveTag value) { + if (effectiveTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectiveTagsIsMutable(); + effectiveTags_.add(value); + onChanged(); + } else { + effectiveTagsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public Builder addEffectiveTags( + int index, com.google.cloud.resourcemanager.v3.EffectiveTag value) { + if (effectiveTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectiveTagsIsMutable(); + effectiveTags_.add(index, value); + onChanged(); + } else { + effectiveTagsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public Builder addEffectiveTags( + com.google.cloud.resourcemanager.v3.EffectiveTag.Builder builderForValue) { + if (effectiveTagsBuilder_ == null) { + ensureEffectiveTagsIsMutable(); + effectiveTags_.add(builderForValue.build()); + onChanged(); + } else { + effectiveTagsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public Builder addEffectiveTags( + int index, com.google.cloud.resourcemanager.v3.EffectiveTag.Builder builderForValue) { + if (effectiveTagsBuilder_ == null) { + ensureEffectiveTagsIsMutable(); + effectiveTags_.add(index, builderForValue.build()); + onChanged(); + } else { + effectiveTagsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public Builder addAllEffectiveTags( + java.lang.Iterable values) { + if (effectiveTagsBuilder_ == null) { + ensureEffectiveTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, effectiveTags_); + onChanged(); + } else { + effectiveTagsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public Builder clearEffectiveTags() { + if (effectiveTagsBuilder_ == null) { + effectiveTags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + effectiveTagsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public Builder removeEffectiveTags(int index) { + if (effectiveTagsBuilder_ == null) { + ensureEffectiveTagsIsMutable(); + effectiveTags_.remove(index); + onChanged(); + } else { + effectiveTagsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public com.google.cloud.resourcemanager.v3.EffectiveTag.Builder getEffectiveTagsBuilder( + int index) { + return getEffectiveTagsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public com.google.cloud.resourcemanager.v3.EffectiveTagOrBuilder getEffectiveTagsOrBuilder( + int index) { + if (effectiveTagsBuilder_ == null) { + return effectiveTags_.get(index); + } else { + return effectiveTagsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public java.util.List + getEffectiveTagsOrBuilderList() { + if (effectiveTagsBuilder_ != null) { + return effectiveTagsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(effectiveTags_); + } + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public com.google.cloud.resourcemanager.v3.EffectiveTag.Builder addEffectiveTagsBuilder() { + return getEffectiveTagsFieldBuilder() + .addBuilder(com.google.cloud.resourcemanager.v3.EffectiveTag.getDefaultInstance()); + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public com.google.cloud.resourcemanager.v3.EffectiveTag.Builder addEffectiveTagsBuilder( + int index) { + return getEffectiveTagsFieldBuilder() + .addBuilder(index, com.google.cloud.resourcemanager.v3.EffectiveTag.getDefaultInstance()); + } + /** + * + * + *
+     * A possibly paginated list of effective tags for the specified resource.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + public java.util.List + getEffectiveTagsBuilderList() { + return getEffectiveTagsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.resourcemanager.v3.EffectiveTag, + com.google.cloud.resourcemanager.v3.EffectiveTag.Builder, + com.google.cloud.resourcemanager.v3.EffectiveTagOrBuilder> + getEffectiveTagsFieldBuilder() { + if (effectiveTagsBuilder_ == null) { + effectiveTagsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.resourcemanager.v3.EffectiveTag, + com.google.cloud.resourcemanager.v3.EffectiveTag.Builder, + com.google.cloud.resourcemanager.v3.EffectiveTagOrBuilder>( + effectiveTags_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + effectiveTags_ = null; + } + return effectiveTagsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Pagination token.
+     * If the result set is too large to fit in a single response, this token
+     * is returned. It encodes the position of the current result cursor.
+     * Feeding this value into a new list request with the `page_token` parameter
+     * gives the next page of the results.
+     * When `next_page_token` is not filled in, there is no next page and
+     * the list returned is the last page in the result set.
+     * Pagination tokens have a limited lifetime.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Pagination token.
+     * If the result set is too large to fit in a single response, this token
+     * is returned. It encodes the position of the current result cursor.
+     * Feeding this value into a new list request with the `page_token` parameter
+     * gives the next page of the results.
+     * When `next_page_token` is not filled in, there is no next page and
+     * the list returned is the last page in the result set.
+     * Pagination tokens have a limited lifetime.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Pagination token.
+     * If the result set is too large to fit in a single response, this token
+     * is returned. It encodes the position of the current result cursor.
+     * Feeding this value into a new list request with the `page_token` parameter
+     * gives the next page of the results.
+     * When `next_page_token` is not filled in, there is no next page and
+     * the list returned is the last page in the result set.
+     * Pagination tokens have a limited lifetime.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Pagination token.
+     * If the result set is too large to fit in a single response, this token
+     * is returned. It encodes the position of the current result cursor.
+     * Feeding this value into a new list request with the `page_token` parameter
+     * gives the next page of the results.
+     * When `next_page_token` is not filled in, there is no next page and
+     * the list returned is the last page in the result set.
+     * Pagination tokens have a limited lifetime.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Pagination token.
+     * If the result set is too large to fit in a single response, this token
+     * is returned. It encodes the position of the current result cursor.
+     * Feeding this value into a new list request with the `page_token` parameter
+     * gives the next page of the results.
+     * When `next_page_token` is not filled in, there is no next page and
+     * the list returned is the last page in the result set.
+     * Pagination tokens have a limited lifetime.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.resourcemanager.v3.ListEffectiveTagsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.resourcemanager.v3.ListEffectiveTagsResponse) + private static final com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse(); + } + + public static com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEffectiveTagsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsResponseOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsResponseOrBuilder.java new file mode 100644 index 000000000000..e5ce8074a255 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListEffectiveTagsResponseOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_bindings.proto + +package com.google.cloud.resourcemanager.v3; + +public interface ListEffectiveTagsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.resourcemanager.v3.ListEffectiveTagsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A possibly paginated list of effective tags for the specified resource.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + java.util.List getEffectiveTagsList(); + /** + * + * + *
+   * A possibly paginated list of effective tags for the specified resource.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + com.google.cloud.resourcemanager.v3.EffectiveTag getEffectiveTags(int index); + /** + * + * + *
+   * A possibly paginated list of effective tags for the specified resource.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + int getEffectiveTagsCount(); + /** + * + * + *
+   * A possibly paginated list of effective tags for the specified resource.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + java.util.List + getEffectiveTagsOrBuilderList(); + /** + * + * + *
+   * A possibly paginated list of effective tags for the specified resource.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.EffectiveTag effective_tags = 1; + */ + com.google.cloud.resourcemanager.v3.EffectiveTagOrBuilder getEffectiveTagsOrBuilder(int index); + + /** + * + * + *
+   * Pagination token.
+   * If the result set is too large to fit in a single response, this token
+   * is returned. It encodes the position of the current result cursor.
+   * Feeding this value into a new list request with the `page_token` parameter
+   * gives the next page of the results.
+   * When `next_page_token` is not filled in, there is no next page and
+   * the list returned is the last page in the result set.
+   * Pagination tokens have a limited lifetime.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Pagination token.
+   * If the result set is too large to fit in a single response, this token
+   * is returned. It encodes the position of the current result cursor.
+   * Feeding this value into a new list request with the `page_token` parameter
+   * gives the next page of the results.
+   * When `next_page_token` is not filled in, there is no next page and
+   * the list returned is the last page in the result set.
+   * Pagination tokens have a limited lifetime.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListFoldersRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListFoldersRequest.java index 6aa57c75faa6..1d4bdbdd8c9f 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListFoldersRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListFoldersRequest.java @@ -76,9 +76,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The resource name of the organization or folder whose folders are
-   * being listed.
-   * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+   * Required. The name of the parent resource whose folders are being listed.
+   * Only children of this parent resource are listed; descendants are not
+   * listed.
+   * If the parent is a folder, use the value `folders/{folder_id}`. If the
+   * parent is an organization, use the value `organizations/{org_id}`.
    * Access to this method is controlled by checking the
    * `resourcemanager.folders.list` permission on the `parent`.
    * 
@@ -105,9 +107,11 @@ public java.lang.String getParent() { * * *
-   * Required. The resource name of the organization or folder whose folders are
-   * being listed.
-   * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+   * Required. The name of the parent resource whose folders are being listed.
+   * Only children of this parent resource are listed; descendants are not
+   * listed.
+   * If the parent is a folder, use the value `folders/{folder_id}`. If the
+   * parent is an organization, use the value `organizations/{org_id}`.
    * Access to this method is controlled by checking the
    * `resourcemanager.folders.list` permission on the `parent`.
    * 
@@ -137,8 +141,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * Optional. The maximum number of folders to return in the response.
-   * If unspecified, server picks an appropriate default.
+   * Optional. The maximum number of folders to return in the response. The
+   * server can return fewer folders than requested. If unspecified, server
+   * picks an appropriate default.
    * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -639,9 +644,11 @@ public Builder mergeFrom( * * *
-     * Required. The resource name of the organization or folder whose folders are
-     * being listed.
-     * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+     * Required. The name of the parent resource whose folders are being listed.
+     * Only children of this parent resource are listed; descendants are not
+     * listed.
+     * If the parent is a folder, use the value `folders/{folder_id}`. If the
+     * parent is an organization, use the value `organizations/{org_id}`.
      * Access to this method is controlled by checking the
      * `resourcemanager.folders.list` permission on the `parent`.
      * 
@@ -667,9 +674,11 @@ public java.lang.String getParent() { * * *
-     * Required. The resource name of the organization or folder whose folders are
-     * being listed.
-     * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+     * Required. The name of the parent resource whose folders are being listed.
+     * Only children of this parent resource are listed; descendants are not
+     * listed.
+     * If the parent is a folder, use the value `folders/{folder_id}`. If the
+     * parent is an organization, use the value `organizations/{org_id}`.
      * Access to this method is controlled by checking the
      * `resourcemanager.folders.list` permission on the `parent`.
      * 
@@ -695,9 +704,11 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The resource name of the organization or folder whose folders are
-     * being listed.
-     * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+     * Required. The name of the parent resource whose folders are being listed.
+     * Only children of this parent resource are listed; descendants are not
+     * listed.
+     * If the parent is a folder, use the value `folders/{folder_id}`. If the
+     * parent is an organization, use the value `organizations/{org_id}`.
      * Access to this method is controlled by checking the
      * `resourcemanager.folders.list` permission on the `parent`.
      * 
@@ -722,9 +733,11 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The resource name of the organization or folder whose folders are
-     * being listed.
-     * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+     * Required. The name of the parent resource whose folders are being listed.
+     * Only children of this parent resource are listed; descendants are not
+     * listed.
+     * If the parent is a folder, use the value `folders/{folder_id}`. If the
+     * parent is an organization, use the value `organizations/{org_id}`.
      * Access to this method is controlled by checking the
      * `resourcemanager.folders.list` permission on the `parent`.
      * 
@@ -745,9 +758,11 @@ public Builder clearParent() { * * *
-     * Required. The resource name of the organization or folder whose folders are
-     * being listed.
-     * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+     * Required. The name of the parent resource whose folders are being listed.
+     * Only children of this parent resource are listed; descendants are not
+     * listed.
+     * If the parent is a folder, use the value `folders/{folder_id}`. If the
+     * parent is an organization, use the value `organizations/{org_id}`.
      * Access to this method is controlled by checking the
      * `resourcemanager.folders.list` permission on the `parent`.
      * 
@@ -775,8 +790,9 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. The maximum number of folders to return in the response.
-     * If unspecified, server picks an appropriate default.
+     * Optional. The maximum number of folders to return in the response. The
+     * server can return fewer folders than requested. If unspecified, server
+     * picks an appropriate default.
      * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -791,8 +807,9 @@ public int getPageSize() { * * *
-     * Optional. The maximum number of folders to return in the response.
-     * If unspecified, server picks an appropriate default.
+     * Optional. The maximum number of folders to return in the response. The
+     * server can return fewer folders than requested. If unspecified, server
+     * picks an appropriate default.
      * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -811,8 +828,9 @@ public Builder setPageSize(int value) { * * *
-     * Optional. The maximum number of folders to return in the response.
-     * If unspecified, server picks an appropriate default.
+     * Optional. The maximum number of folders to return in the response. The
+     * server can return fewer folders than requested. If unspecified, server
+     * picks an appropriate default.
      * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListFoldersRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListFoldersRequestOrBuilder.java index 81117245e27b..795747f175ae 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListFoldersRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListFoldersRequestOrBuilder.java @@ -27,9 +27,11 @@ public interface ListFoldersRequestOrBuilder * * *
-   * Required. The resource name of the organization or folder whose folders are
-   * being listed.
-   * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+   * Required. The name of the parent resource whose folders are being listed.
+   * Only children of this parent resource are listed; descendants are not
+   * listed.
+   * If the parent is a folder, use the value `folders/{folder_id}`. If the
+   * parent is an organization, use the value `organizations/{org_id}`.
    * Access to this method is controlled by checking the
    * `resourcemanager.folders.list` permission on the `parent`.
    * 
@@ -45,9 +47,11 @@ public interface ListFoldersRequestOrBuilder * * *
-   * Required. The resource name of the organization or folder whose folders are
-   * being listed.
-   * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+   * Required. The name of the parent resource whose folders are being listed.
+   * Only children of this parent resource are listed; descendants are not
+   * listed.
+   * If the parent is a folder, use the value `folders/{folder_id}`. If the
+   * parent is an organization, use the value `organizations/{org_id}`.
    * Access to this method is controlled by checking the
    * `resourcemanager.folders.list` permission on the `parent`.
    * 
@@ -64,8 +68,9 @@ public interface ListFoldersRequestOrBuilder * * *
-   * Optional. The maximum number of folders to return in the response.
-   * If unspecified, server picks an appropriate default.
+   * Optional. The maximum number of folders to return in the response. The
+   * server can return fewer folders than requested. If unspecified, server
+   * picks an appropriate default.
    * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListProjectsRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListProjectsRequest.java index 9a0d6c3c688e..507f264c5fa0 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListProjectsRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListProjectsRequest.java @@ -78,9 +78,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The name of the parent resource to list projects under.
-   * For example, setting this field to 'folders/1234' would list all projects
-   * directly under that folder.
+   * Required. The name of the parent resource whose projects are being listed.
+   * Only children of this parent resource are listed; descendants are not
+   * listed.
+   * If the parent is a folder, use the value `folders/{folder_id}`. If the
+   * parent is an organization, use the value `organizations/{org_id}`.
    * 
* * @@ -105,9 +107,11 @@ public java.lang.String getParent() { * * *
-   * Required. The name of the parent resource to list projects under.
-   * For example, setting this field to 'folders/1234' would list all projects
-   * directly under that folder.
+   * Required. The name of the parent resource whose projects are being listed.
+   * Only children of this parent resource are listed; descendants are not
+   * listed.
+   * If the parent is a folder, use the value `folders/{folder_id}`. If the
+   * parent is an organization, use the value `organizations/{org_id}`.
    * 
* * @@ -137,9 +141,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * Optional. A pagination token returned from a previous call to [ListProjects]
-   * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-   * that indicates from where listing should continue.
+   * Optional. A pagination token returned from a previous call to
+   * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+   * indicates from where listing should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -162,9 +166,9 @@ public java.lang.String getPageToken() { * * *
-   * Optional. A pagination token returned from a previous call to [ListProjects]
-   * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-   * that indicates from where listing should continue.
+   * Optional. A pagination token returned from a previous call to
+   * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+   * indicates from where listing should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -210,8 +214,8 @@ public int getPageSize() { * * *
-   * Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be
-   * returned. Normally only `ACTIVE` projects are returned.
+   * Optional. Indicate that projects in the `DELETE_REQUESTED` state should
+   * also be returned. Normally only `ACTIVE` projects are returned.
    * 
* * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -641,9 +645,11 @@ public Builder mergeFrom( * * *
-     * Required. The name of the parent resource to list projects under.
-     * For example, setting this field to 'folders/1234' would list all projects
-     * directly under that folder.
+     * Required. The name of the parent resource whose projects are being listed.
+     * Only children of this parent resource are listed; descendants are not
+     * listed.
+     * If the parent is a folder, use the value `folders/{folder_id}`. If the
+     * parent is an organization, use the value `organizations/{org_id}`.
      * 
* * @@ -667,9 +673,11 @@ public java.lang.String getParent() { * * *
-     * Required. The name of the parent resource to list projects under.
-     * For example, setting this field to 'folders/1234' would list all projects
-     * directly under that folder.
+     * Required. The name of the parent resource whose projects are being listed.
+     * Only children of this parent resource are listed; descendants are not
+     * listed.
+     * If the parent is a folder, use the value `folders/{folder_id}`. If the
+     * parent is an organization, use the value `organizations/{org_id}`.
      * 
* * @@ -693,9 +701,11 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The name of the parent resource to list projects under.
-     * For example, setting this field to 'folders/1234' would list all projects
-     * directly under that folder.
+     * Required. The name of the parent resource whose projects are being listed.
+     * Only children of this parent resource are listed; descendants are not
+     * listed.
+     * If the parent is a folder, use the value `folders/{folder_id}`. If the
+     * parent is an organization, use the value `organizations/{org_id}`.
      * 
* * @@ -718,9 +728,11 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The name of the parent resource to list projects under.
-     * For example, setting this field to 'folders/1234' would list all projects
-     * directly under that folder.
+     * Required. The name of the parent resource whose projects are being listed.
+     * Only children of this parent resource are listed; descendants are not
+     * listed.
+     * If the parent is a folder, use the value `folders/{folder_id}`. If the
+     * parent is an organization, use the value `organizations/{org_id}`.
      * 
* * @@ -739,9 +751,11 @@ public Builder clearParent() { * * *
-     * Required. The name of the parent resource to list projects under.
-     * For example, setting this field to 'folders/1234' would list all projects
-     * directly under that folder.
+     * Required. The name of the parent resource whose projects are being listed.
+     * Only children of this parent resource are listed; descendants are not
+     * listed.
+     * If the parent is a folder, use the value `folders/{folder_id}`. If the
+     * parent is an organization, use the value `organizations/{org_id}`.
      * 
* * @@ -767,9 +781,9 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. A pagination token returned from a previous call to [ListProjects]
-     * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+     * indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -791,9 +805,9 @@ public java.lang.String getPageToken() { * * *
-     * Optional. A pagination token returned from a previous call to [ListProjects]
-     * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+     * indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -815,9 +829,9 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * Optional. A pagination token returned from a previous call to [ListProjects]
-     * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+     * indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -838,9 +852,9 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * Optional. A pagination token returned from a previous call to [ListProjects]
-     * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+     * indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -857,9 +871,9 @@ public Builder clearPageToken() { * * *
-     * Optional. A pagination token returned from a previous call to [ListProjects]
-     * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+     * indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -942,8 +956,8 @@ public Builder clearPageSize() { * * *
-     * Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be
-     * returned. Normally only `ACTIVE` projects are returned.
+     * Optional. Indicate that projects in the `DELETE_REQUESTED` state should
+     * also be returned. Normally only `ACTIVE` projects are returned.
      * 
* * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -958,8 +972,8 @@ public boolean getShowDeleted() { * * *
-     * Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be
-     * returned. Normally only `ACTIVE` projects are returned.
+     * Optional. Indicate that projects in the `DELETE_REQUESTED` state should
+     * also be returned. Normally only `ACTIVE` projects are returned.
      * 
* * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -978,8 +992,8 @@ public Builder setShowDeleted(boolean value) { * * *
-     * Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be
-     * returned. Normally only `ACTIVE` projects are returned.
+     * Optional. Indicate that projects in the `DELETE_REQUESTED` state should
+     * also be returned. Normally only `ACTIVE` projects are returned.
      * 
* * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListProjectsRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListProjectsRequestOrBuilder.java index 8a34738a34ee..c92ab0fe83c2 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListProjectsRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListProjectsRequestOrBuilder.java @@ -27,9 +27,11 @@ public interface ListProjectsRequestOrBuilder * * *
-   * Required. The name of the parent resource to list projects under.
-   * For example, setting this field to 'folders/1234' would list all projects
-   * directly under that folder.
+   * Required. The name of the parent resource whose projects are being listed.
+   * Only children of this parent resource are listed; descendants are not
+   * listed.
+   * If the parent is a folder, use the value `folders/{folder_id}`. If the
+   * parent is an organization, use the value `organizations/{org_id}`.
    * 
* * @@ -43,9 +45,11 @@ public interface ListProjectsRequestOrBuilder * * *
-   * Required. The name of the parent resource to list projects under.
-   * For example, setting this field to 'folders/1234' would list all projects
-   * directly under that folder.
+   * Required. The name of the parent resource whose projects are being listed.
+   * Only children of this parent resource are listed; descendants are not
+   * listed.
+   * If the parent is a folder, use the value `folders/{folder_id}`. If the
+   * parent is an organization, use the value `organizations/{org_id}`.
    * 
* * @@ -60,9 +64,9 @@ public interface ListProjectsRequestOrBuilder * * *
-   * Optional. A pagination token returned from a previous call to [ListProjects]
-   * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-   * that indicates from where listing should continue.
+   * Optional. A pagination token returned from a previous call to
+   * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+   * indicates from where listing should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -74,9 +78,9 @@ public interface ListProjectsRequestOrBuilder * * *
-   * Optional. A pagination token returned from a previous call to [ListProjects]
-   * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-   * that indicates from where listing should continue.
+   * Optional. A pagination token returned from a previous call to
+   * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+   * indicates from where listing should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -104,8 +108,8 @@ public interface ListProjectsRequestOrBuilder * * *
-   * Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be
-   * returned. Normally only `ACTIVE` projects are returned.
+   * Optional. Indicate that projects in the `DELETE_REQUESTED` state should
+   * also be returned. Normally only `ACTIVE` projects are returned.
    * 
* * bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsRequest.java index c64279f87f2c..0c71544ff361 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsRequest.java @@ -76,9 +76,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The full resource name of a resource for which you want to list existing
-   * TagBindings.
-   * E.g. "//cloudresourcemanager.googleapis.com/projects/123"
+   * Required. The full resource name of a resource for which you want to list
+   * existing TagBindings. E.g.
+   * "//cloudresourcemanager.googleapis.com/projects/123"
    * 
* * @@ -103,9 +103,9 @@ public java.lang.String getParent() { * * *
-   * Required. The full resource name of a resource for which you want to list existing
-   * TagBindings.
-   * E.g. "//cloudresourcemanager.googleapis.com/projects/123"
+   * Required. The full resource name of a resource for which you want to list
+   * existing TagBindings. E.g.
+   * "//cloudresourcemanager.googleapis.com/projects/123"
    * 
* * @@ -133,9 +133,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * Optional. The maximum number of TagBindings to return in the response. The server
-   * allows a maximum of 300 TagBindings to return. If unspecified, the server
-   * will use 100 as the default.
+   * Optional. The maximum number of TagBindings to return in the response. The
+   * server allows a maximum of 300 TagBindings to return. If unspecified, the
+   * server will use 100 as the default.
    * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -155,8 +155,8 @@ public int getPageSize() { * * *
-   * Optional. A pagination token returned from a previous call to `ListTagBindings`
-   * that indicates where this listing should continue from.
+   * Optional. A pagination token returned from a previous call to
+   * `ListTagBindings` that indicates where this listing should continue from.
    * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -179,8 +179,8 @@ public java.lang.String getPageToken() { * * *
-   * Optional. A pagination token returned from a previous call to `ListTagBindings`
-   * that indicates where this listing should continue from.
+   * Optional. A pagination token returned from a previous call to
+   * `ListTagBindings` that indicates where this listing should continue from.
    * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -594,9 +594,9 @@ public Builder mergeFrom( * * *
-     * Required. The full resource name of a resource for which you want to list existing
-     * TagBindings.
-     * E.g. "//cloudresourcemanager.googleapis.com/projects/123"
+     * Required. The full resource name of a resource for which you want to list
+     * existing TagBindings. E.g.
+     * "//cloudresourcemanager.googleapis.com/projects/123"
      * 
* * @@ -620,9 +620,9 @@ public java.lang.String getParent() { * * *
-     * Required. The full resource name of a resource for which you want to list existing
-     * TagBindings.
-     * E.g. "//cloudresourcemanager.googleapis.com/projects/123"
+     * Required. The full resource name of a resource for which you want to list
+     * existing TagBindings. E.g.
+     * "//cloudresourcemanager.googleapis.com/projects/123"
      * 
* * @@ -646,9 +646,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The full resource name of a resource for which you want to list existing
-     * TagBindings.
-     * E.g. "//cloudresourcemanager.googleapis.com/projects/123"
+     * Required. The full resource name of a resource for which you want to list
+     * existing TagBindings. E.g.
+     * "//cloudresourcemanager.googleapis.com/projects/123"
      * 
* * @@ -671,9 +671,9 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The full resource name of a resource for which you want to list existing
-     * TagBindings.
-     * E.g. "//cloudresourcemanager.googleapis.com/projects/123"
+     * Required. The full resource name of a resource for which you want to list
+     * existing TagBindings. E.g.
+     * "//cloudresourcemanager.googleapis.com/projects/123"
      * 
* * @@ -692,9 +692,9 @@ public Builder clearParent() { * * *
-     * Required. The full resource name of a resource for which you want to list existing
-     * TagBindings.
-     * E.g. "//cloudresourcemanager.googleapis.com/projects/123"
+     * Required. The full resource name of a resource for which you want to list
+     * existing TagBindings. E.g.
+     * "//cloudresourcemanager.googleapis.com/projects/123"
      * 
* * @@ -720,9 +720,9 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. The maximum number of TagBindings to return in the response. The server
-     * allows a maximum of 300 TagBindings to return. If unspecified, the server
-     * will use 100 as the default.
+     * Optional. The maximum number of TagBindings to return in the response. The
+     * server allows a maximum of 300 TagBindings to return. If unspecified, the
+     * server will use 100 as the default.
      * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -737,9 +737,9 @@ public int getPageSize() { * * *
-     * Optional. The maximum number of TagBindings to return in the response. The server
-     * allows a maximum of 300 TagBindings to return. If unspecified, the server
-     * will use 100 as the default.
+     * Optional. The maximum number of TagBindings to return in the response. The
+     * server allows a maximum of 300 TagBindings to return. If unspecified, the
+     * server will use 100 as the default.
      * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -758,9 +758,9 @@ public Builder setPageSize(int value) { * * *
-     * Optional. The maximum number of TagBindings to return in the response. The server
-     * allows a maximum of 300 TagBindings to return. If unspecified, the server
-     * will use 100 as the default.
+     * Optional. The maximum number of TagBindings to return in the response. The
+     * server allows a maximum of 300 TagBindings to return. If unspecified, the
+     * server will use 100 as the default.
      * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -779,8 +779,8 @@ public Builder clearPageSize() { * * *
-     * Optional. A pagination token returned from a previous call to `ListTagBindings`
-     * that indicates where this listing should continue from.
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagBindings` that indicates where this listing should continue from.
      * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -802,8 +802,8 @@ public java.lang.String getPageToken() { * * *
-     * Optional. A pagination token returned from a previous call to `ListTagBindings`
-     * that indicates where this listing should continue from.
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagBindings` that indicates where this listing should continue from.
      * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -825,8 +825,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * Optional. A pagination token returned from a previous call to `ListTagBindings`
-     * that indicates where this listing should continue from.
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagBindings` that indicates where this listing should continue from.
      * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -847,8 +847,8 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * Optional. A pagination token returned from a previous call to `ListTagBindings`
-     * that indicates where this listing should continue from.
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagBindings` that indicates where this listing should continue from.
      * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -865,8 +865,8 @@ public Builder clearPageToken() { * * *
-     * Optional. A pagination token returned from a previous call to `ListTagBindings`
-     * that indicates where this listing should continue from.
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagBindings` that indicates where this listing should continue from.
      * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsRequestOrBuilder.java index 0b0fabad6aaa..05000cb5fa3e 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsRequestOrBuilder.java @@ -27,9 +27,9 @@ public interface ListTagBindingsRequestOrBuilder * * *
-   * Required. The full resource name of a resource for which you want to list existing
-   * TagBindings.
-   * E.g. "//cloudresourcemanager.googleapis.com/projects/123"
+   * Required. The full resource name of a resource for which you want to list
+   * existing TagBindings. E.g.
+   * "//cloudresourcemanager.googleapis.com/projects/123"
    * 
* * @@ -43,9 +43,9 @@ public interface ListTagBindingsRequestOrBuilder * * *
-   * Required. The full resource name of a resource for which you want to list existing
-   * TagBindings.
-   * E.g. "//cloudresourcemanager.googleapis.com/projects/123"
+   * Required. The full resource name of a resource for which you want to list
+   * existing TagBindings. E.g.
+   * "//cloudresourcemanager.googleapis.com/projects/123"
    * 
* * @@ -60,9 +60,9 @@ public interface ListTagBindingsRequestOrBuilder * * *
-   * Optional. The maximum number of TagBindings to return in the response. The server
-   * allows a maximum of 300 TagBindings to return. If unspecified, the server
-   * will use 100 as the default.
+   * Optional. The maximum number of TagBindings to return in the response. The
+   * server allows a maximum of 300 TagBindings to return. If unspecified, the
+   * server will use 100 as the default.
    * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -75,8 +75,8 @@ public interface ListTagBindingsRequestOrBuilder * * *
-   * Optional. A pagination token returned from a previous call to `ListTagBindings`
-   * that indicates where this listing should continue from.
+   * Optional. A pagination token returned from a previous call to
+   * `ListTagBindings` that indicates where this listing should continue from.
    * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -88,8 +88,8 @@ public interface ListTagBindingsRequestOrBuilder * * *
-   * Optional. A pagination token returned from a previous call to `ListTagBindings`
-   * that indicates where this listing should continue from.
+   * Optional. A pagination token returned from a previous call to
+   * `ListTagBindings` that indicates where this listing should continue from.
    * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsResponse.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsResponse.java index 2716c2c158ad..dbbff91bd97a 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsResponse.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsResponse.java @@ -76,8 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * A possibly paginated list of TagBindings for the specified TagValue or
-   * resource.
+   * A possibly paginated list of TagBindings for the specified resource.
    * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -90,8 +89,7 @@ public java.util.List getTagBind * * *
-   * A possibly paginated list of TagBindings for the specified TagValue or
-   * resource.
+   * A possibly paginated list of TagBindings for the specified resource.
    * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -105,8 +103,7 @@ public java.util.List getTagBind * * *
-   * A possibly paginated list of TagBindings for the specified TagValue or
-   * resource.
+   * A possibly paginated list of TagBindings for the specified resource.
    * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -119,8 +116,7 @@ public int getTagBindingsCount() { * * *
-   * A possibly paginated list of TagBindings for the specified TagValue or
-   * resource.
+   * A possibly paginated list of TagBindings for the specified resource.
    * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -133,8 +129,7 @@ public com.google.cloud.resourcemanager.v3.TagBinding getTagBindings(int index) * * *
-   * A possibly paginated list of TagBindings for the specified TagValue or
-   * resource.
+   * A possibly paginated list of TagBindings for the specified resource.
    * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -646,8 +641,7 @@ private void ensureTagBindingsIsMutable() { * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -663,8 +657,7 @@ public java.util.List getTagBind * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -680,8 +673,7 @@ public int getTagBindingsCount() { * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -697,8 +689,7 @@ public com.google.cloud.resourcemanager.v3.TagBinding getTagBindings(int index) * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -720,8 +711,7 @@ public Builder setTagBindings(int index, com.google.cloud.resourcemanager.v3.Tag * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -741,8 +731,7 @@ public Builder setTagBindings( * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -764,8 +753,7 @@ public Builder addTagBindings(com.google.cloud.resourcemanager.v3.TagBinding val * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -787,8 +775,7 @@ public Builder addTagBindings(int index, com.google.cloud.resourcemanager.v3.Tag * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -808,8 +795,7 @@ public Builder addTagBindings( * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -829,8 +815,7 @@ public Builder addTagBindings( * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -850,8 +835,7 @@ public Builder addAllTagBindings( * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -870,8 +854,7 @@ public Builder clearTagBindings() { * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -890,8 +873,7 @@ public Builder removeTagBindings(int index) { * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -903,8 +885,7 @@ public com.google.cloud.resourcemanager.v3.TagBinding.Builder getTagBindingsBuil * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -921,8 +902,7 @@ public com.google.cloud.resourcemanager.v3.TagBindingOrBuilder getTagBindingsOrB * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -939,8 +919,7 @@ public com.google.cloud.resourcemanager.v3.TagBindingOrBuilder getTagBindingsOrB * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -953,8 +932,7 @@ public com.google.cloud.resourcemanager.v3.TagBinding.Builder addTagBindingsBuil * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -967,8 +945,7 @@ public com.google.cloud.resourcemanager.v3.TagBinding.Builder addTagBindingsBuil * * *
-     * A possibly paginated list of TagBindings for the specified TagValue or
-     * resource.
+     * A possibly paginated list of TagBindings for the specified resource.
      * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsResponseOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsResponseOrBuilder.java index 91d1d20903ad..a8f86857473d 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsResponseOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagBindingsResponseOrBuilder.java @@ -27,8 +27,7 @@ public interface ListTagBindingsResponseOrBuilder * * *
-   * A possibly paginated list of TagBindings for the specified TagValue or
-   * resource.
+   * A possibly paginated list of TagBindings for the specified resource.
    * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -38,8 +37,7 @@ public interface ListTagBindingsResponseOrBuilder * * *
-   * A possibly paginated list of TagBindings for the specified TagValue or
-   * resource.
+   * A possibly paginated list of TagBindings for the specified resource.
    * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -49,8 +47,7 @@ public interface ListTagBindingsResponseOrBuilder * * *
-   * A possibly paginated list of TagBindings for the specified TagValue or
-   * resource.
+   * A possibly paginated list of TagBindings for the specified resource.
    * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -60,8 +57,7 @@ public interface ListTagBindingsResponseOrBuilder * * *
-   * A possibly paginated list of TagBindings for the specified TagValue or
-   * resource.
+   * A possibly paginated list of TagBindings for the specified resource.
    * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; @@ -72,8 +68,7 @@ public interface ListTagBindingsResponseOrBuilder * * *
-   * A possibly paginated list of TagBindings for the specified TagValue or
-   * resource.
+   * A possibly paginated list of TagBindings for the specified resource.
    * 
* * repeated .google.cloud.resourcemanager.v3.TagBinding tag_bindings = 1; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsRequest.java new file mode 100644 index 000000000000..50da414a296e --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsRequest.java @@ -0,0 +1,1186 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +/** + * + * + *
+ * The request message for listing the TagHolds under a TagValue.
+ * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.ListTagHoldsRequest} + */ +public final class ListTagHoldsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.resourcemanager.v3.ListTagHoldsRequest) + ListTagHoldsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTagHoldsRequest.newBuilder() to construct. + private ListTagHoldsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTagHoldsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTagHoldsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_ListTagHoldsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_ListTagHoldsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest.class, + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the parent TagValue. Must be of the form:
+   * `tagValues/{tag-value-id}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the parent TagValue. Must be of the form:
+   * `tagValues/{tag-value-id}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The maximum number of TagHolds to return in the response. The
+   * server allows a maximum of 300 TagHolds to return. If unspecified, the
+   * server will use 100 as the default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. A pagination token returned from a previous call to
+   * `ListTagHolds` that indicates where this listing should continue from.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A pagination token returned from a previous call to
+   * `ListTagHolds` that indicates where this listing should continue from.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. Criteria used to select a subset of TagHolds parented by the
+   * TagValue to return. This field follows the syntax defined by aip.dev/160;
+   * the `holder` and `origin` fields are supported for filtering. Currently
+   * only `AND` syntax is supported. Some example queries are:
+   *   * `holder =
+   *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+   *   * `origin = 35678234`
+   *   * `holder =
+   *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group
+   *     AND origin = 35678234`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Criteria used to select a subset of TagHolds parented by the
+   * TagValue to return. This field follows the syntax defined by aip.dev/160;
+   * the `holder` and `origin` fields are supported for filtering. Currently
+   * only `AND` syntax is supported. Some example queries are:
+   *   * `holder =
+   *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+   *   * `origin = 35678234`
+   *   * `holder =
+   *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group
+   *     AND origin = 35678234`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.resourcemanager.v3.ListTagHoldsRequest)) { + return super.equals(obj); + } + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest other = + (com.google.cloud.resourcemanager.v3.ListTagHoldsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for listing the TagHolds under a TagValue.
+   * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.ListTagHoldsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.resourcemanager.v3.ListTagHoldsRequest) + com.google.cloud.resourcemanager.v3.ListTagHoldsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_ListTagHoldsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_ListTagHoldsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest.class, + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest.Builder.class); + } + + // Construct using com.google.cloud.resourcemanager.v3.ListTagHoldsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_ListTagHoldsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListTagHoldsRequest getDefaultInstanceForType() { + return com.google.cloud.resourcemanager.v3.ListTagHoldsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListTagHoldsRequest build() { + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListTagHoldsRequest buildPartial() { + com.google.cloud.resourcemanager.v3.ListTagHoldsRequest result = + new com.google.cloud.resourcemanager.v3.ListTagHoldsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.resourcemanager.v3.ListTagHoldsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.resourcemanager.v3.ListTagHoldsRequest) { + return mergeFrom((com.google.cloud.resourcemanager.v3.ListTagHoldsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.resourcemanager.v3.ListTagHoldsRequest other) { + if (other == com.google.cloud.resourcemanager.v3.ListTagHoldsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the parent TagValue. Must be of the form:
+     * `tagValues/{tag-value-id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the parent TagValue. Must be of the form:
+     * `tagValues/{tag-value-id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the parent TagValue. Must be of the form:
+     * `tagValues/{tag-value-id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the parent TagValue. Must be of the form:
+     * `tagValues/{tag-value-id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the parent TagValue. Must be of the form:
+     * `tagValues/{tag-value-id}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of TagHolds to return in the response. The
+     * server allows a maximum of 300 TagHolds to return. If unspecified, the
+     * server will use 100 as the default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of TagHolds to return in the response. The
+     * server allows a maximum of 300 TagHolds to return. If unspecified, the
+     * server will use 100 as the default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of TagHolds to return in the response. The
+     * server allows a maximum of 300 TagHolds to return. If unspecified, the
+     * server will use 100 as the default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagHolds` that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagHolds` that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagHolds` that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagHolds` that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagHolds` that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Criteria used to select a subset of TagHolds parented by the
+     * TagValue to return. This field follows the syntax defined by aip.dev/160;
+     * the `holder` and `origin` fields are supported for filtering. Currently
+     * only `AND` syntax is supported. Some example queries are:
+     *   * `holder =
+     *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+     *   * `origin = 35678234`
+     *   * `holder =
+     *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group
+     *     AND origin = 35678234`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Criteria used to select a subset of TagHolds parented by the
+     * TagValue to return. This field follows the syntax defined by aip.dev/160;
+     * the `holder` and `origin` fields are supported for filtering. Currently
+     * only `AND` syntax is supported. Some example queries are:
+     *   * `holder =
+     *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+     *   * `origin = 35678234`
+     *   * `holder =
+     *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group
+     *     AND origin = 35678234`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Criteria used to select a subset of TagHolds parented by the
+     * TagValue to return. This field follows the syntax defined by aip.dev/160;
+     * the `holder` and `origin` fields are supported for filtering. Currently
+     * only `AND` syntax is supported. Some example queries are:
+     *   * `holder =
+     *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+     *   * `origin = 35678234`
+     *   * `holder =
+     *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group
+     *     AND origin = 35678234`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Criteria used to select a subset of TagHolds parented by the
+     * TagValue to return. This field follows the syntax defined by aip.dev/160;
+     * the `holder` and `origin` fields are supported for filtering. Currently
+     * only `AND` syntax is supported. Some example queries are:
+     *   * `holder =
+     *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+     *   * `origin = 35678234`
+     *   * `holder =
+     *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group
+     *     AND origin = 35678234`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Criteria used to select a subset of TagHolds parented by the
+     * TagValue to return. This field follows the syntax defined by aip.dev/160;
+     * the `holder` and `origin` fields are supported for filtering. Currently
+     * only `AND` syntax is supported. Some example queries are:
+     *   * `holder =
+     *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+     *   * `origin = 35678234`
+     *   * `holder =
+     *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group
+     *     AND origin = 35678234`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.resourcemanager.v3.ListTagHoldsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.resourcemanager.v3.ListTagHoldsRequest) + private static final com.google.cloud.resourcemanager.v3.ListTagHoldsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.resourcemanager.v3.ListTagHoldsRequest(); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTagHoldsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListTagHoldsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsRequestOrBuilder.java new file mode 100644 index 000000000000..9913ca0972da --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsRequestOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +public interface ListTagHoldsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.resourcemanager.v3.ListTagHoldsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the parent TagValue. Must be of the form:
+   * `tagValues/{tag-value-id}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the parent TagValue. Must be of the form:
+   * `tagValues/{tag-value-id}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of TagHolds to return in the response. The
+   * server allows a maximum of 300 TagHolds to return. If unspecified, the
+   * server will use 100 as the default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A pagination token returned from a previous call to
+   * `ListTagHolds` that indicates where this listing should continue from.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A pagination token returned from a previous call to
+   * `ListTagHolds` that indicates where this listing should continue from.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Criteria used to select a subset of TagHolds parented by the
+   * TagValue to return. This field follows the syntax defined by aip.dev/160;
+   * the `holder` and `origin` fields are supported for filtering. Currently
+   * only `AND` syntax is supported. Some example queries are:
+   *   * `holder =
+   *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+   *   * `origin = 35678234`
+   *   * `holder =
+   *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group
+   *     AND origin = 35678234`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Criteria used to select a subset of TagHolds parented by the
+   * TagValue to return. This field follows the syntax defined by aip.dev/160;
+   * the `holder` and `origin` fields are supported for filtering. Currently
+   * only `AND` syntax is supported. Some example queries are:
+   *   * `holder =
+   *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+   *   * `origin = 35678234`
+   *   * `holder =
+   *     //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group
+   *     AND origin = 35678234`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsResponse.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsResponse.java new file mode 100644 index 000000000000..c60957b75281 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsResponse.java @@ -0,0 +1,1173 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +/** + * + * + *
+ * The ListTagHolds response.
+ * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.ListTagHoldsResponse} + */ +public final class ListTagHoldsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.resourcemanager.v3.ListTagHoldsResponse) + ListTagHoldsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTagHoldsResponse.newBuilder() to construct. + private ListTagHoldsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTagHoldsResponse() { + tagHolds_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTagHoldsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_ListTagHoldsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_ListTagHoldsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse.class, + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse.Builder.class); + } + + public static final int TAG_HOLDS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List tagHolds_; + /** + * + * + *
+   * A possibly paginated list of TagHolds.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + @java.lang.Override + public java.util.List getTagHoldsList() { + return tagHolds_; + } + /** + * + * + *
+   * A possibly paginated list of TagHolds.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + @java.lang.Override + public java.util.List + getTagHoldsOrBuilderList() { + return tagHolds_; + } + /** + * + * + *
+   * A possibly paginated list of TagHolds.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + @java.lang.Override + public int getTagHoldsCount() { + return tagHolds_.size(); + } + /** + * + * + *
+   * A possibly paginated list of TagHolds.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + @java.lang.Override + public com.google.cloud.resourcemanager.v3.TagHold getTagHolds(int index) { + return tagHolds_.get(index); + } + /** + * + * + *
+   * A possibly paginated list of TagHolds.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + @java.lang.Override + public com.google.cloud.resourcemanager.v3.TagHoldOrBuilder getTagHoldsOrBuilder(int index) { + return tagHolds_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Pagination token.
+   * If the result set is too large to fit in a single response, this token
+   * is returned. It encodes the position of the current result cursor.
+   * Feeding this value into a new list request with the `page_token` parameter
+   * gives the next page of the results.
+   * When `next_page_token` is not filled in, there is no next page and
+   * the list returned is the last page in the result set.
+   * Pagination tokens have a limited lifetime.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Pagination token.
+   * If the result set is too large to fit in a single response, this token
+   * is returned. It encodes the position of the current result cursor.
+   * Feeding this value into a new list request with the `page_token` parameter
+   * gives the next page of the results.
+   * When `next_page_token` is not filled in, there is no next page and
+   * the list returned is the last page in the result set.
+   * Pagination tokens have a limited lifetime.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < tagHolds_.size(); i++) { + output.writeMessage(1, tagHolds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tagHolds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tagHolds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.resourcemanager.v3.ListTagHoldsResponse)) { + return super.equals(obj); + } + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse other = + (com.google.cloud.resourcemanager.v3.ListTagHoldsResponse) obj; + + if (!getTagHoldsList().equals(other.getTagHoldsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTagHoldsCount() > 0) { + hash = (37 * hash) + TAG_HOLDS_FIELD_NUMBER; + hash = (53 * hash) + getTagHoldsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The ListTagHolds response.
+   * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.ListTagHoldsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.resourcemanager.v3.ListTagHoldsResponse) + com.google.cloud.resourcemanager.v3.ListTagHoldsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_ListTagHoldsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_ListTagHoldsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse.class, + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse.Builder.class); + } + + // Construct using com.google.cloud.resourcemanager.v3.ListTagHoldsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (tagHoldsBuilder_ == null) { + tagHolds_ = java.util.Collections.emptyList(); + } else { + tagHolds_ = null; + tagHoldsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_ListTagHoldsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListTagHoldsResponse getDefaultInstanceForType() { + return com.google.cloud.resourcemanager.v3.ListTagHoldsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListTagHoldsResponse build() { + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListTagHoldsResponse buildPartial() { + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse result = + new com.google.cloud.resourcemanager.v3.ListTagHoldsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.resourcemanager.v3.ListTagHoldsResponse result) { + if (tagHoldsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tagHolds_ = java.util.Collections.unmodifiableList(tagHolds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tagHolds_ = tagHolds_; + } else { + result.tagHolds_ = tagHoldsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.resourcemanager.v3.ListTagHoldsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.resourcemanager.v3.ListTagHoldsResponse) { + return mergeFrom((com.google.cloud.resourcemanager.v3.ListTagHoldsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.resourcemanager.v3.ListTagHoldsResponse other) { + if (other == com.google.cloud.resourcemanager.v3.ListTagHoldsResponse.getDefaultInstance()) + return this; + if (tagHoldsBuilder_ == null) { + if (!other.tagHolds_.isEmpty()) { + if (tagHolds_.isEmpty()) { + tagHolds_ = other.tagHolds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTagHoldsIsMutable(); + tagHolds_.addAll(other.tagHolds_); + } + onChanged(); + } + } else { + if (!other.tagHolds_.isEmpty()) { + if (tagHoldsBuilder_.isEmpty()) { + tagHoldsBuilder_.dispose(); + tagHoldsBuilder_ = null; + tagHolds_ = other.tagHolds_; + bitField0_ = (bitField0_ & ~0x00000001); + tagHoldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTagHoldsFieldBuilder() + : null; + } else { + tagHoldsBuilder_.addAllMessages(other.tagHolds_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.resourcemanager.v3.TagHold m = + input.readMessage( + com.google.cloud.resourcemanager.v3.TagHold.parser(), extensionRegistry); + if (tagHoldsBuilder_ == null) { + ensureTagHoldsIsMutable(); + tagHolds_.add(m); + } else { + tagHoldsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List tagHolds_ = + java.util.Collections.emptyList(); + + private void ensureTagHoldsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tagHolds_ = new java.util.ArrayList(tagHolds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.resourcemanager.v3.TagHold, + com.google.cloud.resourcemanager.v3.TagHold.Builder, + com.google.cloud.resourcemanager.v3.TagHoldOrBuilder> + tagHoldsBuilder_; + + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public java.util.List getTagHoldsList() { + if (tagHoldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tagHolds_); + } else { + return tagHoldsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public int getTagHoldsCount() { + if (tagHoldsBuilder_ == null) { + return tagHolds_.size(); + } else { + return tagHoldsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public com.google.cloud.resourcemanager.v3.TagHold getTagHolds(int index) { + if (tagHoldsBuilder_ == null) { + return tagHolds_.get(index); + } else { + return tagHoldsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public Builder setTagHolds(int index, com.google.cloud.resourcemanager.v3.TagHold value) { + if (tagHoldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagHoldsIsMutable(); + tagHolds_.set(index, value); + onChanged(); + } else { + tagHoldsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public Builder setTagHolds( + int index, com.google.cloud.resourcemanager.v3.TagHold.Builder builderForValue) { + if (tagHoldsBuilder_ == null) { + ensureTagHoldsIsMutable(); + tagHolds_.set(index, builderForValue.build()); + onChanged(); + } else { + tagHoldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public Builder addTagHolds(com.google.cloud.resourcemanager.v3.TagHold value) { + if (tagHoldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagHoldsIsMutable(); + tagHolds_.add(value); + onChanged(); + } else { + tagHoldsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public Builder addTagHolds(int index, com.google.cloud.resourcemanager.v3.TagHold value) { + if (tagHoldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagHoldsIsMutable(); + tagHolds_.add(index, value); + onChanged(); + } else { + tagHoldsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public Builder addTagHolds( + com.google.cloud.resourcemanager.v3.TagHold.Builder builderForValue) { + if (tagHoldsBuilder_ == null) { + ensureTagHoldsIsMutable(); + tagHolds_.add(builderForValue.build()); + onChanged(); + } else { + tagHoldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public Builder addTagHolds( + int index, com.google.cloud.resourcemanager.v3.TagHold.Builder builderForValue) { + if (tagHoldsBuilder_ == null) { + ensureTagHoldsIsMutable(); + tagHolds_.add(index, builderForValue.build()); + onChanged(); + } else { + tagHoldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public Builder addAllTagHolds( + java.lang.Iterable values) { + if (tagHoldsBuilder_ == null) { + ensureTagHoldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tagHolds_); + onChanged(); + } else { + tagHoldsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public Builder clearTagHolds() { + if (tagHoldsBuilder_ == null) { + tagHolds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tagHoldsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public Builder removeTagHolds(int index) { + if (tagHoldsBuilder_ == null) { + ensureTagHoldsIsMutable(); + tagHolds_.remove(index); + onChanged(); + } else { + tagHoldsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public com.google.cloud.resourcemanager.v3.TagHold.Builder getTagHoldsBuilder(int index) { + return getTagHoldsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public com.google.cloud.resourcemanager.v3.TagHoldOrBuilder getTagHoldsOrBuilder(int index) { + if (tagHoldsBuilder_ == null) { + return tagHolds_.get(index); + } else { + return tagHoldsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public java.util.List + getTagHoldsOrBuilderList() { + if (tagHoldsBuilder_ != null) { + return tagHoldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tagHolds_); + } + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public com.google.cloud.resourcemanager.v3.TagHold.Builder addTagHoldsBuilder() { + return getTagHoldsFieldBuilder() + .addBuilder(com.google.cloud.resourcemanager.v3.TagHold.getDefaultInstance()); + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public com.google.cloud.resourcemanager.v3.TagHold.Builder addTagHoldsBuilder(int index) { + return getTagHoldsFieldBuilder() + .addBuilder(index, com.google.cloud.resourcemanager.v3.TagHold.getDefaultInstance()); + } + /** + * + * + *
+     * A possibly paginated list of TagHolds.
+     * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + public java.util.List + getTagHoldsBuilderList() { + return getTagHoldsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.resourcemanager.v3.TagHold, + com.google.cloud.resourcemanager.v3.TagHold.Builder, + com.google.cloud.resourcemanager.v3.TagHoldOrBuilder> + getTagHoldsFieldBuilder() { + if (tagHoldsBuilder_ == null) { + tagHoldsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.resourcemanager.v3.TagHold, + com.google.cloud.resourcemanager.v3.TagHold.Builder, + com.google.cloud.resourcemanager.v3.TagHoldOrBuilder>( + tagHolds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tagHolds_ = null; + } + return tagHoldsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Pagination token.
+     * If the result set is too large to fit in a single response, this token
+     * is returned. It encodes the position of the current result cursor.
+     * Feeding this value into a new list request with the `page_token` parameter
+     * gives the next page of the results.
+     * When `next_page_token` is not filled in, there is no next page and
+     * the list returned is the last page in the result set.
+     * Pagination tokens have a limited lifetime.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Pagination token.
+     * If the result set is too large to fit in a single response, this token
+     * is returned. It encodes the position of the current result cursor.
+     * Feeding this value into a new list request with the `page_token` parameter
+     * gives the next page of the results.
+     * When `next_page_token` is not filled in, there is no next page and
+     * the list returned is the last page in the result set.
+     * Pagination tokens have a limited lifetime.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Pagination token.
+     * If the result set is too large to fit in a single response, this token
+     * is returned. It encodes the position of the current result cursor.
+     * Feeding this value into a new list request with the `page_token` parameter
+     * gives the next page of the results.
+     * When `next_page_token` is not filled in, there is no next page and
+     * the list returned is the last page in the result set.
+     * Pagination tokens have a limited lifetime.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Pagination token.
+     * If the result set is too large to fit in a single response, this token
+     * is returned. It encodes the position of the current result cursor.
+     * Feeding this value into a new list request with the `page_token` parameter
+     * gives the next page of the results.
+     * When `next_page_token` is not filled in, there is no next page and
+     * the list returned is the last page in the result set.
+     * Pagination tokens have a limited lifetime.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Pagination token.
+     * If the result set is too large to fit in a single response, this token
+     * is returned. It encodes the position of the current result cursor.
+     * Feeding this value into a new list request with the `page_token` parameter
+     * gives the next page of the results.
+     * When `next_page_token` is not filled in, there is no next page and
+     * the list returned is the last page in the result set.
+     * Pagination tokens have a limited lifetime.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.resourcemanager.v3.ListTagHoldsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.resourcemanager.v3.ListTagHoldsResponse) + private static final com.google.cloud.resourcemanager.v3.ListTagHoldsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.resourcemanager.v3.ListTagHoldsResponse(); + } + + public static com.google.cloud.resourcemanager.v3.ListTagHoldsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTagHoldsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.ListTagHoldsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsResponseOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsResponseOrBuilder.java new file mode 100644 index 000000000000..faa8c81dda91 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagHoldsResponseOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +public interface ListTagHoldsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.resourcemanager.v3.ListTagHoldsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A possibly paginated list of TagHolds.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + java.util.List getTagHoldsList(); + /** + * + * + *
+   * A possibly paginated list of TagHolds.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + com.google.cloud.resourcemanager.v3.TagHold getTagHolds(int index); + /** + * + * + *
+   * A possibly paginated list of TagHolds.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + int getTagHoldsCount(); + /** + * + * + *
+   * A possibly paginated list of TagHolds.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + java.util.List + getTagHoldsOrBuilderList(); + /** + * + * + *
+   * A possibly paginated list of TagHolds.
+   * 
+ * + * repeated .google.cloud.resourcemanager.v3.TagHold tag_holds = 1; + */ + com.google.cloud.resourcemanager.v3.TagHoldOrBuilder getTagHoldsOrBuilder(int index); + + /** + * + * + *
+   * Pagination token.
+   * If the result set is too large to fit in a single response, this token
+   * is returned. It encodes the position of the current result cursor.
+   * Feeding this value into a new list request with the `page_token` parameter
+   * gives the next page of the results.
+   * When `next_page_token` is not filled in, there is no next page and
+   * the list returned is the last page in the result set.
+   * Pagination tokens have a limited lifetime.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Pagination token.
+   * If the result set is too large to fit in a single response, this token
+   * is returned. It encodes the position of the current result cursor.
+   * Feeding this value into a new list request with the `page_token` parameter
+   * gives the next page of the results.
+   * When `next_page_token` is not filled in, there is no next page and
+   * the list returned is the last page in the result set.
+   * Pagination tokens have a limited lifetime.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagKeysRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagKeysRequest.java index 916d4fe92424..f1b939d0a21b 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagKeysRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagKeysRequest.java @@ -131,9 +131,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * Optional. The maximum number of TagKeys to return in the response. The server allows
-   * a maximum of 300 TagKeys to return. If unspecified, the server will use 100
-   * as the default.
+   * Optional. The maximum number of TagKeys to return in the response. The
+   * server allows a maximum of 300 TagKeys to return. If unspecified, the
+   * server will use 100 as the default.
    * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -713,9 +713,9 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. The maximum number of TagKeys to return in the response. The server allows
-     * a maximum of 300 TagKeys to return. If unspecified, the server will use 100
-     * as the default.
+     * Optional. The maximum number of TagKeys to return in the response. The
+     * server allows a maximum of 300 TagKeys to return. If unspecified, the
+     * server will use 100 as the default.
      * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -730,9 +730,9 @@ public int getPageSize() { * * *
-     * Optional. The maximum number of TagKeys to return in the response. The server allows
-     * a maximum of 300 TagKeys to return. If unspecified, the server will use 100
-     * as the default.
+     * Optional. The maximum number of TagKeys to return in the response. The
+     * server allows a maximum of 300 TagKeys to return. If unspecified, the
+     * server will use 100 as the default.
      * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -751,9 +751,9 @@ public Builder setPageSize(int value) { * * *
-     * Optional. The maximum number of TagKeys to return in the response. The server allows
-     * a maximum of 300 TagKeys to return. If unspecified, the server will use 100
-     * as the default.
+     * Optional. The maximum number of TagKeys to return in the response. The
+     * server allows a maximum of 300 TagKeys to return. If unspecified, the
+     * server will use 100 as the default.
      * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagKeysRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagKeysRequestOrBuilder.java index f40db8b2ade7..d19ecb3b2d3d 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagKeysRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagKeysRequestOrBuilder.java @@ -58,9 +58,9 @@ public interface ListTagKeysRequestOrBuilder * * *
-   * Optional. The maximum number of TagKeys to return in the response. The server allows
-   * a maximum of 300 TagKeys to return. If unspecified, the server will use 100
-   * as the default.
+   * Optional. The maximum number of TagKeys to return in the response. The
+   * server allows a maximum of 300 TagKeys to return. If unspecified, the
+   * server will use 100 as the default.
    * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagValuesRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagValuesRequest.java index 8f11991df346..5112031f10b2 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagValuesRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagValuesRequest.java @@ -23,6 +23,8 @@ * *
  * The request message for listing TagValues for the specified TagKey.
+ * Resource name for TagKey, parent of the TagValues to be listed,
+ * in the format `tagKeys/123`.
  * 
* * Protobuf type {@code google.cloud.resourcemanager.v3.ListTagValuesRequest} @@ -76,8 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. Resource name for TagKey, parent of the TagValues to be listed,
-   * in the format `tagKeys/123`.
+   * Required.
    * 
* * @@ -102,8 +103,7 @@ public java.lang.String getParent() { * * *
-   * Required. Resource name for TagKey, parent of the TagValues to be listed,
-   * in the format `tagKeys/123`.
+   * Required.
    * 
* * @@ -131,9 +131,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * Optional. The maximum number of TagValues to return in the response. The server
-   * allows a maximum of 300 TagValues to return. If unspecified, the server
-   * will use 100 as the default.
+   * Optional. The maximum number of TagValues to return in the response. The
+   * server allows a maximum of 300 TagValues to return. If unspecified, the
+   * server will use 100 as the default.
    * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -153,8 +153,8 @@ public int getPageSize() { * * *
-   * Optional. A pagination token returned from a previous call to `ListTagValues`
-   * that indicates where this listing should continue from.
+   * Optional. A pagination token returned from a previous call to
+   * `ListTagValues` that indicates where this listing should continue from.
    * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -177,8 +177,8 @@ public java.lang.String getPageToken() { * * *
-   * Optional. A pagination token returned from a previous call to `ListTagValues`
-   * that indicates where this listing should continue from.
+   * Optional. A pagination token returned from a previous call to
+   * `ListTagValues` that indicates where this listing should continue from.
    * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -381,6 +381,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * The request message for listing TagValues for the specified TagKey.
+   * Resource name for TagKey, parent of the TagValues to be listed,
+   * in the format `tagKeys/123`.
    * 
* * Protobuf type {@code google.cloud.resourcemanager.v3.ListTagValuesRequest} @@ -592,8 +594,7 @@ public Builder mergeFrom( * * *
-     * Required. Resource name for TagKey, parent of the TagValues to be listed,
-     * in the format `tagKeys/123`.
+     * Required.
      * 
* * @@ -617,8 +618,7 @@ public java.lang.String getParent() { * * *
-     * Required. Resource name for TagKey, parent of the TagValues to be listed,
-     * in the format `tagKeys/123`.
+     * Required.
      * 
* * @@ -642,8 +642,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. Resource name for TagKey, parent of the TagValues to be listed,
-     * in the format `tagKeys/123`.
+     * Required.
      * 
* * @@ -666,8 +665,7 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. Resource name for TagKey, parent of the TagValues to be listed,
-     * in the format `tagKeys/123`.
+     * Required.
      * 
* * @@ -686,8 +684,7 @@ public Builder clearParent() { * * *
-     * Required. Resource name for TagKey, parent of the TagValues to be listed,
-     * in the format `tagKeys/123`.
+     * Required.
      * 
* * @@ -713,9 +710,9 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. The maximum number of TagValues to return in the response. The server
-     * allows a maximum of 300 TagValues to return. If unspecified, the server
-     * will use 100 as the default.
+     * Optional. The maximum number of TagValues to return in the response. The
+     * server allows a maximum of 300 TagValues to return. If unspecified, the
+     * server will use 100 as the default.
      * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -730,9 +727,9 @@ public int getPageSize() { * * *
-     * Optional. The maximum number of TagValues to return in the response. The server
-     * allows a maximum of 300 TagValues to return. If unspecified, the server
-     * will use 100 as the default.
+     * Optional. The maximum number of TagValues to return in the response. The
+     * server allows a maximum of 300 TagValues to return. If unspecified, the
+     * server will use 100 as the default.
      * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -751,9 +748,9 @@ public Builder setPageSize(int value) { * * *
-     * Optional. The maximum number of TagValues to return in the response. The server
-     * allows a maximum of 300 TagValues to return. If unspecified, the server
-     * will use 100 as the default.
+     * Optional. The maximum number of TagValues to return in the response. The
+     * server allows a maximum of 300 TagValues to return. If unspecified, the
+     * server will use 100 as the default.
      * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -772,8 +769,8 @@ public Builder clearPageSize() { * * *
-     * Optional. A pagination token returned from a previous call to `ListTagValues`
-     * that indicates where this listing should continue from.
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagValues` that indicates where this listing should continue from.
      * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -795,8 +792,8 @@ public java.lang.String getPageToken() { * * *
-     * Optional. A pagination token returned from a previous call to `ListTagValues`
-     * that indicates where this listing should continue from.
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagValues` that indicates where this listing should continue from.
      * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -818,8 +815,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * Optional. A pagination token returned from a previous call to `ListTagValues`
-     * that indicates where this listing should continue from.
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagValues` that indicates where this listing should continue from.
      * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -840,8 +837,8 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * Optional. A pagination token returned from a previous call to `ListTagValues`
-     * that indicates where this listing should continue from.
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagValues` that indicates where this listing should continue from.
      * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -858,8 +855,8 @@ public Builder clearPageToken() { * * *
-     * Optional. A pagination token returned from a previous call to `ListTagValues`
-     * that indicates where this listing should continue from.
+     * Optional. A pagination token returned from a previous call to
+     * `ListTagValues` that indicates where this listing should continue from.
      * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagValuesRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagValuesRequestOrBuilder.java index b778c1e1d80d..d8a939230ef8 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagValuesRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ListTagValuesRequestOrBuilder.java @@ -27,8 +27,7 @@ public interface ListTagValuesRequestOrBuilder * * *
-   * Required. Resource name for TagKey, parent of the TagValues to be listed,
-   * in the format `tagKeys/123`.
+   * Required.
    * 
* * @@ -42,8 +41,7 @@ public interface ListTagValuesRequestOrBuilder * * *
-   * Required. Resource name for TagKey, parent of the TagValues to be listed,
-   * in the format `tagKeys/123`.
+   * Required.
    * 
* * @@ -58,9 +56,9 @@ public interface ListTagValuesRequestOrBuilder * * *
-   * Optional. The maximum number of TagValues to return in the response. The server
-   * allows a maximum of 300 TagValues to return. If unspecified, the server
-   * will use 100 as the default.
+   * Optional. The maximum number of TagValues to return in the response. The
+   * server allows a maximum of 300 TagValues to return. If unspecified, the
+   * server will use 100 as the default.
    * 
* * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -73,8 +71,8 @@ public interface ListTagValuesRequestOrBuilder * * *
-   * Optional. A pagination token returned from a previous call to `ListTagValues`
-   * that indicates where this listing should continue from.
+   * Optional. A pagination token returned from a previous call to
+   * `ListTagValues` that indicates where this listing should continue from.
    * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -86,8 +84,8 @@ public interface ListTagValuesRequestOrBuilder * * *
-   * Optional. A pagination token returned from a previous call to `ListTagValues`
-   * that indicates where this listing should continue from.
+   * Optional. A pagination token returned from a previous call to
+   * `ListTagValues` that indicates where this listing should continue from.
    * 
* * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/MoveFolderRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/MoveFolderRequest.java index f864f2d8c206..955e4885fe74 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/MoveFolderRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/MoveFolderRequest.java @@ -133,9 +133,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Required. The resource name of the folder or organization which should be the
-   * folder's new parent.
-   * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+   * Required. The resource name of the folder or organization which should be
+   * the folder's new parent. Must be of the form `folders/{folder_id}` or
+   * `organizations/{org_id}`.
    * 
* * @@ -160,9 +160,9 @@ public java.lang.String getDestinationParent() { * * *
-   * Required. The resource name of the folder or organization which should be the
-   * folder's new parent.
-   * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+   * Required. The resource name of the folder or organization which should be
+   * the folder's new parent. Must be of the form `folders/{folder_id}` or
+   * `organizations/{org_id}`.
    * 
* * @@ -677,9 +677,9 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. The resource name of the folder or organization which should be the
-     * folder's new parent.
-     * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+     * Required. The resource name of the folder or organization which should be
+     * the folder's new parent. Must be of the form `folders/{folder_id}` or
+     * `organizations/{org_id}`.
      * 
* * @@ -703,9 +703,9 @@ public java.lang.String getDestinationParent() { * * *
-     * Required. The resource name of the folder or organization which should be the
-     * folder's new parent.
-     * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+     * Required. The resource name of the folder or organization which should be
+     * the folder's new parent. Must be of the form `folders/{folder_id}` or
+     * `organizations/{org_id}`.
      * 
* * @@ -729,9 +729,9 @@ public com.google.protobuf.ByteString getDestinationParentBytes() { * * *
-     * Required. The resource name of the folder or organization which should be the
-     * folder's new parent.
-     * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+     * Required. The resource name of the folder or organization which should be
+     * the folder's new parent. Must be of the form `folders/{folder_id}` or
+     * `organizations/{org_id}`.
      * 
* * @@ -754,9 +754,9 @@ public Builder setDestinationParent(java.lang.String value) { * * *
-     * Required. The resource name of the folder or organization which should be the
-     * folder's new parent.
-     * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+     * Required. The resource name of the folder or organization which should be
+     * the folder's new parent. Must be of the form `folders/{folder_id}` or
+     * `organizations/{org_id}`.
      * 
* * @@ -775,9 +775,9 @@ public Builder clearDestinationParent() { * * *
-     * Required. The resource name of the folder or organization which should be the
-     * folder's new parent.
-     * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+     * Required. The resource name of the folder or organization which should be
+     * the folder's new parent. Must be of the form `folders/{folder_id}` or
+     * `organizations/{org_id}`.
      * 
* * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/MoveFolderRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/MoveFolderRequestOrBuilder.java index 9df41df49662..588b5ccdaf2c 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/MoveFolderRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/MoveFolderRequestOrBuilder.java @@ -58,9 +58,9 @@ public interface MoveFolderRequestOrBuilder * * *
-   * Required. The resource name of the folder or organization which should be the
-   * folder's new parent.
-   * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+   * Required. The resource name of the folder or organization which should be
+   * the folder's new parent. Must be of the form `folders/{folder_id}` or
+   * `organizations/{org_id}`.
    * 
* * @@ -74,9 +74,9 @@ public interface MoveFolderRequestOrBuilder * * *
-   * Required. The resource name of the folder or organization which should be the
-   * folder's new parent.
-   * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
+   * Required. The resource name of the folder or organization which should be
+   * the folder's new parent. Must be of the form `folders/{folder_id}` or
+   * `organizations/{org_id}`.
    * 
* * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Organization.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Organization.java index 7fc20d0c3444..4fbd9a36dd6e 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Organization.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Organization.java @@ -650,9 +650,9 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { * * *
-   * Output only. A checksum computed by the server based on the current value of the
-   * Organization resource. This may be sent on update and delete requests to
-   * ensure the client has an up-to-date value before proceeding.
+   * Output only. A checksum computed by the server based on the current value
+   * of the Organization resource. This may be sent on update and delete
+   * requests to ensure the client has an up-to-date value before proceeding.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -675,9 +675,9 @@ public java.lang.String getEtag() { * * *
-   * Output only. A checksum computed by the server based on the current value of the
-   * Organization resource. This may be sent on update and delete requests to
-   * ensure the client has an up-to-date value before proceeding.
+   * Output only. A checksum computed by the server based on the current value
+   * of the Organization resource. This may be sent on update and delete
+   * requests to ensure the client has an up-to-date value before proceeding.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2350,9 +2350,9 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { * * *
-     * Output only. A checksum computed by the server based on the current value of the
-     * Organization resource. This may be sent on update and delete requests to
-     * ensure the client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the Organization resource. This may be sent on update and delete
+     * requests to ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2374,9 +2374,9 @@ public java.lang.String getEtag() { * * *
-     * Output only. A checksum computed by the server based on the current value of the
-     * Organization resource. This may be sent on update and delete requests to
-     * ensure the client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the Organization resource. This may be sent on update and delete
+     * requests to ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2398,9 +2398,9 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-     * Output only. A checksum computed by the server based on the current value of the
-     * Organization resource. This may be sent on update and delete requests to
-     * ensure the client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the Organization resource. This may be sent on update and delete
+     * requests to ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2421,9 +2421,9 @@ public Builder setEtag(java.lang.String value) { * * *
-     * Output only. A checksum computed by the server based on the current value of the
-     * Organization resource. This may be sent on update and delete requests to
-     * ensure the client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the Organization resource. This may be sent on update and delete
+     * requests to ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2440,9 +2440,9 @@ public Builder clearEtag() { * * *
-     * Output only. A checksum computed by the server based on the current value of the
-     * Organization resource. This may be sent on update and delete requests to
-     * ensure the client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the Organization resource. This may be sent on update and delete
+     * requests to ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationOrBuilder.java index d16be0c2e466..7bb2f0c3a880 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/OrganizationOrBuilder.java @@ -267,9 +267,9 @@ public interface OrganizationOrBuilder * * *
-   * Output only. A checksum computed by the server based on the current value of the
-   * Organization resource. This may be sent on update and delete requests to
-   * ensure the client has an up-to-date value before proceeding.
+   * Output only. A checksum computed by the server based on the current value
+   * of the Organization resource. This may be sent on update and delete
+   * requests to ensure the client has an up-to-date value before proceeding.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -281,9 +281,9 @@ public interface OrganizationOrBuilder * * *
-   * Output only. A checksum computed by the server based on the current value of the
-   * Organization resource. This may be sent on update and delete requests to
-   * ensure the client has an up-to-date value before proceeding.
+   * Output only. A checksum computed by the server based on the current value
+   * of the Organization resource. This may be sent on update and delete
+   * requests to ensure the client has an up-to-date value before proceeding.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Project.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Project.java index 15a862cf6ebb..274742ec9864 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Project.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Project.java @@ -262,8 +262,8 @@ private State(int value) { * * *
-   * Output only. The unique resource name of the project. It is an int64 generated number
-   * prefixed by "projects/".
+   * Output only. The unique resource name of the project. It is an int64
+   * generated number prefixed by "projects/".
    * Example: `projects/415104041262`
    * 
* @@ -287,8 +287,8 @@ public java.lang.String getName() { * * *
-   * Output only. The unique resource name of the project. It is an int64 generated number
-   * prefixed by "projects/".
+   * Output only. The unique resource name of the project. It is an int64
+   * generated number prefixed by "projects/".
    * Example: `projects/415104041262`
    * 
* @@ -674,9 +674,9 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { * * *
-   * Output only. A checksum computed by the server based on the current value of the Project
-   * resource. This may be sent on update and delete requests to ensure the
-   * client has an up-to-date value before proceeding.
+   * Output only. A checksum computed by the server based on the current value
+   * of the Project resource. This may be sent on update and delete requests to
+   * ensure the client has an up-to-date value before proceeding.
    * 
* * string etag = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -699,9 +699,9 @@ public java.lang.String getEtag() { * * *
-   * Output only. A checksum computed by the server based on the current value of the Project
-   * resource. This may be sent on update and delete requests to ensure the
-   * client has an up-to-date value before proceeding.
+   * Output only. A checksum computed by the server based on the current value
+   * of the Project resource. This may be sent on update and delete requests to
+   * ensure the client has an up-to-date value before proceeding.
    * 
* * string etag = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -756,7 +756,7 @@ public int getLabelsCount() { * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -786,7 +786,7 @@ public java.util.Map getLabels() { * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -807,7 +807,7 @@ public java.util.Map getLabelsMap() { * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -835,7 +835,7 @@ public java.util.Map getLabelsMap() { * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -1470,8 +1470,8 @@ public Builder mergeFrom( * * *
-     * Output only. The unique resource name of the project. It is an int64 generated number
-     * prefixed by "projects/".
+     * Output only. The unique resource name of the project. It is an int64
+     * generated number prefixed by "projects/".
      * Example: `projects/415104041262`
      * 
* @@ -1494,8 +1494,8 @@ public java.lang.String getName() { * * *
-     * Output only. The unique resource name of the project. It is an int64 generated number
-     * prefixed by "projects/".
+     * Output only. The unique resource name of the project. It is an int64
+     * generated number prefixed by "projects/".
      * Example: `projects/415104041262`
      * 
* @@ -1518,8 +1518,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Output only. The unique resource name of the project. It is an int64 generated number
-     * prefixed by "projects/".
+     * Output only. The unique resource name of the project. It is an int64
+     * generated number prefixed by "projects/".
      * Example: `projects/415104041262`
      * 
* @@ -1541,8 +1541,8 @@ public Builder setName(java.lang.String value) { * * *
-     * Output only. The unique resource name of the project. It is an int64 generated number
-     * prefixed by "projects/".
+     * Output only. The unique resource name of the project. It is an int64
+     * generated number prefixed by "projects/".
      * Example: `projects/415104041262`
      * 
* @@ -1560,8 +1560,8 @@ public Builder clearName() { * * *
-     * Output only. The unique resource name of the project. It is an int64 generated number
-     * prefixed by "projects/".
+     * Output only. The unique resource name of the project. It is an int64
+     * generated number prefixed by "projects/".
      * Example: `projects/415104041262`
      * 
* @@ -2654,9 +2654,9 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { * * *
-     * Output only. A checksum computed by the server based on the current value of the Project
-     * resource. This may be sent on update and delete requests to ensure the
-     * client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the Project resource. This may be sent on update and delete requests to
+     * ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2678,9 +2678,9 @@ public java.lang.String getEtag() { * * *
-     * Output only. A checksum computed by the server based on the current value of the Project
-     * resource. This may be sent on update and delete requests to ensure the
-     * client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the Project resource. This may be sent on update and delete requests to
+     * ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2702,9 +2702,9 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-     * Output only. A checksum computed by the server based on the current value of the Project
-     * resource. This may be sent on update and delete requests to ensure the
-     * client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the Project resource. This may be sent on update and delete requests to
+     * ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2725,9 +2725,9 @@ public Builder setEtag(java.lang.String value) { * * *
-     * Output only. A checksum computed by the server based on the current value of the Project
-     * resource. This may be sent on update and delete requests to ensure the
-     * client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the Project resource. This may be sent on update and delete requests to
+     * ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2744,9 +2744,9 @@ public Builder clearEtag() { * * *
-     * Output only. A checksum computed by the server based on the current value of the Project
-     * resource. This may be sent on update and delete requests to ensure the
-     * client has an up-to-date value before proceeding.
+     * Output only. A checksum computed by the server based on the current value
+     * of the Project resource. This may be sent on update and delete requests to
+     * ensure the client has an up-to-date value before proceeding.
      * 
* * string etag = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2799,7 +2799,7 @@ public int getLabelsCount() { * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -2829,7 +2829,7 @@ public java.util.Map getLabels() { * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -2850,7 +2850,7 @@ public java.util.Map getLabelsMap() { * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -2878,7 +2878,7 @@ public java.util.Map getLabelsMap() { * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -2912,7 +2912,7 @@ public Builder clearLabels() { * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -2942,7 +2942,7 @@ public java.util.Map getMutableLabels() { * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -2970,7 +2970,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ProjectOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ProjectOrBuilder.java index 236beee848fd..c58ef47fcb1e 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ProjectOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/ProjectOrBuilder.java @@ -27,8 +27,8 @@ public interface ProjectOrBuilder * * *
-   * Output only. The unique resource name of the project. It is an int64 generated number
-   * prefixed by "projects/".
+   * Output only. The unique resource name of the project. It is an int64
+   * generated number prefixed by "projects/".
    * Example: `projects/415104041262`
    * 
* @@ -41,8 +41,8 @@ public interface ProjectOrBuilder * * *
-   * Output only. The unique resource name of the project. It is an int64 generated number
-   * prefixed by "projects/".
+   * Output only. The unique resource name of the project. It is an int64
+   * generated number prefixed by "projects/".
    * Example: `projects/415104041262`
    * 
* @@ -292,9 +292,9 @@ public interface ProjectOrBuilder * * *
-   * Output only. A checksum computed by the server based on the current value of the Project
-   * resource. This may be sent on update and delete requests to ensure the
-   * client has an up-to-date value before proceeding.
+   * Output only. A checksum computed by the server based on the current value
+   * of the Project resource. This may be sent on update and delete requests to
+   * ensure the client has an up-to-date value before proceeding.
    * 
* * string etag = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -306,9 +306,9 @@ public interface ProjectOrBuilder * * *
-   * Output only. A checksum computed by the server based on the current value of the Project
-   * resource. This may be sent on update and delete requests to ensure the
-   * client has an up-to-date value before proceeding.
+   * Output only. A checksum computed by the server based on the current value
+   * of the Project resource. This may be sent on update and delete requests to
+   * ensure the client has an up-to-date value before proceeding.
    * 
* * string etag = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -326,7 +326,7 @@ public interface ProjectOrBuilder * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -344,7 +344,7 @@ public interface ProjectOrBuilder * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -365,7 +365,7 @@ public interface ProjectOrBuilder * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -383,7 +383,7 @@ public interface ProjectOrBuilder * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` @@ -405,7 +405,7 @@ java.lang.String getLabelsOrDefault( * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. * Label values must be between 0 and 63 characters long and must conform * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - * No more than 256 labels can be associated with a given resource. + * No more than 64 labels can be associated with a given resource. * Clients should store labels in a representation such as JSON that does not * depend on specific characters being disallowed. * Example: `"myBusinessDimension" : "businessValue"` diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Purpose.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Purpose.java new file mode 100644 index 000000000000..e6a01d416603 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/Purpose.java @@ -0,0 +1,172 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_keys.proto + +package com.google.cloud.resourcemanager.v3; + +/** + * + * + *
+ * A purpose for each policy engine requiring such an integration. A single
+ * policy engine may have multiple purposes defined, however a TagKey may only
+ * specify a single purpose.
+ * 
+ * + * Protobuf enum {@code google.cloud.resourcemanager.v3.Purpose} + */ +public enum Purpose implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified purpose.
+   * 
+ * + * PURPOSE_UNSPECIFIED = 0; + */ + PURPOSE_UNSPECIFIED(0), + /** + * + * + *
+   * Purpose for Compute Engine firewalls.
+   * A corresponding purpose_data should be set for the network the tag is
+   * intended for. The key should be 'network' and the value should be in
+   * either of these two formats:
+   * -https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}
+   * -{project_id}/{network_name}
+   * Examples:
+   * -https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600
+   * -fail-closed-load-testing/load-testing-network
+   * 
+ * + * GCE_FIREWALL = 1; + */ + GCE_FIREWALL(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified purpose.
+   * 
+ * + * PURPOSE_UNSPECIFIED = 0; + */ + public static final int PURPOSE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Purpose for Compute Engine firewalls.
+   * A corresponding purpose_data should be set for the network the tag is
+   * intended for. The key should be 'network' and the value should be in
+   * either of these two formats:
+   * -https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}
+   * -{project_id}/{network_name}
+   * Examples:
+   * -https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600
+   * -fail-closed-load-testing/load-testing-network
+   * 
+ * + * GCE_FIREWALL = 1; + */ + public static final int GCE_FIREWALL_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Purpose valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Purpose forNumber(int value) { + switch (value) { + case 0: + return PURPOSE_UNSPECIFIED; + case 1: + return GCE_FIREWALL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Purpose findValueByNumber(int number) { + return Purpose.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagKeysProto.getDescriptor().getEnumTypes().get(0); + } + + private static final Purpose[] VALUES = values(); + + public static Purpose valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Purpose(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.resourcemanager.v3.Purpose) +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchFoldersRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchFoldersRequest.java index 8166ef56ff84..33c4b0d55ac1 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchFoldersRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchFoldersRequest.java @@ -74,8 +74,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Optional. The maximum number of folders to return in the response.
-   * If unspecified, server picks an appropriate default.
+   * Optional. The maximum number of folders to return in the response. The
+   * server can return fewer folders than requested. If unspecified, server
+   * picks an appropriate default.
    * 
* * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -95,8 +96,8 @@ public int getPageSize() { * * *
-   * Optional. A pagination token returned from a previous call to `SearchFolders`
-   * that indicates from where search should continue.
+   * Optional. A pagination token returned from a previous call to
+   * `SearchFolders` that indicates from where search should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -119,8 +120,8 @@ public java.lang.String getPageToken() { * * *
-   * Optional. A pagination token returned from a previous call to `SearchFolders`
-   * that indicates from where search should continue.
+   * Optional. A pagination token returned from a previous call to
+   * `SearchFolders` that indicates from where search should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -635,8 +636,9 @@ public Builder mergeFrom( * * *
-     * Optional. The maximum number of folders to return in the response.
-     * If unspecified, server picks an appropriate default.
+     * Optional. The maximum number of folders to return in the response. The
+     * server can return fewer folders than requested. If unspecified, server
+     * picks an appropriate default.
      * 
* * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -651,8 +653,9 @@ public int getPageSize() { * * *
-     * Optional. The maximum number of folders to return in the response.
-     * If unspecified, server picks an appropriate default.
+     * Optional. The maximum number of folders to return in the response. The
+     * server can return fewer folders than requested. If unspecified, server
+     * picks an appropriate default.
      * 
* * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -671,8 +674,9 @@ public Builder setPageSize(int value) { * * *
-     * Optional. The maximum number of folders to return in the response.
-     * If unspecified, server picks an appropriate default.
+     * Optional. The maximum number of folders to return in the response. The
+     * server can return fewer folders than requested. If unspecified, server
+     * picks an appropriate default.
      * 
* * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -691,8 +695,8 @@ public Builder clearPageSize() { * * *
-     * Optional. A pagination token returned from a previous call to `SearchFolders`
-     * that indicates from where search should continue.
+     * Optional. A pagination token returned from a previous call to
+     * `SearchFolders` that indicates from where search should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -714,8 +718,8 @@ public java.lang.String getPageToken() { * * *
-     * Optional. A pagination token returned from a previous call to `SearchFolders`
-     * that indicates from where search should continue.
+     * Optional. A pagination token returned from a previous call to
+     * `SearchFolders` that indicates from where search should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -737,8 +741,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * Optional. A pagination token returned from a previous call to `SearchFolders`
-     * that indicates from where search should continue.
+     * Optional. A pagination token returned from a previous call to
+     * `SearchFolders` that indicates from where search should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -759,8 +763,8 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * Optional. A pagination token returned from a previous call to `SearchFolders`
-     * that indicates from where search should continue.
+     * Optional. A pagination token returned from a previous call to
+     * `SearchFolders` that indicates from where search should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -777,8 +781,8 @@ public Builder clearPageToken() { * * *
-     * Optional. A pagination token returned from a previous call to `SearchFolders`
-     * that indicates from where search should continue.
+     * Optional. A pagination token returned from a previous call to
+     * `SearchFolders` that indicates from where search should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchFoldersRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchFoldersRequestOrBuilder.java index 31df04d17660..2aa7107a49df 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchFoldersRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchFoldersRequestOrBuilder.java @@ -27,8 +27,9 @@ public interface SearchFoldersRequestOrBuilder * * *
-   * Optional. The maximum number of folders to return in the response.
-   * If unspecified, server picks an appropriate default.
+   * Optional. The maximum number of folders to return in the response. The
+   * server can return fewer folders than requested. If unspecified, server
+   * picks an appropriate default.
    * 
* * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -41,8 +42,8 @@ public interface SearchFoldersRequestOrBuilder * * *
-   * Optional. A pagination token returned from a previous call to `SearchFolders`
-   * that indicates from where search should continue.
+   * Optional. A pagination token returned from a previous call to
+   * `SearchFolders` that indicates from where search should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -54,8 +55,8 @@ public interface SearchFoldersRequestOrBuilder * * *
-   * Optional. A pagination token returned from a previous call to `SearchFolders`
-   * that indicates from where search should continue.
+   * Optional. A pagination token returned from a previous call to
+   * `SearchFolders` that indicates from where search should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchOrganizationsRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchOrganizationsRequest.java index f3a1500d8ece..7afe3dfcb113 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchOrganizationsRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchOrganizationsRequest.java @@ -75,7 +75,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Optional. The maximum number of organizations to return in the response.
-   * If unspecified, server picks an appropriate default.
+   * The server can return fewer organizations than requested. If unspecified,
+   * server picks an appropriate default.
    * 
* * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -95,8 +96,8 @@ public int getPageSize() { * * *
-   * Optional. A pagination token returned from a previous call to `SearchOrganizations`
-   * that indicates from where listing should continue.
+   * Optional. A pagination token returned from a previous call to
+   * `SearchOrganizations` that indicates from where listing should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -119,8 +120,8 @@ public java.lang.String getPageToken() { * * *
-   * Optional. A pagination token returned from a previous call to `SearchOrganizations`
-   * that indicates from where listing should continue.
+   * Optional. A pagination token returned from a previous call to
+   * `SearchOrganizations` that indicates from where listing should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -148,8 +149,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-   * Optional. An optional query string used to filter the Organizations to return in
-   * the response. Query rules are case-insensitive.
+   * Optional. An optional query string used to filter the Organizations to
+   * return in the response. Query rules are case-insensitive.
    * ```
    * | Field            | Description                                |
    * |------------------|--------------------------------------------|
@@ -185,8 +186,8 @@ public java.lang.String getQuery() {
    *
    *
    * 
-   * Optional. An optional query string used to filter the Organizations to return in
-   * the response. Query rules are case-insensitive.
+   * Optional. An optional query string used to filter the Organizations to
+   * return in the response. Query rules are case-insensitive.
    * ```
    * | Field            | Description                                |
    * |------------------|--------------------------------------------|
@@ -617,7 +618,8 @@ public Builder mergeFrom(
      *
      * 
      * Optional. The maximum number of organizations to return in the response.
-     * If unspecified, server picks an appropriate default.
+     * The server can return fewer organizations than requested. If unspecified,
+     * server picks an appropriate default.
      * 
* * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -633,7 +635,8 @@ public int getPageSize() { * *
      * Optional. The maximum number of organizations to return in the response.
-     * If unspecified, server picks an appropriate default.
+     * The server can return fewer organizations than requested. If unspecified,
+     * server picks an appropriate default.
      * 
* * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -653,7 +656,8 @@ public Builder setPageSize(int value) { * *
      * Optional. The maximum number of organizations to return in the response.
-     * If unspecified, server picks an appropriate default.
+     * The server can return fewer organizations than requested. If unspecified,
+     * server picks an appropriate default.
      * 
* * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -672,8 +676,8 @@ public Builder clearPageSize() { * * *
-     * Optional. A pagination token returned from a previous call to `SearchOrganizations`
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * `SearchOrganizations` that indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -695,8 +699,8 @@ public java.lang.String getPageToken() { * * *
-     * Optional. A pagination token returned from a previous call to `SearchOrganizations`
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * `SearchOrganizations` that indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -718,8 +722,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * Optional. A pagination token returned from a previous call to `SearchOrganizations`
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * `SearchOrganizations` that indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -740,8 +744,8 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * Optional. A pagination token returned from a previous call to `SearchOrganizations`
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * `SearchOrganizations` that indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -758,8 +762,8 @@ public Builder clearPageToken() { * * *
-     * Optional. A pagination token returned from a previous call to `SearchOrganizations`
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * `SearchOrganizations` that indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -783,8 +787,8 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. An optional query string used to filter the Organizations to return in
-     * the response. Query rules are case-insensitive.
+     * Optional. An optional query string used to filter the Organizations to
+     * return in the response. Query rules are case-insensitive.
      * ```
      * | Field            | Description                                |
      * |------------------|--------------------------------------------|
@@ -819,8 +823,8 @@ public java.lang.String getQuery() {
      *
      *
      * 
-     * Optional. An optional query string used to filter the Organizations to return in
-     * the response. Query rules are case-insensitive.
+     * Optional. An optional query string used to filter the Organizations to
+     * return in the response. Query rules are case-insensitive.
      * ```
      * | Field            | Description                                |
      * |------------------|--------------------------------------------|
@@ -855,8 +859,8 @@ public com.google.protobuf.ByteString getQueryBytes() {
      *
      *
      * 
-     * Optional. An optional query string used to filter the Organizations to return in
-     * the response. Query rules are case-insensitive.
+     * Optional. An optional query string used to filter the Organizations to
+     * return in the response. Query rules are case-insensitive.
      * ```
      * | Field            | Description                                |
      * |------------------|--------------------------------------------|
@@ -890,8 +894,8 @@ public Builder setQuery(java.lang.String value) {
      *
      *
      * 
-     * Optional. An optional query string used to filter the Organizations to return in
-     * the response. Query rules are case-insensitive.
+     * Optional. An optional query string used to filter the Organizations to
+     * return in the response. Query rules are case-insensitive.
      * ```
      * | Field            | Description                                |
      * |------------------|--------------------------------------------|
@@ -921,8 +925,8 @@ public Builder clearQuery() {
      *
      *
      * 
-     * Optional. An optional query string used to filter the Organizations to return in
-     * the response. Query rules are case-insensitive.
+     * Optional. An optional query string used to filter the Organizations to
+     * return in the response. Query rules are case-insensitive.
      * ```
      * | Field            | Description                                |
      * |------------------|--------------------------------------------|
diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchOrganizationsRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchOrganizationsRequestOrBuilder.java
index d0a6545f9367..c2abc95aea13 100644
--- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchOrganizationsRequestOrBuilder.java
+++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchOrganizationsRequestOrBuilder.java
@@ -28,7 +28,8 @@ public interface SearchOrganizationsRequestOrBuilder
    *
    * 
    * Optional. The maximum number of organizations to return in the response.
-   * If unspecified, server picks an appropriate default.
+   * The server can return fewer organizations than requested. If unspecified,
+   * server picks an appropriate default.
    * 
* * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -41,8 +42,8 @@ public interface SearchOrganizationsRequestOrBuilder * * *
-   * Optional. A pagination token returned from a previous call to `SearchOrganizations`
-   * that indicates from where listing should continue.
+   * Optional. A pagination token returned from a previous call to
+   * `SearchOrganizations` that indicates from where listing should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -54,8 +55,8 @@ public interface SearchOrganizationsRequestOrBuilder * * *
-   * Optional. A pagination token returned from a previous call to `SearchOrganizations`
-   * that indicates from where listing should continue.
+   * Optional. A pagination token returned from a previous call to
+   * `SearchOrganizations` that indicates from where listing should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -68,8 +69,8 @@ public interface SearchOrganizationsRequestOrBuilder * * *
-   * Optional. An optional query string used to filter the Organizations to return in
-   * the response. Query rules are case-insensitive.
+   * Optional. An optional query string used to filter the Organizations to
+   * return in the response. Query rules are case-insensitive.
    * ```
    * | Field            | Description                                |
    * |------------------|--------------------------------------------|
@@ -94,8 +95,8 @@ public interface SearchOrganizationsRequestOrBuilder
    *
    *
    * 
-   * Optional. An optional query string used to filter the Organizations to return in
-   * the response. Query rules are case-insensitive.
+   * Optional. An optional query string used to filter the Organizations to
+   * return in the response. Query rules are case-insensitive.
    * ```
    * | Field            | Description                                |
    * |------------------|--------------------------------------------|
diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchProjectsRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchProjectsRequest.java
index 6f197a8a42ef..c4e160982042 100644
--- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchProjectsRequest.java
+++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchProjectsRequest.java
@@ -80,21 +80,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    * 
    * Optional. A query string for searching for projects that the caller has
    * `resourcemanager.projects.get` permission to. If multiple fields are
-   * included in the query, the it will return results that match any of the
+   * included in the query, then it will return results that match any of the
    * fields. Some eligible fields are:
    * ```
    * | Field                   | Description                                  |
    * |-------------------------|----------------------------------------------|
    * | displayName, name       | Filters by displayName.                      |
-   * | parent                  | Project's parent. (for example: folders/123,
-   * organizations/*) Prefer parent field over parent.type and parent.id. |
-   * | parent.type             | Parent's type: `folder` or `organization`.   |
-   * | parent.id               | Parent's id number (for example: 123)        |
-   * | id, projectId           | Filters by projectId.                        |
-   * | state, lifecycleState   | Filters by state.                            |
-   * | labels                  | Filters by label name or value.              |
-   * | labels.<key> (where *key* is the name of a label) | Filters by label
-   * name. |
+   * | parent                  | Project's parent (for example: folders/123,
+   * organizations/*). Prefer parent field over parent.type and parent.id.| |
+   * parent.type             | Parent's type: `folder` or `organization`.   | |
+   * parent.id               | Parent's id number (for example: 123)        | |
+   * id, projectId           | Filters by projectId.                        | |
+   * state, lifecycleState   | Filters by state.                            | |
+   * labels                  | Filters by label name or value.              | |
+   * labels.\<key\> (where *key* is the name of a label) | Filters by label
+   * name.|
    * ```
    * Search expressions are case insensitive.
    * Some examples queries:
@@ -107,8 +107,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    * | NAME:howl        | Equivalent to above.                                |
    * | labels.color:*   | The project has the label `color`.                  |
    * | labels.color:red | The project's label `color` has the value `red`.    |
-   * | labels.color:red&nbsp;labels.size:big | The project's label `color` has
-   * the value `red` and its label `size` has the value `big`.                |
+   * | labels.color:red labels.size:big | The project's label `color` has the
+   * value `red` or its label `size` has the value `big`.                     |
    * ```
    * If no query is specified, the call will return projects for which the user
    * has the `resourcemanager.projects.get` permission.
@@ -136,21 +136,21 @@ public java.lang.String getQuery() {
    * 
    * Optional. A query string for searching for projects that the caller has
    * `resourcemanager.projects.get` permission to. If multiple fields are
-   * included in the query, the it will return results that match any of the
+   * included in the query, then it will return results that match any of the
    * fields. Some eligible fields are:
    * ```
    * | Field                   | Description                                  |
    * |-------------------------|----------------------------------------------|
    * | displayName, name       | Filters by displayName.                      |
-   * | parent                  | Project's parent. (for example: folders/123,
-   * organizations/*) Prefer parent field over parent.type and parent.id. |
-   * | parent.type             | Parent's type: `folder` or `organization`.   |
-   * | parent.id               | Parent's id number (for example: 123)        |
-   * | id, projectId           | Filters by projectId.                        |
-   * | state, lifecycleState   | Filters by state.                            |
-   * | labels                  | Filters by label name or value.              |
-   * | labels.<key> (where *key* is the name of a label) | Filters by label
-   * name. |
+   * | parent                  | Project's parent (for example: folders/123,
+   * organizations/*). Prefer parent field over parent.type and parent.id.| |
+   * parent.type             | Parent's type: `folder` or `organization`.   | |
+   * parent.id               | Parent's id number (for example: 123)        | |
+   * id, projectId           | Filters by projectId.                        | |
+   * state, lifecycleState   | Filters by state.                            | |
+   * labels                  | Filters by label name or value.              | |
+   * labels.\<key\> (where *key* is the name of a label) | Filters by label
+   * name.|
    * ```
    * Search expressions are case insensitive.
    * Some examples queries:
@@ -163,8 +163,8 @@ public java.lang.String getQuery() {
    * | NAME:howl        | Equivalent to above.                                |
    * | labels.color:*   | The project has the label `color`.                  |
    * | labels.color:red | The project's label `color` has the value `red`.    |
-   * | labels.color:red&nbsp;labels.size:big | The project's label `color` has
-   * the value `red` and its label `size` has the value `big`.                |
+   * | labels.color:red labels.size:big | The project's label `color` has the
+   * value `red` or its label `size` has the value `big`.                     |
    * ```
    * If no query is specified, the call will return projects for which the user
    * has the `resourcemanager.projects.get` permission.
@@ -195,9 +195,9 @@ public com.google.protobuf.ByteString getQueryBytes() {
    *
    *
    * 
-   * Optional. A pagination token returned from a previous call to [ListProjects]
-   * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-   * that indicates from where listing should continue.
+   * Optional. A pagination token returned from a previous call to
+   * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+   * indicates from where listing should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -220,9 +220,9 @@ public java.lang.String getPageToken() { * * *
-   * Optional. A pagination token returned from a previous call to [ListProjects]
-   * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-   * that indicates from where listing should continue.
+   * Optional. A pagination token returned from a previous call to
+   * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+   * indicates from where listing should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -660,21 +660,21 @@ public Builder mergeFrom( *
      * Optional. A query string for searching for projects that the caller has
      * `resourcemanager.projects.get` permission to. If multiple fields are
-     * included in the query, the it will return results that match any of the
+     * included in the query, then it will return results that match any of the
      * fields. Some eligible fields are:
      * ```
      * | Field                   | Description                                  |
      * |-------------------------|----------------------------------------------|
      * | displayName, name       | Filters by displayName.                      |
-     * | parent                  | Project's parent. (for example: folders/123,
-     * organizations/*) Prefer parent field over parent.type and parent.id. |
-     * | parent.type             | Parent's type: `folder` or `organization`.   |
-     * | parent.id               | Parent's id number (for example: 123)        |
-     * | id, projectId           | Filters by projectId.                        |
-     * | state, lifecycleState   | Filters by state.                            |
-     * | labels                  | Filters by label name or value.              |
-     * | labels.<key> (where *key* is the name of a label) | Filters by label
-     * name. |
+     * | parent                  | Project's parent (for example: folders/123,
+     * organizations/*). Prefer parent field over parent.type and parent.id.| |
+     * parent.type             | Parent's type: `folder` or `organization`.   | |
+     * parent.id               | Parent's id number (for example: 123)        | |
+     * id, projectId           | Filters by projectId.                        | |
+     * state, lifecycleState   | Filters by state.                            | |
+     * labels                  | Filters by label name or value.              | |
+     * labels.\<key\> (where *key* is the name of a label) | Filters by label
+     * name.|
      * ```
      * Search expressions are case insensitive.
      * Some examples queries:
@@ -687,8 +687,8 @@ public Builder mergeFrom(
      * | NAME:howl        | Equivalent to above.                                |
      * | labels.color:*   | The project has the label `color`.                  |
      * | labels.color:red | The project's label `color` has the value `red`.    |
-     * | labels.color:red&nbsp;labels.size:big | The project's label `color` has
-     * the value `red` and its label `size` has the value `big`.                |
+     * | labels.color:red labels.size:big | The project's label `color` has the
+     * value `red` or its label `size` has the value `big`.                     |
      * ```
      * If no query is specified, the call will return projects for which the user
      * has the `resourcemanager.projects.get` permission.
@@ -715,21 +715,21 @@ public java.lang.String getQuery() {
      * 
      * Optional. A query string for searching for projects that the caller has
      * `resourcemanager.projects.get` permission to. If multiple fields are
-     * included in the query, the it will return results that match any of the
+     * included in the query, then it will return results that match any of the
      * fields. Some eligible fields are:
      * ```
      * | Field                   | Description                                  |
      * |-------------------------|----------------------------------------------|
      * | displayName, name       | Filters by displayName.                      |
-     * | parent                  | Project's parent. (for example: folders/123,
-     * organizations/*) Prefer parent field over parent.type and parent.id. |
-     * | parent.type             | Parent's type: `folder` or `organization`.   |
-     * | parent.id               | Parent's id number (for example: 123)        |
-     * | id, projectId           | Filters by projectId.                        |
-     * | state, lifecycleState   | Filters by state.                            |
-     * | labels                  | Filters by label name or value.              |
-     * | labels.<key> (where *key* is the name of a label) | Filters by label
-     * name. |
+     * | parent                  | Project's parent (for example: folders/123,
+     * organizations/*). Prefer parent field over parent.type and parent.id.| |
+     * parent.type             | Parent's type: `folder` or `organization`.   | |
+     * parent.id               | Parent's id number (for example: 123)        | |
+     * id, projectId           | Filters by projectId.                        | |
+     * state, lifecycleState   | Filters by state.                            | |
+     * labels                  | Filters by label name or value.              | |
+     * labels.\<key\> (where *key* is the name of a label) | Filters by label
+     * name.|
      * ```
      * Search expressions are case insensitive.
      * Some examples queries:
@@ -742,8 +742,8 @@ public java.lang.String getQuery() {
      * | NAME:howl        | Equivalent to above.                                |
      * | labels.color:*   | The project has the label `color`.                  |
      * | labels.color:red | The project's label `color` has the value `red`.    |
-     * | labels.color:red&nbsp;labels.size:big | The project's label `color` has
-     * the value `red` and its label `size` has the value `big`.                |
+     * | labels.color:red labels.size:big | The project's label `color` has the
+     * value `red` or its label `size` has the value `big`.                     |
      * ```
      * If no query is specified, the call will return projects for which the user
      * has the `resourcemanager.projects.get` permission.
@@ -770,21 +770,21 @@ public com.google.protobuf.ByteString getQueryBytes() {
      * 
      * Optional. A query string for searching for projects that the caller has
      * `resourcemanager.projects.get` permission to. If multiple fields are
-     * included in the query, the it will return results that match any of the
+     * included in the query, then it will return results that match any of the
      * fields. Some eligible fields are:
      * ```
      * | Field                   | Description                                  |
      * |-------------------------|----------------------------------------------|
      * | displayName, name       | Filters by displayName.                      |
-     * | parent                  | Project's parent. (for example: folders/123,
-     * organizations/*) Prefer parent field over parent.type and parent.id. |
-     * | parent.type             | Parent's type: `folder` or `organization`.   |
-     * | parent.id               | Parent's id number (for example: 123)        |
-     * | id, projectId           | Filters by projectId.                        |
-     * | state, lifecycleState   | Filters by state.                            |
-     * | labels                  | Filters by label name or value.              |
-     * | labels.<key> (where *key* is the name of a label) | Filters by label
-     * name. |
+     * | parent                  | Project's parent (for example: folders/123,
+     * organizations/*). Prefer parent field over parent.type and parent.id.| |
+     * parent.type             | Parent's type: `folder` or `organization`.   | |
+     * parent.id               | Parent's id number (for example: 123)        | |
+     * id, projectId           | Filters by projectId.                        | |
+     * state, lifecycleState   | Filters by state.                            | |
+     * labels                  | Filters by label name or value.              | |
+     * labels.\<key\> (where *key* is the name of a label) | Filters by label
+     * name.|
      * ```
      * Search expressions are case insensitive.
      * Some examples queries:
@@ -797,8 +797,8 @@ public com.google.protobuf.ByteString getQueryBytes() {
      * | NAME:howl        | Equivalent to above.                                |
      * | labels.color:*   | The project has the label `color`.                  |
      * | labels.color:red | The project's label `color` has the value `red`.    |
-     * | labels.color:red&nbsp;labels.size:big | The project's label `color` has
-     * the value `red` and its label `size` has the value `big`.                |
+     * | labels.color:red labels.size:big | The project's label `color` has the
+     * value `red` or its label `size` has the value `big`.                     |
      * ```
      * If no query is specified, the call will return projects for which the user
      * has the `resourcemanager.projects.get` permission.
@@ -824,21 +824,21 @@ public Builder setQuery(java.lang.String value) {
      * 
      * Optional. A query string for searching for projects that the caller has
      * `resourcemanager.projects.get` permission to. If multiple fields are
-     * included in the query, the it will return results that match any of the
+     * included in the query, then it will return results that match any of the
      * fields. Some eligible fields are:
      * ```
      * | Field                   | Description                                  |
      * |-------------------------|----------------------------------------------|
      * | displayName, name       | Filters by displayName.                      |
-     * | parent                  | Project's parent. (for example: folders/123,
-     * organizations/*) Prefer parent field over parent.type and parent.id. |
-     * | parent.type             | Parent's type: `folder` or `organization`.   |
-     * | parent.id               | Parent's id number (for example: 123)        |
-     * | id, projectId           | Filters by projectId.                        |
-     * | state, lifecycleState   | Filters by state.                            |
-     * | labels                  | Filters by label name or value.              |
-     * | labels.<key> (where *key* is the name of a label) | Filters by label
-     * name. |
+     * | parent                  | Project's parent (for example: folders/123,
+     * organizations/*). Prefer parent field over parent.type and parent.id.| |
+     * parent.type             | Parent's type: `folder` or `organization`.   | |
+     * parent.id               | Parent's id number (for example: 123)        | |
+     * id, projectId           | Filters by projectId.                        | |
+     * state, lifecycleState   | Filters by state.                            | |
+     * labels                  | Filters by label name or value.              | |
+     * labels.\<key\> (where *key* is the name of a label) | Filters by label
+     * name.|
      * ```
      * Search expressions are case insensitive.
      * Some examples queries:
@@ -851,8 +851,8 @@ public Builder setQuery(java.lang.String value) {
      * | NAME:howl        | Equivalent to above.                                |
      * | labels.color:*   | The project has the label `color`.                  |
      * | labels.color:red | The project's label `color` has the value `red`.    |
-     * | labels.color:red&nbsp;labels.size:big | The project's label `color` has
-     * the value `red` and its label `size` has the value `big`.                |
+     * | labels.color:red labels.size:big | The project's label `color` has the
+     * value `red` or its label `size` has the value `big`.                     |
      * ```
      * If no query is specified, the call will return projects for which the user
      * has the `resourcemanager.projects.get` permission.
@@ -874,21 +874,21 @@ public Builder clearQuery() {
      * 
      * Optional. A query string for searching for projects that the caller has
      * `resourcemanager.projects.get` permission to. If multiple fields are
-     * included in the query, the it will return results that match any of the
+     * included in the query, then it will return results that match any of the
      * fields. Some eligible fields are:
      * ```
      * | Field                   | Description                                  |
      * |-------------------------|----------------------------------------------|
      * | displayName, name       | Filters by displayName.                      |
-     * | parent                  | Project's parent. (for example: folders/123,
-     * organizations/*) Prefer parent field over parent.type and parent.id. |
-     * | parent.type             | Parent's type: `folder` or `organization`.   |
-     * | parent.id               | Parent's id number (for example: 123)        |
-     * | id, projectId           | Filters by projectId.                        |
-     * | state, lifecycleState   | Filters by state.                            |
-     * | labels                  | Filters by label name or value.              |
-     * | labels.<key> (where *key* is the name of a label) | Filters by label
-     * name. |
+     * | parent                  | Project's parent (for example: folders/123,
+     * organizations/*). Prefer parent field over parent.type and parent.id.| |
+     * parent.type             | Parent's type: `folder` or `organization`.   | |
+     * parent.id               | Parent's id number (for example: 123)        | |
+     * id, projectId           | Filters by projectId.                        | |
+     * state, lifecycleState   | Filters by state.                            | |
+     * labels                  | Filters by label name or value.              | |
+     * labels.\<key\> (where *key* is the name of a label) | Filters by label
+     * name.|
      * ```
      * Search expressions are case insensitive.
      * Some examples queries:
@@ -901,8 +901,8 @@ public Builder clearQuery() {
      * | NAME:howl        | Equivalent to above.                                |
      * | labels.color:*   | The project has the label `color`.                  |
      * | labels.color:red | The project's label `color` has the value `red`.    |
-     * | labels.color:red&nbsp;labels.size:big | The project's label `color` has
-     * the value `red` and its label `size` has the value `big`.                |
+     * | labels.color:red labels.size:big | The project's label `color` has the
+     * value `red` or its label `size` has the value `big`.                     |
      * ```
      * If no query is specified, the call will return projects for which the user
      * has the `resourcemanager.projects.get` permission.
@@ -929,9 +929,9 @@ public Builder setQueryBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Optional. A pagination token returned from a previous call to [ListProjects]
-     * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+     * indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -953,9 +953,9 @@ public java.lang.String getPageToken() { * * *
-     * Optional. A pagination token returned from a previous call to [ListProjects]
-     * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+     * indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -977,9 +977,9 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * Optional. A pagination token returned from a previous call to [ListProjects]
-     * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+     * indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1000,9 +1000,9 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * Optional. A pagination token returned from a previous call to [ListProjects]
-     * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+     * indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1019,9 +1019,9 @@ public Builder clearPageToken() { * * *
-     * Optional. A pagination token returned from a previous call to [ListProjects]
-     * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-     * that indicates from where listing should continue.
+     * Optional. A pagination token returned from a previous call to
+     * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+     * indicates from where listing should continue.
      * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchProjectsRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchProjectsRequestOrBuilder.java index cb37c476dbfe..ba3df65ac023 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchProjectsRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/SearchProjectsRequestOrBuilder.java @@ -29,21 +29,21 @@ public interface SearchProjectsRequestOrBuilder *
    * Optional. A query string for searching for projects that the caller has
    * `resourcemanager.projects.get` permission to. If multiple fields are
-   * included in the query, the it will return results that match any of the
+   * included in the query, then it will return results that match any of the
    * fields. Some eligible fields are:
    * ```
    * | Field                   | Description                                  |
    * |-------------------------|----------------------------------------------|
    * | displayName, name       | Filters by displayName.                      |
-   * | parent                  | Project's parent. (for example: folders/123,
-   * organizations/*) Prefer parent field over parent.type and parent.id. |
-   * | parent.type             | Parent's type: `folder` or `organization`.   |
-   * | parent.id               | Parent's id number (for example: 123)        |
-   * | id, projectId           | Filters by projectId.                        |
-   * | state, lifecycleState   | Filters by state.                            |
-   * | labels                  | Filters by label name or value.              |
-   * | labels.<key> (where *key* is the name of a label) | Filters by label
-   * name. |
+   * | parent                  | Project's parent (for example: folders/123,
+   * organizations/*). Prefer parent field over parent.type and parent.id.| |
+   * parent.type             | Parent's type: `folder` or `organization`.   | |
+   * parent.id               | Parent's id number (for example: 123)        | |
+   * id, projectId           | Filters by projectId.                        | |
+   * state, lifecycleState   | Filters by state.                            | |
+   * labels                  | Filters by label name or value.              | |
+   * labels.\<key\> (where *key* is the name of a label) | Filters by label
+   * name.|
    * ```
    * Search expressions are case insensitive.
    * Some examples queries:
@@ -56,8 +56,8 @@ public interface SearchProjectsRequestOrBuilder
    * | NAME:howl        | Equivalent to above.                                |
    * | labels.color:*   | The project has the label `color`.                  |
    * | labels.color:red | The project's label `color` has the value `red`.    |
-   * | labels.color:red&nbsp;labels.size:big | The project's label `color` has
-   * the value `red` and its label `size` has the value `big`.                |
+   * | labels.color:red labels.size:big | The project's label `color` has the
+   * value `red` or its label `size` has the value `big`.                     |
    * ```
    * If no query is specified, the call will return projects for which the user
    * has the `resourcemanager.projects.get` permission.
@@ -74,21 +74,21 @@ public interface SearchProjectsRequestOrBuilder
    * 
    * Optional. A query string for searching for projects that the caller has
    * `resourcemanager.projects.get` permission to. If multiple fields are
-   * included in the query, the it will return results that match any of the
+   * included in the query, then it will return results that match any of the
    * fields. Some eligible fields are:
    * ```
    * | Field                   | Description                                  |
    * |-------------------------|----------------------------------------------|
    * | displayName, name       | Filters by displayName.                      |
-   * | parent                  | Project's parent. (for example: folders/123,
-   * organizations/*) Prefer parent field over parent.type and parent.id. |
-   * | parent.type             | Parent's type: `folder` or `organization`.   |
-   * | parent.id               | Parent's id number (for example: 123)        |
-   * | id, projectId           | Filters by projectId.                        |
-   * | state, lifecycleState   | Filters by state.                            |
-   * | labels                  | Filters by label name or value.              |
-   * | labels.<key> (where *key* is the name of a label) | Filters by label
-   * name. |
+   * | parent                  | Project's parent (for example: folders/123,
+   * organizations/*). Prefer parent field over parent.type and parent.id.| |
+   * parent.type             | Parent's type: `folder` or `organization`.   | |
+   * parent.id               | Parent's id number (for example: 123)        | |
+   * id, projectId           | Filters by projectId.                        | |
+   * state, lifecycleState   | Filters by state.                            | |
+   * labels                  | Filters by label name or value.              | |
+   * labels.\<key\> (where *key* is the name of a label) | Filters by label
+   * name.|
    * ```
    * Search expressions are case insensitive.
    * Some examples queries:
@@ -101,8 +101,8 @@ public interface SearchProjectsRequestOrBuilder
    * | NAME:howl        | Equivalent to above.                                |
    * | labels.color:*   | The project has the label `color`.                  |
    * | labels.color:red | The project's label `color` has the value `red`.    |
-   * | labels.color:red&nbsp;labels.size:big | The project's label `color` has
-   * the value `red` and its label `size` has the value `big`.                |
+   * | labels.color:red labels.size:big | The project's label `color` has the
+   * value `red` or its label `size` has the value `big`.                     |
    * ```
    * If no query is specified, the call will return projects for which the user
    * has the `resourcemanager.projects.get` permission.
@@ -118,9 +118,9 @@ public interface SearchProjectsRequestOrBuilder
    *
    *
    * 
-   * Optional. A pagination token returned from a previous call to [ListProjects]
-   * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-   * that indicates from where listing should continue.
+   * Optional. A pagination token returned from a previous call to
+   * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+   * indicates from where listing should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -132,9 +132,9 @@ public interface SearchProjectsRequestOrBuilder * * *
-   * Optional. A pagination token returned from a previous call to [ListProjects]
-   * [google.cloud.resourcemanager.v3.Projects.ListProjects]
-   * that indicates from where listing should continue.
+   * Optional. A pagination token returned from a previous call to
+   * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that
+   * indicates from where listing should continue.
    * 
* * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBinding.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBinding.java index ae629bbf2762..930696d141e9 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBinding.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBinding.java @@ -23,9 +23,8 @@ * *
  * A TagBinding represents a connection between a TagValue and a cloud
- * resource (currently project, folder, or organization). Once a TagBinding is
- * created, the TagValue is applied to all the descendants of the cloud
- * resource.
+ * resource Once a TagBinding is created, the TagValue is applied to all the
+ * descendants of the Google Cloud resource.
  * 
* * Protobuf type {@code google.cloud.resourcemanager.v3.TagBinding} @@ -44,6 +43,7 @@ private TagBinding() { name_ = ""; parent_ = ""; tagValue_ = ""; + tagValueNamespacedName_ = ""; } @java.lang.Override @@ -233,6 +233,67 @@ public com.google.protobuf.ByteString getTagValueBytes() { } } + public static final int TAG_VALUE_NAMESPACED_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object tagValueNamespacedName_ = ""; + /** + * + * + *
+   * The namespaced name for the TagValue of the TagBinding.
+   * Must be in the format
+   * `{parent_id}/{tag_key_short_name}/{short_name}`.
+   * For methods that support TagValue namespaced name, only one of
+   * tag_value_namespaced_name or tag_value may be filled. Requests with both
+   * fields will be rejected.
+   * 
+ * + * string tag_value_namespaced_name = 4; + * + * @return The tagValueNamespacedName. + */ + @java.lang.Override + public java.lang.String getTagValueNamespacedName() { + java.lang.Object ref = tagValueNamespacedName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tagValueNamespacedName_ = s; + return s; + } + } + /** + * + * + *
+   * The namespaced name for the TagValue of the TagBinding.
+   * Must be in the format
+   * `{parent_id}/{tag_key_short_name}/{short_name}`.
+   * For methods that support TagValue namespaced name, only one of
+   * tag_value_namespaced_name or tag_value may be filled. Requests with both
+   * fields will be rejected.
+   * 
+ * + * string tag_value_namespaced_name = 4; + * + * @return The bytes for tagValueNamespacedName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTagValueNamespacedNameBytes() { + java.lang.Object ref = tagValueNamespacedName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagValueNamespacedName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -256,6 +317,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tagValue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tagValue_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tagValueNamespacedName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tagValueNamespacedName_); + } getUnknownFields().writeTo(output); } @@ -274,6 +338,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tagValue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tagValue_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tagValueNamespacedName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, tagValueNamespacedName_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -293,6 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getParent().equals(other.getParent())) return false; if (!getTagValue().equals(other.getTagValue())) return false; + if (!getTagValueNamespacedName().equals(other.getTagValueNamespacedName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -310,6 +378,8 @@ public int hashCode() { hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + TAG_VALUE_FIELD_NUMBER; hash = (53 * hash) + getTagValue().hashCode(); + hash = (37 * hash) + TAG_VALUE_NAMESPACED_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTagValueNamespacedName().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -415,9 +485,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * A TagBinding represents a connection between a TagValue and a cloud
-   * resource (currently project, folder, or organization). Once a TagBinding is
-   * created, the TagValue is applied to all the descendants of the cloud
-   * resource.
+   * resource Once a TagBinding is created, the TagValue is applied to all the
+   * descendants of the Google Cloud resource.
    * 
* * Protobuf type {@code google.cloud.resourcemanager.v3.TagBinding} @@ -455,6 +524,7 @@ public Builder clear() { name_ = ""; parent_ = ""; tagValue_ = ""; + tagValueNamespacedName_ = ""; return this; } @@ -500,6 +570,9 @@ private void buildPartial0(com.google.cloud.resourcemanager.v3.TagBinding result if (((from_bitField0_ & 0x00000004) != 0)) { result.tagValue_ = tagValue_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tagValueNamespacedName_ = tagValueNamespacedName_; + } } @java.lang.Override @@ -562,6 +635,11 @@ public Builder mergeFrom(com.google.cloud.resourcemanager.v3.TagBinding other) { bitField0_ |= 0x00000004; onChanged(); } + if (!other.getTagValueNamespacedName().isEmpty()) { + tagValueNamespacedName_ = other.tagValueNamespacedName_; + bitField0_ |= 0x00000008; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -606,6 +684,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + tagValueNamespacedName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -963,6 +1047,137 @@ public Builder setTagValueBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object tagValueNamespacedName_ = ""; + /** + * + * + *
+     * The namespaced name for the TagValue of the TagBinding.
+     * Must be in the format
+     * `{parent_id}/{tag_key_short_name}/{short_name}`.
+     * For methods that support TagValue namespaced name, only one of
+     * tag_value_namespaced_name or tag_value may be filled. Requests with both
+     * fields will be rejected.
+     * 
+ * + * string tag_value_namespaced_name = 4; + * + * @return The tagValueNamespacedName. + */ + public java.lang.String getTagValueNamespacedName() { + java.lang.Object ref = tagValueNamespacedName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tagValueNamespacedName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The namespaced name for the TagValue of the TagBinding.
+     * Must be in the format
+     * `{parent_id}/{tag_key_short_name}/{short_name}`.
+     * For methods that support TagValue namespaced name, only one of
+     * tag_value_namespaced_name or tag_value may be filled. Requests with both
+     * fields will be rejected.
+     * 
+ * + * string tag_value_namespaced_name = 4; + * + * @return The bytes for tagValueNamespacedName. + */ + public com.google.protobuf.ByteString getTagValueNamespacedNameBytes() { + java.lang.Object ref = tagValueNamespacedName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tagValueNamespacedName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The namespaced name for the TagValue of the TagBinding.
+     * Must be in the format
+     * `{parent_id}/{tag_key_short_name}/{short_name}`.
+     * For methods that support TagValue namespaced name, only one of
+     * tag_value_namespaced_name or tag_value may be filled. Requests with both
+     * fields will be rejected.
+     * 
+ * + * string tag_value_namespaced_name = 4; + * + * @param value The tagValueNamespacedName to set. + * @return This builder for chaining. + */ + public Builder setTagValueNamespacedName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tagValueNamespacedName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The namespaced name for the TagValue of the TagBinding.
+     * Must be in the format
+     * `{parent_id}/{tag_key_short_name}/{short_name}`.
+     * For methods that support TagValue namespaced name, only one of
+     * tag_value_namespaced_name or tag_value may be filled. Requests with both
+     * fields will be rejected.
+     * 
+ * + * string tag_value_namespaced_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearTagValueNamespacedName() { + tagValueNamespacedName_ = getDefaultInstance().getTagValueNamespacedName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The namespaced name for the TagValue of the TagBinding.
+     * Must be in the format
+     * `{parent_id}/{tag_key_short_name}/{short_name}`.
+     * For methods that support TagValue namespaced name, only one of
+     * tag_value_namespaced_name or tag_value may be filled. Requests with both
+     * fields will be rejected.
+     * 
+ * + * string tag_value_namespaced_name = 4; + * + * @param value The bytes for tagValueNamespacedName to set. + * @return This builder for chaining. + */ + public Builder setTagValueNamespacedNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tagValueNamespacedName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingOrBuilder.java index 503daf541dfd..b5d77c432147 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingOrBuilder.java @@ -105,4 +105,39 @@ public interface TagBindingOrBuilder * @return The bytes for tagValue. */ com.google.protobuf.ByteString getTagValueBytes(); + + /** + * + * + *
+   * The namespaced name for the TagValue of the TagBinding.
+   * Must be in the format
+   * `{parent_id}/{tag_key_short_name}/{short_name}`.
+   * For methods that support TagValue namespaced name, only one of
+   * tag_value_namespaced_name or tag_value may be filled. Requests with both
+   * fields will be rejected.
+   * 
+ * + * string tag_value_namespaced_name = 4; + * + * @return The tagValueNamespacedName. + */ + java.lang.String getTagValueNamespacedName(); + /** + * + * + *
+   * The namespaced name for the TagValue of the TagBinding.
+   * Must be in the format
+   * `{parent_id}/{tag_key_short_name}/{short_name}`.
+   * For methods that support TagValue namespaced name, only one of
+   * tag_value_namespaced_name or tag_value may be filled. Requests with both
+   * fields will be rejected.
+   * 
+ * + * string tag_value_namespaced_name = 4; + * + * @return The bytes for tagValueNamespacedName. + */ + com.google.protobuf.ByteString getTagValueNamespacedNameBytes(); } diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsProto.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsProto.java index c9113257226e..12ebd5fe03aa 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsProto.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagBindingsProto.java @@ -55,6 +55,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_resourcemanager_v3_ListTagBindingsResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_resourcemanager_v3_ListTagBindingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_resourcemanager_v3_EffectiveTag_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_resourcemanager_v3_EffectiveTag_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -69,48 +81,66 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "er.v3\032\034google/api/annotations.proto\032\027goo" + "gle/api/client.proto\032\037google/api/field_b" + "ehavior.proto\032\031google/api/resource.proto" - + "\032#google/longrunning/operations.proto\"\222\001" - + "\n\nTagBinding\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\016\n\006paren" - + "t\030\002 \001(\t\022\021\n\ttag_value\030\003 \001(\t:N\352AK\n.cloudre" - + "sourcemanager.googleapis.com/TagBinding\022" - + "\031tagBindings/{tag_binding}\"\032\n\030CreateTagB" - + "indingMetadata\"|\n\027CreateTagBindingReques" - + "t\022E\n\013tag_binding\030\001 \001(\0132+.google.cloud.re" - + "sourcemanager.v3.TagBindingB\003\340A\002\022\032\n\rvali" - + "date_only\030\002 \001(\010B\003\340A\001\"\032\n\030DeleteTagBinding" - + "Metadata\"_\n\027DeleteTagBindingRequest\022D\n\004n" - + "ame\030\001 \001(\tB6\340A\002\372A0\n.cloudresourcemanager." - + "googleapis.com/TagBinding\"d\n\026ListTagBind" - + "ingsRequest\022\031\n\006parent\030\001 \001(\tB\t\340A\002\372A\003\022\001*\022\026" - + "\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001" - + "(\tB\003\340A\001\"u\n\027ListTagBindingsResponse\022A\n\014ta" - + "g_bindings\030\001 \003(\0132+.google.cloud.resource" - + "manager.v3.TagBinding\022\027\n\017next_page_token" - + "\030\002 \001(\t2\340\005\n\013TagBindings\022\246\001\n\017ListTagBindin" - + "gs\0227.google.cloud.resourcemanager.v3.Lis" - + "tTagBindingsRequest\0328.google.cloud.resou" - + "rcemanager.v3.ListTagBindingsResponse\" \202" - + "\323\344\223\002\021\022\017/v3/tagBindings\332A\006parent\022\310\001\n\020Crea" - + "teTagBinding\0228.google.cloud.resourcemana" - + "ger.v3.CreateTagBindingRequest\032\035.google." - + "longrunning.Operation\"[\202\323\344\223\002\036\"\017/v3/tagBi" - + "ndings:\013tag_binding\332A\013tag_binding\312A&\n\nTa" - + "gBinding\022\030CreateTagBindingMetadata\022\311\001\n\020D" - + "eleteTagBinding\0228.google.cloud.resourcem" - + "anager.v3.DeleteTagBindingRequest\032\035.goog" - + "le.longrunning.Operation\"\\\202\323\344\223\002\033*\031/v3/{n" - + "ame=tagBindings/**}\332A\004name\312A1\n\025google.pr" - + "otobuf.Empty\022\030DeleteTagBindingMetadata\032\220" - + "\001\312A#cloudresourcemanager.googleapis.com\322" - + "Aghttps://www.googleapis.com/auth/cloud-" - + "platform,https://www.googleapis.com/auth" - + "/cloud-platform.read-onlyB\361\001\n#com.google" - + ".cloud.resourcemanager.v3B\020TagBindingsPr" - + "otoP\001ZMcloud.google.com/go/resourcemanag" - + "er/apiv3/resourcemanagerpb;resourcemanag" - + "erpb\252\002\037Google.Cloud.ResourceManager.V3\312\002" - + "\037Google\\Cloud\\ResourceManager\\V3\352\002\"Googl" - + "e::Cloud::ResourceManager::V3b\006proto3" + + "\032#google/longrunning/operations.proto\032\033g" + + "oogle/protobuf/empty.proto\"\265\001\n\nTagBindin" + + "g\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\016\n\006parent\030\002 \001(\t\022\021\n\t" + + "tag_value\030\003 \001(\t\022!\n\031tag_value_namespaced_" + + "name\030\004 \001(\t:N\352AK\n.cloudresourcemanager.go" + + "ogleapis.com/TagBinding\022\031tagBindings/{ta" + + "g_binding}\"\032\n\030CreateTagBindingMetadata\"|" + + "\n\027CreateTagBindingRequest\022E\n\013tag_binding" + + "\030\001 \001(\0132+.google.cloud.resourcemanager.v3" + + ".TagBindingB\003\340A\002\022\032\n\rvalidate_only\030\002 \001(\010B" + + "\003\340A\001\"\032\n\030DeleteTagBindingMetadata\"_\n\027Dele" + + "teTagBindingRequest\022D\n\004name\030\001 \001(\tB6\340A\002\372A" + + "0\n.cloudresourcemanager.googleapis.com/T" + + "agBinding\"d\n\026ListTagBindingsRequest\022\031\n\006p" + + "arent\030\001 \001(\tB\t\340A\002\372A\003\022\001*\022\026\n\tpage_size\030\002 \001(" + + "\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"u\n\027ListT" + + "agBindingsResponse\022A\n\014tag_bindings\030\001 \003(\013" + + "2+.google.cloud.resourcemanager.v3.TagBi" + + "nding\022\027\n\017next_page_token\030\002 \001(\t\"`\n\030ListEf" + + "fectiveTagsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022" + + "\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 " + + "\001(\tB\003\340A\001\"{\n\031ListEffectiveTagsResponse\022E\n" + + "\016effective_tags\030\001 \003(\0132-.google.cloud.res" + + "ourcemanager.v3.EffectiveTag\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\"\200\002\n\014EffectiveTag\022D\n\ttag_va" + + "lue\030\001 \001(\tB1\372A.\n,cloudresourcemanager.goo" + + "gleapis.com/TagValue\022\034\n\024namespaced_tag_v" + + "alue\030\002 \001(\t\022@\n\007tag_key\030\003 \001(\tB/\372A,\n*cloudr" + + "esourcemanager.googleapis.com/TagKey\022\032\n\022" + + "namespaced_tag_key\030\004 \001(\t\022\033\n\023tag_key_pare" + + "nt_name\030\006 \001(\t\022\021\n\tinherited\030\005 \001(\0102\221\007\n\013Tag" + + "Bindings\022\246\001\n\017ListTagBindings\0227.google.cl" + + "oud.resourcemanager.v3.ListTagBindingsRe" + + "quest\0328.google.cloud.resourcemanager.v3." + + "ListTagBindingsResponse\" \202\323\344\223\002\021\022\017/v3/tag" + + "Bindings\332A\006parent\022\310\001\n\020CreateTagBinding\0228" + + ".google.cloud.resourcemanager.v3.CreateT" + + "agBindingRequest\032\035.google.longrunning.Op" + + "eration\"[\202\323\344\223\002\036\"\017/v3/tagBindings:\013tag_bi" + + "nding\332A\013tag_binding\312A&\n\nTagBinding\022\030Crea" + + "teTagBindingMetadata\022\311\001\n\020DeleteTagBindin" + + "g\0228.google.cloud.resourcemanager.v3.Dele" + + "teTagBindingRequest\032\035.google.longrunning" + + ".Operation\"\\\202\323\344\223\002\033*\031/v3/{name=tagBinding" + + "s/**}\332A\004name\312A1\n\025google.protobuf.Empty\022\030" + + "DeleteTagBindingMetadata\022\256\001\n\021ListEffecti" + + "veTags\0229.google.cloud.resourcemanager.v3" + + ".ListEffectiveTagsRequest\032:.google.cloud" + + ".resourcemanager.v3.ListEffectiveTagsRes" + + "ponse\"\"\202\323\344\223\002\023\022\021/v3/effectiveTags\332A\006paren" + + "t\032\220\001\312A#cloudresourcemanager.googleapis.c" + + "om\322Aghttps://www.googleapis.com/auth/clo" + + "ud-platform,https://www.googleapis.com/a" + + "uth/cloud-platform.read-onlyB\361\001\n#com.goo" + + "gle.cloud.resourcemanager.v3B\020TagBinding" + + "sProtoP\001ZMcloud.google.com/go/resourcema" + + "nager/apiv3/resourcemanagerpb;resourcema" + + "nagerpb\252\002\037Google.Cloud.ResourceManager.V" + + "3\312\002\037Google\\Cloud\\ResourceManager\\V3\352\002\"Go" + + "ogle::Cloud::ResourceManager::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -121,6 +151,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), }); internal_static_google_cloud_resourcemanager_v3_TagBinding_descriptor = getDescriptor().getMessageTypes().get(0); @@ -128,7 +159,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_resourcemanager_v3_TagBinding_descriptor, new java.lang.String[] { - "Name", "Parent", "TagValue", + "Name", "Parent", "TagValue", "TagValueNamespacedName", }); internal_static_google_cloud_resourcemanager_v3_CreateTagBindingMetadata_descriptor = getDescriptor().getMessageTypes().get(1); @@ -174,6 +205,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "TagBindings", "NextPageToken", }); + internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_resourcemanager_v3_ListEffectiveTagsResponse_descriptor, + new java.lang.String[] { + "EffectiveTags", "NextPageToken", + }); + internal_static_google_cloud_resourcemanager_v3_EffectiveTag_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_resourcemanager_v3_EffectiveTag_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_resourcemanager_v3_EffectiveTag_descriptor, + new java.lang.String[] { + "TagValue", + "NamespacedTagValue", + "TagKey", + "NamespacedTagKey", + "TagKeyParentName", + "Inherited", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -191,6 +251,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHold.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHold.java new file mode 100644 index 000000000000..8c052aae73e8 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHold.java @@ -0,0 +1,1531 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +/** + * + * + *
+ * A TagHold represents the use of a TagValue that is not captured by
+ * TagBindings. If a TagValue has any TagHolds, deletion will be blocked.
+ * This resource is intended to be created in the same cloud location as the
+ * `holder`.
+ * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.TagHold} + */ +public final class TagHold extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.resourcemanager.v3.TagHold) + TagHoldOrBuilder { + private static final long serialVersionUID = 0L; + // Use TagHold.newBuilder() to construct. + private TagHold(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TagHold() { + name_ = ""; + holder_ = ""; + origin_ = ""; + helpLink_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TagHold(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_TagHold_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_TagHold_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.TagHold.class, + com.google.cloud.resourcemanager.v3.TagHold.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The resource name of a TagHold. This is a String of the form:
+   * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`
+   * (e.g. `tagValues/123/tagHolds/456`). This resource name is generated by
+   * the server.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of a TagHold. This is a String of the form:
+   * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`
+   * (e.g. `tagValues/123/tagHolds/456`). This resource name is generated by
+   * the server.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HOLDER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object holder_ = ""; + /** + * + * + *
+   * Required. The name of the resource where the TagValue is being used. Must
+   * be less than 200 characters. E.g.
+   * `//compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+   * 
+ * + * string holder = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The holder. + */ + @java.lang.Override + public java.lang.String getHolder() { + java.lang.Object ref = holder_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + holder_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the resource where the TagValue is being used. Must
+   * be less than 200 characters. E.g.
+   * `//compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+   * 
+ * + * string holder = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for holder. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHolderBytes() { + java.lang.Object ref = holder_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + holder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORIGIN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object origin_ = ""; + /** + * + * + *
+   * Optional. An optional string representing the origin of this request. This
+   * field should include human-understandable information to distinguish
+   * origins from each other. Must be less than 200 characters. E.g.
+   * `migs-35678234`
+   * 
+ * + * string origin = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The origin. + */ + @java.lang.Override + public java.lang.String getOrigin() { + java.lang.Object ref = origin_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + origin_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional string representing the origin of this request. This
+   * field should include human-understandable information to distinguish
+   * origins from each other. Must be less than 200 characters. E.g.
+   * `migs-35678234`
+   * 
+ * + * string origin = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for origin. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOriginBytes() { + java.lang.Object ref = origin_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + origin_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HELP_LINK_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object helpLink_ = ""; + /** + * + * + *
+   * Optional. A URL where an end user can learn more about removing this hold.
+   * E.g.
+   * `https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing`
+   * 
+ * + * string help_link = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The helpLink. + */ + @java.lang.Override + public java.lang.String getHelpLink() { + java.lang.Object ref = helpLink_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + helpLink_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A URL where an end user can learn more about removing this hold.
+   * E.g.
+   * `https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing`
+   * 
+ * + * string help_link = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for helpLink. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHelpLinkBytes() { + java.lang.Object ref = helpLink_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + helpLink_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time this TagHold was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time this TagHold was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time this TagHold was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(holder_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, holder_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(origin_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, origin_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(helpLink_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, helpLink_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(holder_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, holder_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(origin_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, origin_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(helpLink_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, helpLink_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.resourcemanager.v3.TagHold)) { + return super.equals(obj); + } + com.google.cloud.resourcemanager.v3.TagHold other = + (com.google.cloud.resourcemanager.v3.TagHold) obj; + + if (!getName().equals(other.getName())) return false; + if (!getHolder().equals(other.getHolder())) return false; + if (!getOrigin().equals(other.getOrigin())) return false; + if (!getHelpLink().equals(other.getHelpLink())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + HOLDER_FIELD_NUMBER; + hash = (53 * hash) + getHolder().hashCode(); + hash = (37 * hash) + ORIGIN_FIELD_NUMBER; + hash = (53 * hash) + getOrigin().hashCode(); + hash = (37 * hash) + HELP_LINK_FIELD_NUMBER; + hash = (53 * hash) + getHelpLink().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.resourcemanager.v3.TagHold parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.TagHold parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.TagHold parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.TagHold parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.TagHold parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.resourcemanager.v3.TagHold parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.TagHold parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.TagHold parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.TagHold parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.TagHold parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.resourcemanager.v3.TagHold parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.resourcemanager.v3.TagHold parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.resourcemanager.v3.TagHold prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A TagHold represents the use of a TagValue that is not captured by
+   * TagBindings. If a TagValue has any TagHolds, deletion will be blocked.
+   * This resource is intended to be created in the same cloud location as the
+   * `holder`.
+   * 
+ * + * Protobuf type {@code google.cloud.resourcemanager.v3.TagHold} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.resourcemanager.v3.TagHold) + com.google.cloud.resourcemanager.v3.TagHoldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_TagHold_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_TagHold_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.resourcemanager.v3.TagHold.class, + com.google.cloud.resourcemanager.v3.TagHold.Builder.class); + } + + // Construct using com.google.cloud.resourcemanager.v3.TagHold.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + holder_ = ""; + origin_ = ""; + helpLink_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.resourcemanager.v3.TagHoldsProto + .internal_static_google_cloud_resourcemanager_v3_TagHold_descriptor; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.TagHold getDefaultInstanceForType() { + return com.google.cloud.resourcemanager.v3.TagHold.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.TagHold build() { + com.google.cloud.resourcemanager.v3.TagHold result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.TagHold buildPartial() { + com.google.cloud.resourcemanager.v3.TagHold result = + new com.google.cloud.resourcemanager.v3.TagHold(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.resourcemanager.v3.TagHold result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.holder_ = holder_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.origin_ = origin_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.helpLink_ = helpLink_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.resourcemanager.v3.TagHold) { + return mergeFrom((com.google.cloud.resourcemanager.v3.TagHold) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.resourcemanager.v3.TagHold other) { + if (other == com.google.cloud.resourcemanager.v3.TagHold.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getHolder().isEmpty()) { + holder_ = other.holder_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getOrigin().isEmpty()) { + origin_ = other.origin_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getHelpLink().isEmpty()) { + helpLink_ = other.helpLink_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + holder_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + origin_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + helpLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of a TagHold. This is a String of the form:
+     * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`
+     * (e.g. `tagValues/123/tagHolds/456`). This resource name is generated by
+     * the server.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of a TagHold. This is a String of the form:
+     * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`
+     * (e.g. `tagValues/123/tagHolds/456`). This resource name is generated by
+     * the server.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of a TagHold. This is a String of the form:
+     * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`
+     * (e.g. `tagValues/123/tagHolds/456`). This resource name is generated by
+     * the server.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of a TagHold. This is a String of the form:
+     * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`
+     * (e.g. `tagValues/123/tagHolds/456`). This resource name is generated by
+     * the server.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of a TagHold. This is a String of the form:
+     * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`
+     * (e.g. `tagValues/123/tagHolds/456`). This resource name is generated by
+     * the server.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object holder_ = ""; + /** + * + * + *
+     * Required. The name of the resource where the TagValue is being used. Must
+     * be less than 200 characters. E.g.
+     * `//compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+     * 
+ * + * string holder = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The holder. + */ + public java.lang.String getHolder() { + java.lang.Object ref = holder_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + holder_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the resource where the TagValue is being used. Must
+     * be less than 200 characters. E.g.
+     * `//compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+     * 
+ * + * string holder = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for holder. + */ + public com.google.protobuf.ByteString getHolderBytes() { + java.lang.Object ref = holder_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + holder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the resource where the TagValue is being used. Must
+     * be less than 200 characters. E.g.
+     * `//compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+     * 
+ * + * string holder = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The holder to set. + * @return This builder for chaining. + */ + public Builder setHolder(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + holder_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the resource where the TagValue is being used. Must
+     * be less than 200 characters. E.g.
+     * `//compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+     * 
+ * + * string holder = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearHolder() { + holder_ = getDefaultInstance().getHolder(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the resource where the TagValue is being used. Must
+     * be less than 200 characters. E.g.
+     * `//compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+     * 
+ * + * string holder = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for holder to set. + * @return This builder for chaining. + */ + public Builder setHolderBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + holder_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object origin_ = ""; + /** + * + * + *
+     * Optional. An optional string representing the origin of this request. This
+     * field should include human-understandable information to distinguish
+     * origins from each other. Must be less than 200 characters. E.g.
+     * `migs-35678234`
+     * 
+ * + * string origin = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The origin. + */ + public java.lang.String getOrigin() { + java.lang.Object ref = origin_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + origin_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional string representing the origin of this request. This
+     * field should include human-understandable information to distinguish
+     * origins from each other. Must be less than 200 characters. E.g.
+     * `migs-35678234`
+     * 
+ * + * string origin = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for origin. + */ + public com.google.protobuf.ByteString getOriginBytes() { + java.lang.Object ref = origin_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + origin_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional string representing the origin of this request. This
+     * field should include human-understandable information to distinguish
+     * origins from each other. Must be less than 200 characters. E.g.
+     * `migs-35678234`
+     * 
+ * + * string origin = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The origin to set. + * @return This builder for chaining. + */ + public Builder setOrigin(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + origin_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional string representing the origin of this request. This
+     * field should include human-understandable information to distinguish
+     * origins from each other. Must be less than 200 characters. E.g.
+     * `migs-35678234`
+     * 
+ * + * string origin = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrigin() { + origin_ = getDefaultInstance().getOrigin(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional string representing the origin of this request. This
+     * field should include human-understandable information to distinguish
+     * origins from each other. Must be less than 200 characters. E.g.
+     * `migs-35678234`
+     * 
+ * + * string origin = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for origin to set. + * @return This builder for chaining. + */ + public Builder setOriginBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + origin_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object helpLink_ = ""; + /** + * + * + *
+     * Optional. A URL where an end user can learn more about removing this hold.
+     * E.g.
+     * `https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing`
+     * 
+ * + * string help_link = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The helpLink. + */ + public java.lang.String getHelpLink() { + java.lang.Object ref = helpLink_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + helpLink_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A URL where an end user can learn more about removing this hold.
+     * E.g.
+     * `https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing`
+     * 
+ * + * string help_link = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for helpLink. + */ + public com.google.protobuf.ByteString getHelpLinkBytes() { + java.lang.Object ref = helpLink_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + helpLink_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A URL where an end user can learn more about removing this hold.
+     * E.g.
+     * `https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing`
+     * 
+ * + * string help_link = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The helpLink to set. + * @return This builder for chaining. + */ + public Builder setHelpLink(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + helpLink_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A URL where an end user can learn more about removing this hold.
+     * E.g.
+     * `https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing`
+     * 
+ * + * string help_link = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearHelpLink() { + helpLink_ = getDefaultInstance().getHelpLink(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A URL where an end user can learn more about removing this hold.
+     * E.g.
+     * `https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing`
+     * 
+ * + * string help_link = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for helpLink to set. + * @return This builder for chaining. + */ + public Builder setHelpLinkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + helpLink_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time this TagHold was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. The time this TagHold was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time this TagHold was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time this TagHold was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time this TagHold was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time this TagHold was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time this TagHold was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time this TagHold was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time this TagHold was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.resourcemanager.v3.TagHold) + } + + // @@protoc_insertion_point(class_scope:google.cloud.resourcemanager.v3.TagHold) + private static final com.google.cloud.resourcemanager.v3.TagHold DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.resourcemanager.v3.TagHold(); + } + + public static com.google.cloud.resourcemanager.v3.TagHold getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TagHold parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.resourcemanager.v3.TagHold getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldName.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldName.java new file mode 100644 index 000000000000..59487df096c8 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class TagHoldName implements ResourceName { + private static final PathTemplate TAG_VALUE_TAG_HOLD = + PathTemplate.createWithoutUrlEncoding("tagValues/{tag_value}/tagHolds/{tag_hold}"); + private volatile Map fieldValuesMap; + private final String tagValue; + private final String tagHold; + + @Deprecated + protected TagHoldName() { + tagValue = null; + tagHold = null; + } + + private TagHoldName(Builder builder) { + tagValue = Preconditions.checkNotNull(builder.getTagValue()); + tagHold = Preconditions.checkNotNull(builder.getTagHold()); + } + + public String getTagValue() { + return tagValue; + } + + public String getTagHold() { + return tagHold; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TagHoldName of(String tagValue, String tagHold) { + return newBuilder().setTagValue(tagValue).setTagHold(tagHold).build(); + } + + public static String format(String tagValue, String tagHold) { + return newBuilder().setTagValue(tagValue).setTagHold(tagHold).build().toString(); + } + + public static TagHoldName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + TAG_VALUE_TAG_HOLD.validatedMatch( + formattedString, "TagHoldName.parse: formattedString not in valid format"); + return of(matchMap.get("tag_value"), matchMap.get("tag_hold")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (TagHoldName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return TAG_VALUE_TAG_HOLD.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (tagValue != null) { + fieldMapBuilder.put("tag_value", tagValue); + } + if (tagHold != null) { + fieldMapBuilder.put("tag_hold", tagHold); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return TAG_VALUE_TAG_HOLD.instantiate("tag_value", tagValue, "tag_hold", tagHold); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + TagHoldName that = ((TagHoldName) o); + return Objects.equals(this.tagValue, that.tagValue) + && Objects.equals(this.tagHold, that.tagHold); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(tagValue); + h *= 1000003; + h ^= Objects.hashCode(tagHold); + return h; + } + + /** Builder for tagValues/{tag_value}/tagHolds/{tag_hold}. */ + public static class Builder { + private String tagValue; + private String tagHold; + + protected Builder() {} + + public String getTagValue() { + return tagValue; + } + + public String getTagHold() { + return tagHold; + } + + public Builder setTagValue(String tagValue) { + this.tagValue = tagValue; + return this; + } + + public Builder setTagHold(String tagHold) { + this.tagHold = tagHold; + return this; + } + + private Builder(TagHoldName tagHoldName) { + this.tagValue = tagHoldName.tagValue; + this.tagHold = tagHoldName.tagHold; + } + + public TagHoldName build() { + return new TagHoldName(this); + } + } +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldOrBuilder.java new file mode 100644 index 000000000000..351ac179b27f --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +public interface TagHoldOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.resourcemanager.v3.TagHold) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of a TagHold. This is a String of the form:
+   * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`
+   * (e.g. `tagValues/123/tagHolds/456`). This resource name is generated by
+   * the server.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of a TagHold. This is a String of the form:
+   * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`
+   * (e.g. `tagValues/123/tagHolds/456`). This resource name is generated by
+   * the server.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The name of the resource where the TagValue is being used. Must
+   * be less than 200 characters. E.g.
+   * `//compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+   * 
+ * + * string holder = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The holder. + */ + java.lang.String getHolder(); + /** + * + * + *
+   * Required. The name of the resource where the TagValue is being used. Must
+   * be less than 200 characters. E.g.
+   * `//compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group`
+   * 
+ * + * string holder = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for holder. + */ + com.google.protobuf.ByteString getHolderBytes(); + + /** + * + * + *
+   * Optional. An optional string representing the origin of this request. This
+   * field should include human-understandable information to distinguish
+   * origins from each other. Must be less than 200 characters. E.g.
+   * `migs-35678234`
+   * 
+ * + * string origin = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The origin. + */ + java.lang.String getOrigin(); + /** + * + * + *
+   * Optional. An optional string representing the origin of this request. This
+   * field should include human-understandable information to distinguish
+   * origins from each other. Must be less than 200 characters. E.g.
+   * `migs-35678234`
+   * 
+ * + * string origin = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for origin. + */ + com.google.protobuf.ByteString getOriginBytes(); + + /** + * + * + *
+   * Optional. A URL where an end user can learn more about removing this hold.
+   * E.g.
+   * `https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing`
+   * 
+ * + * string help_link = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The helpLink. + */ + java.lang.String getHelpLink(); + /** + * + * + *
+   * Optional. A URL where an end user can learn more about removing this hold.
+   * E.g.
+   * `https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing`
+   * 
+ * + * string help_link = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for helpLink. + */ + com.google.protobuf.ByteString getHelpLinkBytes(); + + /** + * + * + *
+   * Output only. The time this TagHold was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time this TagHold was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time this TagHold was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsProto.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsProto.java new file mode 100644 index 000000000000..cf0a7f487cb5 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagHoldsProto.java @@ -0,0 +1,209 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/resourcemanager/v3/tag_holds.proto + +package com.google.cloud.resourcemanager.v3; + +public final class TagHoldsProto { + private TagHoldsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_resourcemanager_v3_TagHold_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_resourcemanager_v3_TagHold_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_resourcemanager_v3_CreateTagHoldRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_resourcemanager_v3_CreateTagHoldRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_resourcemanager_v3_CreateTagHoldMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_resourcemanager_v3_CreateTagHoldMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_resourcemanager_v3_ListTagHoldsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_resourcemanager_v3_ListTagHoldsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_resourcemanager_v3_ListTagHoldsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_resourcemanager_v3_ListTagHoldsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/resourcemanager/v3/tag_ho" + + "lds.proto\022\037google.cloud.resourcemanager." + + "v3\032\034google/api/annotations.proto\032\027google" + + "/api/client.proto\032\037google/api/field_beha" + + "vior.proto\032\031google/api/resource.proto\032#g" + + "oogle/longrunning/operations.proto\032\033goog" + + "le/protobuf/empty.proto\032\037google/protobuf" + + "/timestamp.proto\"\361\001\n\007TagHold\022\021\n\004name\030\001 \001" + + "(\tB\003\340A\003\022\023\n\006holder\030\002 \001(\tB\003\340A\002\022\023\n\006origin\030\003" + + " \001(\tB\003\340A\001\022\026\n\thelp_link\030\004 \001(\tB\003\340A\001\0224\n\013cre" + + "ate_time\030\005 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\003:[\352AX\n+cloudresourcemanager.googl" + + "eapis.com/TagHold\022)tagValues/{tag_value}" + + "/tagHolds/{tag_hold}\"\270\001\n\024CreateTagHoldRe" + + "quest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\022+cloudreso" + + "urcemanager.googleapis.com/TagHold\022?\n\010ta" + + "g_hold\030\002 \001(\0132(.google.cloud.resourcemana" + + "ger.v3.TagHoldB\003\340A\002\022\032\n\rvalidate_only\030\003 \001" + + "(\010B\003\340A\001\"\027\n\025CreateTagHoldMetadata\"u\n\024Dele" + + "teTagHoldRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+" + + "cloudresourcemanager.googleapis.com/TagH" + + "old\022\032\n\rvalidate_only\030\002 \001(\010B\003\340A\001\"\027\n\025Delet" + + "eTagHoldMetadata\"\240\001\n\023ListTagHoldsRequest" + + "\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\022+cloudresourcem" + + "anager.googleapis.com/TagHold\022\026\n\tpage_si" + + "ze\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023" + + "\n\006filter\030\004 \001(\tB\003\340A\001\"l\n\024ListTagHoldsRespo" + + "nse\022;\n\ttag_holds\030\001 \003(\0132(.google.cloud.re" + + "sourcemanager.v3.TagHold\022\027\n\017next_page_to" + + "ken\030\002 \001(\t2\354\005\n\010TagHolds\022\317\001\n\rCreateTagHold" + + "\0225.google.cloud.resourcemanager.v3.Creat" + + "eTagHoldRequest\032\035.google.longrunning.Ope" + + "ration\"h\202\323\344\223\002-\"!/v3/{parent=tagValues/*}" + + "/tagHolds:\010tag_hold\332A\017parent,tag_hold\312A " + + "\n\007TagHold\022\025CreateTagHoldMetadata\022\310\001\n\rDel" + + "eteTagHold\0225.google.cloud.resourcemanage" + + "r.v3.DeleteTagHoldRequest\032\035.google.longr" + + "unning.Operation\"a\202\323\344\223\002#*!/v3/{name=tagV" + + "alues/*/tagHolds/*}\332A\004name\312A.\n\025google.pr" + + "otobuf.Empty\022\025DeleteTagHoldMetadata\022\257\001\n\014" + + "ListTagHolds\0224.google.cloud.resourcemana" + + "ger.v3.ListTagHoldsRequest\0325.google.clou" + + "d.resourcemanager.v3.ListTagHoldsRespons" + + "e\"2\202\323\344\223\002#\022!/v3/{parent=tagValues/*}/tagH" + + "olds\332A\006parent\032\220\001\312A#cloudresourcemanager." + + "googleapis.com\322Aghttps://www.googleapis." + + "com/auth/cloud-platform,https://www.goog" + + "leapis.com/auth/cloud-platform.read-only" + + "B\356\001\n#com.google.cloud.resourcemanager.v3" + + "B\rTagHoldsProtoP\001ZMcloud.google.com/go/r" + + "esourcemanager/apiv3/resourcemanagerpb;r" + + "esourcemanagerpb\252\002\037Google.Cloud.Resource" + + "Manager.V3\312\002\037Google\\Cloud\\ResourceManage" + + "r\\V3\352\002\"Google::Cloud::ResourceManager::V" + + "3b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_resourcemanager_v3_TagHold_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_resourcemanager_v3_TagHold_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_resourcemanager_v3_TagHold_descriptor, + new java.lang.String[] { + "Name", "Holder", "Origin", "HelpLink", "CreateTime", + }); + internal_static_google_cloud_resourcemanager_v3_CreateTagHoldRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_resourcemanager_v3_CreateTagHoldRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_resourcemanager_v3_CreateTagHoldRequest_descriptor, + new java.lang.String[] { + "Parent", "TagHold", "ValidateOnly", + }); + internal_static_google_cloud_resourcemanager_v3_CreateTagHoldMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_resourcemanager_v3_CreateTagHoldMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_resourcemanager_v3_CreateTagHoldMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldRequest_descriptor, + new java.lang.String[] { + "Name", "ValidateOnly", + }); + internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldMetadata_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_resourcemanager_v3_DeleteTagHoldMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_resourcemanager_v3_ListTagHoldsRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_resourcemanager_v3_ListTagHoldsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_resourcemanager_v3_ListTagHoldsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_resourcemanager_v3_ListTagHoldsResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_resourcemanager_v3_ListTagHoldsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_resourcemanager_v3_ListTagHoldsResponse_descriptor, + new java.lang.String[] { + "TagHolds", "NextPageToken", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKey.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKey.java index f693ab52b817..485ebada3500 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKey.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKey.java @@ -44,6 +44,7 @@ private TagKey() { namespacedName_ = ""; description_ = ""; etag_ = ""; + purpose_ = 0; } @java.lang.Override @@ -62,6 +63,17 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_resourcemanager_v3_TagKey_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 12: + return internalGetPurposeData(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -188,8 +200,8 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * Required. Immutable. The user friendly name for a TagKey. The short name should be
-   * unique for TagKeys within the same tag namespace.
+   * Required. Immutable. The user friendly name for a TagKey. The short name
+   * should be unique for TagKeys within the same tag namespace.
    * The short name must be 1-63 characters, beginning and ending with
    * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
    * dots (.), and alphanumerics between.
@@ -217,8 +229,8 @@ public java.lang.String getShortName() {
    *
    *
    * 
-   * Required. Immutable. The user friendly name for a TagKey. The short name should be
-   * unique for TagKeys within the same tag namespace.
+   * Required. Immutable. The user friendly name for a TagKey. The short name
+   * should be unique for TagKeys within the same tag namespace.
    * The short name must be 1-63 characters, beginning and ending with
    * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
    * dots (.), and alphanumerics between.
@@ -306,7 +318,8 @@ public com.google.protobuf.ByteString getNamespacedNameBytes() {
    *
    *
    * 
-   * Optional. User-assigned description of the TagKey. Must not exceed 256 characters.
+   * Optional. User-assigned description of the TagKey. Must not exceed 256
+   * characters.
    * Read-write.
    * 
* @@ -330,7 +343,8 @@ public java.lang.String getDescription() { * * *
-   * Optional. User-assigned description of the TagKey. Must not exceed 256 characters.
+   * Optional. User-assigned description of the TagKey. Must not exceed 256
+   * characters.
    * Read-write.
    * 
* @@ -457,8 +471,9 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
-   * Optional. Entity tag which users can pass to prevent race conditions. This field is
-   * always set in server responses. See UpdateTagKeyRequest for details.
+   * Optional. Entity tag which users can pass to prevent race conditions. This
+   * field is always set in server responses. See UpdateTagKeyRequest for
+   * details.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -481,8 +496,9 @@ public java.lang.String getEtag() { * * *
-   * Optional. Entity tag which users can pass to prevent race conditions. This field is
-   * always set in server responses. See UpdateTagKeyRequest for details.
+   * Optional. Entity tag which users can pass to prevent race conditions. This
+   * field is always set in server responses. See UpdateTagKeyRequest for
+   * details.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -502,6 +518,170 @@ public com.google.protobuf.ByteString getEtagBytes() { } } + public static final int PURPOSE_FIELD_NUMBER = 11; + private int purpose_ = 0; + /** + * + * + *
+   * Optional. A purpose denotes that this Tag is intended for use in policies
+   * of a specific policy engine, and will involve that policy engine in
+   * management operations involving this Tag. A purpose does not grant a
+   * policy engine exclusive rights to the Tag, and it may be referenced by
+   * other policy engines.
+   * A purpose cannot be changed once set.
+   * 
+ * + * + * .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for purpose. + */ + @java.lang.Override + public int getPurposeValue() { + return purpose_; + } + /** + * + * + *
+   * Optional. A purpose denotes that this Tag is intended for use in policies
+   * of a specific policy engine, and will involve that policy engine in
+   * management operations involving this Tag. A purpose does not grant a
+   * policy engine exclusive rights to the Tag, and it may be referenced by
+   * other policy engines.
+   * A purpose cannot be changed once set.
+   * 
+ * + * + * .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The purpose. + */ + @java.lang.Override + public com.google.cloud.resourcemanager.v3.Purpose getPurpose() { + com.google.cloud.resourcemanager.v3.Purpose result = + com.google.cloud.resourcemanager.v3.Purpose.forNumber(purpose_); + return result == null ? com.google.cloud.resourcemanager.v3.Purpose.UNRECOGNIZED : result; + } + + public static final int PURPOSE_DATA_FIELD_NUMBER = 12; + + private static final class PurposeDataDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.resourcemanager.v3.TagKeysProto + .internal_static_google_cloud_resourcemanager_v3_TagKey_PurposeDataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField purposeData_; + + private com.google.protobuf.MapField + internalGetPurposeData() { + if (purposeData_ == null) { + return com.google.protobuf.MapField.emptyMapField(PurposeDataDefaultEntryHolder.defaultEntry); + } + return purposeData_; + } + + public int getPurposeDataCount() { + return internalGetPurposeData().getMap().size(); + } + /** + * + * + *
+   * Optional. Purpose data corresponds to the policy system that the tag is
+   * intended for. See documentation for `Purpose` for formatting of this field.
+   * Purpose data cannot be changed once set.
+   * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsPurposeData(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetPurposeData().getMap().containsKey(key); + } + /** Use {@link #getPurposeDataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPurposeData() { + return getPurposeDataMap(); + } + /** + * + * + *
+   * Optional. Purpose data corresponds to the policy system that the tag is
+   * intended for. See documentation for `Purpose` for formatting of this field.
+   * Purpose data cannot be changed once set.
+   * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getPurposeDataMap() { + return internalGetPurposeData().getMap(); + } + /** + * + * + *
+   * Optional. Purpose data corresponds to the policy system that the tag is
+   * intended for. See documentation for `Purpose` for formatting of this field.
+   * Purpose data cannot be changed once set.
+   * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getPurposeDataOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetPurposeData().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Purpose data corresponds to the policy system that the tag is
+   * intended for. See documentation for `Purpose` for formatting of this field.
+   * Purpose data cannot be changed once set.
+   * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getPurposeDataOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetPurposeData().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -540,6 +720,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etag_); } + if (purpose_ != com.google.cloud.resourcemanager.v3.Purpose.PURPOSE_UNSPECIFIED.getNumber()) { + output.writeEnum(11, purpose_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetPurposeData(), PurposeDataDefaultEntryHolder.defaultEntry, 12); getUnknownFields().writeTo(output); } @@ -573,6 +758,19 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etag_); } + if (purpose_ != com.google.cloud.resourcemanager.v3.Purpose.PURPOSE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, purpose_); + } + for (java.util.Map.Entry entry : + internalGetPurposeData().getMap().entrySet()) { + com.google.protobuf.MapEntry purposeData__ = + PurposeDataDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, purposeData__); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -603,6 +801,8 @@ public boolean equals(final java.lang.Object obj) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } if (!getEtag().equals(other.getEtag())) return false; + if (purpose_ != other.purpose_) return false; + if (!internalGetPurposeData().equals(other.internalGetPurposeData())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -634,6 +834,12 @@ public int hashCode() { } hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + PURPOSE_FIELD_NUMBER; + hash = (53 * hash) + purpose_; + if (!internalGetPurposeData().getMap().isEmpty()) { + hash = (37 * hash) + PURPOSE_DATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetPurposeData().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -752,6 +958,26 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_resourcemanager_v3_TagKey_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 12: + return internalGetPurposeData(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 12: + return internalGetMutablePurposeData(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -789,6 +1015,8 @@ public Builder clear() { updateTimeBuilder_ = null; } etag_ = ""; + purpose_ = 0; + internalGetMutablePurposeData().clear(); return this; } @@ -849,6 +1077,13 @@ private void buildPartial0(com.google.cloud.resourcemanager.v3.TagKey result) { if (((from_bitField0_ & 0x00000080) != 0)) { result.etag_ = etag_; } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.purpose_ = purpose_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.purposeData_ = internalGetPurposeData(); + result.purposeData_.makeImmutable(); + } } @java.lang.Override @@ -932,6 +1167,11 @@ public Builder mergeFrom(com.google.cloud.resourcemanager.v3.TagKey other) { bitField0_ |= 0x00000080; onChanged(); } + if (other.purpose_ != 0) { + setPurposeValue(other.getPurposeValue()); + } + internalGetMutablePurposeData().mergeFrom(other.internalGetPurposeData()); + bitField0_ |= 0x00000200; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1006,6 +1246,24 @@ public Builder mergeFrom( bitField0_ |= 0x00000080; break; } // case 66 + case 88: + { + purpose_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 88 + case 98: + { + com.google.protobuf.MapEntry purposeData__ = + input.readMessage( + PurposeDataDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutablePurposeData() + .getMutableMap() + .put(purposeData__.getKey(), purposeData__.getValue()); + bitField0_ |= 0x00000200; + break; + } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1257,8 +1515,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. Immutable. The user friendly name for a TagKey. The short name should be
-     * unique for TagKeys within the same tag namespace.
+     * Required. Immutable. The user friendly name for a TagKey. The short name
+     * should be unique for TagKeys within the same tag namespace.
      * The short name must be 1-63 characters, beginning and ending with
      * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
      * dots (.), and alphanumerics between.
@@ -1285,8 +1543,8 @@ public java.lang.String getShortName() {
      *
      *
      * 
-     * Required. Immutable. The user friendly name for a TagKey. The short name should be
-     * unique for TagKeys within the same tag namespace.
+     * Required. Immutable. The user friendly name for a TagKey. The short name
+     * should be unique for TagKeys within the same tag namespace.
      * The short name must be 1-63 characters, beginning and ending with
      * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
      * dots (.), and alphanumerics between.
@@ -1313,8 +1571,8 @@ public com.google.protobuf.ByteString getShortNameBytes() {
      *
      *
      * 
-     * Required. Immutable. The user friendly name for a TagKey. The short name should be
-     * unique for TagKeys within the same tag namespace.
+     * Required. Immutable. The user friendly name for a TagKey. The short name
+     * should be unique for TagKeys within the same tag namespace.
      * The short name must be 1-63 characters, beginning and ending with
      * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
      * dots (.), and alphanumerics between.
@@ -1340,8 +1598,8 @@ public Builder setShortName(java.lang.String value) {
      *
      *
      * 
-     * Required. Immutable. The user friendly name for a TagKey. The short name should be
-     * unique for TagKeys within the same tag namespace.
+     * Required. Immutable. The user friendly name for a TagKey. The short name
+     * should be unique for TagKeys within the same tag namespace.
      * The short name must be 1-63 characters, beginning and ending with
      * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
      * dots (.), and alphanumerics between.
@@ -1363,8 +1621,8 @@ public Builder clearShortName() {
      *
      *
      * 
-     * Required. Immutable. The user friendly name for a TagKey. The short name should be
-     * unique for TagKeys within the same tag namespace.
+     * Required. Immutable. The user friendly name for a TagKey. The short name
+     * should be unique for TagKeys within the same tag namespace.
      * The short name must be 1-63 characters, beginning and ending with
      * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
      * dots (.), and alphanumerics between.
@@ -1509,7 +1767,8 @@ public Builder setNamespacedNameBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Optional. User-assigned description of the TagKey. Must not exceed 256 characters.
+     * Optional. User-assigned description of the TagKey. Must not exceed 256
+     * characters.
      * Read-write.
      * 
* @@ -1532,7 +1791,8 @@ public java.lang.String getDescription() { * * *
-     * Optional. User-assigned description of the TagKey. Must not exceed 256 characters.
+     * Optional. User-assigned description of the TagKey. Must not exceed 256
+     * characters.
      * Read-write.
      * 
* @@ -1555,7 +1815,8 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * * *
-     * Optional. User-assigned description of the TagKey. Must not exceed 256 characters.
+     * Optional. User-assigned description of the TagKey. Must not exceed 256
+     * characters.
      * Read-write.
      * 
* @@ -1577,7 +1838,8 @@ public Builder setDescription(java.lang.String value) { * * *
-     * Optional. User-assigned description of the TagKey. Must not exceed 256 characters.
+     * Optional. User-assigned description of the TagKey. Must not exceed 256
+     * characters.
      * Read-write.
      * 
* @@ -1595,7 +1857,8 @@ public Builder clearDescription() { * * *
-     * Optional. User-assigned description of the TagKey. Must not exceed 256 characters.
+     * Optional. User-assigned description of the TagKey. Must not exceed 256
+     * characters.
      * Read-write.
      * 
* @@ -2022,8 +2285,9 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
-     * Optional. Entity tag which users can pass to prevent race conditions. This field is
-     * always set in server responses. See UpdateTagKeyRequest for details.
+     * Optional. Entity tag which users can pass to prevent race conditions. This
+     * field is always set in server responses. See UpdateTagKeyRequest for
+     * details.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2045,8 +2309,9 @@ public java.lang.String getEtag() { * * *
-     * Optional. Entity tag which users can pass to prevent race conditions. This field is
-     * always set in server responses. See UpdateTagKeyRequest for details.
+     * Optional. Entity tag which users can pass to prevent race conditions. This
+     * field is always set in server responses. See UpdateTagKeyRequest for
+     * details.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2068,8 +2333,9 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-     * Optional. Entity tag which users can pass to prevent race conditions. This field is
-     * always set in server responses. See UpdateTagKeyRequest for details.
+     * Optional. Entity tag which users can pass to prevent race conditions. This
+     * field is always set in server responses. See UpdateTagKeyRequest for
+     * details.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2090,8 +2356,9 @@ public Builder setEtag(java.lang.String value) { * * *
-     * Optional. Entity tag which users can pass to prevent race conditions. This field is
-     * always set in server responses. See UpdateTagKeyRequest for details.
+     * Optional. Entity tag which users can pass to prevent race conditions. This
+     * field is always set in server responses. See UpdateTagKeyRequest for
+     * details.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2108,8 +2375,9 @@ public Builder clearEtag() { * * *
-     * Optional. Entity tag which users can pass to prevent race conditions. This field is
-     * always set in server responses. See UpdateTagKeyRequest for details.
+     * Optional. Entity tag which users can pass to prevent race conditions. This
+     * field is always set in server responses. See UpdateTagKeyRequest for
+     * details.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2128,6 +2396,318 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { return this; } + private int purpose_ = 0; + /** + * + * + *
+     * Optional. A purpose denotes that this Tag is intended for use in policies
+     * of a specific policy engine, and will involve that policy engine in
+     * management operations involving this Tag. A purpose does not grant a
+     * policy engine exclusive rights to the Tag, and it may be referenced by
+     * other policy engines.
+     * A purpose cannot be changed once set.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for purpose. + */ + @java.lang.Override + public int getPurposeValue() { + return purpose_; + } + /** + * + * + *
+     * Optional. A purpose denotes that this Tag is intended for use in policies
+     * of a specific policy engine, and will involve that policy engine in
+     * management operations involving this Tag. A purpose does not grant a
+     * policy engine exclusive rights to the Tag, and it may be referenced by
+     * other policy engines.
+     * A purpose cannot be changed once set.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for purpose to set. + * @return This builder for chaining. + */ + public Builder setPurposeValue(int value) { + purpose_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A purpose denotes that this Tag is intended for use in policies
+     * of a specific policy engine, and will involve that policy engine in
+     * management operations involving this Tag. A purpose does not grant a
+     * policy engine exclusive rights to the Tag, and it may be referenced by
+     * other policy engines.
+     * A purpose cannot be changed once set.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The purpose. + */ + @java.lang.Override + public com.google.cloud.resourcemanager.v3.Purpose getPurpose() { + com.google.cloud.resourcemanager.v3.Purpose result = + com.google.cloud.resourcemanager.v3.Purpose.forNumber(purpose_); + return result == null ? com.google.cloud.resourcemanager.v3.Purpose.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Optional. A purpose denotes that this Tag is intended for use in policies
+     * of a specific policy engine, and will involve that policy engine in
+     * management operations involving this Tag. A purpose does not grant a
+     * policy engine exclusive rights to the Tag, and it may be referenced by
+     * other policy engines.
+     * A purpose cannot be changed once set.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The purpose to set. + * @return This builder for chaining. + */ + public Builder setPurpose(com.google.cloud.resourcemanager.v3.Purpose value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + purpose_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A purpose denotes that this Tag is intended for use in policies
+     * of a specific policy engine, and will involve that policy engine in
+     * management operations involving this Tag. A purpose does not grant a
+     * policy engine exclusive rights to the Tag, and it may be referenced by
+     * other policy engines.
+     * A purpose cannot be changed once set.
+     * 
+ * + * + * .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPurpose() { + bitField0_ = (bitField0_ & ~0x00000100); + purpose_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField purposeData_; + + private com.google.protobuf.MapField + internalGetPurposeData() { + if (purposeData_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PurposeDataDefaultEntryHolder.defaultEntry); + } + return purposeData_; + } + + private com.google.protobuf.MapField + internalGetMutablePurposeData() { + if (purposeData_ == null) { + purposeData_ = + com.google.protobuf.MapField.newMapField(PurposeDataDefaultEntryHolder.defaultEntry); + } + if (!purposeData_.isMutable()) { + purposeData_ = purposeData_.copy(); + } + bitField0_ |= 0x00000200; + onChanged(); + return purposeData_; + } + + public int getPurposeDataCount() { + return internalGetPurposeData().getMap().size(); + } + /** + * + * + *
+     * Optional. Purpose data corresponds to the policy system that the tag is
+     * intended for. See documentation for `Purpose` for formatting of this field.
+     * Purpose data cannot be changed once set.
+     * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsPurposeData(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetPurposeData().getMap().containsKey(key); + } + /** Use {@link #getPurposeDataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPurposeData() { + return getPurposeDataMap(); + } + /** + * + * + *
+     * Optional. Purpose data corresponds to the policy system that the tag is
+     * intended for. See documentation for `Purpose` for formatting of this field.
+     * Purpose data cannot be changed once set.
+     * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getPurposeDataMap() { + return internalGetPurposeData().getMap(); + } + /** + * + * + *
+     * Optional. Purpose data corresponds to the policy system that the tag is
+     * intended for. See documentation for `Purpose` for formatting of this field.
+     * Purpose data cannot be changed once set.
+     * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getPurposeDataOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetPurposeData().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Purpose data corresponds to the policy system that the tag is
+     * intended for. See documentation for `Purpose` for formatting of this field.
+     * Purpose data cannot be changed once set.
+     * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getPurposeDataOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetPurposeData().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearPurposeData() { + bitField0_ = (bitField0_ & ~0x00000200); + internalGetMutablePurposeData().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Purpose data corresponds to the policy system that the tag is
+     * intended for. See documentation for `Purpose` for formatting of this field.
+     * Purpose data cannot be changed once set.
+     * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removePurposeData(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutablePurposeData().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutablePurposeData() { + bitField0_ |= 0x00000200; + return internalGetMutablePurposeData().getMutableMap(); + } + /** + * + * + *
+     * Optional. Purpose data corresponds to the policy system that the tag is
+     * intended for. See documentation for `Purpose` for formatting of this field.
+     * Purpose data cannot be changed once set.
+     * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putPurposeData(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutablePurposeData().getMutableMap().put(key, value); + bitField0_ |= 0x00000200; + return this; + } + /** + * + * + *
+     * Optional. Purpose data corresponds to the policy system that the tag is
+     * intended for. See documentation for `Purpose` for formatting of this field.
+     * Purpose data cannot be changed once set.
+     * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllPurposeData(java.util.Map values) { + internalGetMutablePurposeData().getMutableMap().putAll(values); + bitField0_ |= 0x00000200; + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKeyOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKeyOrBuilder.java index ef8ed8fc643a..6aacbe2eec1c 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKeyOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKeyOrBuilder.java @@ -83,8 +83,8 @@ public interface TagKeyOrBuilder * * *
-   * Required. Immutable. The user friendly name for a TagKey. The short name should be
-   * unique for TagKeys within the same tag namespace.
+   * Required. Immutable. The user friendly name for a TagKey. The short name
+   * should be unique for TagKeys within the same tag namespace.
    * The short name must be 1-63 characters, beginning and ending with
    * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
    * dots (.), and alphanumerics between.
@@ -101,8 +101,8 @@ public interface TagKeyOrBuilder
    *
    *
    * 
-   * Required. Immutable. The user friendly name for a TagKey. The short name should be
-   * unique for TagKeys within the same tag namespace.
+   * Required. Immutable. The user friendly name for a TagKey. The short name
+   * should be unique for TagKeys within the same tag namespace.
    * The short name must be 1-63 characters, beginning and ending with
    * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
    * dots (.), and alphanumerics between.
@@ -149,7 +149,8 @@ public interface TagKeyOrBuilder
    *
    *
    * 
-   * Optional. User-assigned description of the TagKey. Must not exceed 256 characters.
+   * Optional. User-assigned description of the TagKey. Must not exceed 256
+   * characters.
    * Read-write.
    * 
* @@ -162,7 +163,8 @@ public interface TagKeyOrBuilder * * *
-   * Optional. User-assigned description of the TagKey. Must not exceed 256 characters.
+   * Optional. User-assigned description of the TagKey. Must not exceed 256
+   * characters.
    * Read-write.
    * 
* @@ -252,8 +254,9 @@ public interface TagKeyOrBuilder * * *
-   * Optional. Entity tag which users can pass to prevent race conditions. This field is
-   * always set in server responses. See UpdateTagKeyRequest for details.
+   * Optional. Entity tag which users can pass to prevent race conditions. This
+   * field is always set in server responses. See UpdateTagKeyRequest for
+   * details.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -265,8 +268,9 @@ public interface TagKeyOrBuilder * * *
-   * Optional. Entity tag which users can pass to prevent race conditions. This field is
-   * always set in server responses. See UpdateTagKeyRequest for details.
+   * Optional. Entity tag which users can pass to prevent race conditions. This
+   * field is always set in server responses. See UpdateTagKeyRequest for
+   * details.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -274,4 +278,116 @@ public interface TagKeyOrBuilder * @return The bytes for etag. */ com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. A purpose denotes that this Tag is intended for use in policies
+   * of a specific policy engine, and will involve that policy engine in
+   * management operations involving this Tag. A purpose does not grant a
+   * policy engine exclusive rights to the Tag, and it may be referenced by
+   * other policy engines.
+   * A purpose cannot be changed once set.
+   * 
+ * + * + * .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for purpose. + */ + int getPurposeValue(); + /** + * + * + *
+   * Optional. A purpose denotes that this Tag is intended for use in policies
+   * of a specific policy engine, and will involve that policy engine in
+   * management operations involving this Tag. A purpose does not grant a
+   * policy engine exclusive rights to the Tag, and it may be referenced by
+   * other policy engines.
+   * A purpose cannot be changed once set.
+   * 
+ * + * + * .google.cloud.resourcemanager.v3.Purpose purpose = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The purpose. + */ + com.google.cloud.resourcemanager.v3.Purpose getPurpose(); + + /** + * + * + *
+   * Optional. Purpose data corresponds to the policy system that the tag is
+   * intended for. See documentation for `Purpose` for formatting of this field.
+   * Purpose data cannot be changed once set.
+   * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getPurposeDataCount(); + /** + * + * + *
+   * Optional. Purpose data corresponds to the policy system that the tag is
+   * intended for. See documentation for `Purpose` for formatting of this field.
+   * Purpose data cannot be changed once set.
+   * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsPurposeData(java.lang.String key); + /** Use {@link #getPurposeDataMap()} instead. */ + @java.lang.Deprecated + java.util.Map getPurposeData(); + /** + * + * + *
+   * Optional. Purpose data corresponds to the policy system that the tag is
+   * intended for. See documentation for `Purpose` for formatting of this field.
+   * Purpose data cannot be changed once set.
+   * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getPurposeDataMap(); + /** + * + * + *
+   * Optional. Purpose data corresponds to the policy system that the tag is
+   * intended for. See documentation for `Purpose` for formatting of this field.
+   * Purpose data cannot be changed once set.
+   * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getPurposeDataOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Purpose data corresponds to the policy system that the tag is
+   * intended for. See documentation for `Purpose` for formatting of this field.
+   * Purpose data cannot be changed once set.
+   * 
+ * + * map<string, string> purpose_data = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getPurposeDataOrThrow(java.lang.String key); } diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysProto.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysProto.java index f3fa6613c5ee..9f400d94e1a1 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysProto.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagKeysProto.java @@ -31,6 +31,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_resourcemanager_v3_TagKey_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_resourcemanager_v3_TagKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_resourcemanager_v3_TagKey_PurposeDataEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_resourcemanager_v3_TagKey_PurposeDataEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_resourcemanager_v3_ListTagKeysRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -43,6 +47,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_resourcemanager_v3_GetTagKeyRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_resourcemanager_v3_GetTagKeyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagKeyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagKeyRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_resourcemanager_v3_CreateTagKeyRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -85,77 +93,90 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/v1/policy.proto\032#google/longrunning/ope" + "rations.proto\032 google/protobuf/field_mas" + "k.proto\032\037google/protobuf/timestamp.proto" - + "\"\315\002\n\006TagKey\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\023\n\006parent" + + "\"\226\004\n\006TagKey\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\023\n\006parent" + "\030\002 \001(\tB\003\340A\005\022\032\n\nshort_name\030\003 \001(\tB\006\340A\002\340A\005\022" + "\037\n\017namespaced_name\030\004 \001(\tB\006\340A\003\340A\005\022\030\n\013desc" + "ription\030\005 \001(\tB\003\340A\001\0224\n\013create_time\030\006 \001(\0132" + "\032.google.protobuf.TimestampB\003\340A\003\0224\n\013upda" + "te_time\030\007 \001(\0132\032.google.protobuf.Timestam" - + "pB\003\340A\003\022\021\n\004etag\030\010 \001(\tB\003\340A\001:E\352AB\n*cloudres" - + "ourcemanager.googleapis.com/TagKey\022\021tagK" - + "eys/{tag_key}R\001\001\"`\n\022ListTagKeysRequest\022\031" - + "\n\006parent\030\001 \001(\tB\t\340A\002\372A\003\022\001*\022\026\n\tpage_size\030\002" - + " \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"i\n\023Li" - + "stTagKeysResponse\0229\n\010tag_keys\030\001 \003(\0132\'.go" - + "ogle.cloud.resourcemanager.v3.TagKey\022\027\n\017" - + "next_page_token\030\002 \001(\t\"T\n\020GetTagKeyReques" - + "t\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*cloudresourcema" - + "nager.googleapis.com/TagKey\"p\n\023CreateTag" - + "KeyRequest\022=\n\007tag_key\030\001 \001(\0132\'.google.clo" - + "ud.resourcemanager.v3.TagKeyB\003\340A\002\022\032\n\rval" - + "idate_only\030\002 \001(\010B\003\340A\001\"\026\n\024CreateTagKeyMet" - + "adata\"\234\001\n\023UpdateTagKeyRequest\022=\n\007tag_key" - + "\030\001 \001(\0132\'.google.cloud.resourcemanager.v3" - + ".TagKeyB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.goog" - + "le.protobuf.FieldMask\022\025\n\rvalidate_only\030\003" - + " \001(\010\"\026\n\024UpdateTagKeyMetadata\"\206\001\n\023DeleteT" - + "agKeyRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*clou" - + "dresourcemanager.googleapis.com/TagKey\022\032" - + "\n\rvalidate_only\030\002 \001(\010B\003\340A\001\022\021\n\004etag\030\003 \001(\t" - + "B\003\340A\001\"\026\n\024DeleteTagKeyMetadata2\277\013\n\007TagKey" - + "s\022\226\001\n\013ListTagKeys\0223.google.cloud.resourc" - + "emanager.v3.ListTagKeysRequest\0324.google." - + "cloud.resourcemanager.v3.ListTagKeysResp" - + "onse\"\034\202\323\344\223\002\r\022\013/v3/tagKeys\332A\006parent\022\214\001\n\tG" - + "etTagKey\0221.google.cloud.resourcemanager." - + "v3.GetTagKeyRequest\032\'.google.cloud.resou" - + "rcemanager.v3.TagKey\"#\202\323\344\223\002\026\022\024/v3/{name=" - + "tagKeys/*}\332A\004name\022\254\001\n\014CreateTagKey\0224.goo" - + "gle.cloud.resourcemanager.v3.CreateTagKe" - + "yRequest\032\035.google.longrunning.Operation\"" - + "G\202\323\344\223\002\026\"\013/v3/tagKeys:\007tag_key\332A\007tag_key\312" - + "A\036\n\006TagKey\022\024CreateTagKeyMetadata\022\311\001\n\014Upd" - + "ateTagKey\0224.google.cloud.resourcemanager" - + ".v3.UpdateTagKeyRequest\032\035.google.longrun" - + "ning.Operation\"d\202\323\344\223\002\'2\034/v3/{tag_key.nam" - + "e=tagKeys/*}:\007tag_key\332A\023tag_key,update_m" - + "ask\312A\036\n\006TagKey\022\024UpdateTagKeyMetadata\022\251\001\n" - + "\014DeleteTagKey\0224.google.cloud.resourceman" - + "ager.v3.DeleteTagKeyRequest\032\035.google.lon" - + "grunning.Operation\"D\202\323\344\223\002\026*\024/v3/{name=ta" - + "gKeys/*}\332A\004name\312A\036\n\006TagKey\022\024DeleteTagKey" - + "Metadata\022\206\001\n\014GetIamPolicy\022\".google.iam.v" - + "1.GetIamPolicyRequest\032\025.google.iam.v1.Po" - + "licy\";\202\323\344\223\002*\"%/v3/{resource=tagKeys/*}:g" - + "etIamPolicy:\001*\332A\010resource\022\215\001\n\014SetIamPoli" - + "cy\022\".google.iam.v1.SetIamPolicyRequest\032\025" - + ".google.iam.v1.Policy\"B\202\323\344\223\002*\"%/v3/{reso" - + "urce=tagKeys/*}:setIamPolicy:\001*\332A\017resour" - + "ce,policy\022\270\001\n\022TestIamPermissions\022(.googl" - + "e.iam.v1.TestIamPermissionsRequest\032).goo" - + "gle.iam.v1.TestIamPermissionsResponse\"M\202" - + "\323\344\223\0020\"+/v3/{resource=tagKeys/*}:testIamP" - + "ermissions:\001*\332A\024resource,permissions\032\220\001\312" - + "A#cloudresourcemanager.googleapis.com\322Ag" - + "https://www.googleapis.com/auth/cloud-pl" - + "atform,https://www.googleapis.com/auth/c" - + "loud-platform.read-onlyB\355\001\n#com.google.c" - + "loud.resourcemanager.v3B\014TagKeysProtoP\001Z" - + "Mcloud.google.com/go/resourcemanager/api" - + "v3/resourcemanagerpb;resourcemanagerpb\252\002" - + "\037Google.Cloud.ResourceManager.V3\312\002\037Googl" - + "e\\Cloud\\ResourceManager\\V3\352\002\"Google::Clo" - + "ud::ResourceManager::V3b\006proto3" + + "pB\003\340A\003\022\021\n\004etag\030\010 \001(\tB\003\340A\001\022>\n\007purpose\030\013 \001" + + "(\0162(.google.cloud.resourcemanager.v3.Pur" + + "poseB\003\340A\001\022S\n\014purpose_data\030\014 \003(\01328.google" + + ".cloud.resourcemanager.v3.TagKey.Purpose" + + "DataEntryB\003\340A\001\0322\n\020PurposeDataEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:E\352AB\n*cloudre" + + "sourcemanager.googleapis.com/TagKey\022\021tag" + + "Keys/{tag_key}R\001\001\"`\n\022ListTagKeysRequest\022" + + "\031\n\006parent\030\001 \001(\tB\t\340A\002\372A\003\022\001*\022\026\n\tpage_size\030" + + "\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"i\n\023L" + + "istTagKeysResponse\0229\n\010tag_keys\030\001 \003(\0132\'.g" + + "oogle.cloud.resourcemanager.v3.TagKey\022\027\n" + + "\017next_page_token\030\002 \001(\t\"T\n\020GetTagKeyReque" + + "st\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*cloudresourcem" + + "anager.googleapis.com/TagKey\"^\n\032GetNames" + + "pacedTagKeyRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A," + + "\n*cloudresourcemanager.googleapis.com/Ta" + + "gKey\"p\n\023CreateTagKeyRequest\022=\n\007tag_key\030\001" + + " \001(\0132\'.google.cloud.resourcemanager.v3.T" + + "agKeyB\003\340A\002\022\032\n\rvalidate_only\030\002 \001(\010B\003\340A\001\"\026" + + "\n\024CreateTagKeyMetadata\"\234\001\n\023UpdateTagKeyR" + + "equest\022=\n\007tag_key\030\001 \001(\0132\'.google.cloud.r" + + "esourcemanager.v3.TagKeyB\003\340A\002\022/\n\013update_" + + "mask\030\002 \001(\0132\032.google.protobuf.FieldMask\022\025" + + "\n\rvalidate_only\030\003 \001(\010\"\026\n\024UpdateTagKeyMet" + + "adata\"\206\001\n\023DeleteTagKeyRequest\022@\n\004name\030\001 " + + "\001(\tB2\340A\002\372A,\n*cloudresourcemanager.google" + + "apis.com/TagKey\022\032\n\rvalidate_only\030\002 \001(\010B\003" + + "\340A\001\022\021\n\004etag\030\003 \001(\tB\003\340A\001\"\026\n\024DeleteTagKeyMe" + + "tadata*4\n\007Purpose\022\027\n\023PURPOSE_UNSPECIFIED" + + "\020\000\022\020\n\014GCE_FIREWALL\020\0012\344\014\n\007TagKeys\022\226\001\n\013Lis" + + "tTagKeys\0223.google.cloud.resourcemanager." + + "v3.ListTagKeysRequest\0324.google.cloud.res" + + "ourcemanager.v3.ListTagKeysResponse\"\034\202\323\344" + + "\223\002\r\022\013/v3/tagKeys\332A\006parent\022\214\001\n\tGetTagKey\022" + + "1.google.cloud.resourcemanager.v3.GetTag" + + "KeyRequest\032\'.google.cloud.resourcemanage" + + "r.v3.TagKey\"#\202\323\344\223\002\026\022\024/v3/{name=tagKeys/*" + + "}\332A\004name\022\242\001\n\023GetNamespacedTagKey\022;.googl" + + "e.cloud.resourcemanager.v3.GetNamespaced" + + "TagKeyRequest\032\'.google.cloud.resourceman" + + "ager.v3.TagKey\"%\202\323\344\223\002\030\022\026/v3/tagKeys/name" + + "spaced\332A\004name\022\254\001\n\014CreateTagKey\0224.google." + + "cloud.resourcemanager.v3.CreateTagKeyReq" + + "uest\032\035.google.longrunning.Operation\"G\202\323\344" + + "\223\002\026\"\013/v3/tagKeys:\007tag_key\332A\007tag_key\312A\036\n\006" + + "TagKey\022\024CreateTagKeyMetadata\022\311\001\n\014UpdateT" + + "agKey\0224.google.cloud.resourcemanager.v3." + + "UpdateTagKeyRequest\032\035.google.longrunning" + + ".Operation\"d\202\323\344\223\002\'2\034/v3/{tag_key.name=ta" + + "gKeys/*}:\007tag_key\332A\023tag_key,update_mask\312" + + "A\036\n\006TagKey\022\024UpdateTagKeyMetadata\022\251\001\n\014Del" + + "eteTagKey\0224.google.cloud.resourcemanager" + + ".v3.DeleteTagKeyRequest\032\035.google.longrun" + + "ning.Operation\"D\202\323\344\223\002\026*\024/v3/{name=tagKey" + + "s/*}\332A\004name\312A\036\n\006TagKey\022\024DeleteTagKeyMeta" + + "data\022\206\001\n\014GetIamPolicy\022\".google.iam.v1.Ge" + + "tIamPolicyRequest\032\025.google.iam.v1.Policy" + + "\";\202\323\344\223\002*\"%/v3/{resource=tagKeys/*}:getIa" + + "mPolicy:\001*\332A\010resource\022\215\001\n\014SetIamPolicy\022\"" + + ".google.iam.v1.SetIamPolicyRequest\032\025.goo" + + "gle.iam.v1.Policy\"B\202\323\344\223\002*\"%/v3/{resource" + + "=tagKeys/*}:setIamPolicy:\001*\332A\017resource,p" + + "olicy\022\270\001\n\022TestIamPermissions\022(.google.ia" + + "m.v1.TestIamPermissionsRequest\032).google." + + "iam.v1.TestIamPermissionsResponse\"M\202\323\344\223\002" + + "0\"+/v3/{resource=tagKeys/*}:testIamPermi" + + "ssions:\001*\332A\024resource,permissions\032\220\001\312A#cl" + + "oudresourcemanager.googleapis.com\322Aghttp" + + "s://www.googleapis.com/auth/cloud-platfo" + + "rm,https://www.googleapis.com/auth/cloud" + + "-platform.read-onlyB\355\001\n#com.google.cloud" + + ".resourcemanager.v3B\014TagKeysProtoP\001ZMclo" + + "ud.google.com/go/resourcemanager/apiv3/r" + + "esourcemanagerpb;resourcemanagerpb\252\002\037Goo" + + "gle.Cloud.ResourceManager.V3\312\002\037Google\\Cl" + + "oud\\ResourceManager\\V3\352\002\"Google::Cloud::" + + "ResourceManager::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -185,6 +206,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CreateTime", "UpdateTime", "Etag", + "Purpose", + "PurposeData", + }); + internal_static_google_cloud_resourcemanager_v3_TagKey_PurposeDataEntry_descriptor = + internal_static_google_cloud_resourcemanager_v3_TagKey_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_resourcemanager_v3_TagKey_PurposeDataEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_resourcemanager_v3_TagKey_PurposeDataEntry_descriptor, + new java.lang.String[] { + "Key", "Value", }); internal_static_google_cloud_resourcemanager_v3_ListTagKeysRequest_descriptor = getDescriptor().getMessageTypes().get(1); @@ -210,8 +241,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); - internal_static_google_cloud_resourcemanager_v3_CreateTagKeyRequest_descriptor = + internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagKeyRequest_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagKeyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagKeyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_resourcemanager_v3_CreateTagKeyRequest_descriptor = + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_resourcemanager_v3_CreateTagKeyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_resourcemanager_v3_CreateTagKeyRequest_descriptor, @@ -219,13 +258,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TagKey", "ValidateOnly", }); internal_static_google_cloud_resourcemanager_v3_CreateTagKeyMetadata_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_resourcemanager_v3_CreateTagKeyMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_resourcemanager_v3_CreateTagKeyMetadata_descriptor, new java.lang.String[] {}); internal_static_google_cloud_resourcemanager_v3_UpdateTagKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_resourcemanager_v3_UpdateTagKeyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_resourcemanager_v3_UpdateTagKeyRequest_descriptor, @@ -233,13 +272,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TagKey", "UpdateMask", "ValidateOnly", }); internal_static_google_cloud_resourcemanager_v3_UpdateTagKeyMetadata_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_resourcemanager_v3_UpdateTagKeyMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_resourcemanager_v3_UpdateTagKeyMetadata_descriptor, new java.lang.String[] {}); internal_static_google_cloud_resourcemanager_v3_DeleteTagKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_resourcemanager_v3_DeleteTagKeyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_resourcemanager_v3_DeleteTagKeyRequest_descriptor, @@ -247,7 +286,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "ValidateOnly", "Etag", }); internal_static_google_cloud_resourcemanager_v3_DeleteTagKeyMetadata_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_resourcemanager_v3_DeleteTagKeyMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_resourcemanager_v3_DeleteTagKeyMetadata_descriptor, diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValue.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValue.java index 07852e336757..2d4fe533aceb 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValue.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValue.java @@ -185,8 +185,8 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * Required. Immutable. User-assigned short name for TagValue. The short name should be
-   * unique for TagValues within the same parent TagKey.
+   * Required. Immutable. User-assigned short name for TagValue. The short name
+   * should be unique for TagValues within the same parent TagKey.
    * The short name must be 63 characters or less, beginning and ending with
    * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
    * dots (.), and alphanumerics between.
@@ -214,8 +214,8 @@ public java.lang.String getShortName() {
    *
    *
    * 
-   * Required. Immutable. User-assigned short name for TagValue. The short name should be
-   * unique for TagValues within the same parent TagKey.
+   * Required. Immutable. User-assigned short name for TagValue. The short name
+   * should be unique for TagValues within the same parent TagKey.
    * The short name must be 63 characters or less, beginning and ending with
    * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
    * dots (.), and alphanumerics between.
@@ -248,8 +248,10 @@ public com.google.protobuf.ByteString getShortNameBytes() {
    *
    *
    * 
-   * Output only. Namespaced name of the TagValue. Must be in the format
-   * `{organization_id}/{tag_key_short_name}/{short_name}`.
+   * Output only. Namespaced name of the TagValue. Now only supported in the
+   * format
+   * `{organization_id}/{tag_key_short_name}/{short_name}`. Other
+   * formats will be supported when we add non-org parented tags.
    * 
* * string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -272,8 +274,10 @@ public java.lang.String getNamespacedName() { * * *
-   * Output only. Namespaced name of the TagValue. Must be in the format
-   * `{organization_id}/{tag_key_short_name}/{short_name}`.
+   * Output only. Namespaced name of the TagValue. Now only supported in the
+   * format
+   * `{organization_id}/{tag_key_short_name}/{short_name}`. Other
+   * formats will be supported when we add non-org parented tags.
    * 
* * string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -454,8 +458,9 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
-   * Optional. Entity tag which users can pass to prevent race conditions. This field is
-   * always set in server responses. See UpdateTagValueRequest for details.
+   * Optional. Entity tag which users can pass to prevent race conditions. This
+   * field is always set in server responses. See UpdateTagValueRequest for
+   * details.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -478,8 +483,9 @@ public java.lang.String getEtag() { * * *
-   * Optional. Entity tag which users can pass to prevent race conditions. This field is
-   * always set in server responses. See UpdateTagValueRequest for details.
+   * Optional. Entity tag which users can pass to prevent race conditions. This
+   * field is always set in server responses. See UpdateTagValueRequest for
+   * details.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -1245,8 +1251,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. Immutable. User-assigned short name for TagValue. The short name should be
-     * unique for TagValues within the same parent TagKey.
+     * Required. Immutable. User-assigned short name for TagValue. The short name
+     * should be unique for TagValues within the same parent TagKey.
      * The short name must be 63 characters or less, beginning and ending with
      * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
      * dots (.), and alphanumerics between.
@@ -1273,8 +1279,8 @@ public java.lang.String getShortName() {
      *
      *
      * 
-     * Required. Immutable. User-assigned short name for TagValue. The short name should be
-     * unique for TagValues within the same parent TagKey.
+     * Required. Immutable. User-assigned short name for TagValue. The short name
+     * should be unique for TagValues within the same parent TagKey.
      * The short name must be 63 characters or less, beginning and ending with
      * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
      * dots (.), and alphanumerics between.
@@ -1301,8 +1307,8 @@ public com.google.protobuf.ByteString getShortNameBytes() {
      *
      *
      * 
-     * Required. Immutable. User-assigned short name for TagValue. The short name should be
-     * unique for TagValues within the same parent TagKey.
+     * Required. Immutable. User-assigned short name for TagValue. The short name
+     * should be unique for TagValues within the same parent TagKey.
      * The short name must be 63 characters or less, beginning and ending with
      * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
      * dots (.), and alphanumerics between.
@@ -1328,8 +1334,8 @@ public Builder setShortName(java.lang.String value) {
      *
      *
      * 
-     * Required. Immutable. User-assigned short name for TagValue. The short name should be
-     * unique for TagValues within the same parent TagKey.
+     * Required. Immutable. User-assigned short name for TagValue. The short name
+     * should be unique for TagValues within the same parent TagKey.
      * The short name must be 63 characters or less, beginning and ending with
      * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
      * dots (.), and alphanumerics between.
@@ -1351,8 +1357,8 @@ public Builder clearShortName() {
      *
      *
      * 
-     * Required. Immutable. User-assigned short name for TagValue. The short name should be
-     * unique for TagValues within the same parent TagKey.
+     * Required. Immutable. User-assigned short name for TagValue. The short name
+     * should be unique for TagValues within the same parent TagKey.
      * The short name must be 63 characters or less, beginning and ending with
      * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
      * dots (.), and alphanumerics between.
@@ -1381,8 +1387,10 @@ public Builder setShortNameBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Output only. Namespaced name of the TagValue. Must be in the format
-     * `{organization_id}/{tag_key_short_name}/{short_name}`.
+     * Output only. Namespaced name of the TagValue. Now only supported in the
+     * format
+     * `{organization_id}/{tag_key_short_name}/{short_name}`. Other
+     * formats will be supported when we add non-org parented tags.
      * 
* * string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1404,8 +1412,10 @@ public java.lang.String getNamespacedName() { * * *
-     * Output only. Namespaced name of the TagValue. Must be in the format
-     * `{organization_id}/{tag_key_short_name}/{short_name}`.
+     * Output only. Namespaced name of the TagValue. Now only supported in the
+     * format
+     * `{organization_id}/{tag_key_short_name}/{short_name}`. Other
+     * formats will be supported when we add non-org parented tags.
      * 
* * string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1427,8 +1437,10 @@ public com.google.protobuf.ByteString getNamespacedNameBytes() { * * *
-     * Output only. Namespaced name of the TagValue. Must be in the format
-     * `{organization_id}/{tag_key_short_name}/{short_name}`.
+     * Output only. Namespaced name of the TagValue. Now only supported in the
+     * format
+     * `{organization_id}/{tag_key_short_name}/{short_name}`. Other
+     * formats will be supported when we add non-org parented tags.
      * 
* * string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1449,8 +1461,10 @@ public Builder setNamespacedName(java.lang.String value) { * * *
-     * Output only. Namespaced name of the TagValue. Must be in the format
-     * `{organization_id}/{tag_key_short_name}/{short_name}`.
+     * Output only. Namespaced name of the TagValue. Now only supported in the
+     * format
+     * `{organization_id}/{tag_key_short_name}/{short_name}`. Other
+     * formats will be supported when we add non-org parented tags.
      * 
* * string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1467,8 +1481,10 @@ public Builder clearNamespacedName() { * * *
-     * Output only. Namespaced name of the TagValue. Must be in the format
-     * `{organization_id}/{tag_key_short_name}/{short_name}`.
+     * Output only. Namespaced name of the TagValue. Now only supported in the
+     * format
+     * `{organization_id}/{tag_key_short_name}/{short_name}`. Other
+     * formats will be supported when we add non-org parented tags.
      * 
* * string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2010,8 +2026,9 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
-     * Optional. Entity tag which users can pass to prevent race conditions. This field is
-     * always set in server responses. See UpdateTagValueRequest for details.
+     * Optional. Entity tag which users can pass to prevent race conditions. This
+     * field is always set in server responses. See UpdateTagValueRequest for
+     * details.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2033,8 +2050,9 @@ public java.lang.String getEtag() { * * *
-     * Optional. Entity tag which users can pass to prevent race conditions. This field is
-     * always set in server responses. See UpdateTagValueRequest for details.
+     * Optional. Entity tag which users can pass to prevent race conditions. This
+     * field is always set in server responses. See UpdateTagValueRequest for
+     * details.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2056,8 +2074,9 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-     * Optional. Entity tag which users can pass to prevent race conditions. This field is
-     * always set in server responses. See UpdateTagValueRequest for details.
+     * Optional. Entity tag which users can pass to prevent race conditions. This
+     * field is always set in server responses. See UpdateTagValueRequest for
+     * details.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2078,8 +2097,9 @@ public Builder setEtag(java.lang.String value) { * * *
-     * Optional. Entity tag which users can pass to prevent race conditions. This field is
-     * always set in server responses. See UpdateTagValueRequest for details.
+     * Optional. Entity tag which users can pass to prevent race conditions. This
+     * field is always set in server responses. See UpdateTagValueRequest for
+     * details.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2096,8 +2116,9 @@ public Builder clearEtag() { * * *
-     * Optional. Entity tag which users can pass to prevent race conditions. This field is
-     * always set in server responses. See UpdateTagValueRequest for details.
+     * Optional. Entity tag which users can pass to prevent race conditions. This
+     * field is always set in server responses. See UpdateTagValueRequest for
+     * details.
      * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValueOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValueOrBuilder.java index e16b06b17bc6..77892ae2cbf5 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValueOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValueOrBuilder.java @@ -79,8 +79,8 @@ public interface TagValueOrBuilder * * *
-   * Required. Immutable. User-assigned short name for TagValue. The short name should be
-   * unique for TagValues within the same parent TagKey.
+   * Required. Immutable. User-assigned short name for TagValue. The short name
+   * should be unique for TagValues within the same parent TagKey.
    * The short name must be 63 characters or less, beginning and ending with
    * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
    * dots (.), and alphanumerics between.
@@ -97,8 +97,8 @@ public interface TagValueOrBuilder
    *
    *
    * 
-   * Required. Immutable. User-assigned short name for TagValue. The short name should be
-   * unique for TagValues within the same parent TagKey.
+   * Required. Immutable. User-assigned short name for TagValue. The short name
+   * should be unique for TagValues within the same parent TagKey.
    * The short name must be 63 characters or less, beginning and ending with
    * an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_),
    * dots (.), and alphanumerics between.
@@ -116,8 +116,10 @@ public interface TagValueOrBuilder
    *
    *
    * 
-   * Output only. Namespaced name of the TagValue. Must be in the format
-   * `{organization_id}/{tag_key_short_name}/{short_name}`.
+   * Output only. Namespaced name of the TagValue. Now only supported in the
+   * format
+   * `{organization_id}/{tag_key_short_name}/{short_name}`. Other
+   * formats will be supported when we add non-org parented tags.
    * 
* * string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -129,8 +131,10 @@ public interface TagValueOrBuilder * * *
-   * Output only. Namespaced name of the TagValue. Must be in the format
-   * `{organization_id}/{tag_key_short_name}/{short_name}`.
+   * Output only. Namespaced name of the TagValue. Now only supported in the
+   * format
+   * `{organization_id}/{tag_key_short_name}/{short_name}`. Other
+   * formats will be supported when we add non-org parented tags.
    * 
* * string namespaced_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -248,8 +252,9 @@ public interface TagValueOrBuilder * * *
-   * Optional. Entity tag which users can pass to prevent race conditions. This field is
-   * always set in server responses. See UpdateTagValueRequest for details.
+   * Optional. Entity tag which users can pass to prevent race conditions. This
+   * field is always set in server responses. See UpdateTagValueRequest for
+   * details.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -261,8 +266,9 @@ public interface TagValueOrBuilder * * *
-   * Optional. Entity tag which users can pass to prevent race conditions. This field is
-   * always set in server responses. See UpdateTagValueRequest for details.
+   * Optional. Entity tag which users can pass to prevent race conditions. This
+   * field is always set in server responses. See UpdateTagValueRequest for
+   * details.
    * 
* * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesProto.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesProto.java index 4a351fe67a5c..1ad761e1d974 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesProto.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/TagValuesProto.java @@ -43,6 +43,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_resourcemanager_v3_GetTagValueRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_resourcemanager_v3_GetTagValueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagValueRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagValueRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_resourcemanager_v3_CreateTagValueRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -101,64 +105,71 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "v3.TagValue\022\027\n\017next_page_token\030\002 \001(\t\"X\n\022" + "GetTagValueRequest\022B\n\004name\030\001 \001(\tB4\340A\002\372A." + "\n,cloudresourcemanager.googleapis.com/Ta" - + "gValue\"v\n\025CreateTagValueRequest\022A\n\ttag_v" - + "alue\030\001 \001(\0132).google.cloud.resourcemanage" - + "r.v3.TagValueB\003\340A\002\022\032\n\rvalidate_only\030\002 \001(" - + "\010B\003\340A\001\"\030\n\026CreateTagValueMetadata\"\254\001\n\025Upd" - + "ateTagValueRequest\022A\n\ttag_value\030\001 \001(\0132)." - + "google.cloud.resourcemanager.v3.TagValue" - + "B\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.prot" - + "obuf.FieldMaskB\003\340A\001\022\032\n\rvalidate_only\030\003 \001" - + "(\010B\003\340A\001\"\030\n\026UpdateTagValueMetadata\"\212\001\n\025De" - + "leteTagValueRequest\022B\n\004name\030\001 \001(\tB4\340A\002\372A" - + ".\n,cloudresourcemanager.googleapis.com/T" - + "agValue\022\032\n\rvalidate_only\030\002 \001(\010B\003\340A\001\022\021\n\004e" - + "tag\030\003 \001(\tB\003\340A\001\"\030\n\026DeleteTagValueMetadata" - + "2\377\013\n\tTagValues\022\236\001\n\rListTagValues\0225.googl" - + "e.cloud.resourcemanager.v3.ListTagValues" - + "Request\0326.google.cloud.resourcemanager.v" - + "3.ListTagValuesResponse\"\036\202\323\344\223\002\017\022\r/v3/tag" - + "Values\332A\006parent\022\224\001\n\013GetTagValue\0223.google" - + ".cloud.resourcemanager.v3.GetTagValueReq" - + "uest\032).google.cloud.resourcemanager.v3.T" - + "agValue\"%\202\323\344\223\002\030\022\026/v3/{name=tagValues/*}\332" - + "A\004name\022\272\001\n\016CreateTagValue\0226.google.cloud" - + ".resourcemanager.v3.CreateTagValueReques" - + "t\032\035.google.longrunning.Operation\"Q\202\323\344\223\002\032" - + "\"\r/v3/tagValues:\ttag_value\332A\ttag_value\312A" - + "\"\n\010TagValue\022\026CreateTagValueMetadata\022\331\001\n\016" - + "UpdateTagValue\0226.google.cloud.resourcema" - + "nager.v3.UpdateTagValueRequest\032\035.google." - + "longrunning.Operation\"p\202\323\344\223\002-2 /v3/{tag_" - + "value.name=tagValues/*}:\ttag_value\332A\025tag" - + "_value,update_mask\312A\"\n\010TagValue\022\026UpdateT" - + "agValueMetadata\022\263\001\n\016DeleteTagValue\0226.goo" - + "gle.cloud.resourcemanager.v3.DeleteTagVa" - + "lueRequest\032\035.google.longrunning.Operatio" - + "n\"J\202\323\344\223\002\030*\026/v3/{name=tagValues/*}\332A\004name" - + "\312A\"\n\010TagValue\022\026DeleteTagValueMetadata\022\210\001" - + "\n\014GetIamPolicy\022\".google.iam.v1.GetIamPol" - + "icyRequest\032\025.google.iam.v1.Policy\"=\202\323\344\223\002" - + ",\"\'/v3/{resource=tagValues/*}:getIamPoli" - + "cy:\001*\332A\010resource\022\217\001\n\014SetIamPolicy\022\".goog" - + "le.iam.v1.SetIamPolicyRequest\032\025.google.i" - + "am.v1.Policy\"D\202\323\344\223\002,\"\'/v3/{resource=tagV" - + "alues/*}:setIamPolicy:\001*\332A\017resource,poli" - + "cy\022\272\001\n\022TestIamPermissions\022(.google.iam.v" - + "1.TestIamPermissionsRequest\032).google.iam" - + ".v1.TestIamPermissionsResponse\"O\202\323\344\223\0022\"-" - + "/v3/{resource=tagValues/*}:testIamPermis" - + "sions:\001*\332A\024resource,permissions\032\220\001\312A#clo" - + "udresourcemanager.googleapis.com\322Aghttps" + + "gValue\"b\n\034GetNamespacedTagValueRequest\022B" + + "\n\004name\030\001 \001(\tB4\340A\002\372A.\n,cloudresourcemanag" + + "er.googleapis.com/TagValue\"v\n\025CreateTagV" + + "alueRequest\022A\n\ttag_value\030\001 \001(\0132).google." + + "cloud.resourcemanager.v3.TagValueB\003\340A\002\022\032" + + "\n\rvalidate_only\030\002 \001(\010B\003\340A\001\"\030\n\026CreateTagV" + + "alueMetadata\"\254\001\n\025UpdateTagValueRequest\022A" + + "\n\ttag_value\030\001 \001(\0132).google.cloud.resourc" + + "emanager.v3.TagValueB\003\340A\002\0224\n\013update_mask" + + "\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022" + + "\032\n\rvalidate_only\030\003 \001(\010B\003\340A\001\"\030\n\026UpdateTag" + + "ValueMetadata\"\212\001\n\025DeleteTagValueRequest\022" + + "B\n\004name\030\001 \001(\tB4\340A\002\372A.\n,cloudresourcemana" + + "ger.googleapis.com/TagValue\022\032\n\rvalidate_" + + "only\030\002 \001(\010B\003\340A\001\022\021\n\004etag\030\003 \001(\tB\003\340A\001\"\030\n\026De" + + "leteTagValueMetadata2\254\r\n\tTagValues\022\236\001\n\rL" + + "istTagValues\0225.google.cloud.resourcemana" + + "ger.v3.ListTagValuesRequest\0326.google.clo" + + "ud.resourcemanager.v3.ListTagValuesRespo" + + "nse\"\036\202\323\344\223\002\017\022\r/v3/tagValues\332A\006parent\022\224\001\n\013" + + "GetTagValue\0223.google.cloud.resourcemanag" + + "er.v3.GetTagValueRequest\032).google.cloud." + + "resourcemanager.v3.TagValue\"%\202\323\344\223\002\030\022\026/v3" + + "/{name=tagValues/*}\332A\004name\022\252\001\n\025GetNamesp" + + "acedTagValue\022=.google.cloud.resourcemana" + + "ger.v3.GetNamespacedTagValueRequest\032).go" + + "ogle.cloud.resourcemanager.v3.TagValue\"\'" + + "\202\323\344\223\002\032\022\030/v3/tagValues/namespaced\332A\004name\022" + + "\272\001\n\016CreateTagValue\0226.google.cloud.resour" + + "cemanager.v3.CreateTagValueRequest\032\035.goo" + + "gle.longrunning.Operation\"Q\202\323\344\223\002\032\"\r/v3/t" + + "agValues:\ttag_value\332A\ttag_value\312A\"\n\010TagV" + + "alue\022\026CreateTagValueMetadata\022\331\001\n\016UpdateT" + + "agValue\0226.google.cloud.resourcemanager.v" + + "3.UpdateTagValueRequest\032\035.google.longrun" + + "ning.Operation\"p\202\323\344\223\002-2 /v3/{tag_value.n" + + "ame=tagValues/*}:\ttag_value\332A\025tag_value," + + "update_mask\312A\"\n\010TagValue\022\026UpdateTagValue" + + "Metadata\022\263\001\n\016DeleteTagValue\0226.google.clo" + + "ud.resourcemanager.v3.DeleteTagValueRequ" + + "est\032\035.google.longrunning.Operation\"J\202\323\344\223" + + "\002\030*\026/v3/{name=tagValues/*}\332A\004name\312A\"\n\010Ta" + + "gValue\022\026DeleteTagValueMetadata\022\210\001\n\014GetIa" + + "mPolicy\022\".google.iam.v1.GetIamPolicyRequ" + + "est\032\025.google.iam.v1.Policy\"=\202\323\344\223\002,\"\'/v3/" + + "{resource=tagValues/*}:getIamPolicy:\001*\332A" + + "\010resource\022\217\001\n\014SetIamPolicy\022\".google.iam." + + "v1.SetIamPolicyRequest\032\025.google.iam.v1.P" + + "olicy\"D\202\323\344\223\002,\"\'/v3/{resource=tagValues/*" + + "}:setIamPolicy:\001*\332A\017resource,policy\022\272\001\n\022" + + "TestIamPermissions\022(.google.iam.v1.TestI" + + "amPermissionsRequest\032).google.iam.v1.Tes" + + "tIamPermissionsResponse\"O\202\323\344\223\0022\"-/v3/{re" + + "source=tagValues/*}:testIamPermissions:\001" + + "*\332A\024resource,permissions\032\220\001\312A#cloudresou" + + "rcemanager.googleapis.com\322Aghttps://www." + + "googleapis.com/auth/cloud-platform,https" + "://www.googleapis.com/auth/cloud-platfor" - + "m,https://www.googleapis.com/auth/cloud-" - + "platform.read-onlyB\357\001\n#com.google.cloud." - + "resourcemanager.v3B\016TagValuesProtoP\001ZMcl" - + "oud.google.com/go/resourcemanager/apiv3/" - + "resourcemanagerpb;resourcemanagerpb\252\002\037Go" - + "ogle.Cloud.ResourceManager.V3\312\002\037Google\\C" - + "loud\\ResourceManager\\V3\352\002\"Google::Cloud:" - + ":ResourceManager::V3b\006proto3" + + "m.read-onlyB\357\001\n#com.google.cloud.resourc" + + "emanager.v3B\016TagValuesProtoP\001ZMcloud.goo" + + "gle.com/go/resourcemanager/apiv3/resourc" + + "emanagerpb;resourcemanagerpb\252\002\037Google.Cl" + + "oud.ResourceManager.V3\312\002\037Google\\Cloud\\Re" + + "sourceManager\\V3\352\002\"Google::Cloud::Resour" + + "ceManager::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -213,8 +224,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); - internal_static_google_cloud_resourcemanager_v3_CreateTagValueRequest_descriptor = + internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagValueRequest_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagValueRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_resourcemanager_v3_GetNamespacedTagValueRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_resourcemanager_v3_CreateTagValueRequest_descriptor = + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_resourcemanager_v3_CreateTagValueRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_resourcemanager_v3_CreateTagValueRequest_descriptor, @@ -222,13 +241,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TagValue", "ValidateOnly", }); internal_static_google_cloud_resourcemanager_v3_CreateTagValueMetadata_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_resourcemanager_v3_CreateTagValueMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_resourcemanager_v3_CreateTagValueMetadata_descriptor, new java.lang.String[] {}); internal_static_google_cloud_resourcemanager_v3_UpdateTagValueRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_resourcemanager_v3_UpdateTagValueRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_resourcemanager_v3_UpdateTagValueRequest_descriptor, @@ -236,13 +255,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TagValue", "UpdateMask", "ValidateOnly", }); internal_static_google_cloud_resourcemanager_v3_UpdateTagValueMetadata_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_resourcemanager_v3_UpdateTagValueMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_resourcemanager_v3_UpdateTagValueMetadata_descriptor, new java.lang.String[] {}); internal_static_google_cloud_resourcemanager_v3_DeleteTagValueRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_resourcemanager_v3_DeleteTagValueRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_resourcemanager_v3_DeleteTagValueRequest_descriptor, @@ -250,7 +269,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "ValidateOnly", "Etag", }); internal_static_google_cloud_resourcemanager_v3_DeleteTagValueMetadata_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_resourcemanager_v3_DeleteTagValueMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_resourcemanager_v3_DeleteTagValueMetadata_descriptor, diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateFolderRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateFolderRequest.java index ab7540d7d7a6..4067e689f876 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateFolderRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateFolderRequest.java @@ -77,8 +77,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The new definition of the Folder. It must include the `name` field, which
-   * cannot be changed.
+   * Required. The new definition of the Folder. It must include the `name`
+   * field, which cannot be changed.
    * 
* * @@ -95,8 +95,8 @@ public boolean hasFolder() { * * *
-   * Required. The new definition of the Folder. It must include the `name` field, which
-   * cannot be changed.
+   * Required. The new definition of the Folder. It must include the `name`
+   * field, which cannot be changed.
    * 
* * @@ -115,8 +115,8 @@ public com.google.cloud.resourcemanager.v3.Folder getFolder() { * * *
-   * Required. The new definition of the Folder. It must include the `name` field, which
-   * cannot be changed.
+   * Required. The new definition of the Folder. It must include the `name`
+   * field, which cannot be changed.
    * 
* * @@ -579,8 +579,8 @@ public Builder mergeFrom( * * *
-     * Required. The new definition of the Folder. It must include the `name` field, which
-     * cannot be changed.
+     * Required. The new definition of the Folder. It must include the `name`
+     * field, which cannot be changed.
      * 
* * @@ -596,8 +596,8 @@ public boolean hasFolder() { * * *
-     * Required. The new definition of the Folder. It must include the `name` field, which
-     * cannot be changed.
+     * Required. The new definition of the Folder. It must include the `name`
+     * field, which cannot be changed.
      * 
* * @@ -619,8 +619,8 @@ public com.google.cloud.resourcemanager.v3.Folder getFolder() { * * *
-     * Required. The new definition of the Folder. It must include the `name` field, which
-     * cannot be changed.
+     * Required. The new definition of the Folder. It must include the `name`
+     * field, which cannot be changed.
      * 
* * @@ -644,8 +644,8 @@ public Builder setFolder(com.google.cloud.resourcemanager.v3.Folder value) { * * *
-     * Required. The new definition of the Folder. It must include the `name` field, which
-     * cannot be changed.
+     * Required. The new definition of the Folder. It must include the `name`
+     * field, which cannot be changed.
      * 
* * @@ -666,8 +666,8 @@ public Builder setFolder(com.google.cloud.resourcemanager.v3.Folder.Builder buil * * *
-     * Required. The new definition of the Folder. It must include the `name` field, which
-     * cannot be changed.
+     * Required. The new definition of the Folder. It must include the `name`
+     * field, which cannot be changed.
      * 
* * @@ -694,8 +694,8 @@ public Builder mergeFolder(com.google.cloud.resourcemanager.v3.Folder value) { * * *
-     * Required. The new definition of the Folder. It must include the `name` field, which
-     * cannot be changed.
+     * Required. The new definition of the Folder. It must include the `name`
+     * field, which cannot be changed.
      * 
* * @@ -716,8 +716,8 @@ public Builder clearFolder() { * * *
-     * Required. The new definition of the Folder. It must include the `name` field, which
-     * cannot be changed.
+     * Required. The new definition of the Folder. It must include the `name`
+     * field, which cannot be changed.
      * 
* * @@ -733,8 +733,8 @@ public com.google.cloud.resourcemanager.v3.Folder.Builder getFolderBuilder() { * * *
-     * Required. The new definition of the Folder. It must include the `name` field, which
-     * cannot be changed.
+     * Required. The new definition of the Folder. It must include the `name`
+     * field, which cannot be changed.
      * 
* * @@ -754,8 +754,8 @@ public com.google.cloud.resourcemanager.v3.FolderOrBuilder getFolderOrBuilder() * * *
-     * Required. The new definition of the Folder. It must include the `name` field, which
-     * cannot be changed.
+     * Required. The new definition of the Folder. It must include the `name`
+     * field, which cannot be changed.
      * 
* * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateFolderRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateFolderRequestOrBuilder.java index 7fd65be25824..cf7272e8129e 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateFolderRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateFolderRequestOrBuilder.java @@ -27,8 +27,8 @@ public interface UpdateFolderRequestOrBuilder * * *
-   * Required. The new definition of the Folder. It must include the `name` field, which
-   * cannot be changed.
+   * Required. The new definition of the Folder. It must include the `name`
+   * field, which cannot be changed.
    * 
* * @@ -42,8 +42,8 @@ public interface UpdateFolderRequestOrBuilder * * *
-   * Required. The new definition of the Folder. It must include the `name` field, which
-   * cannot be changed.
+   * Required. The new definition of the Folder. It must include the `name`
+   * field, which cannot be changed.
    * 
* * @@ -57,8 +57,8 @@ public interface UpdateFolderRequestOrBuilder * * *
-   * Required. The new definition of the Folder. It must include the `name` field, which
-   * cannot be changed.
+   * Required. The new definition of the Folder. It must include the `name`
+   * field, which cannot be changed.
    * 
* * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagKeyRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagKeyRequest.java index 6a3a8ad8e18b..cc64156fbf04 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagKeyRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagKeyRequest.java @@ -71,10 +71,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-   * can be updated by this request. If the `etag` field is not empty, it
-   * must match the `etag` field of the existing tag key. Otherwise,
-   * `FAILED_PRECONDITION` will be returned.
+   * Required. The new definition of the TagKey. Only the `description` and
+   * `etag` fields can be updated by this request. If the `etag` field is not
+   * empty, it must match the `etag` field of the existing tag key. Otherwise,
+   * `ABORTED` will be returned.
    * 
* * @@ -91,10 +91,10 @@ public boolean hasTagKey() { * * *
-   * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-   * can be updated by this request. If the `etag` field is not empty, it
-   * must match the `etag` field of the existing tag key. Otherwise,
-   * `FAILED_PRECONDITION` will be returned.
+   * Required. The new definition of the TagKey. Only the `description` and
+   * `etag` fields can be updated by this request. If the `etag` field is not
+   * empty, it must match the `etag` field of the existing tag key. Otherwise,
+   * `ABORTED` will be returned.
    * 
* * @@ -113,10 +113,10 @@ public com.google.cloud.resourcemanager.v3.TagKey getTagKey() { * * *
-   * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-   * can be updated by this request. If the `etag` field is not empty, it
-   * must match the `etag` field of the existing tag key. Otherwise,
-   * `FAILED_PRECONDITION` will be returned.
+   * Required. The new definition of the TagKey. Only the `description` and
+   * `etag` fields can be updated by this request. If the `etag` field is not
+   * empty, it must match the `etag` field of the existing tag key. Otherwise,
+   * `ABORTED` will be returned.
    * 
* * @@ -614,10 +614,10 @@ public Builder mergeFrom( * * *
-     * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-     * can be updated by this request. If the `etag` field is not empty, it
-     * must match the `etag` field of the existing tag key. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagKey. Only the `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is not
+     * empty, it must match the `etag` field of the existing tag key. Otherwise,
+     * `ABORTED` will be returned.
      * 
* * @@ -633,10 +633,10 @@ public boolean hasTagKey() { * * *
-     * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-     * can be updated by this request. If the `etag` field is not empty, it
-     * must match the `etag` field of the existing tag key. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagKey. Only the `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is not
+     * empty, it must match the `etag` field of the existing tag key. Otherwise,
+     * `ABORTED` will be returned.
      * 
* * @@ -658,10 +658,10 @@ public com.google.cloud.resourcemanager.v3.TagKey getTagKey() { * * *
-     * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-     * can be updated by this request. If the `etag` field is not empty, it
-     * must match the `etag` field of the existing tag key. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagKey. Only the `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is not
+     * empty, it must match the `etag` field of the existing tag key. Otherwise,
+     * `ABORTED` will be returned.
      * 
* * @@ -685,10 +685,10 @@ public Builder setTagKey(com.google.cloud.resourcemanager.v3.TagKey value) { * * *
-     * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-     * can be updated by this request. If the `etag` field is not empty, it
-     * must match the `etag` field of the existing tag key. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagKey. Only the `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is not
+     * empty, it must match the `etag` field of the existing tag key. Otherwise,
+     * `ABORTED` will be returned.
      * 
* * @@ -709,10 +709,10 @@ public Builder setTagKey(com.google.cloud.resourcemanager.v3.TagKey.Builder buil * * *
-     * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-     * can be updated by this request. If the `etag` field is not empty, it
-     * must match the `etag` field of the existing tag key. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagKey. Only the `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is not
+     * empty, it must match the `etag` field of the existing tag key. Otherwise,
+     * `ABORTED` will be returned.
      * 
* * @@ -739,10 +739,10 @@ public Builder mergeTagKey(com.google.cloud.resourcemanager.v3.TagKey value) { * * *
-     * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-     * can be updated by this request. If the `etag` field is not empty, it
-     * must match the `etag` field of the existing tag key. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagKey. Only the `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is not
+     * empty, it must match the `etag` field of the existing tag key. Otherwise,
+     * `ABORTED` will be returned.
      * 
* * @@ -763,10 +763,10 @@ public Builder clearTagKey() { * * *
-     * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-     * can be updated by this request. If the `etag` field is not empty, it
-     * must match the `etag` field of the existing tag key. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagKey. Only the `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is not
+     * empty, it must match the `etag` field of the existing tag key. Otherwise,
+     * `ABORTED` will be returned.
      * 
* * @@ -782,10 +782,10 @@ public com.google.cloud.resourcemanager.v3.TagKey.Builder getTagKeyBuilder() { * * *
-     * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-     * can be updated by this request. If the `etag` field is not empty, it
-     * must match the `etag` field of the existing tag key. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagKey. Only the `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is not
+     * empty, it must match the `etag` field of the existing tag key. Otherwise,
+     * `ABORTED` will be returned.
      * 
* * @@ -805,10 +805,10 @@ public com.google.cloud.resourcemanager.v3.TagKeyOrBuilder getTagKeyOrBuilder() * * *
-     * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-     * can be updated by this request. If the `etag` field is not empty, it
-     * must match the `etag` field of the existing tag key. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagKey. Only the `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is not
+     * empty, it must match the `etag` field of the existing tag key. Otherwise,
+     * `ABORTED` will be returned.
      * 
* * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagKeyRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagKeyRequestOrBuilder.java index 6a0d2046847e..44d280432912 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagKeyRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagKeyRequestOrBuilder.java @@ -27,10 +27,10 @@ public interface UpdateTagKeyRequestOrBuilder * * *
-   * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-   * can be updated by this request. If the `etag` field is not empty, it
-   * must match the `etag` field of the existing tag key. Otherwise,
-   * `FAILED_PRECONDITION` will be returned.
+   * Required. The new definition of the TagKey. Only the `description` and
+   * `etag` fields can be updated by this request. If the `etag` field is not
+   * empty, it must match the `etag` field of the existing tag key. Otherwise,
+   * `ABORTED` will be returned.
    * 
* * @@ -44,10 +44,10 @@ public interface UpdateTagKeyRequestOrBuilder * * *
-   * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-   * can be updated by this request. If the `etag` field is not empty, it
-   * must match the `etag` field of the existing tag key. Otherwise,
-   * `FAILED_PRECONDITION` will be returned.
+   * Required. The new definition of the TagKey. Only the `description` and
+   * `etag` fields can be updated by this request. If the `etag` field is not
+   * empty, it must match the `etag` field of the existing tag key. Otherwise,
+   * `ABORTED` will be returned.
    * 
* * @@ -61,10 +61,10 @@ public interface UpdateTagKeyRequestOrBuilder * * *
-   * Required. The new definition of the TagKey. Only the `description` and `etag` fields
-   * can be updated by this request. If the `etag` field is not empty, it
-   * must match the `etag` field of the existing tag key. Otherwise,
-   * `FAILED_PRECONDITION` will be returned.
+   * Required. The new definition of the TagKey. Only the `description` and
+   * `etag` fields can be updated by this request. If the `etag` field is not
+   * empty, it must match the `etag` field of the existing tag key. Otherwise,
+   * `ABORTED` will be returned.
    * 
* * diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagValueRequest.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagValueRequest.java index 909af0787e7d..f5281ad34579 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagValueRequest.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagValueRequest.java @@ -71,10 +71,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The new definition of the TagValue. Only fields `description` and `etag`
-   * fields can be updated by this request. If the `etag` field is nonempty, it
-   * must match the `etag` field of the existing ControlGroup. Otherwise,
-   * `FAILED_PRECONDITION` will be returned.
+   * Required. The new definition of the TagValue. Only fields `description` and
+   * `etag` fields can be updated by this request. If the `etag` field is
+   * nonempty, it must match the `etag` field of the existing ControlGroup.
+   * Otherwise, `ABORTED` will be returned.
    * 
* * @@ -91,10 +91,10 @@ public boolean hasTagValue() { * * *
-   * Required. The new definition of the TagValue. Only fields `description` and `etag`
-   * fields can be updated by this request. If the `etag` field is nonempty, it
-   * must match the `etag` field of the existing ControlGroup. Otherwise,
-   * `FAILED_PRECONDITION` will be returned.
+   * Required. The new definition of the TagValue. Only fields `description` and
+   * `etag` fields can be updated by this request. If the `etag` field is
+   * nonempty, it must match the `etag` field of the existing ControlGroup.
+   * Otherwise, `ABORTED` will be returned.
    * 
* * @@ -113,10 +113,10 @@ public com.google.cloud.resourcemanager.v3.TagValue getTagValue() { * * *
-   * Required. The new definition of the TagValue. Only fields `description` and `etag`
-   * fields can be updated by this request. If the `etag` field is nonempty, it
-   * must match the `etag` field of the existing ControlGroup. Otherwise,
-   * `FAILED_PRECONDITION` will be returned.
+   * Required. The new definition of the TagValue. Only fields `description` and
+   * `etag` fields can be updated by this request. If the `etag` field is
+   * nonempty, it must match the `etag` field of the existing ControlGroup.
+   * Otherwise, `ABORTED` will be returned.
    * 
* * @@ -185,8 +185,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
-   * Optional. True to perform validations necessary for updating the resource, but not
-   * actually perform the action.
+   * Optional. True to perform validations necessary for updating the resource,
+   * but not actually perform the action.
    * 
* * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -611,10 +611,10 @@ public Builder mergeFrom( * * *
-     * Required. The new definition of the TagValue. Only fields `description` and `etag`
-     * fields can be updated by this request. If the `etag` field is nonempty, it
-     * must match the `etag` field of the existing ControlGroup. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagValue. Only fields `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is
+     * nonempty, it must match the `etag` field of the existing ControlGroup.
+     * Otherwise, `ABORTED` will be returned.
      * 
* * @@ -630,10 +630,10 @@ public boolean hasTagValue() { * * *
-     * Required. The new definition of the TagValue. Only fields `description` and `etag`
-     * fields can be updated by this request. If the `etag` field is nonempty, it
-     * must match the `etag` field of the existing ControlGroup. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagValue. Only fields `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is
+     * nonempty, it must match the `etag` field of the existing ControlGroup.
+     * Otherwise, `ABORTED` will be returned.
      * 
* * @@ -655,10 +655,10 @@ public com.google.cloud.resourcemanager.v3.TagValue getTagValue() { * * *
-     * Required. The new definition of the TagValue. Only fields `description` and `etag`
-     * fields can be updated by this request. If the `etag` field is nonempty, it
-     * must match the `etag` field of the existing ControlGroup. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagValue. Only fields `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is
+     * nonempty, it must match the `etag` field of the existing ControlGroup.
+     * Otherwise, `ABORTED` will be returned.
      * 
* * @@ -682,10 +682,10 @@ public Builder setTagValue(com.google.cloud.resourcemanager.v3.TagValue value) { * * *
-     * Required. The new definition of the TagValue. Only fields `description` and `etag`
-     * fields can be updated by this request. If the `etag` field is nonempty, it
-     * must match the `etag` field of the existing ControlGroup. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagValue. Only fields `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is
+     * nonempty, it must match the `etag` field of the existing ControlGroup.
+     * Otherwise, `ABORTED` will be returned.
      * 
* * @@ -707,10 +707,10 @@ public Builder setTagValue( * * *
-     * Required. The new definition of the TagValue. Only fields `description` and `etag`
-     * fields can be updated by this request. If the `etag` field is nonempty, it
-     * must match the `etag` field of the existing ControlGroup. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagValue. Only fields `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is
+     * nonempty, it must match the `etag` field of the existing ControlGroup.
+     * Otherwise, `ABORTED` will be returned.
      * 
* * @@ -737,10 +737,10 @@ public Builder mergeTagValue(com.google.cloud.resourcemanager.v3.TagValue value) * * *
-     * Required. The new definition of the TagValue. Only fields `description` and `etag`
-     * fields can be updated by this request. If the `etag` field is nonempty, it
-     * must match the `etag` field of the existing ControlGroup. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagValue. Only fields `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is
+     * nonempty, it must match the `etag` field of the existing ControlGroup.
+     * Otherwise, `ABORTED` will be returned.
      * 
* * @@ -761,10 +761,10 @@ public Builder clearTagValue() { * * *
-     * Required. The new definition of the TagValue. Only fields `description` and `etag`
-     * fields can be updated by this request. If the `etag` field is nonempty, it
-     * must match the `etag` field of the existing ControlGroup. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagValue. Only fields `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is
+     * nonempty, it must match the `etag` field of the existing ControlGroup.
+     * Otherwise, `ABORTED` will be returned.
      * 
* * @@ -780,10 +780,10 @@ public com.google.cloud.resourcemanager.v3.TagValue.Builder getTagValueBuilder() * * *
-     * Required. The new definition of the TagValue. Only fields `description` and `etag`
-     * fields can be updated by this request. If the `etag` field is nonempty, it
-     * must match the `etag` field of the existing ControlGroup. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagValue. Only fields `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is
+     * nonempty, it must match the `etag` field of the existing ControlGroup.
+     * Otherwise, `ABORTED` will be returned.
      * 
* * @@ -803,10 +803,10 @@ public com.google.cloud.resourcemanager.v3.TagValueOrBuilder getTagValueOrBuilde * * *
-     * Required. The new definition of the TagValue. Only fields `description` and `etag`
-     * fields can be updated by this request. If the `etag` field is nonempty, it
-     * must match the `etag` field of the existing ControlGroup. Otherwise,
-     * `FAILED_PRECONDITION` will be returned.
+     * Required. The new definition of the TagValue. Only fields `description` and
+     * `etag` fields can be updated by this request. If the `etag` field is
+     * nonempty, it must match the `etag` field of the existing ControlGroup.
+     * Otherwise, `ABORTED` will be returned.
      * 
* * @@ -1027,8 +1027,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
-     * Optional. True to perform validations necessary for updating the resource, but not
-     * actually perform the action.
+     * Optional. True to perform validations necessary for updating the resource,
+     * but not actually perform the action.
      * 
* * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1043,8 +1043,8 @@ public boolean getValidateOnly() { * * *
-     * Optional. True to perform validations necessary for updating the resource, but not
-     * actually perform the action.
+     * Optional. True to perform validations necessary for updating the resource,
+     * but not actually perform the action.
      * 
* * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1063,8 +1063,8 @@ public Builder setValidateOnly(boolean value) { * * *
-     * Optional. True to perform validations necessary for updating the resource, but not
-     * actually perform the action.
+     * Optional. True to perform validations necessary for updating the resource,
+     * but not actually perform the action.
      * 
* * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagValueRequestOrBuilder.java b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagValueRequestOrBuilder.java index bb6a16bce169..9785fabec56f 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagValueRequestOrBuilder.java +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/java/com/google/cloud/resourcemanager/v3/UpdateTagValueRequestOrBuilder.java @@ -27,10 +27,10 @@ public interface UpdateTagValueRequestOrBuilder * * *
-   * Required. The new definition of the TagValue. Only fields `description` and `etag`
-   * fields can be updated by this request. If the `etag` field is nonempty, it
-   * must match the `etag` field of the existing ControlGroup. Otherwise,
-   * `FAILED_PRECONDITION` will be returned.
+   * Required. The new definition of the TagValue. Only fields `description` and
+   * `etag` fields can be updated by this request. If the `etag` field is
+   * nonempty, it must match the `etag` field of the existing ControlGroup.
+   * Otherwise, `ABORTED` will be returned.
    * 
* * @@ -44,10 +44,10 @@ public interface UpdateTagValueRequestOrBuilder * * *
-   * Required. The new definition of the TagValue. Only fields `description` and `etag`
-   * fields can be updated by this request. If the `etag` field is nonempty, it
-   * must match the `etag` field of the existing ControlGroup. Otherwise,
-   * `FAILED_PRECONDITION` will be returned.
+   * Required. The new definition of the TagValue. Only fields `description` and
+   * `etag` fields can be updated by this request. If the `etag` field is
+   * nonempty, it must match the `etag` field of the existing ControlGroup.
+   * Otherwise, `ABORTED` will be returned.
    * 
* * @@ -61,10 +61,10 @@ public interface UpdateTagValueRequestOrBuilder * * *
-   * Required. The new definition of the TagValue. Only fields `description` and `etag`
-   * fields can be updated by this request. If the `etag` field is nonempty, it
-   * must match the `etag` field of the existing ControlGroup. Otherwise,
-   * `FAILED_PRECONDITION` will be returned.
+   * Required. The new definition of the TagValue. Only fields `description` and
+   * `etag` fields can be updated by this request. If the `etag` field is
+   * nonempty, it must match the `etag` field of the existing ControlGroup.
+   * Otherwise, `ABORTED` will be returned.
    * 
* * @@ -115,8 +115,8 @@ public interface UpdateTagValueRequestOrBuilder * * *
-   * Optional. True to perform validations necessary for updating the resource, but not
-   * actually perform the action.
+   * Optional. True to perform validations necessary for updating the resource,
+   * but not actually perform the action.
    * 
* * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/folders.proto b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/folders.proto index 98568a26e65f..036bf4e6daf5 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/folders.proto +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/folders.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -124,7 +124,9 @@ service Folders { // Updates a folder, changing its `display_name`. // Changes to the folder `display_name` will be rejected if they violate // either the `display_name` formatting rules or the naming constraints - // described in the [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. + // described in the + // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + // documentation. // // The folder's `display_name` must start and end with a letter or digit, // may contain letters, digits, spaces, hyphens and underscores and can be @@ -162,9 +164,9 @@ service Folders { // `FolderOperation` message as an aid to stateless clients. // Folder moves will be rejected if they violate either the naming, height, // or fanout constraints described in the - // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. - // The caller must have `resourcemanager.folders.move` permission on the - // folder's current and proposed new parent. + // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + // documentation. The caller must have `resourcemanager.folders.move` + // permission on the folder's current and proposed new parent. rpc MoveFolder(MoveFolderRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/{name=folders/*}:move" @@ -178,11 +180,13 @@ service Folders { } // Requests deletion of a folder. The folder is moved into the - // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] state - // immediately, and is deleted approximately 30 days later. This method may - // only be called on an empty folder, where a folder is empty if it doesn't - // contain any folders or projects in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. - // If called on a folder in [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] + // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] + // state immediately, and is deleted approximately 30 days later. This method + // may only be called on an empty folder, where a folder is empty if it + // doesn't contain any folders or projects in the + // [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. If + // called on a folder in + // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] // state the operation will result in a no-op success. // The caller must have `resourcemanager.folders.delete` permission on the // identified folder. @@ -198,15 +202,18 @@ service Folders { } // Cancels the deletion request for a folder. This method may be called on a - // folder in any state. If the folder is in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] - // state the result will be a no-op success. In order to succeed, the folder's - // parent must be in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In addition, - // reintroducing the folder into the tree must not violate folder naming, - // height, and fanout constraints described in the - // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. - // The caller must have `resourcemanager.folders.undelete` permission on the - // identified folder. - rpc UndeleteFolder(UndeleteFolderRequest) returns (google.longrunning.Operation) { + // folder in any state. If the folder is in the + // [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state the + // result will be a no-op success. In order to succeed, the folder's parent + // must be in the + // [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In + // addition, reintroducing the folder into the tree must not violate folder + // naming, height, and fanout constraints described in the + // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + // documentation. The caller must have `resourcemanager.folders.undelete` + // permission on the identified folder. + rpc UndeleteFolder(UndeleteFolderRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/{name=folders/*}:undelete" body: "*" @@ -223,7 +230,8 @@ service Folders { // be the folder's resource name, for example: "folders/1234". // The caller must have `resourcemanager.folders.getIamPolicy` permission // on the identified folder. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=folders/*}:getIamPolicy" body: "*" @@ -236,7 +244,8 @@ service Folders { // "folders/1234". // The caller must have `resourcemanager.folders.setIamPolicy` permission // on the identified folder. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=folders/*}:setIamPolicy" body: "*" @@ -249,7 +258,8 @@ service Folders { // for example: "folders/1234". // // There are no permissions required for making this API call. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v3/{resource=folders/*}:testIamPermissions" body: "*" @@ -304,17 +314,20 @@ message Folder { State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the folder was created. - google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the folder was last modified. - google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the folder was requested to be deleted. - google.protobuf.Timestamp delete_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A checksum computed by the server based on the current value of the folder - // resource. This may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. + // Output only. A checksum computed by the server based on the current value + // of the folder resource. This may be sent on update and delete requests to + // ensure the client has an up-to-date value before proceeding. string etag = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -332,20 +345,23 @@ message GetFolderRequest { // The ListFolders request message. message ListFoldersRequest { - // Required. The resource name of the organization or folder whose folders are - // being listed. - // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + // Required. The name of the parent resource whose folders are being listed. + // Only children of this parent resource are listed; descendants are not + // listed. + // + // If the parent is a folder, use the value `folders/{folder_id}`. If the + // parent is an organization, use the value `organizations/{org_id}`. + // // Access to this method is controlled by checking the // `resourcemanager.folders.list` permission on the `parent`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; - // Optional. The maximum number of folders to return in the response. - // If unspecified, server picks an appropriate default. + // Optional. The maximum number of folders to return in the response. The + // server can return fewer folders than requested. If unspecified, server + // picks an appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A pagination token returned from a previous call to `ListFolders` @@ -371,12 +387,13 @@ message ListFoldersResponse { // The request message for searching folders. message SearchFoldersRequest { - // Optional. The maximum number of folders to return in the response. - // If unspecified, server picks an appropriate default. + // Optional. The maximum number of folders to return in the response. The + // server can return fewer folders than requested. If unspecified, server + // picks an appropriate default. int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A pagination token returned from a previous call to `SearchFolders` - // that indicates from where search should continue. + // Optional. A pagination token returned from a previous call to + // `SearchFolders` that indicates from where search should continue. string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Search criteria used to select the folders to return. @@ -426,8 +443,8 @@ message SearchFoldersResponse { // The CreateFolder request message. message CreateFolderRequest { - // Required. The folder being created, only the display name and parent will be - // consulted. All other fields will be ignored. + // Required. The folder being created, only the display name and parent will + // be consulted. All other fields will be ignored. Folder folder = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -450,20 +467,19 @@ message CreateFolderMetadata { // [MoveFolder][google.cloud.resourcemanager.v3.Folders.MoveFolder] method to // change the `parent` field. message UpdateFolderRequest { - // Required. The new definition of the Folder. It must include the `name` field, which - // cannot be changed. + // Required. The new definition of the Folder. It must include the `name` + // field, which cannot be changed. Folder folder = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Fields to be updated. // Only the `display_name` can be updated. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // A status object which is used as the `metadata` field for the Operation // returned by UpdateFolder. -message UpdateFolderMetadata { - -} +message UpdateFolderMetadata {} // The MoveFolder request message. message MoveFolderRequest { @@ -476,14 +492,12 @@ message MoveFolderRequest { } ]; - // Required. The resource name of the folder or organization which should be the - // folder's new parent. - // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + // Required. The resource name of the folder or organization which should be + // the folder's new parent. Must be of the form `folders/{folder_id}` or + // `organizations/{org_id}`. string destination_parent = 2 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; } @@ -513,9 +527,7 @@ message DeleteFolderRequest { // A status object which is used as the `metadata` field for the `Operation` // returned by `DeleteFolder`. -message DeleteFolderMetadata { - -} +message DeleteFolderMetadata {} // The UndeleteFolder request message. message UndeleteFolderRequest { @@ -531,6 +543,4 @@ message UndeleteFolderRequest { // A status object which is used as the `metadata` field for the `Operation` // returned by `UndeleteFolder`. -message UndeleteFolderMetadata { - -} +message UndeleteFolderMetadata {} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/organizations.proto b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/organizations.proto index 8f8a6f34a53f..7b0ed95a501f 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/organizations.proto +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/organizations.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -54,7 +54,8 @@ service Organizations { // // Search will only return organizations on which the user has the permission // `resourcemanager.organizations.get` - rpc SearchOrganizations(SearchOrganizationsRequest) returns (SearchOrganizationsResponse) { + rpc SearchOrganizations(SearchOrganizationsRequest) + returns (SearchOrganizationsResponse) { option (google.api.http) = { get: "/v3/organizations:search" }; @@ -67,7 +68,8 @@ service Organizations { // // Authorization requires the IAM permission // `resourcemanager.organizations.getIamPolicy` on the specified organization. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=organizations/*}:getIamPolicy" body: "*" @@ -81,7 +83,8 @@ service Organizations { // // Authorization requires the IAM permission // `resourcemanager.organizations.setIamPolicy` on the specified organization. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=organizations/*}:setIamPolicy" body: "*" @@ -94,7 +97,8 @@ service Organizations { // for example: "organizations/123". // // There are no permissions required for making this API call. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v3/{resource=organizations/*}:testIamPermissions" body: "*" @@ -150,26 +154,29 @@ message Organization { State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the Organization was created. - google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the Organization was last modified. - google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the Organization was requested for deletion. - google.protobuf.Timestamp delete_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A checksum computed by the server based on the current value of the - // Organization resource. This may be sent on update and delete requests to - // ensure the client has an up-to-date value before proceeding. + // Output only. A checksum computed by the server based on the current value + // of the Organization resource. This may be sent on update and delete + // requests to ensure the client has an up-to-date value before proceeding. string etag = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The request sent to the `GetOrganization` method. The `name` field is // required. `organization_id` is no longer accepted. message GetOrganizationRequest { - // Required. The resource name of the Organization to fetch. This is the organization's - // relative path in the API, formatted as "organizations/[organizationId]". - // For example, "organizations/1234". + // Required. The resource name of the Organization to fetch. This is the + // organization's relative path in the API, formatted as + // "organizations/[organizationId]". For example, "organizations/1234". string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -181,15 +188,17 @@ message GetOrganizationRequest { // The request sent to the `SearchOrganizations` method. message SearchOrganizationsRequest { // Optional. The maximum number of organizations to return in the response. - // If unspecified, server picks an appropriate default. + // The server can return fewer organizations than requested. If unspecified, + // server picks an appropriate default. int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A pagination token returned from a previous call to `SearchOrganizations` - // that indicates from where listing should continue. + // Optional. A pagination token returned from a previous call to + // `SearchOrganizations` that indicates from where listing should continue. string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. An optional query string used to filter the Organizations to return in - // the response. Query rules are case-insensitive. + // Optional. An optional query string used to filter the Organizations to + // return in the response. Query rules are case-insensitive. + // // // ``` // | Field | Description | @@ -225,12 +234,8 @@ message SearchOrganizationsResponse { // A status object which is used as the `metadata` field for the operation // returned by DeleteOrganization. -message DeleteOrganizationMetadata { - -} +message DeleteOrganizationMetadata {} // A status object which is used as the `metadata` field for the Operation // returned by UndeleteOrganization. -message UndeleteOrganizationMetadata { - -} +message UndeleteOrganizationMetadata {} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/projects.proto b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/projects.proto index 693e4609e96a..840d538c261a 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/projects.proto +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/projects.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -88,7 +88,8 @@ service Projects { // seconds, but can sometimes take much longer. The tracking `Operation` is // automatically deleted after a few hours, so there is no need to call // `DeleteOperation`. - rpc CreateProject(CreateProjectRequest) returns (google.longrunning.Operation) { + rpc CreateProject(CreateProjectRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/projects" body: "project" @@ -106,7 +107,8 @@ service Projects { // // The caller must have `resourcemanager.projects.update` permission for this // project. - rpc UpdateProject(UpdateProjectRequest) returns (google.longrunning.Operation) { + rpc UpdateProject(UpdateProjectRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v3/{project.name=projects/*}" body: "project" @@ -126,9 +128,12 @@ service Projects { // Upon success, the `Operation.response` field will be populated with the // moved project. // - // The caller must have `resourcemanager.projects.update` permission on the - // project and have `resourcemanager.projects.move` permission on the - // project's current and proposed new parent. + // The caller must have `resourcemanager.projects.move` permission on the + // project, on the project's current and proposed new parent. + // + // If project has no current parent, or it currently does not have an + // associated organization resource, you will also need the + // `resourcemanager.projects.setIamPolicy` permission in the project. // // rpc MoveProject(MoveProjectRequest) returns (google.longrunning.Operation) { @@ -151,7 +156,8 @@ service Projects { // // This method changes the Project's lifecycle state from // [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] - // to [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. + // to + // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. // The deletion starts at an unspecified time, // at which point the Project is no longer accessible. // @@ -175,7 +181,8 @@ service Projects { // // The caller must have `resourcemanager.projects.delete` permissions for this // project. - rpc DeleteProject(DeleteProjectRequest) returns (google.longrunning.Operation) { + rpc DeleteProject(DeleteProjectRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v3/{name=projects/*}" }; @@ -195,7 +202,8 @@ service Projects { // // The caller must have `resourcemanager.projects.undelete` permission for // this project. - rpc UndeleteProject(UndeleteProjectRequest) returns (google.longrunning.Operation) { + rpc UndeleteProject(UndeleteProjectRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/{name=projects/*}:undelete" body: "*" @@ -207,9 +215,11 @@ service Projects { }; } - // Returns the IAM access control policy for the specified project. + // Returns the IAM access control policy for the specified project, in the + // format `projects/{ProjectIdOrNumber}` e.g. projects/123. // Permission is denied if the policy or the resource do not exist. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=projects/*}:getIamPolicy" body: "*" @@ -217,7 +227,8 @@ service Projects { option (google.api.method_signature) = "resource"; } - // Sets the IAM access control policy for the specified project. + // Sets the IAM access control policy for the specified project, in the + // format `projects/{ProjectIdOrNumber}` e.g. projects/123. // // CAUTION: This method will replace the existing policy, and cannot be used // to append additional IAM settings. @@ -249,19 +260,16 @@ service Projects { // `setIamPolicy()`; // they must be sent only using the Cloud Platform Console. // - // + Membership changes that leave the project without any owners that have - // accepted the Terms of Service (ToS) will be rejected. - // // + If the project is not part of an organization, there must be at least // one owner who has accepted the Terms of Service (ToS) agreement in the // policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner // from the policy will fail. This restriction also applies to legacy // projects that no longer have owners who have accepted the ToS. Edits to // IAM policies will be rejected until the lack of a ToS-accepting owner is - // rectified. - // - // + Calling this method requires enabling the App Engine Admin API. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + // rectified. If the project is part of an organization, you can remove all + // owners, potentially making the organization inaccessible. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=projects/*}:setIamPolicy" body: "*" @@ -269,8 +277,10 @@ service Projects { option (google.api.method_signature) = "resource, policy"; } - // Returns permissions that a caller has on the specified project. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + // Returns permissions that a caller has on the specified project, in the + // format `projects/{ProjectIdOrNumber}` e.g. projects/123.. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v3/{resource=projects/*}:testIamPermissions" body: "*" @@ -307,8 +317,8 @@ message Project { DELETE_REQUESTED = 2; } - // Output only. The unique resource name of the project. It is an int64 generated number - // prefixed by "projects/". + // Output only. The unique resource name of the project. It is an int64 + // generated number prefixed by "projects/". // // Example: `projects/415104041262` string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -337,17 +347,20 @@ message Project { string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; // Output only. Creation time. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The most recent time this resource was modified. - google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time at which this resource was requested for deletion. - google.protobuf.Timestamp delete_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A checksum computed by the server based on the current value of the Project - // resource. This may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. + // Output only. A checksum computed by the server based on the current value + // of the Project resource. This may be sent on update and delete requests to + // ensure the client has an up-to-date value before proceeding. string etag = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The labels associated with this project. @@ -358,7 +371,7 @@ message Project { // Label values must be between 0 and 63 characters long and must conform // to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. // - // No more than 256 labels can be associated with a given resource. + // No more than 64 labels can be associated with a given resource. // // Clients should store labels in a representation such as JSON that does not // depend on specific characters being disallowed. @@ -384,20 +397,20 @@ message GetProjectRequest { // [ListProjects][google.cloud.resourcemanager.v3.Projects.ListProjects] // method. message ListProjectsRequest { - // Required. The name of the parent resource to list projects under. + // Required. The name of the parent resource whose projects are being listed. + // Only children of this parent resource are listed; descendants are not + // listed. // - // For example, setting this field to 'folders/1234' would list all projects - // directly under that folder. + // If the parent is a folder, use the value `folders/{folder_id}`. If the + // parent is an organization, use the value `organizations/{org_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; - // Optional. A pagination token returned from a previous call to [ListProjects] - // [google.cloud.resourcemanager.v3.Projects.ListProjects] - // that indicates from where listing should continue. + // Optional. A pagination token returned from a previous call to + // [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that + // indicates from where listing should continue. string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of projects to return in the response. @@ -405,8 +418,8 @@ message ListProjectsRequest { // If unspecified, server picks an appropriate default. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be - // returned. Normally only `ACTIVE` projects are returned. + // Optional. Indicate that projects in the `DELETE_REQUESTED` state should + // also be returned. Normally only `ACTIVE` projects are returned. bool show_deleted = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -444,22 +457,22 @@ message ListProjectsResponse { message SearchProjectsRequest { // Optional. A query string for searching for projects that the caller has // `resourcemanager.projects.get` permission to. If multiple fields are - // included in the query, the it will return results that match any of the + // included in the query, then it will return results that match any of the // fields. Some eligible fields are: // // ``` // | Field | Description | // |-------------------------|----------------------------------------------| // | displayName, name | Filters by displayName. | - // | parent | Project's parent. (for example: folders/123, - // organizations/*) Prefer parent field over parent.type and parent.id. | - // | parent.type | Parent's type: `folder` or `organization`. | - // | parent.id | Parent's id number (for example: 123) | - // | id, projectId | Filters by projectId. | - // | state, lifecycleState | Filters by state. | - // | labels | Filters by label name or value. | - // | labels. (where *key* is the name of a label) | Filters by label - // name. | + // | parent | Project's parent (for example: folders/123, + // organizations/*). Prefer parent field over parent.type and parent.id.| | + // parent.type | Parent's type: `folder` or `organization`. | | + // parent.id | Parent's id number (for example: 123) | | + // id, projectId | Filters by projectId. | | + // state, lifecycleState | Filters by state. | | + // labels | Filters by label name or value. | | + // labels.\ (where *key* is the name of a label) | Filters by label + // name.| // ``` // // Search expressions are case insensitive. @@ -475,17 +488,17 @@ message SearchProjectsRequest { // | NAME:howl | Equivalent to above. | // | labels.color:* | The project has the label `color`. | // | labels.color:red | The project's label `color` has the value `red`. | - // | labels.color:red labels.size:big | The project's label `color` has - // the value `red` and its label `size` has the value `big`. | + // | labels.color:red labels.size:big | The project's label `color` has the + // value `red` or its label `size` has the value `big`. | // ``` // // If no query is specified, the call will return projects for which the user // has the `resourcemanager.projects.get` permission. string query = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A pagination token returned from a previous call to [ListProjects] - // [google.cloud.resourcemanager.v3.Projects.ListProjects] - // that indicates from where listing should continue. + // Optional. A pagination token returned from a previous call to + // [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that + // indicates from where listing should continue. string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of projects to return in the response. @@ -531,7 +544,7 @@ message CreateProjectRequest { // // If the `parent` field is set, the `resourcemanager.projects.create` // permission is checked on the parent resource. If no parent is set and - // the authorization credentials belong to an Organziation, the parent + // the authorization credentials belong to an Organization, the parent // will be set to that Organization. Project project = 1 [(google.api.field_behavior) = REQUIRED]; } @@ -564,14 +577,13 @@ message UpdateProjectRequest { Project project = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. An update mask to selectively update fields. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; } // A status object which is used as the `metadata` field for the Operation // returned by UpdateProject. -message UpdateProjectMetadata { - -} +message UpdateProjectMetadata {} // The request sent to // [MoveProject][google.cloud.resourcemanager.v3.Projects.MoveProject] @@ -588,17 +600,13 @@ message MoveProjectRequest { // Required. The new parent to move the Project under. string destination_parent = 2 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; } // A status object which is used as the `metadata` field for the Operation // returned by MoveProject. -message MoveProjectMetadata { - -} +message MoveProjectMetadata {} // [DeleteProject][google.cloud.resourcemanager.v3.Projects.DeleteProject] // method. @@ -614,9 +622,7 @@ message DeleteProjectRequest { // A status object which is used as the `metadata` field for the Operation // returned by `DeleteProject`. -message DeleteProjectMetadata { - -} +message DeleteProjectMetadata {} // The request sent to the [UndeleteProject] // [google.cloud.resourcemanager.v3.Projects.UndeleteProject] @@ -635,6 +641,4 @@ message UndeleteProjectRequest { // A status object which is used as the `metadata` field for the Operation // returned by `UndeleteProject`. -message UndeleteProjectMetadata { - -} +message UndeleteProjectMetadata {} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_bindings.proto b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_bindings.proto index a9dbac3b06f2..462757071583 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_bindings.proto +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_bindings.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; option csharp_namespace = "Google.Cloud.ResourceManager.V3"; option go_package = "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb;resourcemanagerpb"; @@ -31,28 +32,29 @@ option php_namespace = "Google\\Cloud\\ResourceManager\\V3"; option ruby_package = "Google::Cloud::ResourceManager::V3"; // Allow users to create and manage TagBindings between TagValues and -// different cloud resources throughout the GCP resource hierarchy. +// different Google Cloud resources throughout the GCP resource hierarchy. service TagBindings { option (google.api.default_host) = "cloudresourcemanager.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform," "https://www.googleapis.com/auth/cloud-platform.read-only"; - // Lists the TagBindings for the given cloud resource, as specified with - // `parent`. + // Lists the TagBindings for the given Google Cloud resource, as specified + // with `parent`. // // NOTE: The `parent` field is expected to be a full resource name: // https://cloud.google.com/apis/design/resource_names#full_resource_name - rpc ListTagBindings(ListTagBindingsRequest) returns (ListTagBindingsResponse) { + rpc ListTagBindings(ListTagBindingsRequest) + returns (ListTagBindingsResponse) { option (google.api.http) = { get: "/v3/tagBindings" }; option (google.api.method_signature) = "parent"; } - // Creates a TagBinding between a TagValue and a cloud resource - // (currently project, folder, or organization). - rpc CreateTagBinding(CreateTagBindingRequest) returns (google.longrunning.Operation) { + // Creates a TagBinding between a TagValue and a Google Cloud resource. + rpc CreateTagBinding(CreateTagBindingRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/tagBindings" body: "tag_binding" @@ -65,7 +67,8 @@ service TagBindings { } // Deletes a TagBinding. - rpc DeleteTagBinding(DeleteTagBindingRequest) returns (google.longrunning.Operation) { + rpc DeleteTagBinding(DeleteTagBindingRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v3/{name=tagBindings/**}" }; @@ -75,12 +78,21 @@ service TagBindings { metadata_type: "DeleteTagBindingMetadata" }; } + + // Return a list of effective tags for the given Google Cloud resource, as + // specified in `parent`. + rpc ListEffectiveTags(ListEffectiveTagsRequest) + returns (ListEffectiveTagsResponse) { + option (google.api.http) = { + get: "/v3/effectiveTags" + }; + option (google.api.method_signature) = "parent"; + } } // A TagBinding represents a connection between a TagValue and a cloud -// resource (currently project, folder, or organization). Once a TagBinding is -// created, the TagValue is applied to all the descendants of the cloud -// resource. +// resource Once a TagBinding is created, the TagValue is applied to all the +// descendants of the Google Cloud resource. message TagBinding { option (google.api.resource) = { type: "cloudresourcemanager.googleapis.com/TagBinding" @@ -99,27 +111,32 @@ message TagBinding { // The TagValue of the TagBinding. // Must be of the form `tagValues/456`. string tag_value = 3; + + // The namespaced name for the TagValue of the TagBinding. + // Must be in the format + // `{parent_id}/{tag_key_short_name}/{short_name}`. + // + // For methods that support TagValue namespaced name, only one of + // tag_value_namespaced_name or tag_value may be filled. Requests with both + // fields will be rejected. + string tag_value_namespaced_name = 4; } // Runtime operation information for creating a TagValue. -message CreateTagBindingMetadata { - -} +message CreateTagBindingMetadata {} // The request message to create a TagBinding. message CreateTagBindingRequest { // Required. The TagBinding to be created. TagBinding tag_binding = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Set to true to perform the validations necessary for creating the resource, - // but not actually perform the action. + // Optional. Set to true to perform the validations necessary for creating the + // resource, but not actually perform the action. bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; } // Runtime operation information for deleting a TagBinding. -message DeleteTagBindingMetadata { - -} +message DeleteTagBindingMetadata {} // The request message to delete a TagBinding. message DeleteTagBindingRequest { @@ -136,30 +153,27 @@ message DeleteTagBindingRequest { // The request message to list all TagBindings for a parent. message ListTagBindingsRequest { - // Required. The full resource name of a resource for which you want to list existing - // TagBindings. - // E.g. "//cloudresourcemanager.googleapis.com/projects/123" + // Required. The full resource name of a resource for which you want to list + // existing TagBindings. E.g. + // "//cloudresourcemanager.googleapis.com/projects/123" string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; - // Optional. The maximum number of TagBindings to return in the response. The server - // allows a maximum of 300 TagBindings to return. If unspecified, the server - // will use 100 as the default. + // Optional. The maximum number of TagBindings to return in the response. The + // server allows a maximum of 300 TagBindings to return. If unspecified, the + // server will use 100 as the default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A pagination token returned from a previous call to `ListTagBindings` - // that indicates where this listing should continue from. + // Optional. A pagination token returned from a previous call to + // `ListTagBindings` that indicates where this listing should continue from. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // The ListTagBindings response. message ListTagBindingsResponse { - // A possibly paginated list of TagBindings for the specified TagValue or - // resource. + // A possibly paginated list of TagBindings for the specified resource. repeated TagBinding tag_bindings = 1; // Pagination token. @@ -175,3 +189,77 @@ message ListTagBindingsResponse { // Pagination tokens have a limited lifetime. string next_page_token = 2; } + +// The request message to ListEffectiveTags +message ListEffectiveTagsRequest { + // Required. The full resource name of a resource for which you want to list + // the effective tags. E.g. + // "//cloudresourcemanager.googleapis.com/projects/123" + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of effective tags to return in the response. + // The server allows a maximum of 300 effective tags to return in a single + // page. If unspecified, the server will use 100 as the default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous call to + // `ListEffectiveTags` that indicates from where this listing should continue. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response of ListEffectiveTags. +message ListEffectiveTagsResponse { + // A possibly paginated list of effective tags for the specified resource. + repeated EffectiveTag effective_tags = 1; + + // Pagination token. + // + // If the result set is too large to fit in a single response, this token + // is returned. It encodes the position of the current result cursor. + // Feeding this value into a new list request with the `page_token` parameter + // gives the next page of the results. + // + // When `next_page_token` is not filled in, there is no next page and + // the list returned is the last page in the result set. + // + // Pagination tokens have a limited lifetime. + string next_page_token = 2; +} + +// An EffectiveTag represents a tag that applies to a resource during policy +// evaluation. Tags can be either directly bound to a resource or inherited from +// its ancestor. EffectiveTag contains the name and +// namespaced_name of the tag value and tag key, with additional fields of +// `inherited` to indicate the inheritance status of the effective tag. +message EffectiveTag { + // Resource name for TagValue in the format `tagValues/456`. + string tag_value = 1 [(google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/TagValue" + }]; + + // Namespaced name of the TagValue. Now only supported in the format + // `{organization_id}/{tag_key_short_name}/{tag_value_short_name}`. + // Other formats will be supported when we add non-org parented tags. + string namespaced_tag_value = 2; + + // The name of the TagKey, in the format `tagKeys/{id}`, such as + // `tagKeys/123`. + string tag_key = 3 [(google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/TagKey" + }]; + + // The namespaced_name of the TagKey. Now only supported in the format of + // `{organization_id}/{tag_key_short_name}`. Other formats will be + // supported when we add non-org parented tags. + string namespaced_tag_key = 4; + + // The parent name of the tag key. + // Must be in the format `organizations/{organization_id}`. + string tag_key_parent_name = 6; + + // Indicates the inheritance status of a tag value + // attached to the given resource. If the tag value is inherited from one of + // the resource's ancestors, inherited will be true. If false, then the tag + // value is directly attached to the resource, inherited will be false. + bool inherited = 5; +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_holds.proto b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_holds.proto new file mode 100644 index 000000000000..15c446913f26 --- /dev/null +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_holds.proto @@ -0,0 +1,216 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.resourcemanager.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ResourceManager.V3"; +option go_package = "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb;resourcemanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "TagHoldsProto"; +option java_package = "com.google.cloud.resourcemanager.v3"; +option php_namespace = "Google\\Cloud\\ResourceManager\\V3"; +option ruby_package = "Google::Cloud::ResourceManager::V3"; + +// Allow users to create and manage TagHolds for TagValues. TagHolds represent +// the use of a Tag Value that is not captured by TagBindings but +// should still block TagValue deletion (such as a reference in a policy +// condition). This service provides isolated failure domains by cloud location +// so that TagHolds can be managed in the same location as their usage. +service TagHolds { + option (google.api.default_host) = "cloudresourcemanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same + // resource and origin exists under the same TagValue. + rpc CreateTagHold(CreateTagHoldRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=tagValues/*}/tagHolds" + body: "tag_hold" + }; + option (google.api.method_signature) = "parent,tag_hold"; + option (google.longrunning.operation_info) = { + response_type: "TagHold" + metadata_type: "CreateTagHoldMetadata" + }; + } + + // Deletes a TagHold. + rpc DeleteTagHold(DeleteTagHoldRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v3/{name=tagValues/*/tagHolds/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteTagHoldMetadata" + }; + } + + // Lists TagHolds under a TagValue. + rpc ListTagHolds(ListTagHoldsRequest) returns (ListTagHoldsResponse) { + option (google.api.http) = { + get: "/v3/{parent=tagValues/*}/tagHolds" + }; + option (google.api.method_signature) = "parent"; + } +} + +// A TagHold represents the use of a TagValue that is not captured by +// TagBindings. If a TagValue has any TagHolds, deletion will be blocked. +// This resource is intended to be created in the same cloud location as the +// `holder`. +message TagHold { + option (google.api.resource) = { + type: "cloudresourcemanager.googleapis.com/TagHold" + pattern: "tagValues/{tag_value}/tagHolds/{tag_hold}" + }; + + // Output only. The resource name of a TagHold. This is a String of the form: + // `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}` + // (e.g. `tagValues/123/tagHolds/456`). This resource name is generated by + // the server. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The name of the resource where the TagValue is being used. Must + // be less than 200 characters. E.g. + // `//compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group` + string holder = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional string representing the origin of this request. This + // field should include human-understandable information to distinguish + // origins from each other. Must be less than 200 characters. E.g. + // `migs-35678234` + string origin = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A URL where an end user can learn more about removing this hold. + // E.g. + // `https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing` + string help_link = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time this TagHold was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message to create a TagHold. +message CreateTagHoldRequest { + // Required. The resource name of the TagHold's parent TagValue. Must be of + // the form: `tagValues/{tag-value-id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudresourcemanager.googleapis.com/TagHold" + } + ]; + + // Required. The TagHold to be created. + TagHold tag_hold = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Set to true to perform the validations necessary for creating the + // resource, but not actually perform the action. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Runtime operation information for creating a TagHold. +// (-- The metadata is currently empty, but may include information in the +// future. --) +message CreateTagHoldMetadata {} + +// The request message to delete a TagHold. +message DeleteTagHoldRequest { + // Required. The resource name of the TagHold to delete. Must be of the form: + // `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/TagHold" + } + ]; + + // Optional. Set to true to perform the validations necessary for deleting the + // resource, but not actually perform the action. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Runtime operation information for deleting a TagHold. +// (-- The metadata is currently empty, but may include information in the +// future. --) +message DeleteTagHoldMetadata {} + +// The request message for listing the TagHolds under a TagValue. +message ListTagHoldsRequest { + // Required. The resource name of the parent TagValue. Must be of the form: + // `tagValues/{tag-value-id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudresourcemanager.googleapis.com/TagHold" + } + ]; + + // Optional. The maximum number of TagHolds to return in the response. The + // server allows a maximum of 300 TagHolds to return. If unspecified, the + // server will use 100 as the default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous call to + // `ListTagHolds` that indicates where this listing should continue from. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Criteria used to select a subset of TagHolds parented by the + // TagValue to return. This field follows the syntax defined by aip.dev/160; + // the `holder` and `origin` fields are supported for filtering. Currently + // only `AND` syntax is supported. Some example queries are: + // + // * `holder = + // //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group` + // * `origin = 35678234` + // * `holder = + // //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group + // AND origin = 35678234` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The ListTagHolds response. +message ListTagHoldsResponse { + // A possibly paginated list of TagHolds. + repeated TagHold tag_holds = 1; + + // Pagination token. + // + // If the result set is too large to fit in a single response, this token + // is returned. It encodes the position of the current result cursor. + // Feeding this value into a new list request with the `page_token` parameter + // gives the next page of the results. + // + // When `next_page_token` is not filled in, there is no next page and + // the list returned is the last page in the result set. + // + // Pagination tokens have a limited lifetime. + string next_page_token = 2; +} diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_keys.proto b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_keys.proto index 3d0500141b13..46c575477769 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_keys.proto +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_keys.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -58,10 +58,20 @@ service TagKeys { option (google.api.method_signature) = "name"; } + // Retrieves a TagKey by its namespaced name. + // This method will return `PERMISSION_DENIED` if the key does not exist + // or the user does not have permission to view it. + rpc GetNamespacedTagKey(GetNamespacedTagKeyRequest) returns (TagKey) { + option (google.api.http) = { + get: "/v3/tagKeys/namespaced" + }; + option (google.api.method_signature) = "name"; + } + // Creates a new TagKey. If another request with the same parameters is // sent while the original request is in process, the second request - // will receive an error. A maximum of 300 TagKeys can exist under a parent at - // any given time. + // will receive an error. A maximum of 1000 TagKeys can exist under a parent + // at any given time. rpc CreateTagKey(CreateTagKeyRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/tagKeys" @@ -106,7 +116,8 @@ service TagKeys { // The caller must have // `cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy` permission on // the specified TagKey. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=tagKeys/*}:getIamPolicy" body: "*" @@ -119,7 +130,8 @@ service TagKeys { // For example, "tagKeys/1234". // The caller must have `resourcemanager.tagKeys.setIamPolicy` permission // on the identified tagValue. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=tagKeys/*}:setIamPolicy" body: "*" @@ -132,7 +144,8 @@ service TagKeys { // For example, "tagKeys/1234". // // There are no permissions required for making this API call. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v3/{resource=tagKeys/*}:testIamPermissions" body: "*" @@ -158,8 +171,8 @@ message TagKey { // Must be of the form `organizations/{org_id}`. string parent = 2 [(google.api.field_behavior) = IMMUTABLE]; - // Required. Immutable. The user friendly name for a TagKey. The short name should be - // unique for TagKeys within the same tag namespace. + // Required. Immutable. The user friendly name for a TagKey. The short name + // should be unique for TagKeys within the same tag namespace. // // The short name must be 1-63 characters, beginning and ending with // an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), @@ -175,20 +188,40 @@ message TagKey { (google.api.field_behavior) = IMMUTABLE ]; - // Optional. User-assigned description of the TagKey. Must not exceed 256 characters. + // Optional. User-assigned description of the TagKey. Must not exceed 256 + // characters. // // Read-write. string description = 5 [(google.api.field_behavior) = OPTIONAL]; // Output only. Creation time. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Update time. - google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Entity tag which users can pass to prevent race conditions. This field is - // always set in server responses. See UpdateTagKeyRequest for details. + // Optional. Entity tag which users can pass to prevent race conditions. This + // field is always set in server responses. See UpdateTagKeyRequest for + // details. string etag = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A purpose denotes that this Tag is intended for use in policies + // of a specific policy engine, and will involve that policy engine in + // management operations involving this Tag. A purpose does not grant a + // policy engine exclusive rights to the Tag, and it may be referenced by + // other policy engines. + // + // A purpose cannot be changed once set. + Purpose purpose = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Purpose data corresponds to the policy system that the tag is + // intended for. See documentation for `Purpose` for formatting of this field. + // + // Purpose data cannot be changed once set. + map purpose_data = 12 + [(google.api.field_behavior) = OPTIONAL]; } // The request message for listing all TagKeys under a parent resource. @@ -197,14 +230,12 @@ message ListTagKeysRequest { // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; - // Optional. The maximum number of TagKeys to return in the response. The server allows - // a maximum of 300 TagKeys to return. If unspecified, the server will use 100 - // as the default. + // Optional. The maximum number of TagKeys to return in the response. The + // server allows a maximum of 300 TagKeys to return. If unspecified, the + // server will use 100 as the default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A pagination token returned from a previous call to `ListTagKey` @@ -234,28 +265,40 @@ message GetTagKeyRequest { ]; } +// The request message for getting a TagKey by its namespaced name. +message GetNamespacedTagKeyRequest { + // Required. A namespaced tag key name in the format + // `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name + // "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short + // name "bar" under the project `r2-d2`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/TagKey" + } + ]; +} + // The request message for creating a TagKey. message CreateTagKeyRequest { - // Required. The TagKey to be created. Only fields `short_name`, `description`, - // and `parent` are considered during the creation request. + // Required. The TagKey to be created. Only fields `short_name`, + // `description`, and `parent` are considered during the creation request. TagKey tag_key = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Set to true to perform validations necessary for creating the resource, but - // not actually perform the action. + // Optional. Set to true to perform validations necessary for creating the + // resource, but not actually perform the action. bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; } // Runtime operation information for creating a TagKey. -message CreateTagKeyMetadata { - -} +message CreateTagKeyMetadata {} // The request message for updating a TagKey. message UpdateTagKeyRequest { - // Required. The new definition of the TagKey. Only the `description` and `etag` fields - // can be updated by this request. If the `etag` field is not empty, it - // must match the `etag` field of the existing tag key. Otherwise, - // `FAILED_PRECONDITION` will be returned. + // Required. The new definition of the TagKey. Only the `description` and + // `etag` fields can be updated by this request. If the `etag` field is not + // empty, it must match the `etag` field of the existing tag key. Otherwise, + // `ABORTED` will be returned. TagKey tag_key = 1 [(google.api.field_behavior) = REQUIRED]; // Fields to be updated. The mask may only contain `description` or @@ -269,15 +312,13 @@ message UpdateTagKeyRequest { } // Runtime operation information for updating a TagKey. -message UpdateTagKeyMetadata { - -} +message UpdateTagKeyMetadata {} // The request message for deleting a TagKey. message DeleteTagKeyRequest { - // Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`. - // The TagKey cannot be a parent of any existing TagValues or it will not be - // deleted successfully. + // Required. The resource name of a TagKey to be deleted in the format + // `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or + // it will not be deleted successfully. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -285,16 +326,35 @@ message DeleteTagKeyRequest { } ]; - // Optional. Set as true to perform validations necessary for deletion, but not actually - // perform the action. + // Optional. Set as true to perform validations necessary for deletion, but + // not actually perform the action. bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The etag known to the client for the expected state of the TagKey. This is - // to be used for optimistic concurrency. + // Optional. The etag known to the client for the expected state of the + // TagKey. This is to be used for optimistic concurrency. string etag = 3 [(google.api.field_behavior) = OPTIONAL]; } // Runtime operation information for deleting a TagKey. -message DeleteTagKeyMetadata { +message DeleteTagKeyMetadata {} +// +// A purpose for each policy engine requiring such an integration. A single +// policy engine may have multiple purposes defined, however a TagKey may only +// specify a single purpose. +enum Purpose { + // Unspecified purpose. + PURPOSE_UNSPECIFIED = 0; + + // Purpose for Compute Engine firewalls. + // A corresponding purpose_data should be set for the network the tag is + // intended for. The key should be 'network' and the value should be in + // either of these two formats: + // -https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id} + // -{project_id}/{network_name} + // + // Examples: + // -https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600 + // -fail-closed-load-testing/load-testing-network + GCE_FIREWALL = 1; } diff --git a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_values.proto b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_values.proto index 7cace43097ff..f54d63556b98 100644 --- a/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_values.proto +++ b/java-resourcemanager/proto-google-cloud-resourcemanager-v3/src/main/proto/google/cloud/resourcemanager/v3/tag_values.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -49,9 +49,8 @@ service TagValues { option (google.api.method_signature) = "parent"; } - // Retrieves TagValue. If the TagValue or namespaced name does not exist, or - // if the user does not have permission to view it, this method will return - // `PERMISSION_DENIED`. + // Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the + // value does not exist or the user does not have permission to view it. rpc GetTagValue(GetTagValueRequest) returns (TagValue) { option (google.api.http) = { get: "/v3/{name=tagValues/*}" @@ -59,11 +58,22 @@ service TagValues { option (google.api.method_signature) = "name"; } + // Retrieves a TagValue by its namespaced name. + // This method will return `PERMISSION_DENIED` if the value does not exist + // or the user does not have permission to view it. + rpc GetNamespacedTagValue(GetNamespacedTagValueRequest) returns (TagValue) { + option (google.api.http) = { + get: "/v3/tagValues/namespaced" + }; + option (google.api.method_signature) = "name"; + } + // Creates a TagValue as a child of the specified TagKey. If a another // request with the same parameters is sent while the original request is in - // process the second request will receive an error. A maximum of 300 + // process the second request will receive an error. A maximum of 1000 // TagValues can exist under a TagKey at any given time. - rpc CreateTagValue(CreateTagValueRequest) returns (google.longrunning.Operation) { + rpc CreateTagValue(CreateTagValueRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/tagValues" body: "tag_value" @@ -76,7 +86,8 @@ service TagValues { } // Updates the attributes of the TagValue resource. - rpc UpdateTagValue(UpdateTagValueRequest) returns (google.longrunning.Operation) { + rpc UpdateTagValue(UpdateTagValueRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v3/{tag_value.name=tagValues/*}" body: "tag_value" @@ -90,7 +101,8 @@ service TagValues { // Deletes a TagValue. The TagValue cannot have any bindings when it is // deleted. - rpc DeleteTagValue(DeleteTagValueRequest) returns (google.longrunning.Operation) { + rpc DeleteTagValue(DeleteTagValueRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v3/{name=tagValues/*}" }; @@ -107,7 +119,8 @@ service TagValues { // The caller must have the // `cloudresourcemanager.googleapis.com/tagValues.getIamPolicy` permission on // the identified TagValue to get the access control policy. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=tagValues/*}:getIamPolicy" body: "*" @@ -120,7 +133,8 @@ service TagValues { // For example: `tagValues/1234`. // The caller must have `resourcemanager.tagValues.setIamPolicy` permission // on the identified tagValue. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=tagValues/*}:setIamPolicy" body: "*" @@ -133,7 +147,8 @@ service TagValues { // `tagValues/1234`. // // There are no permissions required for making this API call. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v3/{resource=tagValues/*}:testIamPermissions" body: "*" @@ -158,8 +173,8 @@ message TagValue { // Must be of the form `tagKeys/{tag_key_id}`. string parent = 2 [(google.api.field_behavior) = IMMUTABLE]; - // Required. Immutable. User-assigned short name for TagValue. The short name should be - // unique for TagValues within the same parent TagKey. + // Required. Immutable. User-assigned short name for TagValue. The short name + // should be unique for TagValues within the same parent TagKey. // // The short name must be 63 characters or less, beginning and ending with // an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), @@ -169,8 +184,10 @@ message TagValue { (google.api.field_behavior) = IMMUTABLE ]; - // Output only. Namespaced name of the TagValue. Must be in the format - // `{organization_id}/{tag_key_short_name}/{short_name}`. + // Output only. Namespaced name of the TagValue. Now only supported in the + // format + // `{organization_id}/{tag_key_short_name}/{short_name}`. Other + // formats will be supported when we add non-org parented tags. string namespaced_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. User-assigned description of the TagValue. @@ -180,34 +197,36 @@ message TagValue { string description = 5 [(google.api.field_behavior) = OPTIONAL]; // Output only. Creation time. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Update time. - google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Entity tag which users can pass to prevent race conditions. This field is - // always set in server responses. See UpdateTagValueRequest for details. + // Optional. Entity tag which users can pass to prevent race conditions. This + // field is always set in server responses. See UpdateTagValueRequest for + // details. string etag = 8 [(google.api.field_behavior) = OPTIONAL]; } // The request message for listing TagValues for the specified TagKey. +// Resource name for TagKey, parent of the TagValues to be listed, +// in the format `tagKeys/123`. message ListTagValuesRequest { - // Required. Resource name for TagKey, parent of the TagValues to be listed, - // in the format `tagKeys/123`. + // Required. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; - // Optional. The maximum number of TagValues to return in the response. The server - // allows a maximum of 300 TagValues to return. If unspecified, the server - // will use 100 as the default. + // Optional. The maximum number of TagValues to return in the response. The + // server allows a maximum of 300 TagValues to return. If unspecified, the + // server will use 100 as the default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A pagination token returned from a previous call to `ListTagValues` - // that indicates where this listing should continue from. + // Optional. A pagination token returned from a previous call to + // `ListTagValues` that indicates where this listing should continue from. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -225,7 +244,27 @@ message ListTagValuesResponse { // The request message for getting a TagValue. message GetTagValueRequest { - // Required. Resource name for TagValue to be fetched in the format `tagValues/456`. + // Required. Resource name for TagValue to be fetched in the format + // `tagValues/456`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/TagValue" + } + ]; +} + +// The request message for getting a TagValue by its namespaced name. +message GetNamespacedTagValueRequest { + // Required. A namespaced tag value name in the following format: + // + // `{parentId}/{tagKeyShort}/{tagValueShort}` + // + // Examples: + // - `42/foo/abc` for a value with short name "abc" under the key with short + // name "foo" under the organization with ID 42 + // - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with + // short name "bar" under the project with ID "r2-d2" string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -236,44 +275,42 @@ message GetTagValueRequest { // The request message for creating a TagValue. message CreateTagValueRequest { - // Required. The TagValue to be created. Only fields `short_name`, `description`, - // and `parent` are considered during the creation request. + // Required. The TagValue to be created. Only fields `short_name`, + // `description`, and `parent` are considered during the creation request. TagValue tag_value = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Set as true to perform the validations necessary for creating the resource, - // but not actually perform the action. + // Optional. Set as true to perform the validations necessary for creating the + // resource, but not actually perform the action. bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; } // Runtime operation information for creating a TagValue. -message CreateTagValueMetadata { - -} +message CreateTagValueMetadata {} // The request message for updating a TagValue. message UpdateTagValueRequest { - // Required. The new definition of the TagValue. Only fields `description` and `etag` - // fields can be updated by this request. If the `etag` field is nonempty, it - // must match the `etag` field of the existing ControlGroup. Otherwise, - // `FAILED_PRECONDITION` will be returned. + // Required. The new definition of the TagValue. Only fields `description` and + // `etag` fields can be updated by this request. If the `etag` field is + // nonempty, it must match the `etag` field of the existing ControlGroup. + // Otherwise, `ABORTED` will be returned. TagValue tag_value = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Fields to be updated. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; - // Optional. True to perform validations necessary for updating the resource, but not - // actually perform the action. + // Optional. True to perform validations necessary for updating the resource, + // but not actually perform the action. bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } // Runtime operation information for updating a TagValue. -message UpdateTagValueMetadata { - -} +message UpdateTagValueMetadata {} // The request message for deleting a TagValue. message DeleteTagValueRequest { - // Required. Resource name for TagValue to be deleted in the format tagValues/456. + // Required. Resource name for TagValue to be deleted in the format + // tagValues/456. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -281,16 +318,14 @@ message DeleteTagValueRequest { } ]; - // Optional. Set as true to perform the validations necessary for deletion, but not - // actually perform the action. + // Optional. Set as true to perform the validations necessary for deletion, + // but not actually perform the action. bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The etag known to the client for the expected state of the TagValue. This - // is to be used for optimistic concurrency. + // Optional. The etag known to the client for the expected state of the + // TagValue. This is to be used for optimistic concurrency. string etag = 3 [(google.api.field_behavior) = OPTIONAL]; } // Runtime operation information for deleting a TagValue. -message DeleteTagValueMetadata { - -} +message DeleteTagValueMetadata {} diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/stub/tagholdsstubsettings/createtaghold/SyncCreateTagHold.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/stub/tagholdsstubsettings/createtaghold/SyncCreateTagHold.java new file mode 100644 index 000000000000..ee68dad75bbd --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/stub/tagholdsstubsettings/createtaghold/SyncCreateTagHold.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.stub.samples; + +// [START cloudresourcemanager_v3_generated_TagHoldsStubSettings_CreateTagHold_sync] +import com.google.cloud.resourcemanager.v3.stub.TagHoldsStubSettings; +import java.time.Duration; + +public class SyncCreateTagHold { + + public static void main(String[] args) throws Exception { + syncCreateTagHold(); + } + + public static void syncCreateTagHold() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TagHoldsStubSettings.Builder tagHoldsSettingsBuilder = TagHoldsStubSettings.newBuilder(); + tagHoldsSettingsBuilder + .createTagHoldSettings() + .setRetrySettings( + tagHoldsSettingsBuilder + .createTagHoldSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TagHoldsStubSettings tagHoldsSettings = tagHoldsSettingsBuilder.build(); + } +} +// [END cloudresourcemanager_v3_generated_TagHoldsStubSettings_CreateTagHold_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/AsyncListEffectiveTags.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/AsyncListEffectiveTags.java new file mode 100644 index 000000000000..2dbb333eb85c --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/AsyncListEffectiveTags.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.resourcemanager.v3.EffectiveTag; +import com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest; +import com.google.cloud.resourcemanager.v3.TagBindingsClient; + +public class AsyncListEffectiveTags { + + public static void main(String[] args) throws Exception { + asyncListEffectiveTags(); + } + + public static void asyncListEffectiveTags() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) { + ListEffectiveTagsRequest request = + ListEffectiveTagsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + tagBindingsClient.listEffectiveTagsPagedCallable().futureCall(request); + // Do something. + for (EffectiveTag element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_async] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/AsyncListEffectiveTagsPaged.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/AsyncListEffectiveTagsPaged.java new file mode 100644 index 000000000000..6e09ef6d214a --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/AsyncListEffectiveTagsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_Paged_async] +import com.google.cloud.resourcemanager.v3.EffectiveTag; +import com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest; +import com.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse; +import com.google.cloud.resourcemanager.v3.TagBindingsClient; +import com.google.common.base.Strings; + +public class AsyncListEffectiveTagsPaged { + + public static void main(String[] args) throws Exception { + asyncListEffectiveTagsPaged(); + } + + public static void asyncListEffectiveTagsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) { + ListEffectiveTagsRequest request = + ListEffectiveTagsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListEffectiveTagsResponse response = + tagBindingsClient.listEffectiveTagsCallable().call(request); + for (EffectiveTag element : response.getEffectiveTagsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_Paged_async] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/SyncListEffectiveTags.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/SyncListEffectiveTags.java new file mode 100644 index 000000000000..7a049f8d86dc --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/SyncListEffectiveTags.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_sync] +import com.google.cloud.resourcemanager.v3.EffectiveTag; +import com.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest; +import com.google.cloud.resourcemanager.v3.TagBindingsClient; + +public class SyncListEffectiveTags { + + public static void main(String[] args) throws Exception { + syncListEffectiveTags(); + } + + public static void syncListEffectiveTags() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) { + ListEffectiveTagsRequest request = + ListEffectiveTagsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (EffectiveTag element : tagBindingsClient.listEffectiveTags(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/SyncListEffectiveTagsString.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/SyncListEffectiveTagsString.java new file mode 100644 index 000000000000..89d0cc57bbdd --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagbindings/listeffectivetags/SyncListEffectiveTagsString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_String_sync] +import com.google.cloud.resourcemanager.v3.EffectiveTag; +import com.google.cloud.resourcemanager.v3.TagBindingsClient; + +public class SyncListEffectiveTagsString { + + public static void main(String[] args) throws Exception { + syncListEffectiveTagsString(); + } + + public static void syncListEffectiveTagsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagBindingsClient tagBindingsClient = TagBindingsClient.create()) { + String parent = "parent-995424086"; + for (EffectiveTag element : tagBindingsClient.listEffectiveTags(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_String_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/create/SyncCreateSetCredentialsProvider.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..3fc16532be10 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.cloud.resourcemanager.v3.TagHoldsSettings; +import com.google.cloud.resourcemanager.v3.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TagHoldsSettings tagHoldsSettings = + TagHoldsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + TagHoldsClient tagHoldsClient = TagHoldsClient.create(tagHoldsSettings); + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_Create_SetCredentialsProvider_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/create/SyncCreateSetCredentialsProvider1.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..703140eb9a6a --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_Create_SetCredentialsProvider1_sync] +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.cloud.resourcemanager.v3.TagHoldsSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TagHoldsSettings tagHoldsSettings = TagHoldsSettings.newHttpJsonBuilder().build(); + TagHoldsClient tagHoldsClient = TagHoldsClient.create(tagHoldsSettings); + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_Create_SetCredentialsProvider1_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/create/SyncCreateSetEndpoint.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..e43eed7cdfc0 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_Create_SetEndpoint_sync] +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.cloud.resourcemanager.v3.TagHoldsSettings; +import com.google.cloud.resourcemanager.v3.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TagHoldsSettings tagHoldsSettings = + TagHoldsSettings.newBuilder().setEndpoint(myEndpoint).build(); + TagHoldsClient tagHoldsClient = TagHoldsClient.create(tagHoldsSettings); + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_Create_SetEndpoint_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/AsyncCreateTagHold.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/AsyncCreateTagHold.java new file mode 100644 index 000000000000..bc96144147ea --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/AsyncCreateTagHold.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.resourcemanager.v3.CreateTagHoldRequest; +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.cloud.resourcemanager.v3.TagValueName; +import com.google.longrunning.Operation; + +public class AsyncCreateTagHold { + + public static void main(String[] args) throws Exception { + asyncCreateTagHold(); + } + + public static void asyncCreateTagHold() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + CreateTagHoldRequest request = + CreateTagHoldRequest.newBuilder() + .setParent(TagValueName.of("[TAG_VALUE]").toString()) + .setTagHold(TagHold.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = tagHoldsClient.createTagHoldCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_async] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/AsyncCreateTagHoldLRO.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/AsyncCreateTagHoldLRO.java new file mode 100644 index 000000000000..f742db3db098 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/AsyncCreateTagHoldLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.resourcemanager.v3.CreateTagHoldMetadata; +import com.google.cloud.resourcemanager.v3.CreateTagHoldRequest; +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.cloud.resourcemanager.v3.TagValueName; + +public class AsyncCreateTagHoldLRO { + + public static void main(String[] args) throws Exception { + asyncCreateTagHoldLRO(); + } + + public static void asyncCreateTagHoldLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + CreateTagHoldRequest request = + CreateTagHoldRequest.newBuilder() + .setParent(TagValueName.of("[TAG_VALUE]").toString()) + .setTagHold(TagHold.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + tagHoldsClient.createTagHoldOperationCallable().futureCall(request); + // Do something. + TagHold response = future.get(); + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_LRO_async] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/SyncCreateTagHold.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/SyncCreateTagHold.java new file mode 100644 index 000000000000..159ba8ed66ac --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/SyncCreateTagHold.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_sync] +import com.google.cloud.resourcemanager.v3.CreateTagHoldRequest; +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.cloud.resourcemanager.v3.TagValueName; + +public class SyncCreateTagHold { + + public static void main(String[] args) throws Exception { + syncCreateTagHold(); + } + + public static void syncCreateTagHold() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + CreateTagHoldRequest request = + CreateTagHoldRequest.newBuilder() + .setParent(TagValueName.of("[TAG_VALUE]").toString()) + .setTagHold(TagHold.newBuilder().build()) + .setValidateOnly(true) + .build(); + TagHold response = tagHoldsClient.createTagHoldAsync(request).get(); + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/SyncCreateTagHoldStringTaghold.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/SyncCreateTagHoldStringTaghold.java new file mode 100644 index 000000000000..ad19cd5553ec --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/SyncCreateTagHoldStringTaghold.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_StringTaghold_sync] +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.cloud.resourcemanager.v3.TagValueName; + +public class SyncCreateTagHoldStringTaghold { + + public static void main(String[] args) throws Exception { + syncCreateTagHoldStringTaghold(); + } + + public static void syncCreateTagHoldStringTaghold() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + String parent = TagValueName.of("[TAG_VALUE]").toString(); + TagHold tagHold = TagHold.newBuilder().build(); + TagHold response = tagHoldsClient.createTagHoldAsync(parent, tagHold).get(); + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_StringTaghold_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/SyncCreateTagHoldTagvaluenameTaghold.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/SyncCreateTagHoldTagvaluenameTaghold.java new file mode 100644 index 000000000000..8ff26fc73f02 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/createtaghold/SyncCreateTagHoldTagvaluenameTaghold.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_TagvaluenameTaghold_sync] +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.cloud.resourcemanager.v3.TagValueName; + +public class SyncCreateTagHoldTagvaluenameTaghold { + + public static void main(String[] args) throws Exception { + syncCreateTagHoldTagvaluenameTaghold(); + } + + public static void syncCreateTagHoldTagvaluenameTaghold() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + TagValueName parent = TagValueName.of("[TAG_VALUE]"); + TagHold tagHold = TagHold.newBuilder().build(); + TagHold response = tagHoldsClient.createTagHoldAsync(parent, tagHold).get(); + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_TagvaluenameTaghold_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/AsyncDeleteTagHold.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/AsyncDeleteTagHold.java new file mode 100644 index 000000000000..1ec32fba4c53 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/AsyncDeleteTagHold.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest; +import com.google.cloud.resourcemanager.v3.TagHoldName; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteTagHold { + + public static void main(String[] args) throws Exception { + asyncDeleteTagHold(); + } + + public static void asyncDeleteTagHold() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + DeleteTagHoldRequest request = + DeleteTagHoldRequest.newBuilder() + .setName(TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]").toString()) + .setValidateOnly(true) + .build(); + ApiFuture future = tagHoldsClient.deleteTagHoldCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_async] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/AsyncDeleteTagHoldLRO.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/AsyncDeleteTagHoldLRO.java new file mode 100644 index 000000000000..eec5987eb03b --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/AsyncDeleteTagHoldLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata; +import com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest; +import com.google.cloud.resourcemanager.v3.TagHoldName; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteTagHoldLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteTagHoldLRO(); + } + + public static void asyncDeleteTagHoldLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + DeleteTagHoldRequest request = + DeleteTagHoldRequest.newBuilder() + .setName(TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]").toString()) + .setValidateOnly(true) + .build(); + OperationFuture future = + tagHoldsClient.deleteTagHoldOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_LRO_async] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/SyncDeleteTagHold.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/SyncDeleteTagHold.java new file mode 100644 index 000000000000..6a33e237cba2 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/SyncDeleteTagHold.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_sync] +import com.google.cloud.resourcemanager.v3.DeleteTagHoldRequest; +import com.google.cloud.resourcemanager.v3.TagHoldName; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.protobuf.Empty; + +public class SyncDeleteTagHold { + + public static void main(String[] args) throws Exception { + syncDeleteTagHold(); + } + + public static void syncDeleteTagHold() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + DeleteTagHoldRequest request = + DeleteTagHoldRequest.newBuilder() + .setName(TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]").toString()) + .setValidateOnly(true) + .build(); + tagHoldsClient.deleteTagHoldAsync(request).get(); + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/SyncDeleteTagHoldString.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/SyncDeleteTagHoldString.java new file mode 100644 index 000000000000..1568b1e1f6fe --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/SyncDeleteTagHoldString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_String_sync] +import com.google.cloud.resourcemanager.v3.TagHoldName; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.protobuf.Empty; + +public class SyncDeleteTagHoldString { + + public static void main(String[] args) throws Exception { + syncDeleteTagHoldString(); + } + + public static void syncDeleteTagHoldString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + String name = TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]").toString(); + tagHoldsClient.deleteTagHoldAsync(name).get(); + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_String_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/SyncDeleteTagHoldTagholdname.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/SyncDeleteTagHoldTagholdname.java new file mode 100644 index 000000000000..85e8ebafaf78 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/deletetaghold/SyncDeleteTagHoldTagholdname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_Tagholdname_sync] +import com.google.cloud.resourcemanager.v3.TagHoldName; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.protobuf.Empty; + +public class SyncDeleteTagHoldTagholdname { + + public static void main(String[] args) throws Exception { + syncDeleteTagHoldTagholdname(); + } + + public static void syncDeleteTagHoldTagholdname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + TagHoldName name = TagHoldName.of("[TAG_VALUE]", "[TAG_HOLD]"); + tagHoldsClient.deleteTagHoldAsync(name).get(); + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_Tagholdname_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/AsyncListTagHolds.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/AsyncListTagHolds.java new file mode 100644 index 000000000000..2265b1893e1e --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/AsyncListTagHolds.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.resourcemanager.v3.ListTagHoldsRequest; +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.cloud.resourcemanager.v3.TagValueName; + +public class AsyncListTagHolds { + + public static void main(String[] args) throws Exception { + asyncListTagHolds(); + } + + public static void asyncListTagHolds() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + ListTagHoldsRequest request = + ListTagHoldsRequest.newBuilder() + .setParent(TagValueName.of("[TAG_VALUE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = tagHoldsClient.listTagHoldsPagedCallable().futureCall(request); + // Do something. + for (TagHold element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_async] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/AsyncListTagHoldsPaged.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/AsyncListTagHoldsPaged.java new file mode 100644 index 000000000000..11648a0d4a18 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/AsyncListTagHoldsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_Paged_async] +import com.google.cloud.resourcemanager.v3.ListTagHoldsRequest; +import com.google.cloud.resourcemanager.v3.ListTagHoldsResponse; +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.cloud.resourcemanager.v3.TagValueName; +import com.google.common.base.Strings; + +public class AsyncListTagHoldsPaged { + + public static void main(String[] args) throws Exception { + asyncListTagHoldsPaged(); + } + + public static void asyncListTagHoldsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + ListTagHoldsRequest request = + ListTagHoldsRequest.newBuilder() + .setParent(TagValueName.of("[TAG_VALUE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListTagHoldsResponse response = tagHoldsClient.listTagHoldsCallable().call(request); + for (TagHold element : response.getTagHoldsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_Paged_async] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/SyncListTagHolds.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/SyncListTagHolds.java new file mode 100644 index 000000000000..b470ffce9693 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/SyncListTagHolds.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_sync] +import com.google.cloud.resourcemanager.v3.ListTagHoldsRequest; +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.cloud.resourcemanager.v3.TagValueName; + +public class SyncListTagHolds { + + public static void main(String[] args) throws Exception { + syncListTagHolds(); + } + + public static void syncListTagHolds() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + ListTagHoldsRequest request = + ListTagHoldsRequest.newBuilder() + .setParent(TagValueName.of("[TAG_VALUE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (TagHold element : tagHoldsClient.listTagHolds(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/SyncListTagHoldsString.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/SyncListTagHoldsString.java new file mode 100644 index 000000000000..70642debb6be --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/SyncListTagHoldsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_String_sync] +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.cloud.resourcemanager.v3.TagValueName; + +public class SyncListTagHoldsString { + + public static void main(String[] args) throws Exception { + syncListTagHoldsString(); + } + + public static void syncListTagHoldsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + String parent = TagValueName.of("[TAG_VALUE]").toString(); + for (TagHold element : tagHoldsClient.listTagHolds(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_String_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/SyncListTagHoldsTagvaluename.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/SyncListTagHoldsTagvaluename.java new file mode 100644 index 000000000000..1088a0ed2ef4 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholds/listtagholds/SyncListTagHoldsTagvaluename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_Tagvaluename_sync] +import com.google.cloud.resourcemanager.v3.TagHold; +import com.google.cloud.resourcemanager.v3.TagHoldsClient; +import com.google.cloud.resourcemanager.v3.TagValueName; + +public class SyncListTagHoldsTagvaluename { + + public static void main(String[] args) throws Exception { + syncListTagHoldsTagvaluename(); + } + + public static void syncListTagHoldsTagvaluename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagHoldsClient tagHoldsClient = TagHoldsClient.create()) { + TagValueName parent = TagValueName.of("[TAG_VALUE]"); + for (TagHold element : tagHoldsClient.listTagHolds(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_Tagvaluename_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholdssettings/createtaghold/SyncCreateTagHold.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholdssettings/createtaghold/SyncCreateTagHold.java new file mode 100644 index 000000000000..a7f49e48c73f --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagholdssettings/createtaghold/SyncCreateTagHold.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagHoldsSettings_CreateTagHold_sync] +import com.google.cloud.resourcemanager.v3.TagHoldsSettings; +import java.time.Duration; + +public class SyncCreateTagHold { + + public static void main(String[] args) throws Exception { + syncCreateTagHold(); + } + + public static void syncCreateTagHold() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TagHoldsSettings.Builder tagHoldsSettingsBuilder = TagHoldsSettings.newBuilder(); + tagHoldsSettingsBuilder + .createTagHoldSettings() + .setRetrySettings( + tagHoldsSettingsBuilder + .createTagHoldSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + TagHoldsSettings tagHoldsSettings = tagHoldsSettingsBuilder.build(); + } +} +// [END cloudresourcemanager_v3_generated_TagHoldsSettings_CreateTagHold_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/AsyncGetNamespacedTagKey.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/AsyncGetNamespacedTagKey.java new file mode 100644 index 000000000000..fccc528a2fc5 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/AsyncGetNamespacedTagKey.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest; +import com.google.cloud.resourcemanager.v3.TagKey; +import com.google.cloud.resourcemanager.v3.TagKeyName; +import com.google.cloud.resourcemanager.v3.TagKeysClient; + +public class AsyncGetNamespacedTagKey { + + public static void main(String[] args) throws Exception { + asyncGetNamespacedTagKey(); + } + + public static void asyncGetNamespacedTagKey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagKeysClient tagKeysClient = TagKeysClient.create()) { + GetNamespacedTagKeyRequest request = + GetNamespacedTagKeyRequest.newBuilder() + .setName(TagKeyName.of("[TAG_KEY]").toString()) + .build(); + ApiFuture future = tagKeysClient.getNamespacedTagKeyCallable().futureCall(request); + // Do something. + TagKey response = future.get(); + } + } +} +// [END cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_async] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/SyncGetNamespacedTagKey.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/SyncGetNamespacedTagKey.java new file mode 100644 index 000000000000..14d665a1c690 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/SyncGetNamespacedTagKey.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_sync] +import com.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest; +import com.google.cloud.resourcemanager.v3.TagKey; +import com.google.cloud.resourcemanager.v3.TagKeyName; +import com.google.cloud.resourcemanager.v3.TagKeysClient; + +public class SyncGetNamespacedTagKey { + + public static void main(String[] args) throws Exception { + syncGetNamespacedTagKey(); + } + + public static void syncGetNamespacedTagKey() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagKeysClient tagKeysClient = TagKeysClient.create()) { + GetNamespacedTagKeyRequest request = + GetNamespacedTagKeyRequest.newBuilder() + .setName(TagKeyName.of("[TAG_KEY]").toString()) + .build(); + TagKey response = tagKeysClient.getNamespacedTagKey(request); + } + } +} +// [END cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/SyncGetNamespacedTagKeyString.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/SyncGetNamespacedTagKeyString.java new file mode 100644 index 000000000000..1936559b3770 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/SyncGetNamespacedTagKeyString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_String_sync] +import com.google.cloud.resourcemanager.v3.TagKey; +import com.google.cloud.resourcemanager.v3.TagKeyName; +import com.google.cloud.resourcemanager.v3.TagKeysClient; + +public class SyncGetNamespacedTagKeyString { + + public static void main(String[] args) throws Exception { + syncGetNamespacedTagKeyString(); + } + + public static void syncGetNamespacedTagKeyString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagKeysClient tagKeysClient = TagKeysClient.create()) { + String name = TagKeyName.of("[TAG_KEY]").toString(); + TagKey response = tagKeysClient.getNamespacedTagKey(name); + } + } +} +// [END cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_String_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/SyncGetNamespacedTagKeyTagkeyname.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/SyncGetNamespacedTagKeyTagkeyname.java new file mode 100644 index 000000000000..f3721ae0275f --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagkeys/getnamespacedtagkey/SyncGetNamespacedTagKeyTagkeyname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_Tagkeyname_sync] +import com.google.cloud.resourcemanager.v3.TagKey; +import com.google.cloud.resourcemanager.v3.TagKeyName; +import com.google.cloud.resourcemanager.v3.TagKeysClient; + +public class SyncGetNamespacedTagKeyTagkeyname { + + public static void main(String[] args) throws Exception { + syncGetNamespacedTagKeyTagkeyname(); + } + + public static void syncGetNamespacedTagKeyTagkeyname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagKeysClient tagKeysClient = TagKeysClient.create()) { + TagKeyName name = TagKeyName.of("[TAG_KEY]"); + TagKey response = tagKeysClient.getNamespacedTagKey(name); + } + } +} +// [END cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_Tagkeyname_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/AsyncGetNamespacedTagValue.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/AsyncGetNamespacedTagValue.java new file mode 100644 index 000000000000..417bd3d1a146 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/AsyncGetNamespacedTagValue.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest; +import com.google.cloud.resourcemanager.v3.TagValue; +import com.google.cloud.resourcemanager.v3.TagValueName; +import com.google.cloud.resourcemanager.v3.TagValuesClient; + +public class AsyncGetNamespacedTagValue { + + public static void main(String[] args) throws Exception { + asyncGetNamespacedTagValue(); + } + + public static void asyncGetNamespacedTagValue() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagValuesClient tagValuesClient = TagValuesClient.create()) { + GetNamespacedTagValueRequest request = + GetNamespacedTagValueRequest.newBuilder() + .setName(TagValueName.of("[TAG_VALUE]").toString()) + .build(); + ApiFuture future = + tagValuesClient.getNamespacedTagValueCallable().futureCall(request); + // Do something. + TagValue response = future.get(); + } + } +} +// [END cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_async] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/SyncGetNamespacedTagValue.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/SyncGetNamespacedTagValue.java new file mode 100644 index 000000000000..0ae03c3663c0 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/SyncGetNamespacedTagValue.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_sync] +import com.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest; +import com.google.cloud.resourcemanager.v3.TagValue; +import com.google.cloud.resourcemanager.v3.TagValueName; +import com.google.cloud.resourcemanager.v3.TagValuesClient; + +public class SyncGetNamespacedTagValue { + + public static void main(String[] args) throws Exception { + syncGetNamespacedTagValue(); + } + + public static void syncGetNamespacedTagValue() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagValuesClient tagValuesClient = TagValuesClient.create()) { + GetNamespacedTagValueRequest request = + GetNamespacedTagValueRequest.newBuilder() + .setName(TagValueName.of("[TAG_VALUE]").toString()) + .build(); + TagValue response = tagValuesClient.getNamespacedTagValue(request); + } + } +} +// [END cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/SyncGetNamespacedTagValueString.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/SyncGetNamespacedTagValueString.java new file mode 100644 index 000000000000..38c5010fe8ce --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/SyncGetNamespacedTagValueString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_String_sync] +import com.google.cloud.resourcemanager.v3.TagValue; +import com.google.cloud.resourcemanager.v3.TagValueName; +import com.google.cloud.resourcemanager.v3.TagValuesClient; + +public class SyncGetNamespacedTagValueString { + + public static void main(String[] args) throws Exception { + syncGetNamespacedTagValueString(); + } + + public static void syncGetNamespacedTagValueString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagValuesClient tagValuesClient = TagValuesClient.create()) { + String name = TagValueName.of("[TAG_VALUE]").toString(); + TagValue response = tagValuesClient.getNamespacedTagValue(name); + } + } +} +// [END cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_String_sync] diff --git a/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/SyncGetNamespacedTagValueTagvaluename.java b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/SyncGetNamespacedTagValueTagvaluename.java new file mode 100644 index 000000000000..f6e4aee695d9 --- /dev/null +++ b/java-resourcemanager/samples/snippets/generated/com/google/cloud/resourcemanager/v3/tagvalues/getnamespacedtagvalue/SyncGetNamespacedTagValueTagvaluename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.resourcemanager.v3.samples; + +// [START cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_Tagvaluename_sync] +import com.google.cloud.resourcemanager.v3.TagValue; +import com.google.cloud.resourcemanager.v3.TagValueName; +import com.google.cloud.resourcemanager.v3.TagValuesClient; + +public class SyncGetNamespacedTagValueTagvaluename { + + public static void main(String[] args) throws Exception { + syncGetNamespacedTagValueTagvaluename(); + } + + public static void syncGetNamespacedTagValueTagvaluename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TagValuesClient tagValuesClient = TagValuesClient.create()) { + TagValueName name = TagValueName.of("[TAG_VALUE]"); + TagValue response = tagValuesClient.getNamespacedTagValue(name); + } + } +} +// [END cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_Tagvaluename_sync]