From 4a0512e57eef1dffd268a301b09d528f46cba086 Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Thu, 28 May 2026 13:53:06 -0400 Subject: [PATCH 1/2] update googleapis commit and add library to config --- librarian.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/librarian.yaml b/librarian.yaml index 5a2c6d6c8413..433b45fb7087 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -16,8 +16,8 @@ version: v0.15.0 repo: googleapis/google-cloud-java sources: googleapis: - commit: 3aa565f453bae9dcef06685a6f84b6e48ccdf335 - sha256: 1e65551719e3fb01f52f4da4373e222e4ee46df985b34ae40e6d06f79b0080cc + commit: cdc919ff596e263f2cc55a9780d2f74633da1ced + sha256: 7ffa366713bc955e172bba121f0d746b7fc1f6aab4ee46a6c65b4174b45d4043 showcase: commit: 328bec7ce4c1fb77c37fdf1868d0506bc02a70fc sha256: 8df187486e37edf5a78c1646c859c311bc452871b9ba4641d93149d3c53450a2 @@ -2991,6 +2991,10 @@ libraries: api_description_override: is a managed service that offers an integrated and secure JupyterLab environment for data scientists and machine learning developers to experiment, develop, and deploy models into production. Users can create instances running JupyterLab that come pre-installed with the latest data science and machine learning frameworks in a single click. name_pretty_override: AI Platform Notebooks product_documentation_override: https://cloud.google.com/ai-platform-notebooks + - name: numberregistry + version: 0.1.0-SNAPSHOT + apis: + - path: google/cloud/numberregistry/v1alpha - name: optimization version: 1.91.0-SNAPSHOT apis: From ef67eb45bbf49ba75be59815936e8ca2bfe2cadd Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Thu, 28 May 2026 13:53:29 -0400 Subject: [PATCH 2/2] add numberregistry library --- gapic-libraries-bom/pom.xml | 7 + java-numberregistry/.repo-metadata.json | 16 + java-numberregistry/README.md | 205 + .../google-cloud-numberregistry-bom/pom.xml | 45 + .../google-cloud-numberregistry/pom.xml | 117 + .../v1alpha/CloudNumberRegistryClient.java | 5658 +++++++++++++++++ .../v1alpha/CloudNumberRegistrySettings.java | 796 +++ .../v1alpha/gapic_metadata.json | 108 + .../numberregistry/v1alpha/package-info.java | 46 + .../v1alpha/stub/CloudNumberRegistryStub.java | 350 + .../stub/CloudNumberRegistryStubSettings.java | 2224 +++++++ ...rpcCloudNumberRegistryCallableFactory.java | 115 + .../stub/GrpcCloudNumberRegistryStub.java | 1531 +++++ ...sonCloudNumberRegistryCallableFactory.java | 103 + .../stub/HttpJsonCloudNumberRegistryStub.java | 2485 ++++++++ .../numberregistry/v1alpha/stub/Version.java | 27 + .../reflect-config.json | 2648 ++++++++ ...CloudNumberRegistryClientHttpJsonTest.java | 3074 +++++++++ .../CloudNumberRegistryClientTest.java | 2769 ++++++++ .../v1alpha/MockCloudNumberRegistry.java | 59 + .../v1alpha/MockCloudNumberRegistryImpl.java | 707 ++ .../pom.xml | 45 + .../v1alpha/CloudNumberRegistryGrpc.java | 4434 +++++++++++++ java-numberregistry/owlbot.py | 38 + java-numberregistry/pom.xml | 58 + .../clirr-ignored-differences.xml | 80 + .../pom.xml | 37 + .../numberregistry/v1alpha/Attribute.java | 785 +++ .../v1alpha/AttributeOrBuilder.java | 80 + ...eckAvailabilityIpamAdminScopesRequest.java | 935 +++ ...bilityIpamAdminScopesRequestOrBuilder.java | 112 + ...ckAvailabilityIpamAdminScopesResponse.java | 1044 +++ ...ilityIpamAdminScopesResponseOrBuilder.java | 98 + .../v1alpha/CleanupIpamAdminScopeRequest.java | 913 +++ ...CleanupIpamAdminScopeRequestOrBuilder.java | 112 + .../numberregistry/v1alpha/CoreProto.java | 1285 ++++ .../v1alpha/CreateCustomRangeRequest.java | 1424 +++++ .../CreateCustomRangeRequestOrBuilder.java | 183 + .../v1alpha/CreateIpamAdminScopeRequest.java | 1439 +++++ .../CreateIpamAdminScopeRequestOrBuilder.java | 185 + .../v1alpha/CreateRealmRequest.java | 1350 ++++ .../v1alpha/CreateRealmRequestOrBuilder.java | 165 + .../v1alpha/CreateRegistryBookRequest.java | 1427 +++++ .../CreateRegistryBookRequestOrBuilder.java | 183 + .../numberregistry/v1alpha/CustomRange.java | 2949 +++++++++ .../v1alpha/CustomRangeName.java | 227 + .../v1alpha/CustomRangeOrBuilder.java | 399 ++ .../v1alpha/DeleteCustomRangeRequest.java | 1006 +++ .../DeleteCustomRangeRequestOrBuilder.java | 125 + .../v1alpha/DeleteIpamAdminScopeRequest.java | 1010 +++ .../DeleteIpamAdminScopeRequestOrBuilder.java | 125 + .../v1alpha/DeleteRealmRequest.java | 936 +++ .../v1alpha/DeleteRealmRequestOrBuilder.java | 107 + .../v1alpha/DeleteRegistryBookRequest.java | 1008 +++ .../DeleteRegistryBookRequestOrBuilder.java | 125 + .../v1alpha/DisableIpamAdminScopeRequest.java | 913 +++ ...DisableIpamAdminScopeRequestOrBuilder.java | 112 + .../v1alpha/DiscoveredRange.java | 4003 ++++++++++++ .../v1alpha/DiscoveredRangeName.java | 227 + .../v1alpha/DiscoveredRangeOrBuilder.java | 541 ++ .../v1alpha/DiscoveryMetadata.java | 2494 ++++++++ .../v1alpha/DiscoveryMetadataOrBuilder.java | 292 + .../FindCustomRangeFreeIpRangesRequest.java | 1120 ++++ ...stomRangeFreeIpRangesRequestOrBuilder.java | 138 + .../FindCustomRangeFreeIpRangesResponse.java | 739 +++ ...tomRangeFreeIpRangesResponseOrBuilder.java | 86 + ...indDiscoveredRangeFreeIpRangesRequest.java | 1125 ++++ ...eredRangeFreeIpRangesRequestOrBuilder.java | 138 + ...ndDiscoveredRangeFreeIpRangesResponse.java | 745 +++ ...redRangeFreeIpRangesResponseOrBuilder.java | 86 + .../v1alpha/GetCustomRangeRequest.java | 619 ++ .../GetCustomRangeRequestOrBuilder.java | 58 + .../v1alpha/GetDiscoveredRangeRequest.java | 624 ++ .../GetDiscoveredRangeRequestOrBuilder.java | 58 + .../v1alpha/GetIpamAdminScopeRequest.java | 622 ++ .../GetIpamAdminScopeRequestOrBuilder.java | 58 + .../v1alpha/GetRealmRequest.java | 792 +++ .../v1alpha/GetRealmRequestOrBuilder.java | 88 + .../v1alpha/GetRegistryBookRequest.java | 798 +++ .../GetRegistryBookRequestOrBuilder.java | 88 + .../numberregistry/v1alpha/IpVersion.java | 191 + .../v1alpha/IpamAdminScope.java | 3091 +++++++++ .../v1alpha/IpamAdminScopeAvailability.java | 1063 ++++ .../IpamAdminScopeAvailabilityOrBuilder.java | 97 + .../v1alpha/IpamAdminScopeName.java | 227 + .../v1alpha/IpamAdminScopeOrBuilder.java | 377 ++ .../v1alpha/ListCustomRangesRequest.java | 1290 ++++ .../ListCustomRangesRequestOrBuilder.java | 150 + .../v1alpha/ListCustomRangesResponse.java | 1432 +++++ .../ListCustomRangesResponseOrBuilder.java | 166 + .../v1alpha/ListDiscoveredRangesRequest.java | 1294 ++++ .../ListDiscoveredRangesRequestOrBuilder.java | 150 + .../v1alpha/ListDiscoveredRangesResponse.java | 1469 +++++ ...ListDiscoveredRangesResponseOrBuilder.java | 172 + .../v1alpha/ListIpamAdminScopesRequest.java | 1294 ++++ .../ListIpamAdminScopesRequestOrBuilder.java | 150 + .../v1alpha/ListIpamAdminScopesResponse.java | 1466 +++++ .../ListIpamAdminScopesResponseOrBuilder.java | 172 + .../v1alpha/ListRealmsRequest.java | 1460 +++++ .../v1alpha/ListRealmsRequestOrBuilder.java | 180 + .../v1alpha/ListRealmsResponse.java | 1407 ++++ .../v1alpha/ListRealmsResponseOrBuilder.java | 164 + .../v1alpha/ListRegistryBooksRequest.java | 1467 +++++ .../ListRegistryBooksRequestOrBuilder.java | 180 + .../v1alpha/ListRegistryBooksResponse.java | 1431 +++++ .../ListRegistryBooksResponseOrBuilder.java | 165 + .../numberregistry/v1alpha/LocationName.java | 192 + .../v1alpha/OperationMetadata.java | 1870 ++++++ .../v1alpha/OperationMetadataOrBuilder.java | 229 + .../cloud/numberregistry/v1alpha/Range.java | 1407 ++++ .../v1alpha/RangeOrBuilder.java | 141 + .../v1alpha/RangeUtilization.java | 942 +++ .../v1alpha/RangeUtilizationOrBuilder.java | 110 + .../cloud/numberregistry/v1alpha/Realm.java | 4145 ++++++++++++ .../numberregistry/v1alpha/RealmName.java | 223 + .../v1alpha/RealmOrBuilder.java | 412 ++ .../numberregistry/v1alpha/RegistryBook.java | 3271 ++++++++++ .../v1alpha/RegistryBookName.java | 227 + .../v1alpha/RegistryBookOrBuilder.java | 323 + .../v1alpha/RegistryBookView.java | 214 + .../v1alpha/SearchIpResourcesRequest.java | 2209 +++++++ .../SearchIpResourcesRequestOrBuilder.java | 298 + .../v1alpha/SearchIpResourcesResponse.java | 3340 ++++++++++ .../SearchIpResourcesResponseOrBuilder.java | 252 + .../numberregistry/v1alpha/ServiceProto.java | 267 + .../ShowCustomRangeUtilizationRequest.java | 634 ++ ...ustomRangeUtilizationRequestOrBuilder.java | 58 + .../ShowCustomRangeUtilizationResponse.java | 1019 +++ ...stomRangeUtilizationResponseOrBuilder.java | 102 + ...ShowDiscoveredRangeUtilizationRequest.java | 641 ++ ...veredRangeUtilizationRequestOrBuilder.java | 58 + ...howDiscoveredRangeUtilizationResponse.java | 1029 +++ ...eredRangeUtilizationResponseOrBuilder.java | 102 + .../v1alpha/UpdateCustomRangeRequest.java | 1362 ++++ .../UpdateCustomRangeRequestOrBuilder.java | 177 + .../v1alpha/UpdateIpamAdminScopeRequest.java | 1370 ++++ .../UpdateIpamAdminScopeRequestOrBuilder.java | 177 + .../v1alpha/UpdateRealmRequest.java | 1252 ++++ .../v1alpha/UpdateRealmRequestOrBuilder.java | 150 + .../v1alpha/UpdateRegistryBookRequest.java | 1365 ++++ .../UpdateRegistryBookRequestOrBuilder.java | 177 + .../cloud/numberregistry/v1alpha/core.proto | 1590 +++++ .../numberregistry/v1alpha/service.proto | 404 ++ ...AsyncCheckAvailabilityIpamAdminScopes.java | 52 + .../SyncCheckAvailabilityIpamAdminScopes.java | 49 + ...IpamAdminScopesLocationnameListstring.java | 46 + ...bilityIpamAdminScopesStringListstring.java | 46 + .../AsyncCleanupIpamAdminScope.java | 52 + .../AsyncCleanupIpamAdminScopeLRO.java | 53 + .../SyncCleanupIpamAdminScope.java | 48 + ...eanupIpamAdminScopeIpamadminscopename.java | 43 + .../SyncCleanupIpamAdminScopeString.java | 43 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../SyncCreateUseHttpJsonTransport.java | 41 + .../AsyncCreateCustomRange.java | 54 + .../AsyncCreateCustomRangeLRO.java | 54 + .../SyncCreateCustomRange.java | 49 + ...tomRangeLocationnameCustomrangeString.java | 47 + ...ateCustomRangeStringCustomrangeString.java | 47 + .../AsyncCreateIpamAdminScope.java | 54 + .../AsyncCreateIpamAdminScopeLRO.java | 54 + .../SyncCreateIpamAdminScope.java | 49 + ...ScopeLocationnameIpamadminscopeString.java | 47 + ...mAdminScopeStringIpamadminscopeString.java | 47 + .../createrealm/AsyncCreateRealm.java | 54 + .../createrealm/AsyncCreateRealmLRO.java | 54 + .../createrealm/SyncCreateRealm.java | 49 + ...yncCreateRealmLocationnameRealmString.java | 44 + .../SyncCreateRealmStringRealmString.java | 44 + .../AsyncCreateRegistryBook.java | 54 + .../AsyncCreateRegistryBookLRO.java | 54 + .../SyncCreateRegistryBook.java | 49 + ...tryBookLocationnameRegistrybookString.java | 47 + ...eRegistryBookStringRegistrybookString.java | 47 + .../AsyncDeleteCustomRange.java | 52 + .../AsyncDeleteCustomRangeLRO.java | 53 + .../SyncDeleteCustomRange.java | 48 + .../SyncDeleteCustomRangeCustomrangename.java | 42 + .../SyncDeleteCustomRangeString.java | 42 + .../AsyncDeleteIpamAdminScope.java | 53 + .../AsyncDeleteIpamAdminScopeLRO.java | 54 + .../SyncDeleteIpamAdminScope.java | 49 + ...eleteIpamAdminScopeIpamadminscopename.java | 43 + .../SyncDeleteIpamAdminScopeString.java | 43 + .../deleterealm/AsyncDeleteRealm.java | 52 + .../deleterealm/AsyncDeleteRealmLRO.java | 53 + .../deleterealm/SyncDeleteRealm.java | 48 + .../deleterealm/SyncDeleteRealmRealmname.java | 42 + .../deleterealm/SyncDeleteRealmString.java | 42 + .../AsyncDeleteRegistryBook.java | 52 + .../AsyncDeleteRegistryBookLRO.java | 53 + .../SyncDeleteRegistryBook.java | 48 + ...yncDeleteRegistryBookRegistrybookname.java | 42 + .../SyncDeleteRegistryBookString.java | 42 + .../AsyncDisableIpamAdminScope.java | 52 + .../AsyncDisableIpamAdminScopeLRO.java | 53 + .../SyncDisableIpamAdminScope.java | 48 + ...sableIpamAdminScopeIpamadminscopename.java | 43 + .../SyncDisableIpamAdminScopeString.java | 43 + .../AsyncFindCustomRangeFreeIpRanges.java | 53 + .../SyncFindCustomRangeFreeIpRanges.java | 50 + ...omRangeFreeIpRangesCustomrangenameInt.java | 44 + ...cFindCustomRangeFreeIpRangesStringInt.java | 44 + .../AsyncFindDiscoveredRangeFreeIpRanges.java | 55 + .../SyncFindDiscoveredRangeFreeIpRanges.java | 52 + ...ngeFreeIpRangesDiscoveredrangenameInt.java | 45 + ...dDiscoveredRangeFreeIpRangesStringInt.java | 45 + .../getcustomrange/AsyncGetCustomRange.java | 50 + .../getcustomrange/SyncGetCustomRange.java | 46 + .../SyncGetCustomRangeCustomrangename.java | 42 + .../SyncGetCustomRangeString.java | 42 + .../AsyncGetDiscoveredRange.java | 52 + .../SyncGetDiscoveredRange.java | 48 + ...GetDiscoveredRangeDiscoveredrangename.java | 43 + .../SyncGetDiscoveredRangeString.java | 43 + .../AsyncGetIpamAdminScope.java | 51 + .../SyncGetIpamAdminScope.java | 47 + ...ncGetIpamAdminScopeIpamadminscopename.java | 43 + .../SyncGetIpamAdminScopeString.java | 43 + .../getrealm/AsyncGetRealm.java | 49 + .../getrealm/SyncGetRealm.java | 46 + .../getrealm/SyncGetRealmRealmname.java | 42 + .../getrealm/SyncGetRealmString.java | 42 + .../getregistrybook/AsyncGetRegistryBook.java | 52 + .../getregistrybook/SyncGetRegistryBook.java | 48 + .../SyncGetRegistryBookRegistrybookname.java | 42 + .../SyncGetRegistryBookString.java | 42 + .../AsyncListCustomRanges.java | 56 + .../AsyncListCustomRangesPaged.java | 64 + .../SyncListCustomRanges.java | 52 + .../SyncListCustomRangesLocationname.java | 44 + .../SyncListCustomRangesString.java | 44 + .../AsyncListDiscoveredRanges.java | 56 + .../AsyncListDiscoveredRangesPaged.java | 64 + .../SyncListDiscoveredRanges.java | 53 + .../SyncListDiscoveredRangesLocationname.java | 45 + .../SyncListDiscoveredRangesString.java | 45 + .../AsyncListIpamAdminScopes.java | 56 + .../AsyncListIpamAdminScopesPaged.java | 64 + .../SyncListIpamAdminScopes.java | 53 + .../SyncListIpamAdminScopesLocationname.java | 45 + .../SyncListIpamAdminScopesString.java | 45 + .../listrealms/AsyncListRealms.java | 56 + .../listrealms/AsyncListRealmsPaged.java | 63 + .../listrealms/SyncListRealms.java | 52 + .../SyncListRealmsLocationname.java | 44 + .../listrealms/SyncListRealmsString.java | 44 + .../AsyncListRegistryBooks.java | 58 + .../AsyncListRegistryBooksPaged.java | 66 + .../SyncListRegistryBooks.java | 55 + .../SyncListRegistryBooksLocationname.java | 45 + .../SyncListRegistryBooksString.java | 45 + .../AsyncSearchIpResources.java | 60 + .../AsyncSearchIpResourcesPaged.java | 68 + .../SyncSearchIpResources.java | 56 + ...SyncSearchIpResourcesRegistrybookname.java | 44 + .../SyncSearchIpResourcesString.java | 44 + .../AsyncShowCustomRangeUtilization.java | 50 + .../SyncShowCustomRangeUtilization.java | 47 + ...CustomRangeUtilizationCustomrangename.java | 43 + .../SyncShowCustomRangeUtilizationString.java | 43 + .../AsyncShowDiscoveredRangeUtilization.java | 52 + .../SyncShowDiscoveredRangeUtilization.java | 49 + ...edRangeUtilizationDiscoveredrangename.java | 44 + ...cShowDiscoveredRangeUtilizationString.java | 44 + .../AsyncUpdateCustomRange.java | 53 + .../AsyncUpdateCustomRangeLRO.java | 53 + .../SyncUpdateCustomRange.java | 48 + ...UpdateCustomRangeCustomrangeFieldmask.java | 44 + .../AsyncUpdateIpamAdminScope.java | 53 + .../AsyncUpdateIpamAdminScopeLRO.java | 53 + .../SyncUpdateIpamAdminScope.java | 48 + ...IpamAdminScopeIpamadminscopeFieldmask.java | 44 + .../updaterealm/AsyncUpdateRealm.java | 53 + .../updaterealm/AsyncUpdateRealmLRO.java | 53 + .../updaterealm/SyncUpdateRealm.java | 48 + .../SyncUpdateRealmRealmFieldmask.java | 43 + .../AsyncUpdateRegistryBook.java | 53 + .../AsyncUpdateRegistryBookLRO.java | 53 + .../SyncUpdateRegistryBook.java | 48 + ...dateRegistryBookRegistrybookFieldmask.java | 44 + .../SyncCreateIpamAdminScope.java | 54 + .../SyncGetIpamAdminScope.java | 57 + .../SyncCreateIpamAdminScope.java | 54 + .../SyncGetIpamAdminScope.java | 57 + pom.xml | 1 + versions.txt | 5 + 288 files changed, 123555 insertions(+) create mode 100644 java-numberregistry/.repo-metadata.json create mode 100644 java-numberregistry/README.md create mode 100644 java-numberregistry/google-cloud-numberregistry-bom/pom.xml create mode 100644 java-numberregistry/google-cloud-numberregistry/pom.xml create mode 100644 java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryClient.java create mode 100644 java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistrySettings.java create mode 100644 java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/gapic_metadata.json create mode 100644 java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/package-info.java create mode 100644 java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/CloudNumberRegistryStub.java create mode 100644 java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/CloudNumberRegistryStubSettings.java create mode 100644 java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/GrpcCloudNumberRegistryCallableFactory.java create mode 100644 java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/GrpcCloudNumberRegistryStub.java create mode 100644 java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/HttpJsonCloudNumberRegistryCallableFactory.java create mode 100644 java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/HttpJsonCloudNumberRegistryStub.java create mode 100644 java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/Version.java create mode 100644 java-numberregistry/google-cloud-numberregistry/src/main/resources/META-INF/native-image/com.google.cloud.numberregistry.v1alpha/reflect-config.json create mode 100644 java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryClientHttpJsonTest.java create mode 100644 java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryClientTest.java create mode 100644 java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/MockCloudNumberRegistry.java create mode 100644 java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/MockCloudNumberRegistryImpl.java create mode 100644 java-numberregistry/grpc-google-cloud-numberregistry-v1alpha/pom.xml create mode 100644 java-numberregistry/grpc-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryGrpc.java create mode 100755 java-numberregistry/owlbot.py create mode 100644 java-numberregistry/pom.xml create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/clirr-ignored-differences.xml create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/pom.xml create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/Attribute.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/AttributeOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesResponse.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesResponseOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CleanupIpamAdminScopeRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CleanupIpamAdminScopeRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CoreProto.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateCustomRangeRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateCustomRangeRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateIpamAdminScopeRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateIpamAdminScopeRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRealmRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRealmRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRegistryBookRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRegistryBookRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CustomRange.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CustomRangeName.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CustomRangeOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteCustomRangeRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteCustomRangeRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteIpamAdminScopeRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteIpamAdminScopeRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRealmRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRealmRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRegistryBookRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRegistryBookRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DisableIpamAdminScopeRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DisableIpamAdminScopeRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveredRange.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveredRangeName.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveredRangeOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveryMetadata.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveryMetadataOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesResponse.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesResponseOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesResponse.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesResponseOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetCustomRangeRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetCustomRangeRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetDiscoveredRangeRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetDiscoveredRangeRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetIpamAdminScopeRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetIpamAdminScopeRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRealmRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRealmRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRegistryBookRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRegistryBookRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpVersion.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScope.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeAvailability.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeAvailabilityOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeName.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesResponse.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesResponseOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesResponse.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesResponseOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesResponse.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesResponseOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsResponse.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsResponseOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksResponse.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksResponseOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/LocationName.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/OperationMetadata.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/OperationMetadataOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/Range.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RangeOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RangeUtilization.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RangeUtilizationOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/Realm.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RealmName.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RealmOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBook.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBookName.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBookOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBookView.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesResponse.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesResponseOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ServiceProto.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationResponse.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationResponseOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationResponse.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationResponseOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateCustomRangeRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateCustomRangeRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateIpamAdminScopeRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateIpamAdminScopeRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRealmRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRealmRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRegistryBookRequest.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRegistryBookRequestOrBuilder.java create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/proto/google/cloud/numberregistry/v1alpha/core.proto create mode 100644 java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/proto/google/cloud/numberregistry/v1alpha/service.proto create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/AsyncCheckAvailabilityIpamAdminScopes.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/SyncCheckAvailabilityIpamAdminScopes.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/SyncCheckAvailabilityIpamAdminScopesLocationnameListstring.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/SyncCheckAvailabilityIpamAdminScopesStringListstring.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/AsyncCleanupIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/AsyncCleanupIpamAdminScopeLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/SyncCleanupIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/SyncCleanupIpamAdminScopeIpamadminscopename.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/SyncCleanupIpamAdminScopeString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/create/SyncCreateSetEndpoint.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/create/SyncCreateUseHttpJsonTransport.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/AsyncCreateCustomRange.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/AsyncCreateCustomRangeLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/SyncCreateCustomRange.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/SyncCreateCustomRangeLocationnameCustomrangeString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/SyncCreateCustomRangeStringCustomrangeString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/AsyncCreateIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/AsyncCreateIpamAdminScopeLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/SyncCreateIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/SyncCreateIpamAdminScopeLocationnameIpamadminscopeString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/SyncCreateIpamAdminScopeStringIpamadminscopeString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/AsyncCreateRealm.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/AsyncCreateRealmLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/SyncCreateRealm.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/SyncCreateRealmLocationnameRealmString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/SyncCreateRealmStringRealmString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/AsyncCreateRegistryBook.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/AsyncCreateRegistryBookLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/SyncCreateRegistryBook.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/SyncCreateRegistryBookLocationnameRegistrybookString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/SyncCreateRegistryBookStringRegistrybookString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/AsyncDeleteCustomRange.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/AsyncDeleteCustomRangeLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/SyncDeleteCustomRange.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/SyncDeleteCustomRangeCustomrangename.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/SyncDeleteCustomRangeString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/AsyncDeleteIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/AsyncDeleteIpamAdminScopeLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/SyncDeleteIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/SyncDeleteIpamAdminScopeIpamadminscopename.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/SyncDeleteIpamAdminScopeString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/AsyncDeleteRealm.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/AsyncDeleteRealmLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/SyncDeleteRealm.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/SyncDeleteRealmRealmname.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/SyncDeleteRealmString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/AsyncDeleteRegistryBook.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/AsyncDeleteRegistryBookLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/SyncDeleteRegistryBook.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/SyncDeleteRegistryBookRegistrybookname.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/SyncDeleteRegistryBookString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/AsyncDisableIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/AsyncDisableIpamAdminScopeLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/SyncDisableIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/SyncDisableIpamAdminScopeIpamadminscopename.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/SyncDisableIpamAdminScopeString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/AsyncFindCustomRangeFreeIpRanges.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/SyncFindCustomRangeFreeIpRanges.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/SyncFindCustomRangeFreeIpRangesCustomrangenameInt.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/SyncFindCustomRangeFreeIpRangesStringInt.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/AsyncFindDiscoveredRangeFreeIpRanges.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/SyncFindDiscoveredRangeFreeIpRanges.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/SyncFindDiscoveredRangeFreeIpRangesDiscoveredrangenameInt.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/SyncFindDiscoveredRangeFreeIpRangesStringInt.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/AsyncGetCustomRange.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/SyncGetCustomRange.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/SyncGetCustomRangeCustomrangename.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/SyncGetCustomRangeString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/AsyncGetDiscoveredRange.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/SyncGetDiscoveredRange.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/SyncGetDiscoveredRangeDiscoveredrangename.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/SyncGetDiscoveredRangeString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/AsyncGetIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/SyncGetIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/SyncGetIpamAdminScopeIpamadminscopename.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/SyncGetIpamAdminScopeString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/AsyncGetRealm.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/SyncGetRealm.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/SyncGetRealmRealmname.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/SyncGetRealmString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/AsyncGetRegistryBook.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/SyncGetRegistryBook.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/SyncGetRegistryBookRegistrybookname.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/SyncGetRegistryBookString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/AsyncListCustomRanges.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/AsyncListCustomRangesPaged.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/SyncListCustomRanges.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/SyncListCustomRangesLocationname.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/SyncListCustomRangesString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/AsyncListDiscoveredRanges.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/AsyncListDiscoveredRangesPaged.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/SyncListDiscoveredRanges.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/SyncListDiscoveredRangesLocationname.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/SyncListDiscoveredRangesString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/AsyncListIpamAdminScopes.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/AsyncListIpamAdminScopesPaged.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/SyncListIpamAdminScopes.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/SyncListIpamAdminScopesLocationname.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/SyncListIpamAdminScopesString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/AsyncListRealms.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/AsyncListRealmsPaged.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/SyncListRealms.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/SyncListRealmsLocationname.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/SyncListRealmsString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/AsyncListRegistryBooks.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/AsyncListRegistryBooksPaged.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/SyncListRegistryBooks.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/SyncListRegistryBooksLocationname.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/SyncListRegistryBooksString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/AsyncSearchIpResources.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/AsyncSearchIpResourcesPaged.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/SyncSearchIpResources.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/SyncSearchIpResourcesRegistrybookname.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/SyncSearchIpResourcesString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/AsyncShowCustomRangeUtilization.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/SyncShowCustomRangeUtilization.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/SyncShowCustomRangeUtilizationCustomrangename.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/SyncShowCustomRangeUtilizationString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/AsyncShowDiscoveredRangeUtilization.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/SyncShowDiscoveredRangeUtilization.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/SyncShowDiscoveredRangeUtilizationDiscoveredrangename.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/SyncShowDiscoveredRangeUtilizationString.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/AsyncUpdateCustomRange.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/AsyncUpdateCustomRangeLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/SyncUpdateCustomRange.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/SyncUpdateCustomRangeCustomrangeFieldmask.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/AsyncUpdateIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/AsyncUpdateIpamAdminScopeLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/SyncUpdateIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/SyncUpdateIpamAdminScopeIpamadminscopeFieldmask.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/AsyncUpdateRealm.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/AsyncUpdateRealmLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/SyncUpdateRealm.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/SyncUpdateRealmRealmFieldmask.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/AsyncUpdateRegistryBook.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/AsyncUpdateRegistryBookLRO.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/SyncUpdateRegistryBook.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/SyncUpdateRegistryBookRegistrybookFieldmask.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistrysettings/createipamadminscope/SyncCreateIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistrysettings/getipamadminscope/SyncGetIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/stub/cloudnumberregistrystubsettings/createipamadminscope/SyncCreateIpamAdminScope.java create mode 100644 java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/stub/cloudnumberregistrystubsettings/getipamadminscope/SyncGetIpamAdminScope.java diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index b6f223ef2a28..07fe341aa76f 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -1004,6 +1004,13 @@ google-cloud-notification 0.211.0-beta-SNAPSHOT + + com.google.cloud + google-cloud-numberregistry-bom + 0.1.0-SNAPSHOT + pom + import + com.google.cloud google-cloud-optimization-bom diff --git a/java-numberregistry/.repo-metadata.json b/java-numberregistry/.repo-metadata.json new file mode 100644 index 000000000000..5e0fd8a30d9e --- /dev/null +++ b/java-numberregistry/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "cloudnumberregistry", + "name_pretty": "Cloud Number Registry", + "product_documentation": "https://docs.cloud.google.com/number-registry/reference/rest", + "api_description": "", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-numberregistry/latest/overview", + "release_level": "preview", + "transport": "both", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-numberregistry", + "distribution_name": "com.google.cloud:google-cloud-numberregistry", + "api_id": "cloudnumberregistry.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-numberregistry/README.md b/java-numberregistry/README.md new file mode 100644 index 000000000000..1524eeadeeb1 --- /dev/null +++ b/java-numberregistry/README.md @@ -0,0 +1,205 @@ +# Google Cloud Number Registry Client for Java + +Java idiomatic client for [Cloud Number Registry][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + 26.82.0 + pom + import + + + + + + + com.google.cloud + google-cloud-numberregistry + + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + +```xml + + com.google.cloud + google-cloud-numberregistry + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-numberregistry:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-numberregistry" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Cloud Number Registry APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Cloud Number Registry API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Cloud Number Registry [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Cloud Number Registry. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-numberregistry` library. See the [Quickstart](#quickstart) section +to add `google-cloud-numberregistry` as a dependency in your code. + +## About Cloud Number Registry + + +[Cloud Number Registry][product-docs] + +See the [Cloud Number Registry client library docs][javadocs] to learn how to +use this Cloud Number Registry Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Cloud Number Registry uses both gRPC and HTTP/JSON for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://docs.cloud.google.com/number-registry/reference/rest +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-numberregistry/latest/overview +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-numberregistry.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-numberregistry/0.0.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 +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudnumberregistry.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-numberregistry/google-cloud-numberregistry-bom/pom.xml b/java-numberregistry/google-cloud-numberregistry-bom/pom.xml new file mode 100644 index 000000000000..2edaf4dd85eb --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry-bom/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + com.google.cloud + google-cloud-numberregistry-bom + 0.1.0-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.87.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Cloud Number Registry BOM + + BOM for Cloud Number Registry + + + + true + + + + + + + com.google.cloud + google-cloud-numberregistry + 0.1.0-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-numberregistry-v1alpha + 0.1.0-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-numberregistry-v1alpha + 0.1.0-SNAPSHOT + + + + + \ No newline at end of file diff --git a/java-numberregistry/google-cloud-numberregistry/pom.xml b/java-numberregistry/google-cloud-numberregistry/pom.xml new file mode 100644 index 000000000000..7654a6f1c228 --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/pom.xml @@ -0,0 +1,117 @@ + + + 4.0.0 + com.google.cloud + google-cloud-numberregistry + 0.1.0-SNAPSHOT + jar + Google Cloud Number Registry + Cloud Number Registry + + com.google.cloud + google-cloud-numberregistry-parent + 0.1.0-SNAPSHOT + + + google-cloud-numberregistry + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.api.grpc + proto-google-cloud-numberregistry-v1alpha + + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + proto-google-iam-v1 + + + org.threeten + threetenbp + + + + + com.google.api.grpc + grpc-google-common-protos + test + + + com.google.api.grpc + grpc-google-iam-v1 + test + + + junit + junit + test + + + + com.google.api.grpc + grpc-google-cloud-numberregistry-v1alpha + test + + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + \ No newline at end of file diff --git a/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryClient.java b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryClient.java new file mode 100644 index 000000000000..665d733fd9f8 --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryClient.java @@ -0,0 +1,5658 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha; + +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.numberregistry.v1alpha.stub.CloudNumberRegistryStub; +import com.google.cloud.numberregistry.v1alpha.stub.CloudNumberRegistryStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The Cloud Number Registry service manages IP address space visibility and + * tracking. It enables the discovery, organization, and monitoring of IP address ranges across + * different cloud infrastructure platforms. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+ *   IpamAdminScopeName name =
+ *       IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]");
+ *   IpamAdminScope response = cloudNumberRegistryClient.getIpamAdminScope(name);
+ * }
+ * }
+ * + *

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

ListIpamAdminScopes

Lists IpamAdminScopes in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listIpamAdminScopes(ListIpamAdminScopesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listIpamAdminScopes(LocationName parent) + *

  • listIpamAdminScopes(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listIpamAdminScopesPagedCallable() + *

  • listIpamAdminScopesCallable() + *

+ *

GetIpamAdminScope

Gets details of a single IpamAdminScope.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIpamAdminScope(GetIpamAdminScopeRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getIpamAdminScope(IpamAdminScopeName name) + *

  • getIpamAdminScope(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIpamAdminScopeCallable() + *

+ *

CheckAvailabilityIpamAdminScopes

Checks the availability of IpamAdminScopes in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • checkAvailabilityIpamAdminScopes(CheckAvailabilityIpamAdminScopesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • checkAvailabilityIpamAdminScopes(LocationName parent, List<String> scopes) + *

  • checkAvailabilityIpamAdminScopes(String parent, List<String> scopes) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • checkAvailabilityIpamAdminScopesCallable() + *

+ *

CreateIpamAdminScope

Creates a new IpamAdminScope in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createIpamAdminScopeAsync(CreateIpamAdminScopeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createIpamAdminScopeAsync(LocationName parent, IpamAdminScope ipamAdminScope, String ipamAdminScopeId) + *

  • createIpamAdminScopeAsync(String parent, IpamAdminScope ipamAdminScope, String ipamAdminScopeId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createIpamAdminScopeOperationCallable() + *

  • createIpamAdminScopeCallable() + *

+ *

UpdateIpamAdminScope

Updates the parameters of a single IpamAdminScope.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateIpamAdminScopeAsync(UpdateIpamAdminScopeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateIpamAdminScopeAsync(IpamAdminScope ipamAdminScope, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateIpamAdminScopeOperationCallable() + *

  • updateIpamAdminScopeCallable() + *

+ *

DeleteIpamAdminScope

Deletes a single IpamAdminScope.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteIpamAdminScopeAsync(DeleteIpamAdminScopeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteIpamAdminScopeAsync(IpamAdminScopeName name) + *

  • deleteIpamAdminScopeAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteIpamAdminScopeOperationCallable() + *

  • deleteIpamAdminScopeCallable() + *

+ *

DisableIpamAdminScope

Disables a single IpamAdminScope.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • disableIpamAdminScopeAsync(DisableIpamAdminScopeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • disableIpamAdminScopeAsync(IpamAdminScopeName name) + *

  • disableIpamAdminScopeAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • disableIpamAdminScopeOperationCallable() + *

  • disableIpamAdminScopeCallable() + *

+ *

CleanupIpamAdminScope

Cleans up a single IpamAdminScope.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • cleanupIpamAdminScopeAsync(CleanupIpamAdminScopeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • cleanupIpamAdminScopeAsync(IpamAdminScopeName name) + *

  • cleanupIpamAdminScopeAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • cleanupIpamAdminScopeOperationCallable() + *

  • cleanupIpamAdminScopeCallable() + *

+ *

ListRegistryBooks

Lists RegistryBooks in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listRegistryBooks(ListRegistryBooksRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listRegistryBooks(LocationName parent) + *

  • listRegistryBooks(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listRegistryBooksPagedCallable() + *

  • listRegistryBooksCallable() + *

+ *

GetRegistryBook

Gets details of a single RegistryBook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getRegistryBook(GetRegistryBookRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getRegistryBook(RegistryBookName name) + *

  • getRegistryBook(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getRegistryBookCallable() + *

+ *

SearchIpResources

Searches IP resources in a given RegistryBook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • searchIpResources(SearchIpResourcesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • searchIpResources(RegistryBookName name) + *

  • searchIpResources(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • searchIpResourcesPagedCallable() + *

  • searchIpResourcesCallable() + *

+ *

CreateRegistryBook

Creates a new RegistryBook in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createRegistryBookAsync(CreateRegistryBookRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createRegistryBookAsync(LocationName parent, RegistryBook registryBook, String registryBookId) + *

  • createRegistryBookAsync(String parent, RegistryBook registryBook, String registryBookId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createRegistryBookOperationCallable() + *

  • createRegistryBookCallable() + *

+ *

UpdateRegistryBook

Updates the parameters of a single RegistryBook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateRegistryBookAsync(UpdateRegistryBookRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateRegistryBookAsync(RegistryBook registryBook, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateRegistryBookOperationCallable() + *

  • updateRegistryBookCallable() + *

+ *

DeleteRegistryBook

Deletes a single RegistryBook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteRegistryBookAsync(DeleteRegistryBookRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteRegistryBookAsync(RegistryBookName name) + *

  • deleteRegistryBookAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteRegistryBookOperationCallable() + *

  • deleteRegistryBookCallable() + *

+ *

ListRealms

Lists Realms in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listRealms(ListRealmsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listRealms(LocationName parent) + *

  • listRealms(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listRealmsPagedCallable() + *

  • listRealmsCallable() + *

+ *

GetRealm

Gets details of a single Realm.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getRealm(GetRealmRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getRealm(RealmName name) + *

  • getRealm(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getRealmCallable() + *

+ *

CreateRealm

Creates a new Realm in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createRealmAsync(CreateRealmRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createRealmAsync(LocationName parent, Realm realm, String realmId) + *

  • createRealmAsync(String parent, Realm realm, String realmId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createRealmOperationCallable() + *

  • createRealmCallable() + *

+ *

UpdateRealm

Updates the parameters of a single Realm.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateRealmAsync(UpdateRealmRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateRealmAsync(Realm realm, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateRealmOperationCallable() + *

  • updateRealmCallable() + *

+ *

DeleteRealm

Deletes a single Realm.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteRealmAsync(DeleteRealmRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteRealmAsync(RealmName name) + *

  • deleteRealmAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteRealmOperationCallable() + *

  • deleteRealmCallable() + *

+ *

ListDiscoveredRanges

Lists DiscoveredRanges in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listDiscoveredRanges(ListDiscoveredRangesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listDiscoveredRanges(LocationName parent) + *

  • listDiscoveredRanges(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listDiscoveredRangesPagedCallable() + *

  • listDiscoveredRangesCallable() + *

+ *

GetDiscoveredRange

Gets details of a single DiscoveredRange.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getDiscoveredRange(GetDiscoveredRangeRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getDiscoveredRange(DiscoveredRangeName name) + *

  • getDiscoveredRange(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getDiscoveredRangeCallable() + *

+ *

FindDiscoveredRangeFreeIpRanges

Finds free IP ranges in a single DiscoveredRange.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • findDiscoveredRangeFreeIpRanges(FindDiscoveredRangeFreeIpRangesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • findDiscoveredRangeFreeIpRanges(DiscoveredRangeName name, int cidrPrefixLength) + *

  • findDiscoveredRangeFreeIpRanges(String name, int cidrPrefixLength) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • findDiscoveredRangeFreeIpRangesCallable() + *

+ *

ListCustomRanges

Lists CustomRanges in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listCustomRanges(ListCustomRangesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listCustomRanges(LocationName parent) + *

  • listCustomRanges(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listCustomRangesPagedCallable() + *

  • listCustomRangesCallable() + *

+ *

GetCustomRange

Gets details of a single CustomRange.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCustomRange(GetCustomRangeRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCustomRange(CustomRangeName name) + *

  • getCustomRange(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getCustomRangeCallable() + *

+ *

ShowCustomRangeUtilization

Gets the details of a single CustomRange and its utilization.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • showCustomRangeUtilization(ShowCustomRangeUtilizationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • showCustomRangeUtilization(CustomRangeName name) + *

  • showCustomRangeUtilization(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • showCustomRangeUtilizationCallable() + *

+ *

ShowDiscoveredRangeUtilization

Gets the details of a single DiscoveredRange and its utilization.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • showDiscoveredRangeUtilization(ShowDiscoveredRangeUtilizationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • showDiscoveredRangeUtilization(DiscoveredRangeName name) + *

  • showDiscoveredRangeUtilization(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • showDiscoveredRangeUtilizationCallable() + *

+ *

FindCustomRangeFreeIpRanges

Finds free IP ranges in a single CustomRange.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • findCustomRangeFreeIpRanges(FindCustomRangeFreeIpRangesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • findCustomRangeFreeIpRanges(CustomRangeName name, int cidrPrefixLength) + *

  • findCustomRangeFreeIpRanges(String name, int cidrPrefixLength) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • findCustomRangeFreeIpRangesCallable() + *

+ *

CreateCustomRange

Creates a new CustomRange in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createCustomRangeAsync(CreateCustomRangeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createCustomRangeAsync(LocationName parent, CustomRange customRange, String customRangeId) + *

  • createCustomRangeAsync(String parent, CustomRange customRange, String customRangeId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createCustomRangeOperationCallable() + *

  • createCustomRangeCallable() + *

+ *

UpdateCustomRange

Updates the parameters of a single CustomRange.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateCustomRangeAsync(UpdateCustomRangeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateCustomRangeAsync(CustomRange customRange, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateCustomRangeOperationCallable() + *

  • updateCustomRangeCallable() + *

+ *

DeleteCustomRange

Deletes a single CustomRange.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteCustomRangeAsync(DeleteCustomRangeRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteCustomRangeAsync(CustomRangeName name) + *

  • deleteCustomRangeAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteCustomRangeOperationCallable() + *

  • deleteCustomRangeCallable() + *

+ *
+ * + *

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 CloudNumberRegistrySettings 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
+ * CloudNumberRegistrySettings cloudNumberRegistrySettings =
+ *     CloudNumberRegistrySettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CloudNumberRegistryClient cloudNumberRegistryClient =
+ *     CloudNumberRegistryClient.create(cloudNumberRegistrySettings);
+ * }
+ * + *

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
+ * CloudNumberRegistrySettings cloudNumberRegistrySettings =
+ *     CloudNumberRegistrySettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CloudNumberRegistryClient cloudNumberRegistryClient =
+ *     CloudNumberRegistryClient.create(cloudNumberRegistrySettings);
+ * }
+ * + *

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
+ * CloudNumberRegistrySettings cloudNumberRegistrySettings =
+ *     CloudNumberRegistrySettings.newHttpJsonBuilder().build();
+ * CloudNumberRegistryClient cloudNumberRegistryClient =
+ *     CloudNumberRegistryClient.create(cloudNumberRegistrySettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class CloudNumberRegistryClient implements BackgroundResource { + private final CloudNumberRegistrySettings settings; + private final CloudNumberRegistryStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of CloudNumberRegistryClient with default settings. */ + public static final CloudNumberRegistryClient create() throws IOException { + return create(CloudNumberRegistrySettings.newBuilder().build()); + } + + /** + * Constructs an instance of CloudNumberRegistryClient, 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 CloudNumberRegistryClient create(CloudNumberRegistrySettings settings) + throws IOException { + return new CloudNumberRegistryClient(settings); + } + + /** + * Constructs an instance of CloudNumberRegistryClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(CloudNumberRegistrySettings). + */ + public static final CloudNumberRegistryClient create(CloudNumberRegistryStub stub) { + return new CloudNumberRegistryClient(stub); + } + + /** + * Constructs an instance of CloudNumberRegistryClient, 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 CloudNumberRegistryClient(CloudNumberRegistrySettings settings) throws IOException { + this.settings = settings; + this.stub = ((CloudNumberRegistryStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected CloudNumberRegistryClient(CloudNumberRegistryStub 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 CloudNumberRegistrySettings getSettings() { + return settings; + } + + public CloudNumberRegistryStub 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. + /** + * Lists IpamAdminScopes in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (IpamAdminScope element :
+   *       cloudNumberRegistryClient.listIpamAdminScopes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, for example `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListIpamAdminScopesPagedResponse listIpamAdminScopes(LocationName parent) { + ListIpamAdminScopesRequest request = + ListIpamAdminScopesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listIpamAdminScopes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists IpamAdminScopes in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (IpamAdminScope element :
+   *       cloudNumberRegistryClient.listIpamAdminScopes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, for example `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListIpamAdminScopesPagedResponse listIpamAdminScopes(String parent) { + ListIpamAdminScopesRequest request = + ListIpamAdminScopesRequest.newBuilder().setParent(parent).build(); + return listIpamAdminScopes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists IpamAdminScopes in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListIpamAdminScopesRequest request =
+   *       ListIpamAdminScopesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (IpamAdminScope element :
+   *       cloudNumberRegistryClient.listIpamAdminScopes(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 ListIpamAdminScopesPagedResponse listIpamAdminScopes( + ListIpamAdminScopesRequest request) { + return listIpamAdminScopesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists IpamAdminScopes in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListIpamAdminScopesRequest request =
+   *       ListIpamAdminScopesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.listIpamAdminScopesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (IpamAdminScope element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listIpamAdminScopesPagedCallable() { + return stub.listIpamAdminScopesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists IpamAdminScopes in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListIpamAdminScopesRequest request =
+   *       ListIpamAdminScopesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListIpamAdminScopesResponse response =
+   *         cloudNumberRegistryClient.listIpamAdminScopesCallable().call(request);
+   *     for (IpamAdminScope element : response.getIpamAdminScopesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listIpamAdminScopesCallable() { + return stub.listIpamAdminScopesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   IpamAdminScopeName name =
+   *       IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]");
+   *   IpamAdminScope response = cloudNumberRegistryClient.getIpamAdminScope(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the IpamAdminScope to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IpamAdminScope getIpamAdminScope(IpamAdminScopeName name) { + GetIpamAdminScopeRequest request = + GetIpamAdminScopeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getIpamAdminScope(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name =
+   *       IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString();
+   *   IpamAdminScope response = cloudNumberRegistryClient.getIpamAdminScope(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the IpamAdminScope to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IpamAdminScope getIpamAdminScope(String name) { + GetIpamAdminScopeRequest request = GetIpamAdminScopeRequest.newBuilder().setName(name).build(); + return getIpamAdminScope(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   GetIpamAdminScopeRequest request =
+   *       GetIpamAdminScopeRequest.newBuilder()
+   *           .setName(
+   *               IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString())
+   *           .build();
+   *   IpamAdminScope response = cloudNumberRegistryClient.getIpamAdminScope(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 IpamAdminScope getIpamAdminScope(GetIpamAdminScopeRequest request) { + return getIpamAdminScopeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   GetIpamAdminScopeRequest request =
+   *       GetIpamAdminScopeRequest.newBuilder()
+   *           .setName(
+   *               IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.getIpamAdminScopeCallable().futureCall(request);
+   *   // Do something.
+   *   IpamAdminScope response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIpamAdminScopeCallable() { + return stub.getIpamAdminScopeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Checks the availability of IpamAdminScopes in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   List scopes = new ArrayList<>();
+   *   CheckAvailabilityIpamAdminScopesResponse response =
+   *       cloudNumberRegistryClient.checkAvailabilityIpamAdminScopes(parent, scopes);
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, for example `projects/*/locations/*`. + * @param scopes Required. The administrative scopes to check for availability. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CheckAvailabilityIpamAdminScopesResponse checkAvailabilityIpamAdminScopes( + LocationName parent, List scopes) { + CheckAvailabilityIpamAdminScopesRequest request = + CheckAvailabilityIpamAdminScopesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllScopes(scopes) + .build(); + return checkAvailabilityIpamAdminScopes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Checks the availability of IpamAdminScopes in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   List scopes = new ArrayList<>();
+   *   CheckAvailabilityIpamAdminScopesResponse response =
+   *       cloudNumberRegistryClient.checkAvailabilityIpamAdminScopes(parent, scopes);
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, for example `projects/*/locations/*`. + * @param scopes Required. The administrative scopes to check for availability. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CheckAvailabilityIpamAdminScopesResponse checkAvailabilityIpamAdminScopes( + String parent, List scopes) { + CheckAvailabilityIpamAdminScopesRequest request = + CheckAvailabilityIpamAdminScopesRequest.newBuilder() + .setParent(parent) + .addAllScopes(scopes) + .build(); + return checkAvailabilityIpamAdminScopes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Checks the availability of IpamAdminScopes in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CheckAvailabilityIpamAdminScopesRequest request =
+   *       CheckAvailabilityIpamAdminScopesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllScopes(new ArrayList())
+   *           .build();
+   *   CheckAvailabilityIpamAdminScopesResponse response =
+   *       cloudNumberRegistryClient.checkAvailabilityIpamAdminScopes(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 CheckAvailabilityIpamAdminScopesResponse checkAvailabilityIpamAdminScopes( + CheckAvailabilityIpamAdminScopesRequest request) { + return checkAvailabilityIpamAdminScopesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Checks the availability of IpamAdminScopes in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CheckAvailabilityIpamAdminScopesRequest request =
+   *       CheckAvailabilityIpamAdminScopesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllScopes(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.checkAvailabilityIpamAdminScopesCallable().futureCall(request);
+   *   // Do something.
+   *   CheckAvailabilityIpamAdminScopesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesCallable() { + return stub.checkAvailabilityIpamAdminScopesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new IpamAdminScope in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build();
+   *   String ipamAdminScopeId = "ipamAdminScopeId1628703603";
+   *   IpamAdminScope response =
+   *       cloudNumberRegistryClient
+   *           .createIpamAdminScopeAsync(parent, ipamAdminScope, ipamAdminScopeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name where the IpamAdminScope will be created. + * @param ipamAdminScope Required. The IpamAdminScope resource to create. + * @param ipamAdminScopeId Required. The ID to use for the IpamAdminScope, which will become the + * final segment of the resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createIpamAdminScopeAsync( + LocationName parent, IpamAdminScope ipamAdminScope, String ipamAdminScopeId) { + CreateIpamAdminScopeRequest request = + CreateIpamAdminScopeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setIpamAdminScope(ipamAdminScope) + .setIpamAdminScopeId(ipamAdminScopeId) + .build(); + return createIpamAdminScopeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new IpamAdminScope in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build();
+   *   String ipamAdminScopeId = "ipamAdminScopeId1628703603";
+   *   IpamAdminScope response =
+   *       cloudNumberRegistryClient
+   *           .createIpamAdminScopeAsync(parent, ipamAdminScope, ipamAdminScopeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name where the IpamAdminScope will be created. + * @param ipamAdminScope Required. The IpamAdminScope resource to create. + * @param ipamAdminScopeId Required. The ID to use for the IpamAdminScope, which will become the + * final segment of the resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createIpamAdminScopeAsync( + String parent, IpamAdminScope ipamAdminScope, String ipamAdminScopeId) { + CreateIpamAdminScopeRequest request = + CreateIpamAdminScopeRequest.newBuilder() + .setParent(parent) + .setIpamAdminScope(ipamAdminScope) + .setIpamAdminScopeId(ipamAdminScopeId) + .build(); + return createIpamAdminScopeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new IpamAdminScope in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CreateIpamAdminScopeRequest request =
+   *       CreateIpamAdminScopeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setIpamAdminScopeId("ipamAdminScopeId1628703603")
+   *           .setIpamAdminScope(IpamAdminScope.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   IpamAdminScope response = cloudNumberRegistryClient.createIpamAdminScopeAsync(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 createIpamAdminScopeAsync( + CreateIpamAdminScopeRequest request) { + return createIpamAdminScopeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new IpamAdminScope in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CreateIpamAdminScopeRequest request =
+   *       CreateIpamAdminScopeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setIpamAdminScopeId("ipamAdminScopeId1628703603")
+   *           .setIpamAdminScope(IpamAdminScope.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.createIpamAdminScopeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   IpamAdminScope response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createIpamAdminScopeOperationCallable() { + return stub.createIpamAdminScopeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new IpamAdminScope in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CreateIpamAdminScopeRequest request =
+   *       CreateIpamAdminScopeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setIpamAdminScopeId("ipamAdminScopeId1628703603")
+   *           .setIpamAdminScope(IpamAdminScope.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.createIpamAdminScopeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createIpamAdminScopeCallable() { + return stub.createIpamAdminScopeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   IpamAdminScope response =
+   *       cloudNumberRegistryClient.updateIpamAdminScopeAsync(ipamAdminScope, updateMask).get();
+   * }
+   * }
+ * + * @param ipamAdminScope Required. The IpamAdminScope resource to update. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * IpamAdminScope resource by the update. The fields specified in the update_mask are relative + * to the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateIpamAdminScopeAsync( + IpamAdminScope ipamAdminScope, FieldMask updateMask) { + UpdateIpamAdminScopeRequest request = + UpdateIpamAdminScopeRequest.newBuilder() + .setIpamAdminScope(ipamAdminScope) + .setUpdateMask(updateMask) + .build(); + return updateIpamAdminScopeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   UpdateIpamAdminScopeRequest request =
+   *       UpdateIpamAdminScopeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setIpamAdminScope(IpamAdminScope.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   IpamAdminScope response = cloudNumberRegistryClient.updateIpamAdminScopeAsync(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 updateIpamAdminScopeAsync( + UpdateIpamAdminScopeRequest request) { + return updateIpamAdminScopeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   UpdateIpamAdminScopeRequest request =
+   *       UpdateIpamAdminScopeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setIpamAdminScope(IpamAdminScope.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.updateIpamAdminScopeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   IpamAdminScope response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateIpamAdminScopeOperationCallable() { + return stub.updateIpamAdminScopeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   UpdateIpamAdminScopeRequest request =
+   *       UpdateIpamAdminScopeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setIpamAdminScope(IpamAdminScope.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.updateIpamAdminScopeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateIpamAdminScopeCallable() { + return stub.updateIpamAdminScopeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   IpamAdminScopeName name =
+   *       IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]");
+   *   cloudNumberRegistryClient.deleteIpamAdminScopeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the IpamAdminScope to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteIpamAdminScopeAsync( + IpamAdminScopeName name) { + DeleteIpamAdminScopeRequest request = + DeleteIpamAdminScopeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteIpamAdminScopeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name =
+   *       IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString();
+   *   cloudNumberRegistryClient.deleteIpamAdminScopeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the IpamAdminScope to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteIpamAdminScopeAsync(String name) { + DeleteIpamAdminScopeRequest request = + DeleteIpamAdminScopeRequest.newBuilder().setName(name).build(); + return deleteIpamAdminScopeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DeleteIpamAdminScopeRequest request =
+   *       DeleteIpamAdminScopeRequest.newBuilder()
+   *           .setName(
+   *               IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   cloudNumberRegistryClient.deleteIpamAdminScopeAsync(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 deleteIpamAdminScopeAsync( + DeleteIpamAdminScopeRequest request) { + return deleteIpamAdminScopeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DeleteIpamAdminScopeRequest request =
+   *       DeleteIpamAdminScopeRequest.newBuilder()
+   *           .setName(
+   *               IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.deleteIpamAdminScopeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteIpamAdminScopeOperationCallable() { + return stub.deleteIpamAdminScopeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DeleteIpamAdminScopeRequest request =
+   *       DeleteIpamAdminScopeRequest.newBuilder()
+   *           .setName(
+   *               IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.deleteIpamAdminScopeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteIpamAdminScopeCallable() { + return stub.deleteIpamAdminScopeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   IpamAdminScopeName name =
+   *       IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]");
+   *   IpamAdminScope response = cloudNumberRegistryClient.disableIpamAdminScopeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the IpamAdminScope to disable. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture disableIpamAdminScopeAsync( + IpamAdminScopeName name) { + DisableIpamAdminScopeRequest request = + DisableIpamAdminScopeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return disableIpamAdminScopeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name =
+   *       IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString();
+   *   IpamAdminScope response = cloudNumberRegistryClient.disableIpamAdminScopeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the IpamAdminScope to disable. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture disableIpamAdminScopeAsync( + String name) { + DisableIpamAdminScopeRequest request = + DisableIpamAdminScopeRequest.newBuilder().setName(name).build(); + return disableIpamAdminScopeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DisableIpamAdminScopeRequest request =
+   *       DisableIpamAdminScopeRequest.newBuilder()
+   *           .setName(
+   *               IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   IpamAdminScope response = cloudNumberRegistryClient.disableIpamAdminScopeAsync(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 disableIpamAdminScopeAsync( + DisableIpamAdminScopeRequest request) { + return disableIpamAdminScopeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DisableIpamAdminScopeRequest request =
+   *       DisableIpamAdminScopeRequest.newBuilder()
+   *           .setName(
+   *               IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.disableIpamAdminScopeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   IpamAdminScope response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + disableIpamAdminScopeOperationCallable() { + return stub.disableIpamAdminScopeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DisableIpamAdminScopeRequest request =
+   *       DisableIpamAdminScopeRequest.newBuilder()
+   *           .setName(
+   *               IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.disableIpamAdminScopeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + disableIpamAdminScopeCallable() { + return stub.disableIpamAdminScopeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cleans up a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   IpamAdminScopeName name =
+   *       IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]");
+   *   IpamAdminScope response = cloudNumberRegistryClient.cleanupIpamAdminScopeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the IpamAdminScope to clean up. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture cleanupIpamAdminScopeAsync( + IpamAdminScopeName name) { + CleanupIpamAdminScopeRequest request = + CleanupIpamAdminScopeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return cleanupIpamAdminScopeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cleans up a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name =
+   *       IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString();
+   *   IpamAdminScope response = cloudNumberRegistryClient.cleanupIpamAdminScopeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the IpamAdminScope to clean up. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture cleanupIpamAdminScopeAsync( + String name) { + CleanupIpamAdminScopeRequest request = + CleanupIpamAdminScopeRequest.newBuilder().setName(name).build(); + return cleanupIpamAdminScopeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cleans up a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CleanupIpamAdminScopeRequest request =
+   *       CleanupIpamAdminScopeRequest.newBuilder()
+   *           .setName(
+   *               IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   IpamAdminScope response = cloudNumberRegistryClient.cleanupIpamAdminScopeAsync(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 cleanupIpamAdminScopeAsync( + CleanupIpamAdminScopeRequest request) { + return cleanupIpamAdminScopeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cleans up a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CleanupIpamAdminScopeRequest request =
+   *       CleanupIpamAdminScopeRequest.newBuilder()
+   *           .setName(
+   *               IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.cleanupIpamAdminScopeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   IpamAdminScope response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + cleanupIpamAdminScopeOperationCallable() { + return stub.cleanupIpamAdminScopeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cleans up a single IpamAdminScope. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CleanupIpamAdminScopeRequest request =
+   *       CleanupIpamAdminScopeRequest.newBuilder()
+   *           .setName(
+   *               IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.cleanupIpamAdminScopeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + cleanupIpamAdminScopeCallable() { + return stub.cleanupIpamAdminScopeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RegistryBooks in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (RegistryBook element :
+   *       cloudNumberRegistryClient.listRegistryBooks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, for example `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRegistryBooksPagedResponse listRegistryBooks(LocationName parent) { + ListRegistryBooksRequest request = + ListRegistryBooksRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRegistryBooks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RegistryBooks in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (RegistryBook element :
+   *       cloudNumberRegistryClient.listRegistryBooks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, for example `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRegistryBooksPagedResponse listRegistryBooks(String parent) { + ListRegistryBooksRequest request = + ListRegistryBooksRequest.newBuilder().setParent(parent).build(); + return listRegistryBooks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RegistryBooks in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListRegistryBooksRequest request =
+   *       ListRegistryBooksRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(RegistryBookView.forNumber(0))
+   *           .build();
+   *   for (RegistryBook element :
+   *       cloudNumberRegistryClient.listRegistryBooks(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 ListRegistryBooksPagedResponse listRegistryBooks(ListRegistryBooksRequest request) { + return listRegistryBooksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RegistryBooks in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListRegistryBooksRequest request =
+   *       ListRegistryBooksRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(RegistryBookView.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.listRegistryBooksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (RegistryBook element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRegistryBooksPagedCallable() { + return stub.listRegistryBooksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RegistryBooks in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListRegistryBooksRequest request =
+   *       ListRegistryBooksRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(RegistryBookView.forNumber(0))
+   *           .build();
+   *   while (true) {
+   *     ListRegistryBooksResponse response =
+   *         cloudNumberRegistryClient.listRegistryBooksCallable().call(request);
+   *     for (RegistryBook element : response.getRegistryBooksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRegistryBooksCallable() { + return stub.listRegistryBooksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]");
+   *   RegistryBook response = cloudNumberRegistryClient.getRegistryBook(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the RegistryBook to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RegistryBook getRegistryBook(RegistryBookName name) { + GetRegistryBookRequest request = + GetRegistryBookRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRegistryBook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString();
+   *   RegistryBook response = cloudNumberRegistryClient.getRegistryBook(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the RegistryBook to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RegistryBook getRegistryBook(String name) { + GetRegistryBookRequest request = GetRegistryBookRequest.newBuilder().setName(name).build(); + return getRegistryBook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   GetRegistryBookRequest request =
+   *       GetRegistryBookRequest.newBuilder()
+   *           .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString())
+   *           .setView(RegistryBookView.forNumber(0))
+   *           .build();
+   *   RegistryBook response = cloudNumberRegistryClient.getRegistryBook(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 RegistryBook getRegistryBook(GetRegistryBookRequest request) { + return getRegistryBookCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   GetRegistryBookRequest request =
+   *       GetRegistryBookRequest.newBuilder()
+   *           .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString())
+   *           .setView(RegistryBookView.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.getRegistryBookCallable().futureCall(request);
+   *   // Do something.
+   *   RegistryBook response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRegistryBookCallable() { + return stub.getRegistryBookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches IP resources in a given RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]");
+   *   for (Range element : cloudNumberRegistryClient.searchIpResources(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The resource name of the RegistryBook to search in. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchIpResourcesPagedResponse searchIpResources(RegistryBookName name) { + SearchIpResourcesRequest request = + SearchIpResourcesRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return searchIpResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches IP resources in a given RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString();
+   *   for (Range element : cloudNumberRegistryClient.searchIpResources(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The resource name of the RegistryBook to search in. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchIpResourcesPagedResponse searchIpResources(String name) { + SearchIpResourcesRequest request = SearchIpResourcesRequest.newBuilder().setName(name).build(); + return searchIpResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches IP resources in a given RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   SearchIpResourcesRequest request =
+   *       SearchIpResourcesRequest.newBuilder()
+   *           .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString())
+   *           .setQuery("query107944136")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowUtilization(true)
+   *           .addAllSearchResourceTypes(
+   *               new ArrayList())
+   *           .build();
+   *   for (Range element : cloudNumberRegistryClient.searchIpResources(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 SearchIpResourcesPagedResponse searchIpResources(SearchIpResourcesRequest request) { + return searchIpResourcesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches IP resources in a given RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   SearchIpResourcesRequest request =
+   *       SearchIpResourcesRequest.newBuilder()
+   *           .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString())
+   *           .setQuery("query107944136")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowUtilization(true)
+   *           .addAllSearchResourceTypes(
+   *               new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.searchIpResourcesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Range element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchIpResourcesPagedCallable() { + return stub.searchIpResourcesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches IP resources in a given RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   SearchIpResourcesRequest request =
+   *       SearchIpResourcesRequest.newBuilder()
+   *           .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString())
+   *           .setQuery("query107944136")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowUtilization(true)
+   *           .addAllSearchResourceTypes(
+   *               new ArrayList())
+   *           .build();
+   *   while (true) {
+   *     SearchIpResourcesResponse response =
+   *         cloudNumberRegistryClient.searchIpResourcesCallable().call(request);
+   *     for (Range element : response.getRangesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchIpResourcesCallable() { + return stub.searchIpResourcesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new RegistryBook in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   RegistryBook registryBook = RegistryBook.newBuilder().build();
+   *   String registryBookId = "registryBookId2126801025";
+   *   RegistryBook response =
+   *       cloudNumberRegistryClient
+   *           .createRegistryBookAsync(parent, registryBook, registryBookId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name where the RegistryBook will be created. + * @param registryBook Required. The RegistryBook resource to create. + * @param registryBookId Required. The ID to use for the RegistryBook, which will become the final + * segment of the resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createRegistryBookAsync( + LocationName parent, RegistryBook registryBook, String registryBookId) { + CreateRegistryBookRequest request = + CreateRegistryBookRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setRegistryBook(registryBook) + .setRegistryBookId(registryBookId) + .build(); + return createRegistryBookAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new RegistryBook in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   RegistryBook registryBook = RegistryBook.newBuilder().build();
+   *   String registryBookId = "registryBookId2126801025";
+   *   RegistryBook response =
+   *       cloudNumberRegistryClient
+   *           .createRegistryBookAsync(parent, registryBook, registryBookId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name where the RegistryBook will be created. + * @param registryBook Required. The RegistryBook resource to create. + * @param registryBookId Required. The ID to use for the RegistryBook, which will become the final + * segment of the resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createRegistryBookAsync( + String parent, RegistryBook registryBook, String registryBookId) { + CreateRegistryBookRequest request = + CreateRegistryBookRequest.newBuilder() + .setParent(parent) + .setRegistryBook(registryBook) + .setRegistryBookId(registryBookId) + .build(); + return createRegistryBookAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new RegistryBook in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CreateRegistryBookRequest request =
+   *       CreateRegistryBookRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setRegistryBookId("registryBookId2126801025")
+   *           .setRegistryBook(RegistryBook.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   RegistryBook response = cloudNumberRegistryClient.createRegistryBookAsync(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 createRegistryBookAsync( + CreateRegistryBookRequest request) { + return createRegistryBookOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new RegistryBook in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CreateRegistryBookRequest request =
+   *       CreateRegistryBookRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setRegistryBookId("registryBookId2126801025")
+   *           .setRegistryBook(RegistryBook.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.createRegistryBookOperationCallable().futureCall(request);
+   *   // Do something.
+   *   RegistryBook response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createRegistryBookOperationCallable() { + return stub.createRegistryBookOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new RegistryBook in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CreateRegistryBookRequest request =
+   *       CreateRegistryBookRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setRegistryBookId("registryBookId2126801025")
+   *           .setRegistryBook(RegistryBook.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.createRegistryBookCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createRegistryBookCallable() { + return stub.createRegistryBookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   RegistryBook registryBook = RegistryBook.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   RegistryBook response =
+   *       cloudNumberRegistryClient.updateRegistryBookAsync(registryBook, updateMask).get();
+   * }
+   * }
+ * + * @param registryBook Required. The RegistryBook resource to update. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * RegistryBook resource by the update. The fields specified in the update_mask are relative + * to the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateRegistryBookAsync( + RegistryBook registryBook, FieldMask updateMask) { + UpdateRegistryBookRequest request = + UpdateRegistryBookRequest.newBuilder() + .setRegistryBook(registryBook) + .setUpdateMask(updateMask) + .build(); + return updateRegistryBookAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   UpdateRegistryBookRequest request =
+   *       UpdateRegistryBookRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRegistryBook(RegistryBook.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   RegistryBook response = cloudNumberRegistryClient.updateRegistryBookAsync(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 updateRegistryBookAsync( + UpdateRegistryBookRequest request) { + return updateRegistryBookOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   UpdateRegistryBookRequest request =
+   *       UpdateRegistryBookRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRegistryBook(RegistryBook.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.updateRegistryBookOperationCallable().futureCall(request);
+   *   // Do something.
+   *   RegistryBook response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateRegistryBookOperationCallable() { + return stub.updateRegistryBookOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   UpdateRegistryBookRequest request =
+   *       UpdateRegistryBookRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRegistryBook(RegistryBook.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.updateRegistryBookCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateRegistryBookCallable() { + return stub.updateRegistryBookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]");
+   *   cloudNumberRegistryClient.deleteRegistryBookAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the RegistryBook to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRegistryBookAsync( + RegistryBookName name) { + DeleteRegistryBookRequest request = + DeleteRegistryBookRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteRegistryBookAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString();
+   *   cloudNumberRegistryClient.deleteRegistryBookAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the RegistryBook to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRegistryBookAsync(String name) { + DeleteRegistryBookRequest request = + DeleteRegistryBookRequest.newBuilder().setName(name).build(); + return deleteRegistryBookAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DeleteRegistryBookRequest request =
+   *       DeleteRegistryBookRequest.newBuilder()
+   *           .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   cloudNumberRegistryClient.deleteRegistryBookAsync(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 deleteRegistryBookAsync( + DeleteRegistryBookRequest request) { + return deleteRegistryBookOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DeleteRegistryBookRequest request =
+   *       DeleteRegistryBookRequest.newBuilder()
+   *           .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.deleteRegistryBookOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteRegistryBookOperationCallable() { + return stub.deleteRegistryBookOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single RegistryBook. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DeleteRegistryBookRequest request =
+   *       DeleteRegistryBookRequest.newBuilder()
+   *           .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.deleteRegistryBookCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteRegistryBookCallable() { + return stub.deleteRegistryBookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Realms in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Realm element : cloudNumberRegistryClient.listRealms(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, for example `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRealmsPagedResponse listRealms(LocationName parent) { + ListRealmsRequest request = + ListRealmsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listRealms(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Realms in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Realm element : cloudNumberRegistryClient.listRealms(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, for example `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRealmsPagedResponse listRealms(String parent) { + ListRealmsRequest request = ListRealmsRequest.newBuilder().setParent(parent).build(); + return listRealms(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Realms in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListRealmsRequest request =
+   *       ListRealmsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Realm element : cloudNumberRegistryClient.listRealms(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 ListRealmsPagedResponse listRealms(ListRealmsRequest request) { + return listRealmsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Realms in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListRealmsRequest request =
+   *       ListRealmsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.listRealmsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Realm element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listRealmsPagedCallable() { + return stub.listRealmsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Realms in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListRealmsRequest request =
+   *       ListRealmsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListRealmsResponse response = cloudNumberRegistryClient.listRealmsCallable().call(request);
+   *     for (Realm element : response.getRealmsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listRealmsCallable() { + return stub.listRealmsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Realm. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+   *   Realm response = cloudNumberRegistryClient.getRealm(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the Realm to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Realm getRealm(RealmName name) { + GetRealmRequest request = + GetRealmRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRealm(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Realm. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString();
+   *   Realm response = cloudNumberRegistryClient.getRealm(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the Realm to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Realm getRealm(String name) { + GetRealmRequest request = GetRealmRequest.newBuilder().setName(name).build(); + return getRealm(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Realm. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   GetRealmRequest request =
+   *       GetRealmRequest.newBuilder()
+   *           .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString())
+   *           .build();
+   *   Realm response = cloudNumberRegistryClient.getRealm(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 Realm getRealm(GetRealmRequest request) { + return getRealmCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Realm. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   GetRealmRequest request =
+   *       GetRealmRequest.newBuilder()
+   *           .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString())
+   *           .build();
+   *   ApiFuture future = cloudNumberRegistryClient.getRealmCallable().futureCall(request);
+   *   // Do something.
+   *   Realm response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRealmCallable() { + return stub.getRealmCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Realm in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Realm realm = Realm.newBuilder().build();
+   *   String realmId = "realmId1080654858";
+   *   Realm response = cloudNumberRegistryClient.createRealmAsync(parent, realm, realmId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name where the Realm will be created. + * @param realm Required. The Realm resource to create. + * @param realmId Required. The ID to use for the Realm, which will become the final segment of + * the resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createRealmAsync( + LocationName parent, Realm realm, String realmId) { + CreateRealmRequest request = + CreateRealmRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setRealm(realm) + .setRealmId(realmId) + .build(); + return createRealmAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Realm in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Realm realm = Realm.newBuilder().build();
+   *   String realmId = "realmId1080654858";
+   *   Realm response = cloudNumberRegistryClient.createRealmAsync(parent, realm, realmId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name where the Realm will be created. + * @param realm Required. The Realm resource to create. + * @param realmId Required. The ID to use for the Realm, which will become the final segment of + * the resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createRealmAsync( + String parent, Realm realm, String realmId) { + CreateRealmRequest request = + CreateRealmRequest.newBuilder() + .setParent(parent) + .setRealm(realm) + .setRealmId(realmId) + .build(); + return createRealmAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Realm in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CreateRealmRequest request =
+   *       CreateRealmRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setRealmId("realmId1080654858")
+   *           .setRealm(Realm.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Realm response = cloudNumberRegistryClient.createRealmAsync(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 createRealmAsync( + CreateRealmRequest request) { + return createRealmOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Realm in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CreateRealmRequest request =
+   *       CreateRealmRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setRealmId("realmId1080654858")
+   *           .setRealm(Realm.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.createRealmOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Realm response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createRealmOperationCallable() { + return stub.createRealmOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Realm in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CreateRealmRequest request =
+   *       CreateRealmRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setRealmId("realmId1080654858")
+   *           .setRealm(Realm.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.createRealmCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createRealmCallable() { + return stub.createRealmCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Realm. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   Realm realm = Realm.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Realm response = cloudNumberRegistryClient.updateRealmAsync(realm, updateMask).get();
+   * }
+   * }
+ * + * @param realm Required. The Realm resource to update. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Realm resource by the update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateRealmAsync( + Realm realm, FieldMask updateMask) { + UpdateRealmRequest request = + UpdateRealmRequest.newBuilder().setRealm(realm).setUpdateMask(updateMask).build(); + return updateRealmAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Realm. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   UpdateRealmRequest request =
+   *       UpdateRealmRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRealm(Realm.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Realm response = cloudNumberRegistryClient.updateRealmAsync(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 updateRealmAsync( + UpdateRealmRequest request) { + return updateRealmOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Realm. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   UpdateRealmRequest request =
+   *       UpdateRealmRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRealm(Realm.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.updateRealmOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Realm response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateRealmOperationCallable() { + return stub.updateRealmOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Realm. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   UpdateRealmRequest request =
+   *       UpdateRealmRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRealm(Realm.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.updateRealmCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateRealmCallable() { + return stub.updateRealmCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Realm. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]");
+   *   cloudNumberRegistryClient.deleteRealmAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the Realm to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRealmAsync(RealmName name) { + DeleteRealmRequest request = + DeleteRealmRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteRealmAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Realm. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString();
+   *   cloudNumberRegistryClient.deleteRealmAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the Realm to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRealmAsync(String name) { + DeleteRealmRequest request = DeleteRealmRequest.newBuilder().setName(name).build(); + return deleteRealmAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Realm. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DeleteRealmRequest request =
+   *       DeleteRealmRequest.newBuilder()
+   *           .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   cloudNumberRegistryClient.deleteRealmAsync(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 deleteRealmAsync( + DeleteRealmRequest request) { + return deleteRealmOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Realm. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DeleteRealmRequest request =
+   *       DeleteRealmRequest.newBuilder()
+   *           .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.deleteRealmOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteRealmOperationCallable() { + return stub.deleteRealmOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Realm. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DeleteRealmRequest request =
+   *       DeleteRealmRequest.newBuilder()
+   *           .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.deleteRealmCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteRealmCallable() { + return stub.deleteRealmCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DiscoveredRanges in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (DiscoveredRange element :
+   *       cloudNumberRegistryClient.listDiscoveredRanges(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, for example `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDiscoveredRangesPagedResponse listDiscoveredRanges(LocationName parent) { + ListDiscoveredRangesRequest request = + ListDiscoveredRangesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDiscoveredRanges(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DiscoveredRanges in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (DiscoveredRange element :
+   *       cloudNumberRegistryClient.listDiscoveredRanges(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, for example `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDiscoveredRangesPagedResponse listDiscoveredRanges(String parent) { + ListDiscoveredRangesRequest request = + ListDiscoveredRangesRequest.newBuilder().setParent(parent).build(); + return listDiscoveredRanges(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DiscoveredRanges in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListDiscoveredRangesRequest request =
+   *       ListDiscoveredRangesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (DiscoveredRange element :
+   *       cloudNumberRegistryClient.listDiscoveredRanges(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 ListDiscoveredRangesPagedResponse listDiscoveredRanges( + ListDiscoveredRangesRequest request) { + return listDiscoveredRangesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DiscoveredRanges in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListDiscoveredRangesRequest request =
+   *       ListDiscoveredRangesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.listDiscoveredRangesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DiscoveredRange element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDiscoveredRangesPagedCallable() { + return stub.listDiscoveredRangesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DiscoveredRanges in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListDiscoveredRangesRequest request =
+   *       ListDiscoveredRangesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListDiscoveredRangesResponse response =
+   *         cloudNumberRegistryClient.listDiscoveredRangesCallable().call(request);
+   *     for (DiscoveredRange element : response.getDiscoveredRangesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDiscoveredRangesCallable() { + return stub.listDiscoveredRangesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DiscoveredRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DiscoveredRangeName name =
+   *       DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]");
+   *   DiscoveredRange response = cloudNumberRegistryClient.getDiscoveredRange(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the DiscoveredRange to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiscoveredRange getDiscoveredRange(DiscoveredRangeName name) { + GetDiscoveredRangeRequest request = + GetDiscoveredRangeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDiscoveredRange(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DiscoveredRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name =
+   *       DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString();
+   *   DiscoveredRange response = cloudNumberRegistryClient.getDiscoveredRange(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the DiscoveredRange to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiscoveredRange getDiscoveredRange(String name) { + GetDiscoveredRangeRequest request = + GetDiscoveredRangeRequest.newBuilder().setName(name).build(); + return getDiscoveredRange(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DiscoveredRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   GetDiscoveredRangeRequest request =
+   *       GetDiscoveredRangeRequest.newBuilder()
+   *           .setName(
+   *               DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]")
+   *                   .toString())
+   *           .build();
+   *   DiscoveredRange response = cloudNumberRegistryClient.getDiscoveredRange(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 DiscoveredRange getDiscoveredRange(GetDiscoveredRangeRequest request) { + return getDiscoveredRangeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DiscoveredRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   GetDiscoveredRangeRequest request =
+   *       GetDiscoveredRangeRequest.newBuilder()
+   *           .setName(
+   *               DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.getDiscoveredRangeCallable().futureCall(request);
+   *   // Do something.
+   *   DiscoveredRange response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getDiscoveredRangeCallable() { + return stub.getDiscoveredRangeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Finds free IP ranges in a single DiscoveredRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DiscoveredRangeName name =
+   *       DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]");
+   *   int cidrPrefixLength = -954389592;
+   *   FindDiscoveredRangeFreeIpRangesResponse response =
+   *       cloudNumberRegistryClient.findDiscoveredRangeFreeIpRanges(name, cidrPrefixLength);
+   * }
+   * }
+ * + * @param name Required. The resource name of the DiscoveredRange to search within. + * @param cidrPrefixLength Required. The prefix length of the free IP ranges to find. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FindDiscoveredRangeFreeIpRangesResponse findDiscoveredRangeFreeIpRanges( + DiscoveredRangeName name, int cidrPrefixLength) { + FindDiscoveredRangeFreeIpRangesRequest request = + FindDiscoveredRangeFreeIpRangesRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setCidrPrefixLength(cidrPrefixLength) + .build(); + return findDiscoveredRangeFreeIpRanges(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Finds free IP ranges in a single DiscoveredRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name =
+   *       DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString();
+   *   int cidrPrefixLength = -954389592;
+   *   FindDiscoveredRangeFreeIpRangesResponse response =
+   *       cloudNumberRegistryClient.findDiscoveredRangeFreeIpRanges(name, cidrPrefixLength);
+   * }
+   * }
+ * + * @param name Required. The resource name of the DiscoveredRange to search within. + * @param cidrPrefixLength Required. The prefix length of the free IP ranges to find. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FindDiscoveredRangeFreeIpRangesResponse findDiscoveredRangeFreeIpRanges( + String name, int cidrPrefixLength) { + FindDiscoveredRangeFreeIpRangesRequest request = + FindDiscoveredRangeFreeIpRangesRequest.newBuilder() + .setName(name) + .setCidrPrefixLength(cidrPrefixLength) + .build(); + return findDiscoveredRangeFreeIpRanges(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Finds free IP ranges in a single DiscoveredRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   FindDiscoveredRangeFreeIpRangesRequest request =
+   *       FindDiscoveredRangeFreeIpRangesRequest.newBuilder()
+   *           .setName(
+   *               DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]")
+   *                   .toString())
+   *           .setCidrPrefixLength(-954389592)
+   *           .setRangeCount(-448443507)
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   FindDiscoveredRangeFreeIpRangesResponse response =
+   *       cloudNumberRegistryClient.findDiscoveredRangeFreeIpRanges(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 FindDiscoveredRangeFreeIpRangesResponse findDiscoveredRangeFreeIpRanges( + FindDiscoveredRangeFreeIpRangesRequest request) { + return findDiscoveredRangeFreeIpRangesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Finds free IP ranges in a single DiscoveredRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   FindDiscoveredRangeFreeIpRangesRequest request =
+   *       FindDiscoveredRangeFreeIpRangesRequest.newBuilder()
+   *           .setName(
+   *               DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]")
+   *                   .toString())
+   *           .setCidrPrefixLength(-954389592)
+   *           .setRangeCount(-448443507)
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.findDiscoveredRangeFreeIpRangesCallable().futureCall(request);
+   *   // Do something.
+   *   FindDiscoveredRangeFreeIpRangesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesCallable() { + return stub.findDiscoveredRangeFreeIpRangesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomRanges in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (CustomRange element : cloudNumberRegistryClient.listCustomRanges(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, for example `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCustomRangesPagedResponse listCustomRanges(LocationName parent) { + ListCustomRangesRequest request = + ListCustomRangesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCustomRanges(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomRanges in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (CustomRange element : cloudNumberRegistryClient.listCustomRanges(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name, for example `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCustomRangesPagedResponse listCustomRanges(String parent) { + ListCustomRangesRequest request = + ListCustomRangesRequest.newBuilder().setParent(parent).build(); + return listCustomRanges(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomRanges in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListCustomRangesRequest request =
+   *       ListCustomRangesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (CustomRange element : cloudNumberRegistryClient.listCustomRanges(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 ListCustomRangesPagedResponse listCustomRanges(ListCustomRangesRequest request) { + return listCustomRangesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomRanges in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListCustomRangesRequest request =
+   *       ListCustomRangesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.listCustomRangesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (CustomRange element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCustomRangesPagedCallable() { + return stub.listCustomRangesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists CustomRanges in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ListCustomRangesRequest request =
+   *       ListCustomRangesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListCustomRangesResponse response =
+   *         cloudNumberRegistryClient.listCustomRangesCallable().call(request);
+   *     for (CustomRange element : response.getCustomRangesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCustomRangesCallable() { + return stub.listCustomRangesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]");
+   *   CustomRange response = cloudNumberRegistryClient.getCustomRange(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the CustomRange to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomRange getCustomRange(CustomRangeName name) { + GetCustomRangeRequest request = + GetCustomRangeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCustomRange(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString();
+   *   CustomRange response = cloudNumberRegistryClient.getCustomRange(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the CustomRange to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CustomRange getCustomRange(String name) { + GetCustomRangeRequest request = GetCustomRangeRequest.newBuilder().setName(name).build(); + return getCustomRange(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   GetCustomRangeRequest request =
+   *       GetCustomRangeRequest.newBuilder()
+   *           .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString())
+   *           .build();
+   *   CustomRange response = cloudNumberRegistryClient.getCustomRange(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 CustomRange getCustomRange(GetCustomRangeRequest request) { + return getCustomRangeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   GetCustomRangeRequest request =
+   *       GetCustomRangeRequest.newBuilder()
+   *           .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.getCustomRangeCallable().futureCall(request);
+   *   // Do something.
+   *   CustomRange response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getCustomRangeCallable() { + return stub.getCustomRangeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single CustomRange and its utilization. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]");
+   *   ShowCustomRangeUtilizationResponse response =
+   *       cloudNumberRegistryClient.showCustomRangeUtilization(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the CustomRange. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ShowCustomRangeUtilizationResponse showCustomRangeUtilization(CustomRangeName name) { + ShowCustomRangeUtilizationRequest request = + ShowCustomRangeUtilizationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return showCustomRangeUtilization(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single CustomRange and its utilization. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString();
+   *   ShowCustomRangeUtilizationResponse response =
+   *       cloudNumberRegistryClient.showCustomRangeUtilization(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the CustomRange. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ShowCustomRangeUtilizationResponse showCustomRangeUtilization(String name) { + ShowCustomRangeUtilizationRequest request = + ShowCustomRangeUtilizationRequest.newBuilder().setName(name).build(); + return showCustomRangeUtilization(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single CustomRange and its utilization. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ShowCustomRangeUtilizationRequest request =
+   *       ShowCustomRangeUtilizationRequest.newBuilder()
+   *           .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString())
+   *           .build();
+   *   ShowCustomRangeUtilizationResponse response =
+   *       cloudNumberRegistryClient.showCustomRangeUtilization(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 ShowCustomRangeUtilizationResponse showCustomRangeUtilization( + ShowCustomRangeUtilizationRequest request) { + return showCustomRangeUtilizationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single CustomRange and its utilization. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ShowCustomRangeUtilizationRequest request =
+   *       ShowCustomRangeUtilizationRequest.newBuilder()
+   *           .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.showCustomRangeUtilizationCallable().futureCall(request);
+   *   // Do something.
+   *   ShowCustomRangeUtilizationResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + showCustomRangeUtilizationCallable() { + return stub.showCustomRangeUtilizationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single DiscoveredRange and its utilization. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DiscoveredRangeName name =
+   *       DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]");
+   *   ShowDiscoveredRangeUtilizationResponse response =
+   *       cloudNumberRegistryClient.showDiscoveredRangeUtilization(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the DiscoveredRange. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ShowDiscoveredRangeUtilizationResponse showDiscoveredRangeUtilization( + DiscoveredRangeName name) { + ShowDiscoveredRangeUtilizationRequest request = + ShowDiscoveredRangeUtilizationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return showDiscoveredRangeUtilization(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single DiscoveredRange and its utilization. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name =
+   *       DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString();
+   *   ShowDiscoveredRangeUtilizationResponse response =
+   *       cloudNumberRegistryClient.showDiscoveredRangeUtilization(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the DiscoveredRange. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ShowDiscoveredRangeUtilizationResponse showDiscoveredRangeUtilization(String name) { + ShowDiscoveredRangeUtilizationRequest request = + ShowDiscoveredRangeUtilizationRequest.newBuilder().setName(name).build(); + return showDiscoveredRangeUtilization(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single DiscoveredRange and its utilization. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ShowDiscoveredRangeUtilizationRequest request =
+   *       ShowDiscoveredRangeUtilizationRequest.newBuilder()
+   *           .setName(
+   *               DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]")
+   *                   .toString())
+   *           .build();
+   *   ShowDiscoveredRangeUtilizationResponse response =
+   *       cloudNumberRegistryClient.showDiscoveredRangeUtilization(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 ShowDiscoveredRangeUtilizationResponse showDiscoveredRangeUtilization( + ShowDiscoveredRangeUtilizationRequest request) { + return showDiscoveredRangeUtilizationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single DiscoveredRange and its utilization. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   ShowDiscoveredRangeUtilizationRequest request =
+   *       ShowDiscoveredRangeUtilizationRequest.newBuilder()
+   *           .setName(
+   *               DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.showDiscoveredRangeUtilizationCallable().futureCall(request);
+   *   // Do something.
+   *   ShowDiscoveredRangeUtilizationResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationCallable() { + return stub.showDiscoveredRangeUtilizationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Finds free IP ranges in a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]");
+   *   int cidrPrefixLength = -954389592;
+   *   FindCustomRangeFreeIpRangesResponse response =
+   *       cloudNumberRegistryClient.findCustomRangeFreeIpRanges(name, cidrPrefixLength);
+   * }
+   * }
+ * + * @param name Required. The resource name of the CustomRange to search within. + * @param cidrPrefixLength Required. The prefix length of the free IP ranges to find. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FindCustomRangeFreeIpRangesResponse findCustomRangeFreeIpRanges( + CustomRangeName name, int cidrPrefixLength) { + FindCustomRangeFreeIpRangesRequest request = + FindCustomRangeFreeIpRangesRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setCidrPrefixLength(cidrPrefixLength) + .build(); + return findCustomRangeFreeIpRanges(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Finds free IP ranges in a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString();
+   *   int cidrPrefixLength = -954389592;
+   *   FindCustomRangeFreeIpRangesResponse response =
+   *       cloudNumberRegistryClient.findCustomRangeFreeIpRanges(name, cidrPrefixLength);
+   * }
+   * }
+ * + * @param name Required. The resource name of the CustomRange to search within. + * @param cidrPrefixLength Required. The prefix length of the free IP ranges to find. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FindCustomRangeFreeIpRangesResponse findCustomRangeFreeIpRanges( + String name, int cidrPrefixLength) { + FindCustomRangeFreeIpRangesRequest request = + FindCustomRangeFreeIpRangesRequest.newBuilder() + .setName(name) + .setCidrPrefixLength(cidrPrefixLength) + .build(); + return findCustomRangeFreeIpRanges(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Finds free IP ranges in a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   FindCustomRangeFreeIpRangesRequest request =
+   *       FindCustomRangeFreeIpRangesRequest.newBuilder()
+   *           .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString())
+   *           .setCidrPrefixLength(-954389592)
+   *           .setRangeCount(-448443507)
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   FindCustomRangeFreeIpRangesResponse response =
+   *       cloudNumberRegistryClient.findCustomRangeFreeIpRanges(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 FindCustomRangeFreeIpRangesResponse findCustomRangeFreeIpRanges( + FindCustomRangeFreeIpRangesRequest request) { + return findCustomRangeFreeIpRangesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Finds free IP ranges in a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   FindCustomRangeFreeIpRangesRequest request =
+   *       FindCustomRangeFreeIpRangesRequest.newBuilder()
+   *           .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString())
+   *           .setCidrPrefixLength(-954389592)
+   *           .setRangeCount(-448443507)
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.findCustomRangeFreeIpRangesCallable().futureCall(request);
+   *   // Do something.
+   *   FindCustomRangeFreeIpRangesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + FindCustomRangeFreeIpRangesRequest, FindCustomRangeFreeIpRangesResponse> + findCustomRangeFreeIpRangesCallable() { + return stub.findCustomRangeFreeIpRangesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CustomRange in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   CustomRange customRange = CustomRange.newBuilder().build();
+   *   String customRangeId = "customRangeId1995399815";
+   *   CustomRange response =
+   *       cloudNumberRegistryClient
+   *           .createCustomRangeAsync(parent, customRange, customRangeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name where the CustomRange will be created. + * @param customRange Required. The CustomRange resource to create. + * @param customRangeId Required. The ID to use for the CustomRange, which will become the final + * segment of the resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createCustomRangeAsync( + LocationName parent, CustomRange customRange, String customRangeId) { + CreateCustomRangeRequest request = + CreateCustomRangeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCustomRange(customRange) + .setCustomRangeId(customRangeId) + .build(); + return createCustomRangeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CustomRange in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   CustomRange customRange = CustomRange.newBuilder().build();
+   *   String customRangeId = "customRangeId1995399815";
+   *   CustomRange response =
+   *       cloudNumberRegistryClient
+   *           .createCustomRangeAsync(parent, customRange, customRangeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name where the CustomRange will be created. + * @param customRange Required. The CustomRange resource to create. + * @param customRangeId Required. The ID to use for the CustomRange, which will become the final + * segment of the resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createCustomRangeAsync( + String parent, CustomRange customRange, String customRangeId) { + CreateCustomRangeRequest request = + CreateCustomRangeRequest.newBuilder() + .setParent(parent) + .setCustomRange(customRange) + .setCustomRangeId(customRangeId) + .build(); + return createCustomRangeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CustomRange in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CreateCustomRangeRequest request =
+   *       CreateCustomRangeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setCustomRangeId("customRangeId1995399815")
+   *           .setCustomRange(CustomRange.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   CustomRange response = cloudNumberRegistryClient.createCustomRangeAsync(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 createCustomRangeAsync( + CreateCustomRangeRequest request) { + return createCustomRangeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CustomRange in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CreateCustomRangeRequest request =
+   *       CreateCustomRangeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setCustomRangeId("customRangeId1995399815")
+   *           .setCustomRange(CustomRange.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.createCustomRangeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   CustomRange response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createCustomRangeOperationCallable() { + return stub.createCustomRangeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new CustomRange in a given project and location. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CreateCustomRangeRequest request =
+   *       CreateCustomRangeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setCustomRangeId("customRangeId1995399815")
+   *           .setCustomRange(CustomRange.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.createCustomRangeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createCustomRangeCallable() { + return stub.createCustomRangeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CustomRange customRange = CustomRange.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   CustomRange response =
+   *       cloudNumberRegistryClient.updateCustomRangeAsync(customRange, updateMask).get();
+   * }
+   * }
+ * + * @param customRange Required. The CustomRange resource to update. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * CustomRange resource by the update. The fields specified in the update_mask are relative to + * the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateCustomRangeAsync( + CustomRange customRange, FieldMask updateMask) { + UpdateCustomRangeRequest request = + UpdateCustomRangeRequest.newBuilder() + .setCustomRange(customRange) + .setUpdateMask(updateMask) + .build(); + return updateCustomRangeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   UpdateCustomRangeRequest request =
+   *       UpdateCustomRangeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setCustomRange(CustomRange.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   CustomRange response = cloudNumberRegistryClient.updateCustomRangeAsync(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 updateCustomRangeAsync( + UpdateCustomRangeRequest request) { + return updateCustomRangeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   UpdateCustomRangeRequest request =
+   *       UpdateCustomRangeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setCustomRange(CustomRange.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.updateCustomRangeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   CustomRange response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateCustomRangeOperationCallable() { + return stub.updateCustomRangeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   UpdateCustomRangeRequest request =
+   *       UpdateCustomRangeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setCustomRange(CustomRange.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.updateCustomRangeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateCustomRangeCallable() { + return stub.updateCustomRangeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]");
+   *   cloudNumberRegistryClient.deleteCustomRangeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the CustomRange to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteCustomRangeAsync( + CustomRangeName name) { + DeleteCustomRangeRequest request = + DeleteCustomRangeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteCustomRangeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   String name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString();
+   *   cloudNumberRegistryClient.deleteCustomRangeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the CustomRange to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteCustomRangeAsync(String name) { + DeleteCustomRangeRequest request = DeleteCustomRangeRequest.newBuilder().setName(name).build(); + return deleteCustomRangeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DeleteCustomRangeRequest request =
+   *       DeleteCustomRangeRequest.newBuilder()
+   *           .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   cloudNumberRegistryClient.deleteCustomRangeAsync(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 deleteCustomRangeAsync( + DeleteCustomRangeRequest request) { + return deleteCustomRangeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DeleteCustomRangeRequest request =
+   *       DeleteCustomRangeRequest.newBuilder()
+   *           .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       cloudNumberRegistryClient.deleteCustomRangeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteCustomRangeOperationCallable() { + return stub.deleteCustomRangeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single CustomRange. + * + *

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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+   *   DeleteCustomRangeRequest request =
+   *       DeleteCustomRangeRequest.newBuilder()
+   *           .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       cloudNumberRegistryClient.deleteCustomRangeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteCustomRangeCallable() { + return stub.deleteCustomRangeCallable(); + } + + @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 ListIpamAdminScopesPagedResponse + extends AbstractPagedListResponse< + ListIpamAdminScopesRequest, + ListIpamAdminScopesResponse, + IpamAdminScope, + ListIpamAdminScopesPage, + ListIpamAdminScopesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListIpamAdminScopesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListIpamAdminScopesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListIpamAdminScopesPagedResponse(ListIpamAdminScopesPage page) { + super(page, ListIpamAdminScopesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListIpamAdminScopesPage + extends AbstractPage< + ListIpamAdminScopesRequest, + ListIpamAdminScopesResponse, + IpamAdminScope, + ListIpamAdminScopesPage> { + + private ListIpamAdminScopesPage( + PageContext + context, + ListIpamAdminScopesResponse response) { + super(context, response); + } + + private static ListIpamAdminScopesPage createEmptyPage() { + return new ListIpamAdminScopesPage(null, null); + } + + @Override + protected ListIpamAdminScopesPage createPage( + PageContext + context, + ListIpamAdminScopesResponse response) { + return new ListIpamAdminScopesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListIpamAdminScopesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListIpamAdminScopesRequest, + ListIpamAdminScopesResponse, + IpamAdminScope, + ListIpamAdminScopesPage, + ListIpamAdminScopesFixedSizeCollection> { + + private ListIpamAdminScopesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListIpamAdminScopesFixedSizeCollection createEmptyCollection() { + return new ListIpamAdminScopesFixedSizeCollection(null, 0); + } + + @Override + protected ListIpamAdminScopesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListIpamAdminScopesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListRegistryBooksPagedResponse + extends AbstractPagedListResponse< + ListRegistryBooksRequest, + ListRegistryBooksResponse, + RegistryBook, + ListRegistryBooksPage, + ListRegistryBooksFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRegistryBooksPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRegistryBooksPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRegistryBooksPagedResponse(ListRegistryBooksPage page) { + super(page, ListRegistryBooksFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRegistryBooksPage + extends AbstractPage< + ListRegistryBooksRequest, + ListRegistryBooksResponse, + RegistryBook, + ListRegistryBooksPage> { + + private ListRegistryBooksPage( + PageContext context, + ListRegistryBooksResponse response) { + super(context, response); + } + + private static ListRegistryBooksPage createEmptyPage() { + return new ListRegistryBooksPage(null, null); + } + + @Override + protected ListRegistryBooksPage createPage( + PageContext context, + ListRegistryBooksResponse response) { + return new ListRegistryBooksPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRegistryBooksFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRegistryBooksRequest, + ListRegistryBooksResponse, + RegistryBook, + ListRegistryBooksPage, + ListRegistryBooksFixedSizeCollection> { + + private ListRegistryBooksFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRegistryBooksFixedSizeCollection createEmptyCollection() { + return new ListRegistryBooksFixedSizeCollection(null, 0); + } + + @Override + protected ListRegistryBooksFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRegistryBooksFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchIpResourcesPagedResponse + extends AbstractPagedListResponse< + SearchIpResourcesRequest, + SearchIpResourcesResponse, + Range, + SearchIpResourcesPage, + SearchIpResourcesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchIpResourcesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchIpResourcesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchIpResourcesPagedResponse(SearchIpResourcesPage page) { + super(page, SearchIpResourcesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchIpResourcesPage + extends AbstractPage< + SearchIpResourcesRequest, SearchIpResourcesResponse, Range, SearchIpResourcesPage> { + + private SearchIpResourcesPage( + PageContext context, + SearchIpResourcesResponse response) { + super(context, response); + } + + private static SearchIpResourcesPage createEmptyPage() { + return new SearchIpResourcesPage(null, null); + } + + @Override + protected SearchIpResourcesPage createPage( + PageContext context, + SearchIpResourcesResponse response) { + return new SearchIpResourcesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchIpResourcesFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchIpResourcesRequest, + SearchIpResourcesResponse, + Range, + SearchIpResourcesPage, + SearchIpResourcesFixedSizeCollection> { + + private SearchIpResourcesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchIpResourcesFixedSizeCollection createEmptyCollection() { + return new SearchIpResourcesFixedSizeCollection(null, 0); + } + + @Override + protected SearchIpResourcesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchIpResourcesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListRealmsPagedResponse + extends AbstractPagedListResponse< + ListRealmsRequest, + ListRealmsResponse, + Realm, + ListRealmsPage, + ListRealmsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRealmsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListRealmsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListRealmsPagedResponse(ListRealmsPage page) { + super(page, ListRealmsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRealmsPage + extends AbstractPage { + + private ListRealmsPage( + PageContext context, + ListRealmsResponse response) { + super(context, response); + } + + private static ListRealmsPage createEmptyPage() { + return new ListRealmsPage(null, null); + } + + @Override + protected ListRealmsPage createPage( + PageContext context, + ListRealmsResponse response) { + return new ListRealmsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRealmsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRealmsRequest, + ListRealmsResponse, + Realm, + ListRealmsPage, + ListRealmsFixedSizeCollection> { + + private ListRealmsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRealmsFixedSizeCollection createEmptyCollection() { + return new ListRealmsFixedSizeCollection(null, 0); + } + + @Override + protected ListRealmsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRealmsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDiscoveredRangesPagedResponse + extends AbstractPagedListResponse< + ListDiscoveredRangesRequest, + ListDiscoveredRangesResponse, + DiscoveredRange, + ListDiscoveredRangesPage, + ListDiscoveredRangesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDiscoveredRangesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDiscoveredRangesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDiscoveredRangesPagedResponse(ListDiscoveredRangesPage page) { + super(page, ListDiscoveredRangesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDiscoveredRangesPage + extends AbstractPage< + ListDiscoveredRangesRequest, + ListDiscoveredRangesResponse, + DiscoveredRange, + ListDiscoveredRangesPage> { + + private ListDiscoveredRangesPage( + PageContext + context, + ListDiscoveredRangesResponse response) { + super(context, response); + } + + private static ListDiscoveredRangesPage createEmptyPage() { + return new ListDiscoveredRangesPage(null, null); + } + + @Override + protected ListDiscoveredRangesPage createPage( + PageContext + context, + ListDiscoveredRangesResponse response) { + return new ListDiscoveredRangesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDiscoveredRangesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDiscoveredRangesRequest, + ListDiscoveredRangesResponse, + DiscoveredRange, + ListDiscoveredRangesPage, + ListDiscoveredRangesFixedSizeCollection> { + + private ListDiscoveredRangesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDiscoveredRangesFixedSizeCollection createEmptyCollection() { + return new ListDiscoveredRangesFixedSizeCollection(null, 0); + } + + @Override + protected ListDiscoveredRangesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDiscoveredRangesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListCustomRangesPagedResponse + extends AbstractPagedListResponse< + ListCustomRangesRequest, + ListCustomRangesResponse, + CustomRange, + ListCustomRangesPage, + ListCustomRangesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCustomRangesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListCustomRangesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListCustomRangesPagedResponse(ListCustomRangesPage page) { + super(page, ListCustomRangesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCustomRangesPage + extends AbstractPage< + ListCustomRangesRequest, ListCustomRangesResponse, CustomRange, ListCustomRangesPage> { + + private ListCustomRangesPage( + PageContext context, + ListCustomRangesResponse response) { + super(context, response); + } + + private static ListCustomRangesPage createEmptyPage() { + return new ListCustomRangesPage(null, null); + } + + @Override + protected ListCustomRangesPage createPage( + PageContext context, + ListCustomRangesResponse response) { + return new ListCustomRangesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCustomRangesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCustomRangesRequest, + ListCustomRangesResponse, + CustomRange, + ListCustomRangesPage, + ListCustomRangesFixedSizeCollection> { + + private ListCustomRangesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCustomRangesFixedSizeCollection createEmptyCollection() { + return new ListCustomRangesFixedSizeCollection(null, 0); + } + + @Override + protected ListCustomRangesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCustomRangesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistrySettings.java b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistrySettings.java new file mode 100644 index 000000000000..ec12001b1d39 --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistrySettings.java @@ -0,0 +1,796 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha; + +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListCustomRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListDiscoveredRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListIpamAdminScopesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRealmsPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRegistryBooksPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.SearchIpResourcesPagedResponse; + +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.numberregistry.v1alpha.stub.CloudNumberRegistryStubSettings; +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 CloudNumberRegistryClient}. + * + *

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

    + *
  • The default service address (cloudnumberregistry.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getIpamAdminScope: + * + *

{@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
+ * CloudNumberRegistrySettings.Builder cloudNumberRegistrySettingsBuilder =
+ *     CloudNumberRegistrySettings.newBuilder();
+ * cloudNumberRegistrySettingsBuilder
+ *     .getIpamAdminScopeSettings()
+ *     .setRetrySettings(
+ *         cloudNumberRegistrySettingsBuilder
+ *             .getIpamAdminScopeSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * CloudNumberRegistrySettings cloudNumberRegistrySettings =
+ *     cloudNumberRegistrySettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createIpamAdminScope: + * + *

{@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
+ * CloudNumberRegistrySettings.Builder cloudNumberRegistrySettingsBuilder =
+ *     CloudNumberRegistrySettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * cloudNumberRegistrySettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class CloudNumberRegistrySettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listIpamAdminScopes. */ + public PagedCallSettings< + ListIpamAdminScopesRequest, ListIpamAdminScopesResponse, ListIpamAdminScopesPagedResponse> + listIpamAdminScopesSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).listIpamAdminScopesSettings(); + } + + /** Returns the object with the settings used for calls to getIpamAdminScope. */ + public UnaryCallSettings getIpamAdminScopeSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).getIpamAdminScopeSettings(); + } + + /** Returns the object with the settings used for calls to checkAvailabilityIpamAdminScopes. */ + public UnaryCallSettings< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .checkAvailabilityIpamAdminScopesSettings(); + } + + /** Returns the object with the settings used for calls to createIpamAdminScope. */ + public UnaryCallSettings createIpamAdminScopeSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).createIpamAdminScopeSettings(); + } + + /** Returns the object with the settings used for calls to createIpamAdminScope. */ + public OperationCallSettings + createIpamAdminScopeOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .createIpamAdminScopeOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateIpamAdminScope. */ + public UnaryCallSettings updateIpamAdminScopeSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).updateIpamAdminScopeSettings(); + } + + /** Returns the object with the settings used for calls to updateIpamAdminScope. */ + public OperationCallSettings + updateIpamAdminScopeOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .updateIpamAdminScopeOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteIpamAdminScope. */ + public UnaryCallSettings deleteIpamAdminScopeSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).deleteIpamAdminScopeSettings(); + } + + /** Returns the object with the settings used for calls to deleteIpamAdminScope. */ + public OperationCallSettings + deleteIpamAdminScopeOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .deleteIpamAdminScopeOperationSettings(); + } + + /** Returns the object with the settings used for calls to disableIpamAdminScope. */ + public UnaryCallSettings + disableIpamAdminScopeSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).disableIpamAdminScopeSettings(); + } + + /** Returns the object with the settings used for calls to disableIpamAdminScope. */ + public OperationCallSettings + disableIpamAdminScopeOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .disableIpamAdminScopeOperationSettings(); + } + + /** Returns the object with the settings used for calls to cleanupIpamAdminScope. */ + public UnaryCallSettings + cleanupIpamAdminScopeSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).cleanupIpamAdminScopeSettings(); + } + + /** Returns the object with the settings used for calls to cleanupIpamAdminScope. */ + public OperationCallSettings + cleanupIpamAdminScopeOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .cleanupIpamAdminScopeOperationSettings(); + } + + /** Returns the object with the settings used for calls to listRegistryBooks. */ + public PagedCallSettings< + ListRegistryBooksRequest, ListRegistryBooksResponse, ListRegistryBooksPagedResponse> + listRegistryBooksSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).listRegistryBooksSettings(); + } + + /** Returns the object with the settings used for calls to getRegistryBook. */ + public UnaryCallSettings getRegistryBookSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).getRegistryBookSettings(); + } + + /** Returns the object with the settings used for calls to searchIpResources. */ + public PagedCallSettings< + SearchIpResourcesRequest, SearchIpResourcesResponse, SearchIpResourcesPagedResponse> + searchIpResourcesSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).searchIpResourcesSettings(); + } + + /** Returns the object with the settings used for calls to createRegistryBook. */ + public UnaryCallSettings createRegistryBookSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).createRegistryBookSettings(); + } + + /** Returns the object with the settings used for calls to createRegistryBook. */ + public OperationCallSettings + createRegistryBookOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .createRegistryBookOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateRegistryBook. */ + public UnaryCallSettings updateRegistryBookSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).updateRegistryBookSettings(); + } + + /** Returns the object with the settings used for calls to updateRegistryBook. */ + public OperationCallSettings + updateRegistryBookOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .updateRegistryBookOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteRegistryBook. */ + public UnaryCallSettings deleteRegistryBookSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).deleteRegistryBookSettings(); + } + + /** Returns the object with the settings used for calls to deleteRegistryBook. */ + public OperationCallSettings + deleteRegistryBookOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .deleteRegistryBookOperationSettings(); + } + + /** Returns the object with the settings used for calls to listRealms. */ + public PagedCallSettings + listRealmsSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).listRealmsSettings(); + } + + /** Returns the object with the settings used for calls to getRealm. */ + public UnaryCallSettings getRealmSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).getRealmSettings(); + } + + /** Returns the object with the settings used for calls to createRealm. */ + public UnaryCallSettings createRealmSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).createRealmSettings(); + } + + /** Returns the object with the settings used for calls to createRealm. */ + public OperationCallSettings + createRealmOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).createRealmOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateRealm. */ + public UnaryCallSettings updateRealmSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).updateRealmSettings(); + } + + /** Returns the object with the settings used for calls to updateRealm. */ + public OperationCallSettings + updateRealmOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).updateRealmOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteRealm. */ + public UnaryCallSettings deleteRealmSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).deleteRealmSettings(); + } + + /** Returns the object with the settings used for calls to deleteRealm. */ + public OperationCallSettings + deleteRealmOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).deleteRealmOperationSettings(); + } + + /** Returns the object with the settings used for calls to listDiscoveredRanges. */ + public PagedCallSettings< + ListDiscoveredRangesRequest, + ListDiscoveredRangesResponse, + ListDiscoveredRangesPagedResponse> + listDiscoveredRangesSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).listDiscoveredRangesSettings(); + } + + /** Returns the object with the settings used for calls to getDiscoveredRange. */ + public UnaryCallSettings + getDiscoveredRangeSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).getDiscoveredRangeSettings(); + } + + /** Returns the object with the settings used for calls to findDiscoveredRangeFreeIpRanges. */ + public UnaryCallSettings< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .findDiscoveredRangeFreeIpRangesSettings(); + } + + /** Returns the object with the settings used for calls to listCustomRanges. */ + public PagedCallSettings< + ListCustomRangesRequest, ListCustomRangesResponse, ListCustomRangesPagedResponse> + listCustomRangesSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).listCustomRangesSettings(); + } + + /** Returns the object with the settings used for calls to getCustomRange. */ + public UnaryCallSettings getCustomRangeSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).getCustomRangeSettings(); + } + + /** Returns the object with the settings used for calls to showCustomRangeUtilization. */ + public UnaryCallSettings + showCustomRangeUtilizationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .showCustomRangeUtilizationSettings(); + } + + /** Returns the object with the settings used for calls to showDiscoveredRangeUtilization. */ + public UnaryCallSettings< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .showDiscoveredRangeUtilizationSettings(); + } + + /** Returns the object with the settings used for calls to findCustomRangeFreeIpRanges. */ + public UnaryCallSettings + findCustomRangeFreeIpRangesSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .findCustomRangeFreeIpRangesSettings(); + } + + /** Returns the object with the settings used for calls to createCustomRange. */ + public UnaryCallSettings createCustomRangeSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).createCustomRangeSettings(); + } + + /** Returns the object with the settings used for calls to createCustomRange. */ + public OperationCallSettings + createCustomRangeOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .createCustomRangeOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateCustomRange. */ + public UnaryCallSettings updateCustomRangeSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).updateCustomRangeSettings(); + } + + /** Returns the object with the settings used for calls to updateCustomRange. */ + public OperationCallSettings + updateCustomRangeOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .updateCustomRangeOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteCustomRange. */ + public UnaryCallSettings deleteCustomRangeSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()).deleteCustomRangeSettings(); + } + + /** Returns the object with the settings used for calls to deleteCustomRange. */ + public OperationCallSettings + deleteCustomRangeOperationSettings() { + return ((CloudNumberRegistryStubSettings) getStubSettings()) + .deleteCustomRangeOperationSettings(); + } + + public static final CloudNumberRegistrySettings create(CloudNumberRegistryStubSettings stub) + throws IOException { + return new CloudNumberRegistrySettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CloudNumberRegistryStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CloudNumberRegistryStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CloudNumberRegistryStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CloudNumberRegistryStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return CloudNumberRegistryStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return CloudNumberRegistryStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CloudNumberRegistryStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CloudNumberRegistryStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** 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 CloudNumberRegistrySettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CloudNumberRegistrySettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(CloudNumberRegistryStubSettings.newBuilder(clientContext)); + } + + protected Builder(CloudNumberRegistrySettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CloudNumberRegistryStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(CloudNumberRegistryStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(CloudNumberRegistryStubSettings.newHttpJsonBuilder()); + } + + public CloudNumberRegistryStubSettings.Builder getStubSettingsBuilder() { + return ((CloudNumberRegistryStubSettings.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 listIpamAdminScopes. */ + public PagedCallSettings.Builder< + ListIpamAdminScopesRequest, + ListIpamAdminScopesResponse, + ListIpamAdminScopesPagedResponse> + listIpamAdminScopesSettings() { + return getStubSettingsBuilder().listIpamAdminScopesSettings(); + } + + /** Returns the builder for the settings used for calls to getIpamAdminScope. */ + public UnaryCallSettings.Builder + getIpamAdminScopeSettings() { + return getStubSettingsBuilder().getIpamAdminScopeSettings(); + } + + /** Returns the builder for the settings used for calls to checkAvailabilityIpamAdminScopes. */ + public UnaryCallSettings.Builder< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesSettings() { + return getStubSettingsBuilder().checkAvailabilityIpamAdminScopesSettings(); + } + + /** Returns the builder for the settings used for calls to createIpamAdminScope. */ + public UnaryCallSettings.Builder + createIpamAdminScopeSettings() { + return getStubSettingsBuilder().createIpamAdminScopeSettings(); + } + + /** Returns the builder for the settings used for calls to createIpamAdminScope. */ + public OperationCallSettings.Builder< + CreateIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + createIpamAdminScopeOperationSettings() { + return getStubSettingsBuilder().createIpamAdminScopeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateIpamAdminScope. */ + public UnaryCallSettings.Builder + updateIpamAdminScopeSettings() { + return getStubSettingsBuilder().updateIpamAdminScopeSettings(); + } + + /** Returns the builder for the settings used for calls to updateIpamAdminScope. */ + public OperationCallSettings.Builder< + UpdateIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + updateIpamAdminScopeOperationSettings() { + return getStubSettingsBuilder().updateIpamAdminScopeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteIpamAdminScope. */ + public UnaryCallSettings.Builder + deleteIpamAdminScopeSettings() { + return getStubSettingsBuilder().deleteIpamAdminScopeSettings(); + } + + /** Returns the builder for the settings used for calls to deleteIpamAdminScope. */ + public OperationCallSettings.Builder + deleteIpamAdminScopeOperationSettings() { + return getStubSettingsBuilder().deleteIpamAdminScopeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to disableIpamAdminScope. */ + public UnaryCallSettings.Builder + disableIpamAdminScopeSettings() { + return getStubSettingsBuilder().disableIpamAdminScopeSettings(); + } + + /** Returns the builder for the settings used for calls to disableIpamAdminScope. */ + public OperationCallSettings.Builder< + DisableIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + disableIpamAdminScopeOperationSettings() { + return getStubSettingsBuilder().disableIpamAdminScopeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to cleanupIpamAdminScope. */ + public UnaryCallSettings.Builder + cleanupIpamAdminScopeSettings() { + return getStubSettingsBuilder().cleanupIpamAdminScopeSettings(); + } + + /** Returns the builder for the settings used for calls to cleanupIpamAdminScope. */ + public OperationCallSettings.Builder< + CleanupIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + cleanupIpamAdminScopeOperationSettings() { + return getStubSettingsBuilder().cleanupIpamAdminScopeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listRegistryBooks. */ + public PagedCallSettings.Builder< + ListRegistryBooksRequest, ListRegistryBooksResponse, ListRegistryBooksPagedResponse> + listRegistryBooksSettings() { + return getStubSettingsBuilder().listRegistryBooksSettings(); + } + + /** Returns the builder for the settings used for calls to getRegistryBook. */ + public UnaryCallSettings.Builder + getRegistryBookSettings() { + return getStubSettingsBuilder().getRegistryBookSettings(); + } + + /** Returns the builder for the settings used for calls to searchIpResources. */ + public PagedCallSettings.Builder< + SearchIpResourcesRequest, SearchIpResourcesResponse, SearchIpResourcesPagedResponse> + searchIpResourcesSettings() { + return getStubSettingsBuilder().searchIpResourcesSettings(); + } + + /** Returns the builder for the settings used for calls to createRegistryBook. */ + public UnaryCallSettings.Builder + createRegistryBookSettings() { + return getStubSettingsBuilder().createRegistryBookSettings(); + } + + /** Returns the builder for the settings used for calls to createRegistryBook. */ + public OperationCallSettings.Builder + createRegistryBookOperationSettings() { + return getStubSettingsBuilder().createRegistryBookOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateRegistryBook. */ + public UnaryCallSettings.Builder + updateRegistryBookSettings() { + return getStubSettingsBuilder().updateRegistryBookSettings(); + } + + /** Returns the builder for the settings used for calls to updateRegistryBook. */ + public OperationCallSettings.Builder + updateRegistryBookOperationSettings() { + return getStubSettingsBuilder().updateRegistryBookOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRegistryBook. */ + public UnaryCallSettings.Builder + deleteRegistryBookSettings() { + return getStubSettingsBuilder().deleteRegistryBookSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRegistryBook. */ + public OperationCallSettings.Builder + deleteRegistryBookOperationSettings() { + return getStubSettingsBuilder().deleteRegistryBookOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listRealms. */ + public PagedCallSettings.Builder + listRealmsSettings() { + return getStubSettingsBuilder().listRealmsSettings(); + } + + /** Returns the builder for the settings used for calls to getRealm. */ + public UnaryCallSettings.Builder getRealmSettings() { + return getStubSettingsBuilder().getRealmSettings(); + } + + /** Returns the builder for the settings used for calls to createRealm. */ + public UnaryCallSettings.Builder createRealmSettings() { + return getStubSettingsBuilder().createRealmSettings(); + } + + /** Returns the builder for the settings used for calls to createRealm. */ + public OperationCallSettings.Builder + createRealmOperationSettings() { + return getStubSettingsBuilder().createRealmOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateRealm. */ + public UnaryCallSettings.Builder updateRealmSettings() { + return getStubSettingsBuilder().updateRealmSettings(); + } + + /** Returns the builder for the settings used for calls to updateRealm. */ + public OperationCallSettings.Builder + updateRealmOperationSettings() { + return getStubSettingsBuilder().updateRealmOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRealm. */ + public UnaryCallSettings.Builder deleteRealmSettings() { + return getStubSettingsBuilder().deleteRealmSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRealm. */ + public OperationCallSettings.Builder + deleteRealmOperationSettings() { + return getStubSettingsBuilder().deleteRealmOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listDiscoveredRanges. */ + public PagedCallSettings.Builder< + ListDiscoveredRangesRequest, + ListDiscoveredRangesResponse, + ListDiscoveredRangesPagedResponse> + listDiscoveredRangesSettings() { + return getStubSettingsBuilder().listDiscoveredRangesSettings(); + } + + /** Returns the builder for the settings used for calls to getDiscoveredRange. */ + public UnaryCallSettings.Builder + getDiscoveredRangeSettings() { + return getStubSettingsBuilder().getDiscoveredRangeSettings(); + } + + /** Returns the builder for the settings used for calls to findDiscoveredRangeFreeIpRanges. */ + public UnaryCallSettings.Builder< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesSettings() { + return getStubSettingsBuilder().findDiscoveredRangeFreeIpRangesSettings(); + } + + /** Returns the builder for the settings used for calls to listCustomRanges. */ + public PagedCallSettings.Builder< + ListCustomRangesRequest, ListCustomRangesResponse, ListCustomRangesPagedResponse> + listCustomRangesSettings() { + return getStubSettingsBuilder().listCustomRangesSettings(); + } + + /** Returns the builder for the settings used for calls to getCustomRange. */ + public UnaryCallSettings.Builder getCustomRangeSettings() { + return getStubSettingsBuilder().getCustomRangeSettings(); + } + + /** Returns the builder for the settings used for calls to showCustomRangeUtilization. */ + public UnaryCallSettings.Builder< + ShowCustomRangeUtilizationRequest, ShowCustomRangeUtilizationResponse> + showCustomRangeUtilizationSettings() { + return getStubSettingsBuilder().showCustomRangeUtilizationSettings(); + } + + /** Returns the builder for the settings used for calls to showDiscoveredRangeUtilization. */ + public UnaryCallSettings.Builder< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationSettings() { + return getStubSettingsBuilder().showDiscoveredRangeUtilizationSettings(); + } + + /** Returns the builder for the settings used for calls to findCustomRangeFreeIpRanges. */ + public UnaryCallSettings.Builder< + FindCustomRangeFreeIpRangesRequest, FindCustomRangeFreeIpRangesResponse> + findCustomRangeFreeIpRangesSettings() { + return getStubSettingsBuilder().findCustomRangeFreeIpRangesSettings(); + } + + /** Returns the builder for the settings used for calls to createCustomRange. */ + public UnaryCallSettings.Builder + createCustomRangeSettings() { + return getStubSettingsBuilder().createCustomRangeSettings(); + } + + /** Returns the builder for the settings used for calls to createCustomRange. */ + public OperationCallSettings.Builder + createCustomRangeOperationSettings() { + return getStubSettingsBuilder().createCustomRangeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateCustomRange. */ + public UnaryCallSettings.Builder + updateCustomRangeSettings() { + return getStubSettingsBuilder().updateCustomRangeSettings(); + } + + /** Returns the builder for the settings used for calls to updateCustomRange. */ + public OperationCallSettings.Builder + updateCustomRangeOperationSettings() { + return getStubSettingsBuilder().updateCustomRangeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCustomRange. */ + public UnaryCallSettings.Builder + deleteCustomRangeSettings() { + return getStubSettingsBuilder().deleteCustomRangeSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCustomRange. */ + public OperationCallSettings.Builder + deleteCustomRangeOperationSettings() { + return getStubSettingsBuilder().deleteCustomRangeOperationSettings(); + } + + @Override + public CloudNumberRegistrySettings build() throws IOException { + return new CloudNumberRegistrySettings(this); + } + } +} diff --git a/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/gapic_metadata.json b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/gapic_metadata.json new file mode 100644 index 000000000000..c39a32388038 --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/gapic_metadata.json @@ -0,0 +1,108 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.numberregistry.v1alpha", + "libraryPackage": "com.google.cloud.numberregistry.v1alpha", + "services": { + "CloudNumberRegistry": { + "clients": { + "grpc": { + "libraryClient": "CloudNumberRegistryClient", + "rpcs": { + "CheckAvailabilityIpamAdminScopes": { + "methods": ["checkAvailabilityIpamAdminScopes", "checkAvailabilityIpamAdminScopes", "checkAvailabilityIpamAdminScopes", "checkAvailabilityIpamAdminScopesCallable"] + }, + "CleanupIpamAdminScope": { + "methods": ["cleanupIpamAdminScopeAsync", "cleanupIpamAdminScopeAsync", "cleanupIpamAdminScopeAsync", "cleanupIpamAdminScopeOperationCallable", "cleanupIpamAdminScopeCallable"] + }, + "CreateCustomRange": { + "methods": ["createCustomRangeAsync", "createCustomRangeAsync", "createCustomRangeAsync", "createCustomRangeOperationCallable", "createCustomRangeCallable"] + }, + "CreateIpamAdminScope": { + "methods": ["createIpamAdminScopeAsync", "createIpamAdminScopeAsync", "createIpamAdminScopeAsync", "createIpamAdminScopeOperationCallable", "createIpamAdminScopeCallable"] + }, + "CreateRealm": { + "methods": ["createRealmAsync", "createRealmAsync", "createRealmAsync", "createRealmOperationCallable", "createRealmCallable"] + }, + "CreateRegistryBook": { + "methods": ["createRegistryBookAsync", "createRegistryBookAsync", "createRegistryBookAsync", "createRegistryBookOperationCallable", "createRegistryBookCallable"] + }, + "DeleteCustomRange": { + "methods": ["deleteCustomRangeAsync", "deleteCustomRangeAsync", "deleteCustomRangeAsync", "deleteCustomRangeOperationCallable", "deleteCustomRangeCallable"] + }, + "DeleteIpamAdminScope": { + "methods": ["deleteIpamAdminScopeAsync", "deleteIpamAdminScopeAsync", "deleteIpamAdminScopeAsync", "deleteIpamAdminScopeOperationCallable", "deleteIpamAdminScopeCallable"] + }, + "DeleteRealm": { + "methods": ["deleteRealmAsync", "deleteRealmAsync", "deleteRealmAsync", "deleteRealmOperationCallable", "deleteRealmCallable"] + }, + "DeleteRegistryBook": { + "methods": ["deleteRegistryBookAsync", "deleteRegistryBookAsync", "deleteRegistryBookAsync", "deleteRegistryBookOperationCallable", "deleteRegistryBookCallable"] + }, + "DisableIpamAdminScope": { + "methods": ["disableIpamAdminScopeAsync", "disableIpamAdminScopeAsync", "disableIpamAdminScopeAsync", "disableIpamAdminScopeOperationCallable", "disableIpamAdminScopeCallable"] + }, + "FindCustomRangeFreeIpRanges": { + "methods": ["findCustomRangeFreeIpRanges", "findCustomRangeFreeIpRanges", "findCustomRangeFreeIpRanges", "findCustomRangeFreeIpRangesCallable"] + }, + "FindDiscoveredRangeFreeIpRanges": { + "methods": ["findDiscoveredRangeFreeIpRanges", "findDiscoveredRangeFreeIpRanges", "findDiscoveredRangeFreeIpRanges", "findDiscoveredRangeFreeIpRangesCallable"] + }, + "GetCustomRange": { + "methods": ["getCustomRange", "getCustomRange", "getCustomRange", "getCustomRangeCallable"] + }, + "GetDiscoveredRange": { + "methods": ["getDiscoveredRange", "getDiscoveredRange", "getDiscoveredRange", "getDiscoveredRangeCallable"] + }, + "GetIpamAdminScope": { + "methods": ["getIpamAdminScope", "getIpamAdminScope", "getIpamAdminScope", "getIpamAdminScopeCallable"] + }, + "GetRealm": { + "methods": ["getRealm", "getRealm", "getRealm", "getRealmCallable"] + }, + "GetRegistryBook": { + "methods": ["getRegistryBook", "getRegistryBook", "getRegistryBook", "getRegistryBookCallable"] + }, + "ListCustomRanges": { + "methods": ["listCustomRanges", "listCustomRanges", "listCustomRanges", "listCustomRangesPagedCallable", "listCustomRangesCallable"] + }, + "ListDiscoveredRanges": { + "methods": ["listDiscoveredRanges", "listDiscoveredRanges", "listDiscoveredRanges", "listDiscoveredRangesPagedCallable", "listDiscoveredRangesCallable"] + }, + "ListIpamAdminScopes": { + "methods": ["listIpamAdminScopes", "listIpamAdminScopes", "listIpamAdminScopes", "listIpamAdminScopesPagedCallable", "listIpamAdminScopesCallable"] + }, + "ListRealms": { + "methods": ["listRealms", "listRealms", "listRealms", "listRealmsPagedCallable", "listRealmsCallable"] + }, + "ListRegistryBooks": { + "methods": ["listRegistryBooks", "listRegistryBooks", "listRegistryBooks", "listRegistryBooksPagedCallable", "listRegistryBooksCallable"] + }, + "SearchIpResources": { + "methods": ["searchIpResources", "searchIpResources", "searchIpResources", "searchIpResourcesPagedCallable", "searchIpResourcesCallable"] + }, + "ShowCustomRangeUtilization": { + "methods": ["showCustomRangeUtilization", "showCustomRangeUtilization", "showCustomRangeUtilization", "showCustomRangeUtilizationCallable"] + }, + "ShowDiscoveredRangeUtilization": { + "methods": ["showDiscoveredRangeUtilization", "showDiscoveredRangeUtilization", "showDiscoveredRangeUtilization", "showDiscoveredRangeUtilizationCallable"] + }, + "UpdateCustomRange": { + "methods": ["updateCustomRangeAsync", "updateCustomRangeAsync", "updateCustomRangeOperationCallable", "updateCustomRangeCallable"] + }, + "UpdateIpamAdminScope": { + "methods": ["updateIpamAdminScopeAsync", "updateIpamAdminScopeAsync", "updateIpamAdminScopeOperationCallable", "updateIpamAdminScopeCallable"] + }, + "UpdateRealm": { + "methods": ["updateRealmAsync", "updateRealmAsync", "updateRealmOperationCallable", "updateRealmCallable"] + }, + "UpdateRegistryBook": { + "methods": ["updateRegistryBookAsync", "updateRegistryBookAsync", "updateRegistryBookOperationCallable", "updateRegistryBookCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/package-info.java b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/package-info.java new file mode 100644 index 000000000000..643007396443 --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/package-info.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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. + */ + +/** + * A client to Cloud Number Registry API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= CloudNumberRegistryClient ======================= + * + *

Service Description: The Cloud Number Registry service manages IP address space visibility and + * tracking. It enables the discovery, organization, and monitoring of IP address ranges across + * different cloud infrastructure platforms. + * + *

Sample for CloudNumberRegistryClient: + * + *

{@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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) {
+ *   IpamAdminScopeName name =
+ *       IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]");
+ *   IpamAdminScope response = cloudNumberRegistryClient.getIpamAdminScope(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.numberregistry.v1alpha; + +import javax.annotation.Generated; diff --git a/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/CloudNumberRegistryStub.java b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/CloudNumberRegistryStub.java new file mode 100644 index 000000000000..2b392d6077d9 --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/CloudNumberRegistryStub.java @@ -0,0 +1,350 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.stub; + +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListCustomRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListDiscoveredRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListIpamAdminScopesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRealmsPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRegistryBooksPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.SearchIpResourcesPagedResponse; + +import com.google.api.core.BetaApi; +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.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest; +import com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse; +import com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.CreateRealmRequest; +import com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest; +import com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRange; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse; +import com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest; +import com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.GetRealmRequest; +import com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest; +import com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse; +import com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest; +import com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse; +import com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest; +import com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse; +import com.google.cloud.numberregistry.v1alpha.ListRealmsRequest; +import com.google.cloud.numberregistry.v1alpha.ListRealmsResponse; +import com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest; +import com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest; +import com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse; +import com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest; +import com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest; +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 CloudNumberRegistry service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class CloudNumberRegistryStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + listIpamAdminScopesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listIpamAdminScopesPagedCallable()"); + } + + public UnaryCallable + listIpamAdminScopesCallable() { + throw new UnsupportedOperationException("Not implemented: listIpamAdminScopesCallable()"); + } + + public UnaryCallable getIpamAdminScopeCallable() { + throw new UnsupportedOperationException("Not implemented: getIpamAdminScopeCallable()"); + } + + public UnaryCallable< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesCallable() { + throw new UnsupportedOperationException( + "Not implemented: checkAvailabilityIpamAdminScopesCallable()"); + } + + public OperationCallable + createIpamAdminScopeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createIpamAdminScopeOperationCallable()"); + } + + public UnaryCallable createIpamAdminScopeCallable() { + throw new UnsupportedOperationException("Not implemented: createIpamAdminScopeCallable()"); + } + + public OperationCallable + updateIpamAdminScopeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateIpamAdminScopeOperationCallable()"); + } + + public UnaryCallable updateIpamAdminScopeCallable() { + throw new UnsupportedOperationException("Not implemented: updateIpamAdminScopeCallable()"); + } + + public OperationCallable + deleteIpamAdminScopeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteIpamAdminScopeOperationCallable()"); + } + + public UnaryCallable deleteIpamAdminScopeCallable() { + throw new UnsupportedOperationException("Not implemented: deleteIpamAdminScopeCallable()"); + } + + public OperationCallable + disableIpamAdminScopeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: disableIpamAdminScopeOperationCallable()"); + } + + public UnaryCallable disableIpamAdminScopeCallable() { + throw new UnsupportedOperationException("Not implemented: disableIpamAdminScopeCallable()"); + } + + public OperationCallable + cleanupIpamAdminScopeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: cleanupIpamAdminScopeOperationCallable()"); + } + + public UnaryCallable cleanupIpamAdminScopeCallable() { + throw new UnsupportedOperationException("Not implemented: cleanupIpamAdminScopeCallable()"); + } + + public UnaryCallable + listRegistryBooksPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRegistryBooksPagedCallable()"); + } + + public UnaryCallable + listRegistryBooksCallable() { + throw new UnsupportedOperationException("Not implemented: listRegistryBooksCallable()"); + } + + public UnaryCallable getRegistryBookCallable() { + throw new UnsupportedOperationException("Not implemented: getRegistryBookCallable()"); + } + + public UnaryCallable + searchIpResourcesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchIpResourcesPagedCallable()"); + } + + public UnaryCallable + searchIpResourcesCallable() { + throw new UnsupportedOperationException("Not implemented: searchIpResourcesCallable()"); + } + + public OperationCallable + createRegistryBookOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createRegistryBookOperationCallable()"); + } + + public UnaryCallable createRegistryBookCallable() { + throw new UnsupportedOperationException("Not implemented: createRegistryBookCallable()"); + } + + public OperationCallable + updateRegistryBookOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateRegistryBookOperationCallable()"); + } + + public UnaryCallable updateRegistryBookCallable() { + throw new UnsupportedOperationException("Not implemented: updateRegistryBookCallable()"); + } + + public OperationCallable + deleteRegistryBookOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteRegistryBookOperationCallable()"); + } + + public UnaryCallable deleteRegistryBookCallable() { + throw new UnsupportedOperationException("Not implemented: deleteRegistryBookCallable()"); + } + + public UnaryCallable listRealmsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRealmsPagedCallable()"); + } + + public UnaryCallable listRealmsCallable() { + throw new UnsupportedOperationException("Not implemented: listRealmsCallable()"); + } + + public UnaryCallable getRealmCallable() { + throw new UnsupportedOperationException("Not implemented: getRealmCallable()"); + } + + public OperationCallable + createRealmOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createRealmOperationCallable()"); + } + + public UnaryCallable createRealmCallable() { + throw new UnsupportedOperationException("Not implemented: createRealmCallable()"); + } + + public OperationCallable + updateRealmOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateRealmOperationCallable()"); + } + + public UnaryCallable updateRealmCallable() { + throw new UnsupportedOperationException("Not implemented: updateRealmCallable()"); + } + + public OperationCallable + deleteRealmOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteRealmOperationCallable()"); + } + + public UnaryCallable deleteRealmCallable() { + throw new UnsupportedOperationException("Not implemented: deleteRealmCallable()"); + } + + public UnaryCallable + listDiscoveredRangesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDiscoveredRangesPagedCallable()"); + } + + public UnaryCallable + listDiscoveredRangesCallable() { + throw new UnsupportedOperationException("Not implemented: listDiscoveredRangesCallable()"); + } + + public UnaryCallable getDiscoveredRangeCallable() { + throw new UnsupportedOperationException("Not implemented: getDiscoveredRangeCallable()"); + } + + public UnaryCallable< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesCallable() { + throw new UnsupportedOperationException( + "Not implemented: findDiscoveredRangeFreeIpRangesCallable()"); + } + + public UnaryCallable + listCustomRangesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listCustomRangesPagedCallable()"); + } + + public UnaryCallable + listCustomRangesCallable() { + throw new UnsupportedOperationException("Not implemented: listCustomRangesCallable()"); + } + + public UnaryCallable getCustomRangeCallable() { + throw new UnsupportedOperationException("Not implemented: getCustomRangeCallable()"); + } + + public UnaryCallable + showCustomRangeUtilizationCallable() { + throw new UnsupportedOperationException( + "Not implemented: showCustomRangeUtilizationCallable()"); + } + + public UnaryCallable< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationCallable() { + throw new UnsupportedOperationException( + "Not implemented: showDiscoveredRangeUtilizationCallable()"); + } + + public UnaryCallable + findCustomRangeFreeIpRangesCallable() { + throw new UnsupportedOperationException( + "Not implemented: findCustomRangeFreeIpRangesCallable()"); + } + + public OperationCallable + createCustomRangeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createCustomRangeOperationCallable()"); + } + + public UnaryCallable createCustomRangeCallable() { + throw new UnsupportedOperationException("Not implemented: createCustomRangeCallable()"); + } + + public OperationCallable + updateCustomRangeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateCustomRangeOperationCallable()"); + } + + public UnaryCallable updateCustomRangeCallable() { + throw new UnsupportedOperationException("Not implemented: updateCustomRangeCallable()"); + } + + public OperationCallable + deleteCustomRangeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteCustomRangeOperationCallable()"); + } + + public UnaryCallable deleteCustomRangeCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCustomRangeCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/CloudNumberRegistryStubSettings.java b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/CloudNumberRegistryStubSettings.java new file mode 100644 index 000000000000..b39b392981ef --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/CloudNumberRegistryStubSettings.java @@ -0,0 +1,2224 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.stub; + +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListCustomRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListDiscoveredRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListIpamAdminScopesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRealmsPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRegistryBooksPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.SearchIpResourcesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +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.LibraryMetadata; +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.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest; +import com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse; +import com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.CreateRealmRequest; +import com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest; +import com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRange; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse; +import com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest; +import com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.GetRealmRequest; +import com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest; +import com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse; +import com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest; +import com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse; +import com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest; +import com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse; +import com.google.cloud.numberregistry.v1alpha.ListRealmsRequest; +import com.google.cloud.numberregistry.v1alpha.ListRealmsResponse; +import com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest; +import com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.cloud.numberregistry.v1alpha.Range; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest; +import com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse; +import com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest; +import com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest; +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.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CloudNumberRegistryStub}. + * + *

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

    + *
  • The default service address (cloudnumberregistry.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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getIpamAdminScope: + * + *

{@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
+ * CloudNumberRegistryStubSettings.Builder cloudNumberRegistrySettingsBuilder =
+ *     CloudNumberRegistryStubSettings.newBuilder();
+ * cloudNumberRegistrySettingsBuilder
+ *     .getIpamAdminScopeSettings()
+ *     .setRetrySettings(
+ *         cloudNumberRegistrySettingsBuilder
+ *             .getIpamAdminScopeSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * CloudNumberRegistryStubSettings cloudNumberRegistrySettings =
+ *     cloudNumberRegistrySettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createIpamAdminScope: + * + *

{@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
+ * CloudNumberRegistryStubSettings.Builder cloudNumberRegistrySettingsBuilder =
+ *     CloudNumberRegistryStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * cloudNumberRegistrySettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class CloudNumberRegistryStubSettings 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").build(); + + private final PagedCallSettings< + ListIpamAdminScopesRequest, ListIpamAdminScopesResponse, ListIpamAdminScopesPagedResponse> + listIpamAdminScopesSettings; + private final UnaryCallSettings + getIpamAdminScopeSettings; + private final UnaryCallSettings< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesSettings; + private final UnaryCallSettings + createIpamAdminScopeSettings; + private final OperationCallSettings< + CreateIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + createIpamAdminScopeOperationSettings; + private final UnaryCallSettings + updateIpamAdminScopeSettings; + private final OperationCallSettings< + UpdateIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + updateIpamAdminScopeOperationSettings; + private final UnaryCallSettings + deleteIpamAdminScopeSettings; + private final OperationCallSettings + deleteIpamAdminScopeOperationSettings; + private final UnaryCallSettings + disableIpamAdminScopeSettings; + private final OperationCallSettings< + DisableIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + disableIpamAdminScopeOperationSettings; + private final UnaryCallSettings + cleanupIpamAdminScopeSettings; + private final OperationCallSettings< + CleanupIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + cleanupIpamAdminScopeOperationSettings; + private final PagedCallSettings< + ListRegistryBooksRequest, ListRegistryBooksResponse, ListRegistryBooksPagedResponse> + listRegistryBooksSettings; + private final UnaryCallSettings getRegistryBookSettings; + private final PagedCallSettings< + SearchIpResourcesRequest, SearchIpResourcesResponse, SearchIpResourcesPagedResponse> + searchIpResourcesSettings; + private final UnaryCallSettings createRegistryBookSettings; + private final OperationCallSettings + createRegistryBookOperationSettings; + private final UnaryCallSettings updateRegistryBookSettings; + private final OperationCallSettings + updateRegistryBookOperationSettings; + private final UnaryCallSettings deleteRegistryBookSettings; + private final OperationCallSettings + deleteRegistryBookOperationSettings; + private final PagedCallSettings + listRealmsSettings; + private final UnaryCallSettings getRealmSettings; + private final UnaryCallSettings createRealmSettings; + private final OperationCallSettings + createRealmOperationSettings; + private final UnaryCallSettings updateRealmSettings; + private final OperationCallSettings + updateRealmOperationSettings; + private final UnaryCallSettings deleteRealmSettings; + private final OperationCallSettings + deleteRealmOperationSettings; + private final PagedCallSettings< + ListDiscoveredRangesRequest, + ListDiscoveredRangesResponse, + ListDiscoveredRangesPagedResponse> + listDiscoveredRangesSettings; + private final UnaryCallSettings + getDiscoveredRangeSettings; + private final UnaryCallSettings< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesSettings; + private final PagedCallSettings< + ListCustomRangesRequest, ListCustomRangesResponse, ListCustomRangesPagedResponse> + listCustomRangesSettings; + private final UnaryCallSettings getCustomRangeSettings; + private final UnaryCallSettings< + ShowCustomRangeUtilizationRequest, ShowCustomRangeUtilizationResponse> + showCustomRangeUtilizationSettings; + private final UnaryCallSettings< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationSettings; + private final UnaryCallSettings< + FindCustomRangeFreeIpRangesRequest, FindCustomRangeFreeIpRangesResponse> + findCustomRangeFreeIpRangesSettings; + private final UnaryCallSettings createCustomRangeSettings; + private final OperationCallSettings + createCustomRangeOperationSettings; + private final UnaryCallSettings updateCustomRangeSettings; + private final OperationCallSettings + updateCustomRangeOperationSettings; + private final UnaryCallSettings deleteCustomRangeSettings; + private final OperationCallSettings + deleteCustomRangeOperationSettings; + + private static final PagedListDescriptor< + ListIpamAdminScopesRequest, ListIpamAdminScopesResponse, IpamAdminScope> + LIST_IPAM_ADMIN_SCOPES_PAGE_STR_DESC = + new PagedListDescriptor< + ListIpamAdminScopesRequest, ListIpamAdminScopesResponse, IpamAdminScope>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListIpamAdminScopesRequest injectToken( + ListIpamAdminScopesRequest payload, String token) { + return ListIpamAdminScopesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListIpamAdminScopesRequest injectPageSize( + ListIpamAdminScopesRequest payload, int pageSize) { + return ListIpamAdminScopesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListIpamAdminScopesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListIpamAdminScopesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListIpamAdminScopesResponse payload) { + return payload.getIpamAdminScopesList(); + } + }; + + private static final PagedListDescriptor< + ListRegistryBooksRequest, ListRegistryBooksResponse, RegistryBook> + LIST_REGISTRY_BOOKS_PAGE_STR_DESC = + new PagedListDescriptor< + ListRegistryBooksRequest, ListRegistryBooksResponse, RegistryBook>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRegistryBooksRequest injectToken( + ListRegistryBooksRequest payload, String token) { + return ListRegistryBooksRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRegistryBooksRequest injectPageSize( + ListRegistryBooksRequest payload, int pageSize) { + return ListRegistryBooksRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRegistryBooksRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRegistryBooksResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRegistryBooksResponse payload) { + return payload.getRegistryBooksList(); + } + }; + + private static final PagedListDescriptor< + SearchIpResourcesRequest, SearchIpResourcesResponse, Range> + SEARCH_IP_RESOURCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchIpResourcesRequest injectToken( + SearchIpResourcesRequest payload, String token) { + return SearchIpResourcesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchIpResourcesRequest injectPageSize( + SearchIpResourcesRequest payload, int pageSize) { + return SearchIpResourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchIpResourcesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchIpResourcesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(SearchIpResourcesResponse payload) { + return payload.getRangesList(); + } + }; + + private static final PagedListDescriptor + LIST_REALMS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRealmsRequest injectToken(ListRealmsRequest payload, String token) { + return ListRealmsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRealmsRequest injectPageSize(ListRealmsRequest payload, int pageSize) { + return ListRealmsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRealmsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRealmsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRealmsResponse payload) { + return payload.getRealmsList(); + } + }; + + private static final PagedListDescriptor< + ListDiscoveredRangesRequest, ListDiscoveredRangesResponse, DiscoveredRange> + LIST_DISCOVERED_RANGES_PAGE_STR_DESC = + new PagedListDescriptor< + ListDiscoveredRangesRequest, ListDiscoveredRangesResponse, DiscoveredRange>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDiscoveredRangesRequest injectToken( + ListDiscoveredRangesRequest payload, String token) { + return ListDiscoveredRangesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDiscoveredRangesRequest injectPageSize( + ListDiscoveredRangesRequest payload, int pageSize) { + return ListDiscoveredRangesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDiscoveredRangesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDiscoveredRangesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListDiscoveredRangesResponse payload) { + return payload.getDiscoveredRangesList(); + } + }; + + private static final PagedListDescriptor< + ListCustomRangesRequest, ListCustomRangesResponse, CustomRange> + LIST_CUSTOM_RANGES_PAGE_STR_DESC = + new PagedListDescriptor< + ListCustomRangesRequest, ListCustomRangesResponse, CustomRange>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCustomRangesRequest injectToken( + ListCustomRangesRequest payload, String token) { + return ListCustomRangesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListCustomRangesRequest injectPageSize( + ListCustomRangesRequest payload, int pageSize) { + return ListCustomRangesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListCustomRangesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCustomRangesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListCustomRangesResponse payload) { + return payload.getCustomRangesList(); + } + }; + + private static final PagedListResponseFactory< + ListIpamAdminScopesRequest, ListIpamAdminScopesResponse, ListIpamAdminScopesPagedResponse> + LIST_IPAM_ADMIN_SCOPES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListIpamAdminScopesRequest, + ListIpamAdminScopesResponse, + ListIpamAdminScopesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListIpamAdminScopesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_IPAM_ADMIN_SCOPES_PAGE_STR_DESC, request, context); + return ListIpamAdminScopesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListRegistryBooksRequest, ListRegistryBooksResponse, ListRegistryBooksPagedResponse> + LIST_REGISTRY_BOOKS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRegistryBooksRequest, + ListRegistryBooksResponse, + ListRegistryBooksPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRegistryBooksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_REGISTRY_BOOKS_PAGE_STR_DESC, request, context); + return ListRegistryBooksPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchIpResourcesRequest, SearchIpResourcesResponse, SearchIpResourcesPagedResponse> + SEARCH_IP_RESOURCES_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchIpResourcesRequest, + SearchIpResourcesResponse, + SearchIpResourcesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchIpResourcesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, SEARCH_IP_RESOURCES_PAGE_STR_DESC, request, context); + return SearchIpResourcesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListRealmsRequest, ListRealmsResponse, ListRealmsPagedResponse> + LIST_REALMS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRealmsRequest, ListRealmsResponse, ListRealmsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRealmsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_REALMS_PAGE_STR_DESC, request, context); + return ListRealmsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDiscoveredRangesRequest, + ListDiscoveredRangesResponse, + ListDiscoveredRangesPagedResponse> + LIST_DISCOVERED_RANGES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDiscoveredRangesRequest, + ListDiscoveredRangesResponse, + ListDiscoveredRangesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDiscoveredRangesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListDiscoveredRangesRequest, ListDiscoveredRangesResponse, DiscoveredRange> + pageContext = + PageContext.create( + callable, LIST_DISCOVERED_RANGES_PAGE_STR_DESC, request, context); + return ListDiscoveredRangesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListCustomRangesRequest, ListCustomRangesResponse, ListCustomRangesPagedResponse> + LIST_CUSTOM_RANGES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCustomRangesRequest, ListCustomRangesResponse, ListCustomRangesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListCustomRangesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_CUSTOM_RANGES_PAGE_STR_DESC, request, context); + return ListCustomRangesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listIpamAdminScopes. */ + public PagedCallSettings< + ListIpamAdminScopesRequest, ListIpamAdminScopesResponse, ListIpamAdminScopesPagedResponse> + listIpamAdminScopesSettings() { + return listIpamAdminScopesSettings; + } + + /** Returns the object with the settings used for calls to getIpamAdminScope. */ + public UnaryCallSettings getIpamAdminScopeSettings() { + return getIpamAdminScopeSettings; + } + + /** Returns the object with the settings used for calls to checkAvailabilityIpamAdminScopes. */ + public UnaryCallSettings< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesSettings() { + return checkAvailabilityIpamAdminScopesSettings; + } + + /** Returns the object with the settings used for calls to createIpamAdminScope. */ + public UnaryCallSettings createIpamAdminScopeSettings() { + return createIpamAdminScopeSettings; + } + + /** Returns the object with the settings used for calls to createIpamAdminScope. */ + public OperationCallSettings + createIpamAdminScopeOperationSettings() { + return createIpamAdminScopeOperationSettings; + } + + /** Returns the object with the settings used for calls to updateIpamAdminScope. */ + public UnaryCallSettings updateIpamAdminScopeSettings() { + return updateIpamAdminScopeSettings; + } + + /** Returns the object with the settings used for calls to updateIpamAdminScope. */ + public OperationCallSettings + updateIpamAdminScopeOperationSettings() { + return updateIpamAdminScopeOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteIpamAdminScope. */ + public UnaryCallSettings deleteIpamAdminScopeSettings() { + return deleteIpamAdminScopeSettings; + } + + /** Returns the object with the settings used for calls to deleteIpamAdminScope. */ + public OperationCallSettings + deleteIpamAdminScopeOperationSettings() { + return deleteIpamAdminScopeOperationSettings; + } + + /** Returns the object with the settings used for calls to disableIpamAdminScope. */ + public UnaryCallSettings + disableIpamAdminScopeSettings() { + return disableIpamAdminScopeSettings; + } + + /** Returns the object with the settings used for calls to disableIpamAdminScope. */ + public OperationCallSettings + disableIpamAdminScopeOperationSettings() { + return disableIpamAdminScopeOperationSettings; + } + + /** Returns the object with the settings used for calls to cleanupIpamAdminScope. */ + public UnaryCallSettings + cleanupIpamAdminScopeSettings() { + return cleanupIpamAdminScopeSettings; + } + + /** Returns the object with the settings used for calls to cleanupIpamAdminScope. */ + public OperationCallSettings + cleanupIpamAdminScopeOperationSettings() { + return cleanupIpamAdminScopeOperationSettings; + } + + /** Returns the object with the settings used for calls to listRegistryBooks. */ + public PagedCallSettings< + ListRegistryBooksRequest, ListRegistryBooksResponse, ListRegistryBooksPagedResponse> + listRegistryBooksSettings() { + return listRegistryBooksSettings; + } + + /** Returns the object with the settings used for calls to getRegistryBook. */ + public UnaryCallSettings getRegistryBookSettings() { + return getRegistryBookSettings; + } + + /** Returns the object with the settings used for calls to searchIpResources. */ + public PagedCallSettings< + SearchIpResourcesRequest, SearchIpResourcesResponse, SearchIpResourcesPagedResponse> + searchIpResourcesSettings() { + return searchIpResourcesSettings; + } + + /** Returns the object with the settings used for calls to createRegistryBook. */ + public UnaryCallSettings createRegistryBookSettings() { + return createRegistryBookSettings; + } + + /** Returns the object with the settings used for calls to createRegistryBook. */ + public OperationCallSettings + createRegistryBookOperationSettings() { + return createRegistryBookOperationSettings; + } + + /** Returns the object with the settings used for calls to updateRegistryBook. */ + public UnaryCallSettings updateRegistryBookSettings() { + return updateRegistryBookSettings; + } + + /** Returns the object with the settings used for calls to updateRegistryBook. */ + public OperationCallSettings + updateRegistryBookOperationSettings() { + return updateRegistryBookOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteRegistryBook. */ + public UnaryCallSettings deleteRegistryBookSettings() { + return deleteRegistryBookSettings; + } + + /** Returns the object with the settings used for calls to deleteRegistryBook. */ + public OperationCallSettings + deleteRegistryBookOperationSettings() { + return deleteRegistryBookOperationSettings; + } + + /** Returns the object with the settings used for calls to listRealms. */ + public PagedCallSettings + listRealmsSettings() { + return listRealmsSettings; + } + + /** Returns the object with the settings used for calls to getRealm. */ + public UnaryCallSettings getRealmSettings() { + return getRealmSettings; + } + + /** Returns the object with the settings used for calls to createRealm. */ + public UnaryCallSettings createRealmSettings() { + return createRealmSettings; + } + + /** Returns the object with the settings used for calls to createRealm. */ + public OperationCallSettings + createRealmOperationSettings() { + return createRealmOperationSettings; + } + + /** Returns the object with the settings used for calls to updateRealm. */ + public UnaryCallSettings updateRealmSettings() { + return updateRealmSettings; + } + + /** Returns the object with the settings used for calls to updateRealm. */ + public OperationCallSettings + updateRealmOperationSettings() { + return updateRealmOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteRealm. */ + public UnaryCallSettings deleteRealmSettings() { + return deleteRealmSettings; + } + + /** Returns the object with the settings used for calls to deleteRealm. */ + public OperationCallSettings + deleteRealmOperationSettings() { + return deleteRealmOperationSettings; + } + + /** Returns the object with the settings used for calls to listDiscoveredRanges. */ + public PagedCallSettings< + ListDiscoveredRangesRequest, + ListDiscoveredRangesResponse, + ListDiscoveredRangesPagedResponse> + listDiscoveredRangesSettings() { + return listDiscoveredRangesSettings; + } + + /** Returns the object with the settings used for calls to getDiscoveredRange. */ + public UnaryCallSettings + getDiscoveredRangeSettings() { + return getDiscoveredRangeSettings; + } + + /** Returns the object with the settings used for calls to findDiscoveredRangeFreeIpRanges. */ + public UnaryCallSettings< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesSettings() { + return findDiscoveredRangeFreeIpRangesSettings; + } + + /** Returns the object with the settings used for calls to listCustomRanges. */ + public PagedCallSettings< + ListCustomRangesRequest, ListCustomRangesResponse, ListCustomRangesPagedResponse> + listCustomRangesSettings() { + return listCustomRangesSettings; + } + + /** Returns the object with the settings used for calls to getCustomRange. */ + public UnaryCallSettings getCustomRangeSettings() { + return getCustomRangeSettings; + } + + /** Returns the object with the settings used for calls to showCustomRangeUtilization. */ + public UnaryCallSettings + showCustomRangeUtilizationSettings() { + return showCustomRangeUtilizationSettings; + } + + /** Returns the object with the settings used for calls to showDiscoveredRangeUtilization. */ + public UnaryCallSettings< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationSettings() { + return showDiscoveredRangeUtilizationSettings; + } + + /** Returns the object with the settings used for calls to findCustomRangeFreeIpRanges. */ + public UnaryCallSettings + findCustomRangeFreeIpRangesSettings() { + return findCustomRangeFreeIpRangesSettings; + } + + /** Returns the object with the settings used for calls to createCustomRange. */ + public UnaryCallSettings createCustomRangeSettings() { + return createCustomRangeSettings; + } + + /** Returns the object with the settings used for calls to createCustomRange. */ + public OperationCallSettings + createCustomRangeOperationSettings() { + return createCustomRangeOperationSettings; + } + + /** Returns the object with the settings used for calls to updateCustomRange. */ + public UnaryCallSettings updateCustomRangeSettings() { + return updateCustomRangeSettings; + } + + /** Returns the object with the settings used for calls to updateCustomRange. */ + public OperationCallSettings + updateCustomRangeOperationSettings() { + return updateCustomRangeOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteCustomRange. */ + public UnaryCallSettings deleteCustomRangeSettings() { + return deleteCustomRangeSettings; + } + + /** Returns the object with the settings used for calls to deleteCustomRange. */ + public OperationCallSettings + deleteCustomRangeOperationSettings() { + return deleteCustomRangeOperationSettings; + } + + public CloudNumberRegistryStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcCloudNumberRegistryStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonCloudNumberRegistryStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "cloudnumberregistry"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "cloudnumberregistry.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "cloudnumberregistry.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(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(CloudNumberRegistryStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(CloudNumberRegistryStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CloudNumberRegistryStubSettings.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 CloudNumberRegistryStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listIpamAdminScopesSettings = settingsBuilder.listIpamAdminScopesSettings().build(); + getIpamAdminScopeSettings = settingsBuilder.getIpamAdminScopeSettings().build(); + checkAvailabilityIpamAdminScopesSettings = + settingsBuilder.checkAvailabilityIpamAdminScopesSettings().build(); + createIpamAdminScopeSettings = settingsBuilder.createIpamAdminScopeSettings().build(); + createIpamAdminScopeOperationSettings = + settingsBuilder.createIpamAdminScopeOperationSettings().build(); + updateIpamAdminScopeSettings = settingsBuilder.updateIpamAdminScopeSettings().build(); + updateIpamAdminScopeOperationSettings = + settingsBuilder.updateIpamAdminScopeOperationSettings().build(); + deleteIpamAdminScopeSettings = settingsBuilder.deleteIpamAdminScopeSettings().build(); + deleteIpamAdminScopeOperationSettings = + settingsBuilder.deleteIpamAdminScopeOperationSettings().build(); + disableIpamAdminScopeSettings = settingsBuilder.disableIpamAdminScopeSettings().build(); + disableIpamAdminScopeOperationSettings = + settingsBuilder.disableIpamAdminScopeOperationSettings().build(); + cleanupIpamAdminScopeSettings = settingsBuilder.cleanupIpamAdminScopeSettings().build(); + cleanupIpamAdminScopeOperationSettings = + settingsBuilder.cleanupIpamAdminScopeOperationSettings().build(); + listRegistryBooksSettings = settingsBuilder.listRegistryBooksSettings().build(); + getRegistryBookSettings = settingsBuilder.getRegistryBookSettings().build(); + searchIpResourcesSettings = settingsBuilder.searchIpResourcesSettings().build(); + createRegistryBookSettings = settingsBuilder.createRegistryBookSettings().build(); + createRegistryBookOperationSettings = + settingsBuilder.createRegistryBookOperationSettings().build(); + updateRegistryBookSettings = settingsBuilder.updateRegistryBookSettings().build(); + updateRegistryBookOperationSettings = + settingsBuilder.updateRegistryBookOperationSettings().build(); + deleteRegistryBookSettings = settingsBuilder.deleteRegistryBookSettings().build(); + deleteRegistryBookOperationSettings = + settingsBuilder.deleteRegistryBookOperationSettings().build(); + listRealmsSettings = settingsBuilder.listRealmsSettings().build(); + getRealmSettings = settingsBuilder.getRealmSettings().build(); + createRealmSettings = settingsBuilder.createRealmSettings().build(); + createRealmOperationSettings = settingsBuilder.createRealmOperationSettings().build(); + updateRealmSettings = settingsBuilder.updateRealmSettings().build(); + updateRealmOperationSettings = settingsBuilder.updateRealmOperationSettings().build(); + deleteRealmSettings = settingsBuilder.deleteRealmSettings().build(); + deleteRealmOperationSettings = settingsBuilder.deleteRealmOperationSettings().build(); + listDiscoveredRangesSettings = settingsBuilder.listDiscoveredRangesSettings().build(); + getDiscoveredRangeSettings = settingsBuilder.getDiscoveredRangeSettings().build(); + findDiscoveredRangeFreeIpRangesSettings = + settingsBuilder.findDiscoveredRangeFreeIpRangesSettings().build(); + listCustomRangesSettings = settingsBuilder.listCustomRangesSettings().build(); + getCustomRangeSettings = settingsBuilder.getCustomRangeSettings().build(); + showCustomRangeUtilizationSettings = + settingsBuilder.showCustomRangeUtilizationSettings().build(); + showDiscoveredRangeUtilizationSettings = + settingsBuilder.showDiscoveredRangeUtilizationSettings().build(); + findCustomRangeFreeIpRangesSettings = + settingsBuilder.findCustomRangeFreeIpRangesSettings().build(); + createCustomRangeSettings = settingsBuilder.createCustomRangeSettings().build(); + createCustomRangeOperationSettings = + settingsBuilder.createCustomRangeOperationSettings().build(); + updateCustomRangeSettings = settingsBuilder.updateCustomRangeSettings().build(); + updateCustomRangeOperationSettings = + settingsBuilder.updateCustomRangeOperationSettings().build(); + deleteCustomRangeSettings = settingsBuilder.deleteCustomRangeSettings().build(); + deleteCustomRangeOperationSettings = + settingsBuilder.deleteCustomRangeOperationSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-numberregistry") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for CloudNumberRegistryStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListIpamAdminScopesRequest, + ListIpamAdminScopesResponse, + ListIpamAdminScopesPagedResponse> + listIpamAdminScopesSettings; + private final UnaryCallSettings.Builder + getIpamAdminScopeSettings; + private final UnaryCallSettings.Builder< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesSettings; + private final UnaryCallSettings.Builder + createIpamAdminScopeSettings; + private final OperationCallSettings.Builder< + CreateIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + createIpamAdminScopeOperationSettings; + private final UnaryCallSettings.Builder + updateIpamAdminScopeSettings; + private final OperationCallSettings.Builder< + UpdateIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + updateIpamAdminScopeOperationSettings; + private final UnaryCallSettings.Builder + deleteIpamAdminScopeSettings; + private final OperationCallSettings.Builder< + DeleteIpamAdminScopeRequest, Empty, OperationMetadata> + deleteIpamAdminScopeOperationSettings; + private final UnaryCallSettings.Builder + disableIpamAdminScopeSettings; + private final OperationCallSettings.Builder< + DisableIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + disableIpamAdminScopeOperationSettings; + private final UnaryCallSettings.Builder + cleanupIpamAdminScopeSettings; + private final OperationCallSettings.Builder< + CleanupIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + cleanupIpamAdminScopeOperationSettings; + private final PagedCallSettings.Builder< + ListRegistryBooksRequest, ListRegistryBooksResponse, ListRegistryBooksPagedResponse> + listRegistryBooksSettings; + private final UnaryCallSettings.Builder + getRegistryBookSettings; + private final PagedCallSettings.Builder< + SearchIpResourcesRequest, SearchIpResourcesResponse, SearchIpResourcesPagedResponse> + searchIpResourcesSettings; + private final UnaryCallSettings.Builder + createRegistryBookSettings; + private final OperationCallSettings.Builder< + CreateRegistryBookRequest, RegistryBook, OperationMetadata> + createRegistryBookOperationSettings; + private final UnaryCallSettings.Builder + updateRegistryBookSettings; + private final OperationCallSettings.Builder< + UpdateRegistryBookRequest, RegistryBook, OperationMetadata> + updateRegistryBookOperationSettings; + private final UnaryCallSettings.Builder + deleteRegistryBookSettings; + private final OperationCallSettings.Builder + deleteRegistryBookOperationSettings; + private final PagedCallSettings.Builder< + ListRealmsRequest, ListRealmsResponse, ListRealmsPagedResponse> + listRealmsSettings; + private final UnaryCallSettings.Builder getRealmSettings; + private final UnaryCallSettings.Builder createRealmSettings; + private final OperationCallSettings.Builder + createRealmOperationSettings; + private final UnaryCallSettings.Builder updateRealmSettings; + private final OperationCallSettings.Builder + updateRealmOperationSettings; + private final UnaryCallSettings.Builder deleteRealmSettings; + private final OperationCallSettings.Builder + deleteRealmOperationSettings; + private final PagedCallSettings.Builder< + ListDiscoveredRangesRequest, + ListDiscoveredRangesResponse, + ListDiscoveredRangesPagedResponse> + listDiscoveredRangesSettings; + private final UnaryCallSettings.Builder + getDiscoveredRangeSettings; + private final UnaryCallSettings.Builder< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesSettings; + private final PagedCallSettings.Builder< + ListCustomRangesRequest, ListCustomRangesResponse, ListCustomRangesPagedResponse> + listCustomRangesSettings; + private final UnaryCallSettings.Builder + getCustomRangeSettings; + private final UnaryCallSettings.Builder< + ShowCustomRangeUtilizationRequest, ShowCustomRangeUtilizationResponse> + showCustomRangeUtilizationSettings; + private final UnaryCallSettings.Builder< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationSettings; + private final UnaryCallSettings.Builder< + FindCustomRangeFreeIpRangesRequest, FindCustomRangeFreeIpRangesResponse> + findCustomRangeFreeIpRangesSettings; + private final UnaryCallSettings.Builder + createCustomRangeSettings; + private final OperationCallSettings.Builder< + CreateCustomRangeRequest, CustomRange, OperationMetadata> + createCustomRangeOperationSettings; + private final UnaryCallSettings.Builder + updateCustomRangeSettings; + private final OperationCallSettings.Builder< + UpdateCustomRangeRequest, CustomRange, OperationMetadata> + updateCustomRangeOperationSettings; + private final UnaryCallSettings.Builder + deleteCustomRangeSettings; + private final OperationCallSettings.Builder + deleteCustomRangeOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_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() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listIpamAdminScopesSettings = + PagedCallSettings.newBuilder(LIST_IPAM_ADMIN_SCOPES_PAGE_STR_FACT); + getIpamAdminScopeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + checkAvailabilityIpamAdminScopesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createIpamAdminScopeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createIpamAdminScopeOperationSettings = OperationCallSettings.newBuilder(); + updateIpamAdminScopeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateIpamAdminScopeOperationSettings = OperationCallSettings.newBuilder(); + deleteIpamAdminScopeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteIpamAdminScopeOperationSettings = OperationCallSettings.newBuilder(); + disableIpamAdminScopeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + disableIpamAdminScopeOperationSettings = OperationCallSettings.newBuilder(); + cleanupIpamAdminScopeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + cleanupIpamAdminScopeOperationSettings = OperationCallSettings.newBuilder(); + listRegistryBooksSettings = PagedCallSettings.newBuilder(LIST_REGISTRY_BOOKS_PAGE_STR_FACT); + getRegistryBookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + searchIpResourcesSettings = PagedCallSettings.newBuilder(SEARCH_IP_RESOURCES_PAGE_STR_FACT); + createRegistryBookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createRegistryBookOperationSettings = OperationCallSettings.newBuilder(); + updateRegistryBookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateRegistryBookOperationSettings = OperationCallSettings.newBuilder(); + deleteRegistryBookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteRegistryBookOperationSettings = OperationCallSettings.newBuilder(); + listRealmsSettings = PagedCallSettings.newBuilder(LIST_REALMS_PAGE_STR_FACT); + getRealmSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createRealmSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createRealmOperationSettings = OperationCallSettings.newBuilder(); + updateRealmSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateRealmOperationSettings = OperationCallSettings.newBuilder(); + deleteRealmSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteRealmOperationSettings = OperationCallSettings.newBuilder(); + listDiscoveredRangesSettings = + PagedCallSettings.newBuilder(LIST_DISCOVERED_RANGES_PAGE_STR_FACT); + getDiscoveredRangeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + findDiscoveredRangeFreeIpRangesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listCustomRangesSettings = PagedCallSettings.newBuilder(LIST_CUSTOM_RANGES_PAGE_STR_FACT); + getCustomRangeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + showCustomRangeUtilizationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + showDiscoveredRangeUtilizationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + findCustomRangeFreeIpRangesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCustomRangeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCustomRangeOperationSettings = OperationCallSettings.newBuilder(); + updateCustomRangeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateCustomRangeOperationSettings = OperationCallSettings.newBuilder(); + deleteCustomRangeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteCustomRangeOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listIpamAdminScopesSettings, + getIpamAdminScopeSettings, + checkAvailabilityIpamAdminScopesSettings, + createIpamAdminScopeSettings, + updateIpamAdminScopeSettings, + deleteIpamAdminScopeSettings, + disableIpamAdminScopeSettings, + cleanupIpamAdminScopeSettings, + listRegistryBooksSettings, + getRegistryBookSettings, + searchIpResourcesSettings, + createRegistryBookSettings, + updateRegistryBookSettings, + deleteRegistryBookSettings, + listRealmsSettings, + getRealmSettings, + createRealmSettings, + updateRealmSettings, + deleteRealmSettings, + listDiscoveredRangesSettings, + getDiscoveredRangeSettings, + findDiscoveredRangeFreeIpRangesSettings, + listCustomRangesSettings, + getCustomRangeSettings, + showCustomRangeUtilizationSettings, + showDiscoveredRangeUtilizationSettings, + findCustomRangeFreeIpRangesSettings, + createCustomRangeSettings, + updateCustomRangeSettings, + deleteCustomRangeSettings); + initDefaults(this); + } + + protected Builder(CloudNumberRegistryStubSettings settings) { + super(settings); + + listIpamAdminScopesSettings = settings.listIpamAdminScopesSettings.toBuilder(); + getIpamAdminScopeSettings = settings.getIpamAdminScopeSettings.toBuilder(); + checkAvailabilityIpamAdminScopesSettings = + settings.checkAvailabilityIpamAdminScopesSettings.toBuilder(); + createIpamAdminScopeSettings = settings.createIpamAdminScopeSettings.toBuilder(); + createIpamAdminScopeOperationSettings = + settings.createIpamAdminScopeOperationSettings.toBuilder(); + updateIpamAdminScopeSettings = settings.updateIpamAdminScopeSettings.toBuilder(); + updateIpamAdminScopeOperationSettings = + settings.updateIpamAdminScopeOperationSettings.toBuilder(); + deleteIpamAdminScopeSettings = settings.deleteIpamAdminScopeSettings.toBuilder(); + deleteIpamAdminScopeOperationSettings = + settings.deleteIpamAdminScopeOperationSettings.toBuilder(); + disableIpamAdminScopeSettings = settings.disableIpamAdminScopeSettings.toBuilder(); + disableIpamAdminScopeOperationSettings = + settings.disableIpamAdminScopeOperationSettings.toBuilder(); + cleanupIpamAdminScopeSettings = settings.cleanupIpamAdminScopeSettings.toBuilder(); + cleanupIpamAdminScopeOperationSettings = + settings.cleanupIpamAdminScopeOperationSettings.toBuilder(); + listRegistryBooksSettings = settings.listRegistryBooksSettings.toBuilder(); + getRegistryBookSettings = settings.getRegistryBookSettings.toBuilder(); + searchIpResourcesSettings = settings.searchIpResourcesSettings.toBuilder(); + createRegistryBookSettings = settings.createRegistryBookSettings.toBuilder(); + createRegistryBookOperationSettings = + settings.createRegistryBookOperationSettings.toBuilder(); + updateRegistryBookSettings = settings.updateRegistryBookSettings.toBuilder(); + updateRegistryBookOperationSettings = + settings.updateRegistryBookOperationSettings.toBuilder(); + deleteRegistryBookSettings = settings.deleteRegistryBookSettings.toBuilder(); + deleteRegistryBookOperationSettings = + settings.deleteRegistryBookOperationSettings.toBuilder(); + listRealmsSettings = settings.listRealmsSettings.toBuilder(); + getRealmSettings = settings.getRealmSettings.toBuilder(); + createRealmSettings = settings.createRealmSettings.toBuilder(); + createRealmOperationSettings = settings.createRealmOperationSettings.toBuilder(); + updateRealmSettings = settings.updateRealmSettings.toBuilder(); + updateRealmOperationSettings = settings.updateRealmOperationSettings.toBuilder(); + deleteRealmSettings = settings.deleteRealmSettings.toBuilder(); + deleteRealmOperationSettings = settings.deleteRealmOperationSettings.toBuilder(); + listDiscoveredRangesSettings = settings.listDiscoveredRangesSettings.toBuilder(); + getDiscoveredRangeSettings = settings.getDiscoveredRangeSettings.toBuilder(); + findDiscoveredRangeFreeIpRangesSettings = + settings.findDiscoveredRangeFreeIpRangesSettings.toBuilder(); + listCustomRangesSettings = settings.listCustomRangesSettings.toBuilder(); + getCustomRangeSettings = settings.getCustomRangeSettings.toBuilder(); + showCustomRangeUtilizationSettings = settings.showCustomRangeUtilizationSettings.toBuilder(); + showDiscoveredRangeUtilizationSettings = + settings.showDiscoveredRangeUtilizationSettings.toBuilder(); + findCustomRangeFreeIpRangesSettings = + settings.findCustomRangeFreeIpRangesSettings.toBuilder(); + createCustomRangeSettings = settings.createCustomRangeSettings.toBuilder(); + createCustomRangeOperationSettings = settings.createCustomRangeOperationSettings.toBuilder(); + updateCustomRangeSettings = settings.updateCustomRangeSettings.toBuilder(); + updateCustomRangeOperationSettings = settings.updateCustomRangeOperationSettings.toBuilder(); + deleteCustomRangeSettings = settings.deleteCustomRangeSettings.toBuilder(); + deleteCustomRangeOperationSettings = settings.deleteCustomRangeOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listIpamAdminScopesSettings, + getIpamAdminScopeSettings, + checkAvailabilityIpamAdminScopesSettings, + createIpamAdminScopeSettings, + updateIpamAdminScopeSettings, + deleteIpamAdminScopeSettings, + disableIpamAdminScopeSettings, + cleanupIpamAdminScopeSettings, + listRegistryBooksSettings, + getRegistryBookSettings, + searchIpResourcesSettings, + createRegistryBookSettings, + updateRegistryBookSettings, + deleteRegistryBookSettings, + listRealmsSettings, + getRealmSettings, + createRealmSettings, + updateRealmSettings, + deleteRealmSettings, + listDiscoveredRangesSettings, + getDiscoveredRangeSettings, + findDiscoveredRangeFreeIpRangesSettings, + listCustomRangesSettings, + getCustomRangeSettings, + showCustomRangeUtilizationSettings, + showDiscoveredRangeUtilizationSettings, + findCustomRangeFreeIpRangesSettings, + createCustomRangeSettings, + updateCustomRangeSettings, + deleteCustomRangeSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + 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.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listIpamAdminScopesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getIpamAdminScopeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .checkAvailabilityIpamAdminScopesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createIpamAdminScopeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateIpamAdminScopeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteIpamAdminScopeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .disableIpamAdminScopeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .cleanupIpamAdminScopeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listRegistryBooksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getRegistryBookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .searchIpResourcesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createRegistryBookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateRegistryBookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteRegistryBookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listRealmsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getRealmSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createRealmSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateRealmSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteRealmSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listDiscoveredRangesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getDiscoveredRangeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .findDiscoveredRangeFreeIpRangesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listCustomRangesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getCustomRangeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .showCustomRangeUtilizationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .showDiscoveredRangeUtilizationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .findCustomRangeFreeIpRangesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createCustomRangeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateCustomRangeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteCustomRangeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createIpamAdminScopeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(IpamAdminScope.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateIpamAdminScopeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(IpamAdminScope.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteIpamAdminScopeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .disableIpamAdminScopeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(IpamAdminScope.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .cleanupIpamAdminScopeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(IpamAdminScope.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createRegistryBookOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(RegistryBook.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateRegistryBookOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(RegistryBook.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteRegistryBookOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createRealmOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Realm.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateRealmOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Realm.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteRealmOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createCustomRangeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CustomRange.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateCustomRangeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CustomRange.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteCustomRangeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(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 listIpamAdminScopes. */ + public PagedCallSettings.Builder< + ListIpamAdminScopesRequest, + ListIpamAdminScopesResponse, + ListIpamAdminScopesPagedResponse> + listIpamAdminScopesSettings() { + return listIpamAdminScopesSettings; + } + + /** Returns the builder for the settings used for calls to getIpamAdminScope. */ + public UnaryCallSettings.Builder + getIpamAdminScopeSettings() { + return getIpamAdminScopeSettings; + } + + /** Returns the builder for the settings used for calls to checkAvailabilityIpamAdminScopes. */ + public UnaryCallSettings.Builder< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesSettings() { + return checkAvailabilityIpamAdminScopesSettings; + } + + /** Returns the builder for the settings used for calls to createIpamAdminScope. */ + public UnaryCallSettings.Builder + createIpamAdminScopeSettings() { + return createIpamAdminScopeSettings; + } + + /** Returns the builder for the settings used for calls to createIpamAdminScope. */ + public OperationCallSettings.Builder< + CreateIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + createIpamAdminScopeOperationSettings() { + return createIpamAdminScopeOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateIpamAdminScope. */ + public UnaryCallSettings.Builder + updateIpamAdminScopeSettings() { + return updateIpamAdminScopeSettings; + } + + /** Returns the builder for the settings used for calls to updateIpamAdminScope. */ + public OperationCallSettings.Builder< + UpdateIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + updateIpamAdminScopeOperationSettings() { + return updateIpamAdminScopeOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteIpamAdminScope. */ + public UnaryCallSettings.Builder + deleteIpamAdminScopeSettings() { + return deleteIpamAdminScopeSettings; + } + + /** Returns the builder for the settings used for calls to deleteIpamAdminScope. */ + public OperationCallSettings.Builder + deleteIpamAdminScopeOperationSettings() { + return deleteIpamAdminScopeOperationSettings; + } + + /** Returns the builder for the settings used for calls to disableIpamAdminScope. */ + public UnaryCallSettings.Builder + disableIpamAdminScopeSettings() { + return disableIpamAdminScopeSettings; + } + + /** Returns the builder for the settings used for calls to disableIpamAdminScope. */ + public OperationCallSettings.Builder< + DisableIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + disableIpamAdminScopeOperationSettings() { + return disableIpamAdminScopeOperationSettings; + } + + /** Returns the builder for the settings used for calls to cleanupIpamAdminScope. */ + public UnaryCallSettings.Builder + cleanupIpamAdminScopeSettings() { + return cleanupIpamAdminScopeSettings; + } + + /** Returns the builder for the settings used for calls to cleanupIpamAdminScope. */ + public OperationCallSettings.Builder< + CleanupIpamAdminScopeRequest, IpamAdminScope, OperationMetadata> + cleanupIpamAdminScopeOperationSettings() { + return cleanupIpamAdminScopeOperationSettings; + } + + /** Returns the builder for the settings used for calls to listRegistryBooks. */ + public PagedCallSettings.Builder< + ListRegistryBooksRequest, ListRegistryBooksResponse, ListRegistryBooksPagedResponse> + listRegistryBooksSettings() { + return listRegistryBooksSettings; + } + + /** Returns the builder for the settings used for calls to getRegistryBook. */ + public UnaryCallSettings.Builder + getRegistryBookSettings() { + return getRegistryBookSettings; + } + + /** Returns the builder for the settings used for calls to searchIpResources. */ + public PagedCallSettings.Builder< + SearchIpResourcesRequest, SearchIpResourcesResponse, SearchIpResourcesPagedResponse> + searchIpResourcesSettings() { + return searchIpResourcesSettings; + } + + /** Returns the builder for the settings used for calls to createRegistryBook. */ + public UnaryCallSettings.Builder + createRegistryBookSettings() { + return createRegistryBookSettings; + } + + /** Returns the builder for the settings used for calls to createRegistryBook. */ + public OperationCallSettings.Builder + createRegistryBookOperationSettings() { + return createRegistryBookOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateRegistryBook. */ + public UnaryCallSettings.Builder + updateRegistryBookSettings() { + return updateRegistryBookSettings; + } + + /** Returns the builder for the settings used for calls to updateRegistryBook. */ + public OperationCallSettings.Builder + updateRegistryBookOperationSettings() { + return updateRegistryBookOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteRegistryBook. */ + public UnaryCallSettings.Builder + deleteRegistryBookSettings() { + return deleteRegistryBookSettings; + } + + /** Returns the builder for the settings used for calls to deleteRegistryBook. */ + public OperationCallSettings.Builder + deleteRegistryBookOperationSettings() { + return deleteRegistryBookOperationSettings; + } + + /** Returns the builder for the settings used for calls to listRealms. */ + public PagedCallSettings.Builder + listRealmsSettings() { + return listRealmsSettings; + } + + /** Returns the builder for the settings used for calls to getRealm. */ + public UnaryCallSettings.Builder getRealmSettings() { + return getRealmSettings; + } + + /** Returns the builder for the settings used for calls to createRealm. */ + public UnaryCallSettings.Builder createRealmSettings() { + return createRealmSettings; + } + + /** Returns the builder for the settings used for calls to createRealm. */ + public OperationCallSettings.Builder + createRealmOperationSettings() { + return createRealmOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateRealm. */ + public UnaryCallSettings.Builder updateRealmSettings() { + return updateRealmSettings; + } + + /** Returns the builder for the settings used for calls to updateRealm. */ + public OperationCallSettings.Builder + updateRealmOperationSettings() { + return updateRealmOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteRealm. */ + public UnaryCallSettings.Builder deleteRealmSettings() { + return deleteRealmSettings; + } + + /** Returns the builder for the settings used for calls to deleteRealm. */ + public OperationCallSettings.Builder + deleteRealmOperationSettings() { + return deleteRealmOperationSettings; + } + + /** Returns the builder for the settings used for calls to listDiscoveredRanges. */ + public PagedCallSettings.Builder< + ListDiscoveredRangesRequest, + ListDiscoveredRangesResponse, + ListDiscoveredRangesPagedResponse> + listDiscoveredRangesSettings() { + return listDiscoveredRangesSettings; + } + + /** Returns the builder for the settings used for calls to getDiscoveredRange. */ + public UnaryCallSettings.Builder + getDiscoveredRangeSettings() { + return getDiscoveredRangeSettings; + } + + /** Returns the builder for the settings used for calls to findDiscoveredRangeFreeIpRanges. */ + public UnaryCallSettings.Builder< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesSettings() { + return findDiscoveredRangeFreeIpRangesSettings; + } + + /** Returns the builder for the settings used for calls to listCustomRanges. */ + public PagedCallSettings.Builder< + ListCustomRangesRequest, ListCustomRangesResponse, ListCustomRangesPagedResponse> + listCustomRangesSettings() { + return listCustomRangesSettings; + } + + /** Returns the builder for the settings used for calls to getCustomRange. */ + public UnaryCallSettings.Builder getCustomRangeSettings() { + return getCustomRangeSettings; + } + + /** Returns the builder for the settings used for calls to showCustomRangeUtilization. */ + public UnaryCallSettings.Builder< + ShowCustomRangeUtilizationRequest, ShowCustomRangeUtilizationResponse> + showCustomRangeUtilizationSettings() { + return showCustomRangeUtilizationSettings; + } + + /** Returns the builder for the settings used for calls to showDiscoveredRangeUtilization. */ + public UnaryCallSettings.Builder< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationSettings() { + return showDiscoveredRangeUtilizationSettings; + } + + /** Returns the builder for the settings used for calls to findCustomRangeFreeIpRanges. */ + public UnaryCallSettings.Builder< + FindCustomRangeFreeIpRangesRequest, FindCustomRangeFreeIpRangesResponse> + findCustomRangeFreeIpRangesSettings() { + return findCustomRangeFreeIpRangesSettings; + } + + /** Returns the builder for the settings used for calls to createCustomRange. */ + public UnaryCallSettings.Builder + createCustomRangeSettings() { + return createCustomRangeSettings; + } + + /** Returns the builder for the settings used for calls to createCustomRange. */ + public OperationCallSettings.Builder + createCustomRangeOperationSettings() { + return createCustomRangeOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateCustomRange. */ + public UnaryCallSettings.Builder + updateCustomRangeSettings() { + return updateCustomRangeSettings; + } + + /** Returns the builder for the settings used for calls to updateCustomRange. */ + public OperationCallSettings.Builder + updateCustomRangeOperationSettings() { + return updateCustomRangeOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteCustomRange. */ + public UnaryCallSettings.Builder + deleteCustomRangeSettings() { + return deleteCustomRangeSettings; + } + + /** Returns the builder for the settings used for calls to deleteCustomRange. */ + public OperationCallSettings.Builder + deleteCustomRangeOperationSettings() { + return deleteCustomRangeOperationSettings; + } + + @Override + public CloudNumberRegistryStubSettings build() throws IOException { + return new CloudNumberRegistryStubSettings(this); + } + } +} diff --git a/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/GrpcCloudNumberRegistryCallableFactory.java b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/GrpcCloudNumberRegistryCallableFactory.java new file mode 100644 index 000000000000..8ccc0252cad1 --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/GrpcCloudNumberRegistryCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.stub; + +import com.google.api.core.BetaApi; +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 CloudNumberRegistry service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcCloudNumberRegistryCallableFactory 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-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/GrpcCloudNumberRegistryStub.java b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/GrpcCloudNumberRegistryStub.java new file mode 100644 index 000000000000..ab9f6ded0cd5 --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/GrpcCloudNumberRegistryStub.java @@ -0,0 +1,1531 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.stub; + +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListCustomRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListDiscoveredRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListIpamAdminScopesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRealmsPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRegistryBooksPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.SearchIpResourcesPagedResponse; + +import com.google.api.core.BetaApi; +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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest; +import com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse; +import com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.CreateRealmRequest; +import com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest; +import com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRange; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse; +import com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest; +import com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.GetRealmRequest; +import com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest; +import com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse; +import com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest; +import com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse; +import com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest; +import com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse; +import com.google.cloud.numberregistry.v1alpha.ListRealmsRequest; +import com.google.cloud.numberregistry.v1alpha.ListRealmsResponse; +import com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest; +import com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest; +import com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse; +import com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest; +import com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest; +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 CloudNumberRegistry service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcCloudNumberRegistryStub extends CloudNumberRegistryStub { + private static final MethodDescriptor + listIpamAdminScopesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ListIpamAdminScopes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListIpamAdminScopesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListIpamAdminScopesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getIpamAdminScopeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/GetIpamAdminScope") + .setRequestMarshaller( + ProtoUtils.marshaller(GetIpamAdminScopeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(IpamAdminScope.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/CheckAvailabilityIpamAdminScopes") + .setRequestMarshaller( + ProtoUtils.marshaller( + CheckAvailabilityIpamAdminScopesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + CheckAvailabilityIpamAdminScopesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createIpamAdminScopeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/CreateIpamAdminScope") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateIpamAdminScopeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateIpamAdminScopeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/UpdateIpamAdminScope") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateIpamAdminScopeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteIpamAdminScopeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/DeleteIpamAdminScope") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteIpamAdminScopeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + disableIpamAdminScopeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/DisableIpamAdminScope") + .setRequestMarshaller( + ProtoUtils.marshaller(DisableIpamAdminScopeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + cleanupIpamAdminScopeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/CleanupIpamAdminScope") + .setRequestMarshaller( + ProtoUtils.marshaller(CleanupIpamAdminScopeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listRegistryBooksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ListRegistryBooks") + .setRequestMarshaller( + ProtoUtils.marshaller(ListRegistryBooksRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRegistryBooksResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getRegistryBookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/GetRegistryBook") + .setRequestMarshaller( + ProtoUtils.marshaller(GetRegistryBookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(RegistryBook.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + searchIpResourcesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/SearchIpResources") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchIpResourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchIpResourcesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createRegistryBookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/CreateRegistryBook") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateRegistryBookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateRegistryBookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/UpdateRegistryBook") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateRegistryBookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteRegistryBookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/DeleteRegistryBook") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteRegistryBookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listRealmsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ListRealms") + .setRequestMarshaller(ProtoUtils.marshaller(ListRealmsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListRealmsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getRealmMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.numberregistry.v1alpha.CloudNumberRegistry/GetRealm") + .setRequestMarshaller(ProtoUtils.marshaller(GetRealmRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Realm.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor createRealmMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.numberregistry.v1alpha.CloudNumberRegistry/CreateRealm") + .setRequestMarshaller(ProtoUtils.marshaller(CreateRealmRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor updateRealmMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.numberregistry.v1alpha.CloudNumberRegistry/UpdateRealm") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateRealmRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor deleteRealmMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.numberregistry.v1alpha.CloudNumberRegistry/DeleteRealm") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteRealmRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listDiscoveredRangesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ListDiscoveredRanges") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDiscoveredRangesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDiscoveredRangesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getDiscoveredRangeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/GetDiscoveredRange") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDiscoveredRangeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DiscoveredRange.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/FindDiscoveredRangeFreeIpRanges") + .setRequestMarshaller( + ProtoUtils.marshaller( + FindDiscoveredRangeFreeIpRangesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + FindDiscoveredRangeFreeIpRangesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listCustomRangesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ListCustomRanges") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCustomRangesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCustomRangesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getCustomRangeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/GetCustomRange") + .setRequestMarshaller( + ProtoUtils.marshaller(GetCustomRangeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(CustomRange.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ShowCustomRangeUtilizationRequest, ShowCustomRangeUtilizationResponse> + showCustomRangeUtilizationMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ShowCustomRangeUtilization") + .setRequestMarshaller( + ProtoUtils.marshaller(ShowCustomRangeUtilizationRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ShowCustomRangeUtilizationResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ShowDiscoveredRangeUtilization") + .setRequestMarshaller( + ProtoUtils.marshaller(ShowDiscoveredRangeUtilizationRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + ShowDiscoveredRangeUtilizationResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + FindCustomRangeFreeIpRangesRequest, FindCustomRangeFreeIpRangesResponse> + findCustomRangeFreeIpRangesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/FindCustomRangeFreeIpRanges") + .setRequestMarshaller( + ProtoUtils.marshaller(FindCustomRangeFreeIpRangesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(FindCustomRangeFreeIpRangesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createCustomRangeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/CreateCustomRange") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateCustomRangeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateCustomRangeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/UpdateCustomRange") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateCustomRangeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteCustomRangeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/DeleteCustomRange") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteCustomRangeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable + listIpamAdminScopesCallable; + private final UnaryCallable + listIpamAdminScopesPagedCallable; + private final UnaryCallable getIpamAdminScopeCallable; + private final UnaryCallable< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesCallable; + private final UnaryCallable createIpamAdminScopeCallable; + private final OperationCallable + createIpamAdminScopeOperationCallable; + private final UnaryCallable updateIpamAdminScopeCallable; + private final OperationCallable + updateIpamAdminScopeOperationCallable; + private final UnaryCallable deleteIpamAdminScopeCallable; + private final OperationCallable + deleteIpamAdminScopeOperationCallable; + private final UnaryCallable + disableIpamAdminScopeCallable; + private final OperationCallable + disableIpamAdminScopeOperationCallable; + private final UnaryCallable + cleanupIpamAdminScopeCallable; + private final OperationCallable + cleanupIpamAdminScopeOperationCallable; + private final UnaryCallable + listRegistryBooksCallable; + private final UnaryCallable + listRegistryBooksPagedCallable; + private final UnaryCallable getRegistryBookCallable; + private final UnaryCallable + searchIpResourcesCallable; + private final UnaryCallable + searchIpResourcesPagedCallable; + private final UnaryCallable createRegistryBookCallable; + private final OperationCallable + createRegistryBookOperationCallable; + private final UnaryCallable updateRegistryBookCallable; + private final OperationCallable + updateRegistryBookOperationCallable; + private final UnaryCallable deleteRegistryBookCallable; + private final OperationCallable + deleteRegistryBookOperationCallable; + private final UnaryCallable listRealmsCallable; + private final UnaryCallable listRealmsPagedCallable; + private final UnaryCallable getRealmCallable; + private final UnaryCallable createRealmCallable; + private final OperationCallable + createRealmOperationCallable; + private final UnaryCallable updateRealmCallable; + private final OperationCallable + updateRealmOperationCallable; + private final UnaryCallable deleteRealmCallable; + private final OperationCallable + deleteRealmOperationCallable; + private final UnaryCallable + listDiscoveredRangesCallable; + private final UnaryCallable + listDiscoveredRangesPagedCallable; + private final UnaryCallable + getDiscoveredRangeCallable; + private final UnaryCallable< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesCallable; + private final UnaryCallable + listCustomRangesCallable; + private final UnaryCallable + listCustomRangesPagedCallable; + private final UnaryCallable getCustomRangeCallable; + private final UnaryCallable + showCustomRangeUtilizationCallable; + private final UnaryCallable< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationCallable; + private final UnaryCallable< + FindCustomRangeFreeIpRangesRequest, FindCustomRangeFreeIpRangesResponse> + findCustomRangeFreeIpRangesCallable; + private final UnaryCallable createCustomRangeCallable; + private final OperationCallable + createCustomRangeOperationCallable; + private final UnaryCallable updateCustomRangeCallable; + private final OperationCallable + updateCustomRangeOperationCallable; + private final UnaryCallable deleteCustomRangeCallable; + private final OperationCallable + deleteCustomRangeOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcCloudNumberRegistryStub create(CloudNumberRegistryStubSettings settings) + throws IOException { + return new GrpcCloudNumberRegistryStub(settings, ClientContext.create(settings)); + } + + public static final GrpcCloudNumberRegistryStub create(ClientContext clientContext) + throws IOException { + return new GrpcCloudNumberRegistryStub( + CloudNumberRegistryStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcCloudNumberRegistryStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcCloudNumberRegistryStub( + CloudNumberRegistryStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcCloudNumberRegistryStub, 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 GrpcCloudNumberRegistryStub( + CloudNumberRegistryStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcCloudNumberRegistryCallableFactory()); + } + + /** + * Constructs an instance of GrpcCloudNumberRegistryStub, 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 GrpcCloudNumberRegistryStub( + CloudNumberRegistryStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listIpamAdminScopesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listIpamAdminScopesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getIpamAdminScopeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIpamAdminScopeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(checkAvailabilityIpamAdminScopesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings createIpamAdminScopeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createIpamAdminScopeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateIpamAdminScopeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateIpamAdminScopeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "ipam_admin_scope.name", + String.valueOf(request.getIpamAdminScope().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteIpamAdminScopeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteIpamAdminScopeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + disableIpamAdminScopeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(disableIpamAdminScopeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + cleanupIpamAdminScopeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cleanupIpamAdminScopeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listRegistryBooksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRegistryBooksMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getRegistryBookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRegistryBookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + searchIpResourcesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchIpResourcesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings createRegistryBookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createRegistryBookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateRegistryBookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateRegistryBookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "registry_book.name", String.valueOf(request.getRegistryBook().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteRegistryBookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteRegistryBookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings listRealmsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRealmsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getRealmTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRealmMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings createRealmTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createRealmMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateRealmTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateRealmMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("realm.name", String.valueOf(request.getRealm().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteRealmTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteRealmMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listDiscoveredRangesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDiscoveredRangesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + getDiscoveredRangeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDiscoveredRangeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(findDiscoveredRangeFreeIpRangesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listCustomRangesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listCustomRangesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getCustomRangeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCustomRangeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + showCustomRangeUtilizationTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(showCustomRangeUtilizationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + showDiscoveredRangeUtilizationTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(showDiscoveredRangeUtilizationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + findCustomRangeFreeIpRangesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(findCustomRangeFreeIpRangesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings createCustomRangeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCustomRangeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateCustomRangeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCustomRangeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "custom_range.name", String.valueOf(request.getCustomRange().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteCustomRangeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteCustomRangeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.listIpamAdminScopesCallable = + callableFactory.createUnaryCallable( + listIpamAdminScopesTransportSettings, + settings.listIpamAdminScopesSettings(), + clientContext); + this.listIpamAdminScopesPagedCallable = + callableFactory.createPagedCallable( + listIpamAdminScopesTransportSettings, + settings.listIpamAdminScopesSettings(), + clientContext); + this.getIpamAdminScopeCallable = + callableFactory.createUnaryCallable( + getIpamAdminScopeTransportSettings, + settings.getIpamAdminScopeSettings(), + clientContext); + this.checkAvailabilityIpamAdminScopesCallable = + callableFactory.createUnaryCallable( + checkAvailabilityIpamAdminScopesTransportSettings, + settings.checkAvailabilityIpamAdminScopesSettings(), + clientContext); + this.createIpamAdminScopeCallable = + callableFactory.createUnaryCallable( + createIpamAdminScopeTransportSettings, + settings.createIpamAdminScopeSettings(), + clientContext); + this.createIpamAdminScopeOperationCallable = + callableFactory.createOperationCallable( + createIpamAdminScopeTransportSettings, + settings.createIpamAdminScopeOperationSettings(), + clientContext, + operationsStub); + this.updateIpamAdminScopeCallable = + callableFactory.createUnaryCallable( + updateIpamAdminScopeTransportSettings, + settings.updateIpamAdminScopeSettings(), + clientContext); + this.updateIpamAdminScopeOperationCallable = + callableFactory.createOperationCallable( + updateIpamAdminScopeTransportSettings, + settings.updateIpamAdminScopeOperationSettings(), + clientContext, + operationsStub); + this.deleteIpamAdminScopeCallable = + callableFactory.createUnaryCallable( + deleteIpamAdminScopeTransportSettings, + settings.deleteIpamAdminScopeSettings(), + clientContext); + this.deleteIpamAdminScopeOperationCallable = + callableFactory.createOperationCallable( + deleteIpamAdminScopeTransportSettings, + settings.deleteIpamAdminScopeOperationSettings(), + clientContext, + operationsStub); + this.disableIpamAdminScopeCallable = + callableFactory.createUnaryCallable( + disableIpamAdminScopeTransportSettings, + settings.disableIpamAdminScopeSettings(), + clientContext); + this.disableIpamAdminScopeOperationCallable = + callableFactory.createOperationCallable( + disableIpamAdminScopeTransportSettings, + settings.disableIpamAdminScopeOperationSettings(), + clientContext, + operationsStub); + this.cleanupIpamAdminScopeCallable = + callableFactory.createUnaryCallable( + cleanupIpamAdminScopeTransportSettings, + settings.cleanupIpamAdminScopeSettings(), + clientContext); + this.cleanupIpamAdminScopeOperationCallable = + callableFactory.createOperationCallable( + cleanupIpamAdminScopeTransportSettings, + settings.cleanupIpamAdminScopeOperationSettings(), + clientContext, + operationsStub); + this.listRegistryBooksCallable = + callableFactory.createUnaryCallable( + listRegistryBooksTransportSettings, + settings.listRegistryBooksSettings(), + clientContext); + this.listRegistryBooksPagedCallable = + callableFactory.createPagedCallable( + listRegistryBooksTransportSettings, + settings.listRegistryBooksSettings(), + clientContext); + this.getRegistryBookCallable = + callableFactory.createUnaryCallable( + getRegistryBookTransportSettings, settings.getRegistryBookSettings(), clientContext); + this.searchIpResourcesCallable = + callableFactory.createUnaryCallable( + searchIpResourcesTransportSettings, + settings.searchIpResourcesSettings(), + clientContext); + this.searchIpResourcesPagedCallable = + callableFactory.createPagedCallable( + searchIpResourcesTransportSettings, + settings.searchIpResourcesSettings(), + clientContext); + this.createRegistryBookCallable = + callableFactory.createUnaryCallable( + createRegistryBookTransportSettings, + settings.createRegistryBookSettings(), + clientContext); + this.createRegistryBookOperationCallable = + callableFactory.createOperationCallable( + createRegistryBookTransportSettings, + settings.createRegistryBookOperationSettings(), + clientContext, + operationsStub); + this.updateRegistryBookCallable = + callableFactory.createUnaryCallable( + updateRegistryBookTransportSettings, + settings.updateRegistryBookSettings(), + clientContext); + this.updateRegistryBookOperationCallable = + callableFactory.createOperationCallable( + updateRegistryBookTransportSettings, + settings.updateRegistryBookOperationSettings(), + clientContext, + operationsStub); + this.deleteRegistryBookCallable = + callableFactory.createUnaryCallable( + deleteRegistryBookTransportSettings, + settings.deleteRegistryBookSettings(), + clientContext); + this.deleteRegistryBookOperationCallable = + callableFactory.createOperationCallable( + deleteRegistryBookTransportSettings, + settings.deleteRegistryBookOperationSettings(), + clientContext, + operationsStub); + this.listRealmsCallable = + callableFactory.createUnaryCallable( + listRealmsTransportSettings, settings.listRealmsSettings(), clientContext); + this.listRealmsPagedCallable = + callableFactory.createPagedCallable( + listRealmsTransportSettings, settings.listRealmsSettings(), clientContext); + this.getRealmCallable = + callableFactory.createUnaryCallable( + getRealmTransportSettings, settings.getRealmSettings(), clientContext); + this.createRealmCallable = + callableFactory.createUnaryCallable( + createRealmTransportSettings, settings.createRealmSettings(), clientContext); + this.createRealmOperationCallable = + callableFactory.createOperationCallable( + createRealmTransportSettings, + settings.createRealmOperationSettings(), + clientContext, + operationsStub); + this.updateRealmCallable = + callableFactory.createUnaryCallable( + updateRealmTransportSettings, settings.updateRealmSettings(), clientContext); + this.updateRealmOperationCallable = + callableFactory.createOperationCallable( + updateRealmTransportSettings, + settings.updateRealmOperationSettings(), + clientContext, + operationsStub); + this.deleteRealmCallable = + callableFactory.createUnaryCallable( + deleteRealmTransportSettings, settings.deleteRealmSettings(), clientContext); + this.deleteRealmOperationCallable = + callableFactory.createOperationCallable( + deleteRealmTransportSettings, + settings.deleteRealmOperationSettings(), + clientContext, + operationsStub); + this.listDiscoveredRangesCallable = + callableFactory.createUnaryCallable( + listDiscoveredRangesTransportSettings, + settings.listDiscoveredRangesSettings(), + clientContext); + this.listDiscoveredRangesPagedCallable = + callableFactory.createPagedCallable( + listDiscoveredRangesTransportSettings, + settings.listDiscoveredRangesSettings(), + clientContext); + this.getDiscoveredRangeCallable = + callableFactory.createUnaryCallable( + getDiscoveredRangeTransportSettings, + settings.getDiscoveredRangeSettings(), + clientContext); + this.findDiscoveredRangeFreeIpRangesCallable = + callableFactory.createUnaryCallable( + findDiscoveredRangeFreeIpRangesTransportSettings, + settings.findDiscoveredRangeFreeIpRangesSettings(), + clientContext); + this.listCustomRangesCallable = + callableFactory.createUnaryCallable( + listCustomRangesTransportSettings, settings.listCustomRangesSettings(), clientContext); + this.listCustomRangesPagedCallable = + callableFactory.createPagedCallable( + listCustomRangesTransportSettings, settings.listCustomRangesSettings(), clientContext); + this.getCustomRangeCallable = + callableFactory.createUnaryCallable( + getCustomRangeTransportSettings, settings.getCustomRangeSettings(), clientContext); + this.showCustomRangeUtilizationCallable = + callableFactory.createUnaryCallable( + showCustomRangeUtilizationTransportSettings, + settings.showCustomRangeUtilizationSettings(), + clientContext); + this.showDiscoveredRangeUtilizationCallable = + callableFactory.createUnaryCallable( + showDiscoveredRangeUtilizationTransportSettings, + settings.showDiscoveredRangeUtilizationSettings(), + clientContext); + this.findCustomRangeFreeIpRangesCallable = + callableFactory.createUnaryCallable( + findCustomRangeFreeIpRangesTransportSettings, + settings.findCustomRangeFreeIpRangesSettings(), + clientContext); + this.createCustomRangeCallable = + callableFactory.createUnaryCallable( + createCustomRangeTransportSettings, + settings.createCustomRangeSettings(), + clientContext); + this.createCustomRangeOperationCallable = + callableFactory.createOperationCallable( + createCustomRangeTransportSettings, + settings.createCustomRangeOperationSettings(), + clientContext, + operationsStub); + this.updateCustomRangeCallable = + callableFactory.createUnaryCallable( + updateCustomRangeTransportSettings, + settings.updateCustomRangeSettings(), + clientContext); + this.updateCustomRangeOperationCallable = + callableFactory.createOperationCallable( + updateCustomRangeTransportSettings, + settings.updateCustomRangeOperationSettings(), + clientContext, + operationsStub); + this.deleteCustomRangeCallable = + callableFactory.createUnaryCallable( + deleteCustomRangeTransportSettings, + settings.deleteCustomRangeSettings(), + clientContext); + this.deleteCustomRangeOperationCallable = + callableFactory.createOperationCallable( + deleteCustomRangeTransportSettings, + settings.deleteCustomRangeOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listIpamAdminScopesCallable() { + return listIpamAdminScopesCallable; + } + + @Override + public UnaryCallable + listIpamAdminScopesPagedCallable() { + return listIpamAdminScopesPagedCallable; + } + + @Override + public UnaryCallable getIpamAdminScopeCallable() { + return getIpamAdminScopeCallable; + } + + @Override + public UnaryCallable< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesCallable() { + return checkAvailabilityIpamAdminScopesCallable; + } + + @Override + public UnaryCallable createIpamAdminScopeCallable() { + return createIpamAdminScopeCallable; + } + + @Override + public OperationCallable + createIpamAdminScopeOperationCallable() { + return createIpamAdminScopeOperationCallable; + } + + @Override + public UnaryCallable updateIpamAdminScopeCallable() { + return updateIpamAdminScopeCallable; + } + + @Override + public OperationCallable + updateIpamAdminScopeOperationCallable() { + return updateIpamAdminScopeOperationCallable; + } + + @Override + public UnaryCallable deleteIpamAdminScopeCallable() { + return deleteIpamAdminScopeCallable; + } + + @Override + public OperationCallable + deleteIpamAdminScopeOperationCallable() { + return deleteIpamAdminScopeOperationCallable; + } + + @Override + public UnaryCallable disableIpamAdminScopeCallable() { + return disableIpamAdminScopeCallable; + } + + @Override + public OperationCallable + disableIpamAdminScopeOperationCallable() { + return disableIpamAdminScopeOperationCallable; + } + + @Override + public UnaryCallable cleanupIpamAdminScopeCallable() { + return cleanupIpamAdminScopeCallable; + } + + @Override + public OperationCallable + cleanupIpamAdminScopeOperationCallable() { + return cleanupIpamAdminScopeOperationCallable; + } + + @Override + public UnaryCallable + listRegistryBooksCallable() { + return listRegistryBooksCallable; + } + + @Override + public UnaryCallable + listRegistryBooksPagedCallable() { + return listRegistryBooksPagedCallable; + } + + @Override + public UnaryCallable getRegistryBookCallable() { + return getRegistryBookCallable; + } + + @Override + public UnaryCallable + searchIpResourcesCallable() { + return searchIpResourcesCallable; + } + + @Override + public UnaryCallable + searchIpResourcesPagedCallable() { + return searchIpResourcesPagedCallable; + } + + @Override + public UnaryCallable createRegistryBookCallable() { + return createRegistryBookCallable; + } + + @Override + public OperationCallable + createRegistryBookOperationCallable() { + return createRegistryBookOperationCallable; + } + + @Override + public UnaryCallable updateRegistryBookCallable() { + return updateRegistryBookCallable; + } + + @Override + public OperationCallable + updateRegistryBookOperationCallable() { + return updateRegistryBookOperationCallable; + } + + @Override + public UnaryCallable deleteRegistryBookCallable() { + return deleteRegistryBookCallable; + } + + @Override + public OperationCallable + deleteRegistryBookOperationCallable() { + return deleteRegistryBookOperationCallable; + } + + @Override + public UnaryCallable listRealmsCallable() { + return listRealmsCallable; + } + + @Override + public UnaryCallable listRealmsPagedCallable() { + return listRealmsPagedCallable; + } + + @Override + public UnaryCallable getRealmCallable() { + return getRealmCallable; + } + + @Override + public UnaryCallable createRealmCallable() { + return createRealmCallable; + } + + @Override + public OperationCallable + createRealmOperationCallable() { + return createRealmOperationCallable; + } + + @Override + public UnaryCallable updateRealmCallable() { + return updateRealmCallable; + } + + @Override + public OperationCallable + updateRealmOperationCallable() { + return updateRealmOperationCallable; + } + + @Override + public UnaryCallable deleteRealmCallable() { + return deleteRealmCallable; + } + + @Override + public OperationCallable + deleteRealmOperationCallable() { + return deleteRealmOperationCallable; + } + + @Override + public UnaryCallable + listDiscoveredRangesCallable() { + return listDiscoveredRangesCallable; + } + + @Override + public UnaryCallable + listDiscoveredRangesPagedCallable() { + return listDiscoveredRangesPagedCallable; + } + + @Override + public UnaryCallable getDiscoveredRangeCallable() { + return getDiscoveredRangeCallable; + } + + @Override + public UnaryCallable< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesCallable() { + return findDiscoveredRangeFreeIpRangesCallable; + } + + @Override + public UnaryCallable + listCustomRangesCallable() { + return listCustomRangesCallable; + } + + @Override + public UnaryCallable + listCustomRangesPagedCallable() { + return listCustomRangesPagedCallable; + } + + @Override + public UnaryCallable getCustomRangeCallable() { + return getCustomRangeCallable; + } + + @Override + public UnaryCallable + showCustomRangeUtilizationCallable() { + return showCustomRangeUtilizationCallable; + } + + @Override + public UnaryCallable< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationCallable() { + return showDiscoveredRangeUtilizationCallable; + } + + @Override + public UnaryCallable + findCustomRangeFreeIpRangesCallable() { + return findCustomRangeFreeIpRangesCallable; + } + + @Override + public UnaryCallable createCustomRangeCallable() { + return createCustomRangeCallable; + } + + @Override + public OperationCallable + createCustomRangeOperationCallable() { + return createCustomRangeOperationCallable; + } + + @Override + public UnaryCallable updateCustomRangeCallable() { + return updateCustomRangeCallable; + } + + @Override + public OperationCallable + updateCustomRangeOperationCallable() { + return updateCustomRangeOperationCallable; + } + + @Override + public UnaryCallable deleteCustomRangeCallable() { + return deleteCustomRangeCallable; + } + + @Override + public OperationCallable + deleteCustomRangeOperationCallable() { + return deleteCustomRangeOperationCallable; + } + + @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-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/HttpJsonCloudNumberRegistryCallableFactory.java b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/HttpJsonCloudNumberRegistryCallableFactory.java new file mode 100644 index 000000000000..377792b0affa --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/HttpJsonCloudNumberRegistryCallableFactory.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.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 CloudNumberRegistry service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonCloudNumberRegistryCallableFactory + 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); + } + + @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-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/HttpJsonCloudNumberRegistryStub.java b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/HttpJsonCloudNumberRegistryStub.java new file mode 100644 index 000000000000..53f548ccadf2 --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/HttpJsonCloudNumberRegistryStub.java @@ -0,0 +1,2485 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.stub; + +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListCustomRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListDiscoveredRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListIpamAdminScopesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRealmsPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRegistryBooksPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.SearchIpResourcesPagedResponse; + +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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest; +import com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse; +import com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.CreateRealmRequest; +import com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest; +import com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRange; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse; +import com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest; +import com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.GetRealmRequest; +import com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest; +import com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse; +import com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest; +import com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse; +import com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest; +import com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse; +import com.google.cloud.numberregistry.v1alpha.ListRealmsRequest; +import com.google.cloud.numberregistry.v1alpha.ListRealmsResponse; +import com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest; +import com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest; +import com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse; +import com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest; +import com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest; +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 CloudNumberRegistry service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonCloudNumberRegistryStub extends CloudNumberRegistryStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(Realm.getDescriptor()) + .add(RegistryBook.getDescriptor()) + .add(IpamAdminScope.getDescriptor()) + .add(CustomRange.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listIpamAdminScopesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ListIpamAdminScopes") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/ipamAdminScopes", + 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, "orderBy", request.getOrderBy()); + 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(ListIpamAdminScopesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIpamAdminScopeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/GetIpamAdminScope") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/ipamAdminScopes/*}", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(IpamAdminScope.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/CheckAvailabilityIpamAdminScopes") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/ipamAdminScopes:checkAvailability", + 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, "scopes", request.getScopesList()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + CheckAvailabilityIpamAdminScopesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createIpamAdminScopeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/CreateIpamAdminScope") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/ipamAdminScopes", + 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, "ipamAdminScopeId", request.getIpamAdminScopeId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("ipamAdminScope", request.getIpamAdminScope(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateIpamAdminScopeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateIpamAdminScopeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/UpdateIpamAdminScope") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{ipamAdminScope.name=projects/*/locations/*/ipamAdminScopes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "ipamAdminScope.name", + request.getIpamAdminScope().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("ipamAdminScope", request.getIpamAdminScope(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateIpamAdminScopeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteIpamAdminScopeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/DeleteIpamAdminScope") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/ipamAdminScopes/*}", + 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, "force", request.getForce()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteIpamAdminScopeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + disableIpamAdminScopeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/DisableIpamAdminScope") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/ipamAdminScopes/*}:disable", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DisableIpamAdminScopeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + cleanupIpamAdminScopeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/CleanupIpamAdminScope") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/ipamAdminScopes/*}:cleanup", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CleanupIpamAdminScopeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listRegistryBooksMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ListRegistryBooks") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/registryBooks", + 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, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListRegistryBooksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getRegistryBookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/GetRegistryBook") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/registryBooks/*}", + 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, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RegistryBook.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + searchIpResourcesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/SearchIpResources") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/registryBooks/*}:searchIpResources", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchIpResourcesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createRegistryBookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/CreateRegistryBook") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/registryBooks", + 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, "registryBookId", request.getRegistryBookId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("registryBook", request.getRegistryBook(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateRegistryBookRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateRegistryBookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/UpdateRegistryBook") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{registryBook.name=projects/*/locations/*/registryBooks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "registryBook.name", request.getRegistryBook().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("registryBook", request.getRegistryBook(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateRegistryBookRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteRegistryBookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/DeleteRegistryBook") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/registryBooks/*}", + 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, "force", request.getForce()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteRegistryBookRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listRealmsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ListRealms") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/realms", + 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, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListRealmsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getRealmMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.numberregistry.v1alpha.CloudNumberRegistry/GetRealm") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/realms/*}", + 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, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Realm.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createRealmMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/CreateRealm") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/realms", + 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, "realmId", request.getRealmId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("realm", request.getRealm(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateRealmRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateRealmMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/UpdateRealm") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{realm.name=projects/*/locations/*/realms/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "realm.name", request.getRealm().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("realm", request.getRealm(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateRealmRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteRealmMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/DeleteRealm") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/realms/*}", + 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, "force", request.getForce()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteRealmRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + ListDiscoveredRangesRequest, ListDiscoveredRangesResponse> + listDiscoveredRangesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ListDiscoveredRanges") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/discoveredRanges", + 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, "orderBy", request.getOrderBy()); + 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(ListDiscoveredRangesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDiscoveredRangeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/GetDiscoveredRange") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/discoveredRanges/*}", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DiscoveredRange.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/FindDiscoveredRangeFreeIpRanges") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/discoveredRanges/*}:findFreeIpRanges", + 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, "cidrPrefixLength", request.getCidrPrefixLength()); + serializer.putQueryParam(fields, "rangeCount", request.getRangeCount()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + FindDiscoveredRangeFreeIpRangesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listCustomRangesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ListCustomRanges") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/customRanges", + 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, "orderBy", request.getOrderBy()); + 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(ListCustomRangesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getCustomRangeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/GetCustomRange") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/customRanges/*}", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CustomRange.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ShowCustomRangeUtilizationRequest, ShowCustomRangeUtilizationResponse> + showCustomRangeUtilizationMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ShowCustomRangeUtilization") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/customRanges/*}:showUtilization", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ShowCustomRangeUtilizationResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/ShowDiscoveredRangeUtilization") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/discoveredRanges/*}:showUtilization", + 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, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + ShowDiscoveredRangeUtilizationResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + FindCustomRangeFreeIpRangesRequest, FindCustomRangeFreeIpRangesResponse> + findCustomRangeFreeIpRangesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/FindCustomRangeFreeIpRanges") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/customRanges/*}:findFreeIpRanges", + 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, "cidrPrefixLength", request.getCidrPrefixLength()); + serializer.putQueryParam(fields, "rangeCount", request.getRangeCount()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(FindCustomRangeFreeIpRangesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createCustomRangeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/CreateCustomRange") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/customRanges", + 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, "customRangeId", request.getCustomRangeId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("customRange", request.getCustomRange(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateCustomRangeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateCustomRangeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/UpdateCustomRange") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{customRange.name=projects/*/locations/*/customRanges/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "customRange.name", request.getCustomRange().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("customRange", request.getCustomRange(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateCustomRangeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteCustomRangeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry/DeleteCustomRange") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/customRanges/*}", + 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, "force", request.getForce()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteCustomRangeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable + listIpamAdminScopesCallable; + private final UnaryCallable + listIpamAdminScopesPagedCallable; + private final UnaryCallable getIpamAdminScopeCallable; + private final UnaryCallable< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesCallable; + private final UnaryCallable createIpamAdminScopeCallable; + private final OperationCallable + createIpamAdminScopeOperationCallable; + private final UnaryCallable updateIpamAdminScopeCallable; + private final OperationCallable + updateIpamAdminScopeOperationCallable; + private final UnaryCallable deleteIpamAdminScopeCallable; + private final OperationCallable + deleteIpamAdminScopeOperationCallable; + private final UnaryCallable + disableIpamAdminScopeCallable; + private final OperationCallable + disableIpamAdminScopeOperationCallable; + private final UnaryCallable + cleanupIpamAdminScopeCallable; + private final OperationCallable + cleanupIpamAdminScopeOperationCallable; + private final UnaryCallable + listRegistryBooksCallable; + private final UnaryCallable + listRegistryBooksPagedCallable; + private final UnaryCallable getRegistryBookCallable; + private final UnaryCallable + searchIpResourcesCallable; + private final UnaryCallable + searchIpResourcesPagedCallable; + private final UnaryCallable createRegistryBookCallable; + private final OperationCallable + createRegistryBookOperationCallable; + private final UnaryCallable updateRegistryBookCallable; + private final OperationCallable + updateRegistryBookOperationCallable; + private final UnaryCallable deleteRegistryBookCallable; + private final OperationCallable + deleteRegistryBookOperationCallable; + private final UnaryCallable listRealmsCallable; + private final UnaryCallable listRealmsPagedCallable; + private final UnaryCallable getRealmCallable; + private final UnaryCallable createRealmCallable; + private final OperationCallable + createRealmOperationCallable; + private final UnaryCallable updateRealmCallable; + private final OperationCallable + updateRealmOperationCallable; + private final UnaryCallable deleteRealmCallable; + private final OperationCallable + deleteRealmOperationCallable; + private final UnaryCallable + listDiscoveredRangesCallable; + private final UnaryCallable + listDiscoveredRangesPagedCallable; + private final UnaryCallable + getDiscoveredRangeCallable; + private final UnaryCallable< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesCallable; + private final UnaryCallable + listCustomRangesCallable; + private final UnaryCallable + listCustomRangesPagedCallable; + private final UnaryCallable getCustomRangeCallable; + private final UnaryCallable + showCustomRangeUtilizationCallable; + private final UnaryCallable< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationCallable; + private final UnaryCallable< + FindCustomRangeFreeIpRangesRequest, FindCustomRangeFreeIpRangesResponse> + findCustomRangeFreeIpRangesCallable; + private final UnaryCallable createCustomRangeCallable; + private final OperationCallable + createCustomRangeOperationCallable; + private final UnaryCallable updateCustomRangeCallable; + private final OperationCallable + updateCustomRangeOperationCallable; + private final UnaryCallable deleteCustomRangeCallable; + private final OperationCallable + deleteCustomRangeOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonCloudNumberRegistryStub create( + CloudNumberRegistryStubSettings settings) throws IOException { + return new HttpJsonCloudNumberRegistryStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonCloudNumberRegistryStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonCloudNumberRegistryStub( + CloudNumberRegistryStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonCloudNumberRegistryStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonCloudNumberRegistryStub( + CloudNumberRegistryStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonCloudNumberRegistryStub, 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 HttpJsonCloudNumberRegistryStub( + CloudNumberRegistryStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonCloudNumberRegistryCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonCloudNumberRegistryStub, 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 HttpJsonCloudNumberRegistryStub( + CloudNumberRegistryStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1alpha/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1alpha/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings + listIpamAdminScopesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listIpamAdminScopesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + getIpamAdminScopeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIpamAdminScopeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(checkAvailabilityIpamAdminScopesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + createIpamAdminScopeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createIpamAdminScopeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + updateIpamAdminScopeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateIpamAdminScopeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "ipam_admin_scope.name", + String.valueOf(request.getIpamAdminScope().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteIpamAdminScopeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteIpamAdminScopeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + disableIpamAdminScopeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(disableIpamAdminScopeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + cleanupIpamAdminScopeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(cleanupIpamAdminScopeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listRegistryBooksTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listRegistryBooksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getRegistryBookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getRegistryBookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + searchIpResourcesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchIpResourcesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings createRegistryBookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createRegistryBookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateRegistryBookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateRegistryBookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "registry_book.name", String.valueOf(request.getRegistryBook().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteRegistryBookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteRegistryBookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings listRealmsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listRealmsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getRealmTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getRealmMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings createRealmTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createRealmMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateRealmTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateRealmMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("realm.name", String.valueOf(request.getRealm().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteRealmTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteRealmMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listDiscoveredRangesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listDiscoveredRangesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + getDiscoveredRangeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDiscoveredRangeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(findDiscoveredRangeFreeIpRangesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listCustomRangesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listCustomRangesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getCustomRangeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getCustomRangeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + showCustomRangeUtilizationTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(showCustomRangeUtilizationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(showDiscoveredRangeUtilizationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + findCustomRangeFreeIpRangesTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(findCustomRangeFreeIpRangesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings createCustomRangeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createCustomRangeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateCustomRangeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateCustomRangeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "custom_range.name", String.valueOf(request.getCustomRange().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteCustomRangeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteCustomRangeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.listIpamAdminScopesCallable = + callableFactory.createUnaryCallable( + listIpamAdminScopesTransportSettings, + settings.listIpamAdminScopesSettings(), + clientContext); + this.listIpamAdminScopesPagedCallable = + callableFactory.createPagedCallable( + listIpamAdminScopesTransportSettings, + settings.listIpamAdminScopesSettings(), + clientContext); + this.getIpamAdminScopeCallable = + callableFactory.createUnaryCallable( + getIpamAdminScopeTransportSettings, + settings.getIpamAdminScopeSettings(), + clientContext); + this.checkAvailabilityIpamAdminScopesCallable = + callableFactory.createUnaryCallable( + checkAvailabilityIpamAdminScopesTransportSettings, + settings.checkAvailabilityIpamAdminScopesSettings(), + clientContext); + this.createIpamAdminScopeCallable = + callableFactory.createUnaryCallable( + createIpamAdminScopeTransportSettings, + settings.createIpamAdminScopeSettings(), + clientContext); + this.createIpamAdminScopeOperationCallable = + callableFactory.createOperationCallable( + createIpamAdminScopeTransportSettings, + settings.createIpamAdminScopeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateIpamAdminScopeCallable = + callableFactory.createUnaryCallable( + updateIpamAdminScopeTransportSettings, + settings.updateIpamAdminScopeSettings(), + clientContext); + this.updateIpamAdminScopeOperationCallable = + callableFactory.createOperationCallable( + updateIpamAdminScopeTransportSettings, + settings.updateIpamAdminScopeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteIpamAdminScopeCallable = + callableFactory.createUnaryCallable( + deleteIpamAdminScopeTransportSettings, + settings.deleteIpamAdminScopeSettings(), + clientContext); + this.deleteIpamAdminScopeOperationCallable = + callableFactory.createOperationCallable( + deleteIpamAdminScopeTransportSettings, + settings.deleteIpamAdminScopeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.disableIpamAdminScopeCallable = + callableFactory.createUnaryCallable( + disableIpamAdminScopeTransportSettings, + settings.disableIpamAdminScopeSettings(), + clientContext); + this.disableIpamAdminScopeOperationCallable = + callableFactory.createOperationCallable( + disableIpamAdminScopeTransportSettings, + settings.disableIpamAdminScopeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.cleanupIpamAdminScopeCallable = + callableFactory.createUnaryCallable( + cleanupIpamAdminScopeTransportSettings, + settings.cleanupIpamAdminScopeSettings(), + clientContext); + this.cleanupIpamAdminScopeOperationCallable = + callableFactory.createOperationCallable( + cleanupIpamAdminScopeTransportSettings, + settings.cleanupIpamAdminScopeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listRegistryBooksCallable = + callableFactory.createUnaryCallable( + listRegistryBooksTransportSettings, + settings.listRegistryBooksSettings(), + clientContext); + this.listRegistryBooksPagedCallable = + callableFactory.createPagedCallable( + listRegistryBooksTransportSettings, + settings.listRegistryBooksSettings(), + clientContext); + this.getRegistryBookCallable = + callableFactory.createUnaryCallable( + getRegistryBookTransportSettings, settings.getRegistryBookSettings(), clientContext); + this.searchIpResourcesCallable = + callableFactory.createUnaryCallable( + searchIpResourcesTransportSettings, + settings.searchIpResourcesSettings(), + clientContext); + this.searchIpResourcesPagedCallable = + callableFactory.createPagedCallable( + searchIpResourcesTransportSettings, + settings.searchIpResourcesSettings(), + clientContext); + this.createRegistryBookCallable = + callableFactory.createUnaryCallable( + createRegistryBookTransportSettings, + settings.createRegistryBookSettings(), + clientContext); + this.createRegistryBookOperationCallable = + callableFactory.createOperationCallable( + createRegistryBookTransportSettings, + settings.createRegistryBookOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateRegistryBookCallable = + callableFactory.createUnaryCallable( + updateRegistryBookTransportSettings, + settings.updateRegistryBookSettings(), + clientContext); + this.updateRegistryBookOperationCallable = + callableFactory.createOperationCallable( + updateRegistryBookTransportSettings, + settings.updateRegistryBookOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteRegistryBookCallable = + callableFactory.createUnaryCallable( + deleteRegistryBookTransportSettings, + settings.deleteRegistryBookSettings(), + clientContext); + this.deleteRegistryBookOperationCallable = + callableFactory.createOperationCallable( + deleteRegistryBookTransportSettings, + settings.deleteRegistryBookOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listRealmsCallable = + callableFactory.createUnaryCallable( + listRealmsTransportSettings, settings.listRealmsSettings(), clientContext); + this.listRealmsPagedCallable = + callableFactory.createPagedCallable( + listRealmsTransportSettings, settings.listRealmsSettings(), clientContext); + this.getRealmCallable = + callableFactory.createUnaryCallable( + getRealmTransportSettings, settings.getRealmSettings(), clientContext); + this.createRealmCallable = + callableFactory.createUnaryCallable( + createRealmTransportSettings, settings.createRealmSettings(), clientContext); + this.createRealmOperationCallable = + callableFactory.createOperationCallable( + createRealmTransportSettings, + settings.createRealmOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateRealmCallable = + callableFactory.createUnaryCallable( + updateRealmTransportSettings, settings.updateRealmSettings(), clientContext); + this.updateRealmOperationCallable = + callableFactory.createOperationCallable( + updateRealmTransportSettings, + settings.updateRealmOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteRealmCallable = + callableFactory.createUnaryCallable( + deleteRealmTransportSettings, settings.deleteRealmSettings(), clientContext); + this.deleteRealmOperationCallable = + callableFactory.createOperationCallable( + deleteRealmTransportSettings, + settings.deleteRealmOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listDiscoveredRangesCallable = + callableFactory.createUnaryCallable( + listDiscoveredRangesTransportSettings, + settings.listDiscoveredRangesSettings(), + clientContext); + this.listDiscoveredRangesPagedCallable = + callableFactory.createPagedCallable( + listDiscoveredRangesTransportSettings, + settings.listDiscoveredRangesSettings(), + clientContext); + this.getDiscoveredRangeCallable = + callableFactory.createUnaryCallable( + getDiscoveredRangeTransportSettings, + settings.getDiscoveredRangeSettings(), + clientContext); + this.findDiscoveredRangeFreeIpRangesCallable = + callableFactory.createUnaryCallable( + findDiscoveredRangeFreeIpRangesTransportSettings, + settings.findDiscoveredRangeFreeIpRangesSettings(), + clientContext); + this.listCustomRangesCallable = + callableFactory.createUnaryCallable( + listCustomRangesTransportSettings, settings.listCustomRangesSettings(), clientContext); + this.listCustomRangesPagedCallable = + callableFactory.createPagedCallable( + listCustomRangesTransportSettings, settings.listCustomRangesSettings(), clientContext); + this.getCustomRangeCallable = + callableFactory.createUnaryCallable( + getCustomRangeTransportSettings, settings.getCustomRangeSettings(), clientContext); + this.showCustomRangeUtilizationCallable = + callableFactory.createUnaryCallable( + showCustomRangeUtilizationTransportSettings, + settings.showCustomRangeUtilizationSettings(), + clientContext); + this.showDiscoveredRangeUtilizationCallable = + callableFactory.createUnaryCallable( + showDiscoveredRangeUtilizationTransportSettings, + settings.showDiscoveredRangeUtilizationSettings(), + clientContext); + this.findCustomRangeFreeIpRangesCallable = + callableFactory.createUnaryCallable( + findCustomRangeFreeIpRangesTransportSettings, + settings.findCustomRangeFreeIpRangesSettings(), + clientContext); + this.createCustomRangeCallable = + callableFactory.createUnaryCallable( + createCustomRangeTransportSettings, + settings.createCustomRangeSettings(), + clientContext); + this.createCustomRangeOperationCallable = + callableFactory.createOperationCallable( + createCustomRangeTransportSettings, + settings.createCustomRangeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateCustomRangeCallable = + callableFactory.createUnaryCallable( + updateCustomRangeTransportSettings, + settings.updateCustomRangeSettings(), + clientContext); + this.updateCustomRangeOperationCallable = + callableFactory.createOperationCallable( + updateCustomRangeTransportSettings, + settings.updateCustomRangeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteCustomRangeCallable = + callableFactory.createUnaryCallable( + deleteCustomRangeTransportSettings, + settings.deleteCustomRangeSettings(), + clientContext); + this.deleteCustomRangeOperationCallable = + callableFactory.createOperationCallable( + deleteCustomRangeTransportSettings, + settings.deleteCustomRangeOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listIpamAdminScopesMethodDescriptor); + methodDescriptors.add(getIpamAdminScopeMethodDescriptor); + methodDescriptors.add(checkAvailabilityIpamAdminScopesMethodDescriptor); + methodDescriptors.add(createIpamAdminScopeMethodDescriptor); + methodDescriptors.add(updateIpamAdminScopeMethodDescriptor); + methodDescriptors.add(deleteIpamAdminScopeMethodDescriptor); + methodDescriptors.add(disableIpamAdminScopeMethodDescriptor); + methodDescriptors.add(cleanupIpamAdminScopeMethodDescriptor); + methodDescriptors.add(listRegistryBooksMethodDescriptor); + methodDescriptors.add(getRegistryBookMethodDescriptor); + methodDescriptors.add(searchIpResourcesMethodDescriptor); + methodDescriptors.add(createRegistryBookMethodDescriptor); + methodDescriptors.add(updateRegistryBookMethodDescriptor); + methodDescriptors.add(deleteRegistryBookMethodDescriptor); + methodDescriptors.add(listRealmsMethodDescriptor); + methodDescriptors.add(getRealmMethodDescriptor); + methodDescriptors.add(createRealmMethodDescriptor); + methodDescriptors.add(updateRealmMethodDescriptor); + methodDescriptors.add(deleteRealmMethodDescriptor); + methodDescriptors.add(listDiscoveredRangesMethodDescriptor); + methodDescriptors.add(getDiscoveredRangeMethodDescriptor); + methodDescriptors.add(findDiscoveredRangeFreeIpRangesMethodDescriptor); + methodDescriptors.add(listCustomRangesMethodDescriptor); + methodDescriptors.add(getCustomRangeMethodDescriptor); + methodDescriptors.add(showCustomRangeUtilizationMethodDescriptor); + methodDescriptors.add(showDiscoveredRangeUtilizationMethodDescriptor); + methodDescriptors.add(findCustomRangeFreeIpRangesMethodDescriptor); + methodDescriptors.add(createCustomRangeMethodDescriptor); + methodDescriptors.add(updateCustomRangeMethodDescriptor); + methodDescriptors.add(deleteCustomRangeMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + listIpamAdminScopesCallable() { + return listIpamAdminScopesCallable; + } + + @Override + public UnaryCallable + listIpamAdminScopesPagedCallable() { + return listIpamAdminScopesPagedCallable; + } + + @Override + public UnaryCallable getIpamAdminScopeCallable() { + return getIpamAdminScopeCallable; + } + + @Override + public UnaryCallable< + CheckAvailabilityIpamAdminScopesRequest, CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopesCallable() { + return checkAvailabilityIpamAdminScopesCallable; + } + + @Override + public UnaryCallable createIpamAdminScopeCallable() { + return createIpamAdminScopeCallable; + } + + @Override + public OperationCallable + createIpamAdminScopeOperationCallable() { + return createIpamAdminScopeOperationCallable; + } + + @Override + public UnaryCallable updateIpamAdminScopeCallable() { + return updateIpamAdminScopeCallable; + } + + @Override + public OperationCallable + updateIpamAdminScopeOperationCallable() { + return updateIpamAdminScopeOperationCallable; + } + + @Override + public UnaryCallable deleteIpamAdminScopeCallable() { + return deleteIpamAdminScopeCallable; + } + + @Override + public OperationCallable + deleteIpamAdminScopeOperationCallable() { + return deleteIpamAdminScopeOperationCallable; + } + + @Override + public UnaryCallable disableIpamAdminScopeCallable() { + return disableIpamAdminScopeCallable; + } + + @Override + public OperationCallable + disableIpamAdminScopeOperationCallable() { + return disableIpamAdminScopeOperationCallable; + } + + @Override + public UnaryCallable cleanupIpamAdminScopeCallable() { + return cleanupIpamAdminScopeCallable; + } + + @Override + public OperationCallable + cleanupIpamAdminScopeOperationCallable() { + return cleanupIpamAdminScopeOperationCallable; + } + + @Override + public UnaryCallable + listRegistryBooksCallable() { + return listRegistryBooksCallable; + } + + @Override + public UnaryCallable + listRegistryBooksPagedCallable() { + return listRegistryBooksPagedCallable; + } + + @Override + public UnaryCallable getRegistryBookCallable() { + return getRegistryBookCallable; + } + + @Override + public UnaryCallable + searchIpResourcesCallable() { + return searchIpResourcesCallable; + } + + @Override + public UnaryCallable + searchIpResourcesPagedCallable() { + return searchIpResourcesPagedCallable; + } + + @Override + public UnaryCallable createRegistryBookCallable() { + return createRegistryBookCallable; + } + + @Override + public OperationCallable + createRegistryBookOperationCallable() { + return createRegistryBookOperationCallable; + } + + @Override + public UnaryCallable updateRegistryBookCallable() { + return updateRegistryBookCallable; + } + + @Override + public OperationCallable + updateRegistryBookOperationCallable() { + return updateRegistryBookOperationCallable; + } + + @Override + public UnaryCallable deleteRegistryBookCallable() { + return deleteRegistryBookCallable; + } + + @Override + public OperationCallable + deleteRegistryBookOperationCallable() { + return deleteRegistryBookOperationCallable; + } + + @Override + public UnaryCallable listRealmsCallable() { + return listRealmsCallable; + } + + @Override + public UnaryCallable listRealmsPagedCallable() { + return listRealmsPagedCallable; + } + + @Override + public UnaryCallable getRealmCallable() { + return getRealmCallable; + } + + @Override + public UnaryCallable createRealmCallable() { + return createRealmCallable; + } + + @Override + public OperationCallable + createRealmOperationCallable() { + return createRealmOperationCallable; + } + + @Override + public UnaryCallable updateRealmCallable() { + return updateRealmCallable; + } + + @Override + public OperationCallable + updateRealmOperationCallable() { + return updateRealmOperationCallable; + } + + @Override + public UnaryCallable deleteRealmCallable() { + return deleteRealmCallable; + } + + @Override + public OperationCallable + deleteRealmOperationCallable() { + return deleteRealmOperationCallable; + } + + @Override + public UnaryCallable + listDiscoveredRangesCallable() { + return listDiscoveredRangesCallable; + } + + @Override + public UnaryCallable + listDiscoveredRangesPagedCallable() { + return listDiscoveredRangesPagedCallable; + } + + @Override + public UnaryCallable getDiscoveredRangeCallable() { + return getDiscoveredRangeCallable; + } + + @Override + public UnaryCallable< + FindDiscoveredRangeFreeIpRangesRequest, FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRangesCallable() { + return findDiscoveredRangeFreeIpRangesCallable; + } + + @Override + public UnaryCallable + listCustomRangesCallable() { + return listCustomRangesCallable; + } + + @Override + public UnaryCallable + listCustomRangesPagedCallable() { + return listCustomRangesPagedCallable; + } + + @Override + public UnaryCallable getCustomRangeCallable() { + return getCustomRangeCallable; + } + + @Override + public UnaryCallable + showCustomRangeUtilizationCallable() { + return showCustomRangeUtilizationCallable; + } + + @Override + public UnaryCallable< + ShowDiscoveredRangeUtilizationRequest, ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilizationCallable() { + return showDiscoveredRangeUtilizationCallable; + } + + @Override + public UnaryCallable + findCustomRangeFreeIpRangesCallable() { + return findCustomRangeFreeIpRangesCallable; + } + + @Override + public UnaryCallable createCustomRangeCallable() { + return createCustomRangeCallable; + } + + @Override + public OperationCallable + createCustomRangeOperationCallable() { + return createCustomRangeOperationCallable; + } + + @Override + public UnaryCallable updateCustomRangeCallable() { + return updateCustomRangeCallable; + } + + @Override + public OperationCallable + updateCustomRangeOperationCallable() { + return updateCustomRangeOperationCallable; + } + + @Override + public UnaryCallable deleteCustomRangeCallable() { + return deleteCustomRangeCallable; + } + + @Override + public OperationCallable + deleteCustomRangeOperationCallable() { + return deleteCustomRangeOperationCallable; + } + + @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-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/Version.java b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/Version.java new file mode 100644 index 000000000000..d8584ce8b8be --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/main/java/com/google/cloud/numberregistry/v1alpha/stub/Version.java @@ -0,0 +1,27 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.stub; + +import com.google.api.core.InternalApi; + +@InternalApi("For internal use only") +final class Version { + // {x-version-update-start:google-cloud-numberregistry:current} + static final String VERSION = "0.0.0-SNAPSHOT"; + // {x-version-update-end} + +} diff --git a/java-numberregistry/google-cloud-numberregistry/src/main/resources/META-INF/native-image/com.google.cloud.numberregistry.v1alpha/reflect-config.json b/java-numberregistry/google-cloud-numberregistry/src/main/resources/META-INF/native-image/com.google.cloud.numberregistry.v1alpha/reflect-config.json new file mode 100644 index 000000000000..3e701a45c492 --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/main/resources/META-INF/native-image/com.google.cloud.numberregistry.v1alpha/reflect-config.json @@ -0,0 +1,2648 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Format", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.Attribute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.Attribute$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CreateRealmRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CreateRealmRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CustomRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.CustomRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DiscoveredRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DiscoveredRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata$ResourceState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.GetRealmRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.GetRealmRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.IpVersion", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.IpamAdminScope", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.IpamAdminScope$AddOnPlatform", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.IpamAdminScope$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.IpamAdminScope$DiscoveryPipelineState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability$Availability", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListRealmsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListRealmsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListRealmsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListRealmsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.Range", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.Range$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.RangeUtilization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.RangeUtilization$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.Realm", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.Realm$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.Realm$ManagementType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.Realm$RealmAggregatedData", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.Realm$RealmAggregatedData$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.Realm$RealmView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.Realm$TrafficType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.RegistryBook", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.RegistryBook$AggregatedData", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.RegistryBook$AggregatedData$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.RegistryBook$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.RegistryBookView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest$SearchResourceType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse$SearchIpResourcesResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse$SearchIpResourcesResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryClientHttpJsonTest.java b/java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryClientHttpJsonTest.java new file mode 100644 index 000000000000..a4c4c95d800d --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryClientHttpJsonTest.java @@ -0,0 +1,3074 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha; + +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListCustomRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListDiscoveredRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListIpamAdminScopesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRealmsPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRegistryBooksPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.SearchIpResourcesPagedResponse; + +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.numberregistry.v1alpha.stub.HttpJsonCloudNumberRegistryStub; +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.FieldMask; +import com.google.protobuf.Timestamp; +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; +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 CloudNumberRegistryClientHttpJsonTest { + private static MockHttpService mockService; + private static CloudNumberRegistryClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonCloudNumberRegistryStub.getMethodDescriptors(), + CloudNumberRegistrySettings.getDefaultEndpoint()); + CloudNumberRegistrySettings settings = + CloudNumberRegistrySettings.newHttpJsonBuilder() + .setTransportChannelProvider( + CloudNumberRegistrySettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CloudNumberRegistryClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listIpamAdminScopesTest() throws Exception { + IpamAdminScope responsesElement = IpamAdminScope.newBuilder().build(); + ListIpamAdminScopesResponse expectedResponse = + ListIpamAdminScopesResponse.newBuilder() + .setNextPageToken("") + .addAllIpamAdminScopes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListIpamAdminScopesPagedResponse pagedListResponse = client.listIpamAdminScopes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIpamAdminScopesList().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 listIpamAdminScopesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listIpamAdminScopes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIpamAdminScopesTest2() throws Exception { + IpamAdminScope responsesElement = IpamAdminScope.newBuilder().build(); + ListIpamAdminScopesResponse expectedResponse = + ListIpamAdminScopesResponse.newBuilder() + .setNextPageToken("") + .addAllIpamAdminScopes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListIpamAdminScopesPagedResponse pagedListResponse = client.listIpamAdminScopes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIpamAdminScopesList().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 listIpamAdminScopesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listIpamAdminScopes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIpamAdminScopeTest() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + + IpamAdminScope actualResponse = client.getIpamAdminScope(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 getIpamAdminScopeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + client.getIpamAdminScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIpamAdminScopeTest2() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8033/locations/location-8033/ipamAdminScopes/ipamAdminScope-8033"; + + IpamAdminScope actualResponse = client.getIpamAdminScope(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 getIpamAdminScopeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8033/locations/location-8033/ipamAdminScopes/ipamAdminScope-8033"; + client.getIpamAdminScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void checkAvailabilityIpamAdminScopesTest() throws Exception { + CheckAvailabilityIpamAdminScopesResponse expectedResponse = + CheckAvailabilityIpamAdminScopesResponse.newBuilder() + .addAllScopeAvailabilities(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List scopes = new ArrayList<>(); + + CheckAvailabilityIpamAdminScopesResponse actualResponse = + client.checkAvailabilityIpamAdminScopes(parent, scopes); + 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 checkAvailabilityIpamAdminScopesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List scopes = new ArrayList<>(); + client.checkAvailabilityIpamAdminScopes(parent, scopes); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void checkAvailabilityIpamAdminScopesTest2() throws Exception { + CheckAvailabilityIpamAdminScopesResponse expectedResponse = + CheckAvailabilityIpamAdminScopesResponse.newBuilder() + .addAllScopeAvailabilities(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + List scopes = new ArrayList<>(); + + CheckAvailabilityIpamAdminScopesResponse actualResponse = + client.checkAvailabilityIpamAdminScopes(parent, scopes); + 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 checkAvailabilityIpamAdminScopesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + List scopes = new ArrayList<>(); + client.checkAvailabilityIpamAdminScopes(parent, scopes); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createIpamAdminScopeTest() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build(); + String ipamAdminScopeId = "ipamAdminScopeId1628703603"; + + IpamAdminScope actualResponse = + client.createIpamAdminScopeAsync(parent, ipamAdminScope, ipamAdminScopeId).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 createIpamAdminScopeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build(); + String ipamAdminScopeId = "ipamAdminScopeId1628703603"; + client.createIpamAdminScopeAsync(parent, ipamAdminScope, ipamAdminScopeId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createIpamAdminScopeTest2() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build(); + String ipamAdminScopeId = "ipamAdminScopeId1628703603"; + + IpamAdminScope actualResponse = + client.createIpamAdminScopeAsync(parent, ipamAdminScope, ipamAdminScopeId).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 createIpamAdminScopeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build(); + String ipamAdminScopeId = "ipamAdminScopeId1628703603"; + client.createIpamAdminScopeAsync(parent, ipamAdminScope, ipamAdminScopeId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateIpamAdminScopeTest() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + IpamAdminScope ipamAdminScope = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + IpamAdminScope actualResponse = + client.updateIpamAdminScopeAsync(ipamAdminScope, updateMask).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 updateIpamAdminScopeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IpamAdminScope ipamAdminScope = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateIpamAdminScopeAsync(ipamAdminScope, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteIpamAdminScopeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + + client.deleteIpamAdminScopeAsync(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 deleteIpamAdminScopeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + client.deleteIpamAdminScopeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteIpamAdminScopeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-8033/locations/location-8033/ipamAdminScopes/ipamAdminScope-8033"; + + client.deleteIpamAdminScopeAsync(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 deleteIpamAdminScopeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8033/locations/location-8033/ipamAdminScopes/ipamAdminScope-8033"; + client.deleteIpamAdminScopeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void disableIpamAdminScopeTest() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("disableIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + + IpamAdminScope actualResponse = client.disableIpamAdminScopeAsync(name).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 disableIpamAdminScopeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + client.disableIpamAdminScopeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void disableIpamAdminScopeTest2() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("disableIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-8033/locations/location-8033/ipamAdminScopes/ipamAdminScope-8033"; + + IpamAdminScope actualResponse = client.disableIpamAdminScopeAsync(name).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 disableIpamAdminScopeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8033/locations/location-8033/ipamAdminScopes/ipamAdminScope-8033"; + client.disableIpamAdminScopeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void cleanupIpamAdminScopeTest() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("cleanupIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + + IpamAdminScope actualResponse = client.cleanupIpamAdminScopeAsync(name).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 cleanupIpamAdminScopeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + client.cleanupIpamAdminScopeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void cleanupIpamAdminScopeTest2() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("cleanupIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-8033/locations/location-8033/ipamAdminScopes/ipamAdminScope-8033"; + + IpamAdminScope actualResponse = client.cleanupIpamAdminScopeAsync(name).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 cleanupIpamAdminScopeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8033/locations/location-8033/ipamAdminScopes/ipamAdminScope-8033"; + client.cleanupIpamAdminScopeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listRegistryBooksTest() throws Exception { + RegistryBook responsesElement = RegistryBook.newBuilder().build(); + ListRegistryBooksResponse expectedResponse = + ListRegistryBooksResponse.newBuilder() + .setNextPageToken("") + .addAllRegistryBooks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListRegistryBooksPagedResponse pagedListResponse = client.listRegistryBooks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRegistryBooksList().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 listRegistryBooksExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listRegistryBooks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRegistryBooksTest2() throws Exception { + RegistryBook responsesElement = RegistryBook.newBuilder().build(); + ListRegistryBooksResponse expectedResponse = + ListRegistryBooksResponse.newBuilder() + .setNextPageToken("") + .addAllRegistryBooks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListRegistryBooksPagedResponse pagedListResponse = client.listRegistryBooks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRegistryBooksList().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 listRegistryBooksExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listRegistryBooks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRegistryBookTest() throws Exception { + RegistryBook expectedResponse = + RegistryBook.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllClaimedScopes(new ArrayList()) + .setIsDefault(true) + .setAggregatedData(RegistryBook.AggregatedData.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + + RegistryBook actualResponse = client.getRegistryBook(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 getRegistryBookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + client.getRegistryBook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRegistryBookTest2() throws Exception { + RegistryBook expectedResponse = + RegistryBook.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllClaimedScopes(new ArrayList()) + .setIsDefault(true) + .setAggregatedData(RegistryBook.AggregatedData.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3699/locations/location-3699/registryBooks/registryBook-3699"; + + RegistryBook actualResponse = client.getRegistryBook(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 getRegistryBookExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3699/locations/location-3699/registryBooks/registryBook-3699"; + client.getRegistryBook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchIpResourcesTest() throws Exception { + Range responsesElement = Range.newBuilder().build(); + SearchIpResourcesResponse expectedResponse = + SearchIpResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllRanges(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + + SearchIpResourcesPagedResponse pagedListResponse = client.searchIpResources(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRangesList().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 searchIpResourcesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + client.searchIpResources(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchIpResourcesTest2() throws Exception { + Range responsesElement = Range.newBuilder().build(); + SearchIpResourcesResponse expectedResponse = + SearchIpResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllRanges(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3699/locations/location-3699/registryBooks/registryBook-3699"; + + SearchIpResourcesPagedResponse pagedListResponse = client.searchIpResources(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRangesList().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 searchIpResourcesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3699/locations/location-3699/registryBooks/registryBook-3699"; + client.searchIpResources(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createRegistryBookTest() throws Exception { + RegistryBook expectedResponse = + RegistryBook.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllClaimedScopes(new ArrayList()) + .setIsDefault(true) + .setAggregatedData(RegistryBook.AggregatedData.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRegistryBookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RegistryBook registryBook = RegistryBook.newBuilder().build(); + String registryBookId = "registryBookId2126801025"; + + RegistryBook actualResponse = + client.createRegistryBookAsync(parent, registryBook, registryBookId).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 createRegistryBookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RegistryBook registryBook = RegistryBook.newBuilder().build(); + String registryBookId = "registryBookId2126801025"; + client.createRegistryBookAsync(parent, registryBook, registryBookId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createRegistryBookTest2() throws Exception { + RegistryBook expectedResponse = + RegistryBook.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllClaimedScopes(new ArrayList()) + .setIsDefault(true) + .setAggregatedData(RegistryBook.AggregatedData.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRegistryBookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + RegistryBook registryBook = RegistryBook.newBuilder().build(); + String registryBookId = "registryBookId2126801025"; + + RegistryBook actualResponse = + client.createRegistryBookAsync(parent, registryBook, registryBookId).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 createRegistryBookExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + RegistryBook registryBook = RegistryBook.newBuilder().build(); + String registryBookId = "registryBookId2126801025"; + client.createRegistryBookAsync(parent, registryBook, registryBookId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateRegistryBookTest() throws Exception { + RegistryBook expectedResponse = + RegistryBook.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllClaimedScopes(new ArrayList()) + .setIsDefault(true) + .setAggregatedData(RegistryBook.AggregatedData.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateRegistryBookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + RegistryBook registryBook = + RegistryBook.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllClaimedScopes(new ArrayList()) + .setIsDefault(true) + .setAggregatedData(RegistryBook.AggregatedData.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + RegistryBook actualResponse = client.updateRegistryBookAsync(registryBook, updateMask).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 updateRegistryBookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RegistryBook registryBook = + RegistryBook.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllClaimedScopes(new ArrayList()) + .setIsDefault(true) + .setAggregatedData(RegistryBook.AggregatedData.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateRegistryBookAsync(registryBook, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteRegistryBookTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRegistryBookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + + client.deleteRegistryBookAsync(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 deleteRegistryBookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + client.deleteRegistryBookAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteRegistryBookTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRegistryBookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-3699/locations/location-3699/registryBooks/registryBook-3699"; + + client.deleteRegistryBookAsync(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 deleteRegistryBookExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3699/locations/location-3699/registryBooks/registryBook-3699"; + client.deleteRegistryBookAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listRealmsTest() throws Exception { + Realm responsesElement = Realm.newBuilder().build(); + ListRealmsResponse expectedResponse = + ListRealmsResponse.newBuilder() + .setNextPageToken("") + .addAllRealms(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListRealmsPagedResponse pagedListResponse = client.listRealms(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRealmsList().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 listRealmsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listRealms(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRealmsTest2() throws Exception { + Realm responsesElement = Realm.newBuilder().build(); + ListRealmsResponse expectedResponse = + ListRealmsResponse.newBuilder() + .setNextPageToken("") + .addAllRealms(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListRealmsPagedResponse pagedListResponse = client.listRealms(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRealmsList().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 listRealmsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listRealms(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRealmTest() throws Exception { + Realm expectedResponse = + Realm.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRegistryBook( + RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setIpVersion(IpVersion.forNumber(0)) + .setAggregatedData(Realm.RealmAggregatedData.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]"); + + Realm actualResponse = client.getRealm(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 getRealmExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]"); + client.getRealm(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRealmTest2() throws Exception { + Realm expectedResponse = + Realm.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRegistryBook( + RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setIpVersion(IpVersion.forNumber(0)) + .setAggregatedData(Realm.RealmAggregatedData.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-9444/locations/location-9444/realms/realm-9444"; + + Realm actualResponse = client.getRealm(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 getRealmExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9444/locations/location-9444/realms/realm-9444"; + client.getRealm(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createRealmTest() throws Exception { + Realm expectedResponse = + Realm.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRegistryBook( + RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setIpVersion(IpVersion.forNumber(0)) + .setAggregatedData(Realm.RealmAggregatedData.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRealmTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Realm realm = Realm.newBuilder().build(); + String realmId = "realmId1080654858"; + + Realm actualResponse = client.createRealmAsync(parent, realm, realmId).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 createRealmExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Realm realm = Realm.newBuilder().build(); + String realmId = "realmId1080654858"; + client.createRealmAsync(parent, realm, realmId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createRealmTest2() throws Exception { + Realm expectedResponse = + Realm.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRegistryBook( + RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setIpVersion(IpVersion.forNumber(0)) + .setAggregatedData(Realm.RealmAggregatedData.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRealmTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Realm realm = Realm.newBuilder().build(); + String realmId = "realmId1080654858"; + + Realm actualResponse = client.createRealmAsync(parent, realm, realmId).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 createRealmExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Realm realm = Realm.newBuilder().build(); + String realmId = "realmId1080654858"; + client.createRealmAsync(parent, realm, realmId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateRealmTest() throws Exception { + Realm expectedResponse = + Realm.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRegistryBook( + RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setIpVersion(IpVersion.forNumber(0)) + .setAggregatedData(Realm.RealmAggregatedData.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateRealmTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Realm realm = + Realm.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRegistryBook( + RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setIpVersion(IpVersion.forNumber(0)) + .setAggregatedData(Realm.RealmAggregatedData.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Realm actualResponse = client.updateRealmAsync(realm, updateMask).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 updateRealmExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Realm realm = + Realm.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRegistryBook( + RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setIpVersion(IpVersion.forNumber(0)) + .setAggregatedData(Realm.RealmAggregatedData.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateRealmAsync(realm, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteRealmTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRealmTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]"); + + client.deleteRealmAsync(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 deleteRealmExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]"); + client.deleteRealmAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteRealmTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRealmTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-9444/locations/location-9444/realms/realm-9444"; + + client.deleteRealmAsync(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 deleteRealmExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9444/locations/location-9444/realms/realm-9444"; + client.deleteRealmAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listDiscoveredRangesTest() throws Exception { + DiscoveredRange responsesElement = DiscoveredRange.newBuilder().build(); + ListDiscoveredRangesResponse expectedResponse = + ListDiscoveredRangesResponse.newBuilder() + .setNextPageToken("") + .addAllDiscoveredRanges(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDiscoveredRangesPagedResponse pagedListResponse = client.listDiscoveredRanges(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDiscoveredRangesList().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 listDiscoveredRangesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDiscoveredRanges(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDiscoveredRangesTest2() throws Exception { + DiscoveredRange responsesElement = DiscoveredRange.newBuilder().build(); + ListDiscoveredRangesResponse expectedResponse = + ListDiscoveredRangesResponse.newBuilder() + .setNextPageToken("") + .addAllDiscoveredRanges(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListDiscoveredRangesPagedResponse pagedListResponse = client.listDiscoveredRanges(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDiscoveredRangesList().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 listDiscoveredRangesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listDiscoveredRanges(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDiscoveredRangeTest() throws Exception { + DiscoveredRange expectedResponse = + DiscoveredRange.newBuilder() + .setName( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .setDescription("description-1724546052") + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChildCidrOverlapAllowed(true) + .build(); + mockService.addResponse(expectedResponse); + + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + + DiscoveredRange actualResponse = client.getDiscoveredRange(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 getDiscoveredRangeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + client.getDiscoveredRange(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDiscoveredRangeTest2() throws Exception { + DiscoveredRange expectedResponse = + DiscoveredRange.newBuilder() + .setName( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .setDescription("description-1724546052") + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChildCidrOverlapAllowed(true) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1762/locations/location-1762/discoveredRanges/discoveredRange-1762"; + + DiscoveredRange actualResponse = client.getDiscoveredRange(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 getDiscoveredRangeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1762/locations/location-1762/discoveredRanges/discoveredRange-1762"; + client.getDiscoveredRange(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void findDiscoveredRangeFreeIpRangesTest() throws Exception { + FindDiscoveredRangeFreeIpRangesResponse expectedResponse = + FindDiscoveredRangeFreeIpRangesResponse.newBuilder() + .addAllFreeIpCidrRanges(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + int cidrPrefixLength = -954389592; + + FindDiscoveredRangeFreeIpRangesResponse actualResponse = + client.findDiscoveredRangeFreeIpRanges(name, cidrPrefixLength); + 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 findDiscoveredRangeFreeIpRangesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + int cidrPrefixLength = -954389592; + client.findDiscoveredRangeFreeIpRanges(name, cidrPrefixLength); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void findDiscoveredRangeFreeIpRangesTest2() throws Exception { + FindDiscoveredRangeFreeIpRangesResponse expectedResponse = + FindDiscoveredRangeFreeIpRangesResponse.newBuilder() + .addAllFreeIpCidrRanges(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1762/locations/location-1762/discoveredRanges/discoveredRange-1762"; + int cidrPrefixLength = -954389592; + + FindDiscoveredRangeFreeIpRangesResponse actualResponse = + client.findDiscoveredRangeFreeIpRanges(name, cidrPrefixLength); + 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 findDiscoveredRangeFreeIpRangesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1762/locations/location-1762/discoveredRanges/discoveredRange-1762"; + int cidrPrefixLength = -954389592; + client.findDiscoveredRangeFreeIpRanges(name, cidrPrefixLength); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCustomRangesTest() throws Exception { + CustomRange responsesElement = CustomRange.newBuilder().build(); + ListCustomRangesResponse expectedResponse = + ListCustomRangesResponse.newBuilder() + .setNextPageToken("") + .addAllCustomRanges(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListCustomRangesPagedResponse pagedListResponse = client.listCustomRanges(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomRangesList().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 listCustomRangesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listCustomRanges(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCustomRangesTest2() throws Exception { + CustomRange responsesElement = CustomRange.newBuilder().build(); + ListCustomRangesResponse expectedResponse = + ListCustomRangesResponse.newBuilder() + .setNextPageToken("") + .addAllCustomRanges(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListCustomRangesPagedResponse pagedListResponse = client.listCustomRanges(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomRangesList().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 listCustomRangesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listCustomRanges(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomRangeTest() throws Exception { + CustomRange expectedResponse = + CustomRange.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .addAllAttributes(new ArrayList()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + + CustomRange actualResponse = client.getCustomRange(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 getCustomRangeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + client.getCustomRange(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomRangeTest2() throws Exception { + CustomRange expectedResponse = + CustomRange.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .addAllAttributes(new ArrayList()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3303/locations/location-3303/customRanges/customRange-3303"; + + CustomRange actualResponse = client.getCustomRange(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 getCustomRangeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3303/locations/location-3303/customRanges/customRange-3303"; + client.getCustomRange(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void showCustomRangeUtilizationTest() throws Exception { + ShowCustomRangeUtilizationResponse expectedResponse = + ShowCustomRangeUtilizationResponse.newBuilder() + .setCustomRange(CustomRange.newBuilder().build()) + .setRangeUtilization(RangeUtilization.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + + ShowCustomRangeUtilizationResponse actualResponse = client.showCustomRangeUtilization(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 showCustomRangeUtilizationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + client.showCustomRangeUtilization(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void showCustomRangeUtilizationTest2() throws Exception { + ShowCustomRangeUtilizationResponse expectedResponse = + ShowCustomRangeUtilizationResponse.newBuilder() + .setCustomRange(CustomRange.newBuilder().build()) + .setRangeUtilization(RangeUtilization.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3303/locations/location-3303/customRanges/customRange-3303"; + + ShowCustomRangeUtilizationResponse actualResponse = client.showCustomRangeUtilization(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 showCustomRangeUtilizationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3303/locations/location-3303/customRanges/customRange-3303"; + client.showCustomRangeUtilization(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void showDiscoveredRangeUtilizationTest() throws Exception { + ShowDiscoveredRangeUtilizationResponse expectedResponse = + ShowDiscoveredRangeUtilizationResponse.newBuilder() + .setDiscoveredRange(DiscoveredRange.newBuilder().build()) + .setRangeUtilization(RangeUtilization.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + + ShowDiscoveredRangeUtilizationResponse actualResponse = + client.showDiscoveredRangeUtilization(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 showDiscoveredRangeUtilizationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + client.showDiscoveredRangeUtilization(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void showDiscoveredRangeUtilizationTest2() throws Exception { + ShowDiscoveredRangeUtilizationResponse expectedResponse = + ShowDiscoveredRangeUtilizationResponse.newBuilder() + .setDiscoveredRange(DiscoveredRange.newBuilder().build()) + .setRangeUtilization(RangeUtilization.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1762/locations/location-1762/discoveredRanges/discoveredRange-1762"; + + ShowDiscoveredRangeUtilizationResponse actualResponse = + client.showDiscoveredRangeUtilization(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 showDiscoveredRangeUtilizationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1762/locations/location-1762/discoveredRanges/discoveredRange-1762"; + client.showDiscoveredRangeUtilization(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void findCustomRangeFreeIpRangesTest() throws Exception { + FindCustomRangeFreeIpRangesResponse expectedResponse = + FindCustomRangeFreeIpRangesResponse.newBuilder() + .addAllFreeIpCidrRanges(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + int cidrPrefixLength = -954389592; + + FindCustomRangeFreeIpRangesResponse actualResponse = + client.findCustomRangeFreeIpRanges(name, cidrPrefixLength); + 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 findCustomRangeFreeIpRangesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + int cidrPrefixLength = -954389592; + client.findCustomRangeFreeIpRanges(name, cidrPrefixLength); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void findCustomRangeFreeIpRangesTest2() throws Exception { + FindCustomRangeFreeIpRangesResponse expectedResponse = + FindCustomRangeFreeIpRangesResponse.newBuilder() + .addAllFreeIpCidrRanges(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3303/locations/location-3303/customRanges/customRange-3303"; + int cidrPrefixLength = -954389592; + + FindCustomRangeFreeIpRangesResponse actualResponse = + client.findCustomRangeFreeIpRanges(name, cidrPrefixLength); + 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 findCustomRangeFreeIpRangesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3303/locations/location-3303/customRanges/customRange-3303"; + int cidrPrefixLength = -954389592; + client.findCustomRangeFreeIpRanges(name, cidrPrefixLength); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCustomRangeTest() throws Exception { + CustomRange expectedResponse = + CustomRange.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .addAllAttributes(new ArrayList()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCustomRangeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + CustomRange customRange = CustomRange.newBuilder().build(); + String customRangeId = "customRangeId1995399815"; + + CustomRange actualResponse = + client.createCustomRangeAsync(parent, customRange, customRangeId).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 createCustomRangeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + CustomRange customRange = CustomRange.newBuilder().build(); + String customRangeId = "customRangeId1995399815"; + client.createCustomRangeAsync(parent, customRange, customRangeId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createCustomRangeTest2() throws Exception { + CustomRange expectedResponse = + CustomRange.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .addAllAttributes(new ArrayList()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCustomRangeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + CustomRange customRange = CustomRange.newBuilder().build(); + String customRangeId = "customRangeId1995399815"; + + CustomRange actualResponse = + client.createCustomRangeAsync(parent, customRange, customRangeId).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 createCustomRangeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + CustomRange customRange = CustomRange.newBuilder().build(); + String customRangeId = "customRangeId1995399815"; + client.createCustomRangeAsync(parent, customRange, customRangeId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateCustomRangeTest() throws Exception { + CustomRange expectedResponse = + CustomRange.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .addAllAttributes(new ArrayList()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateCustomRangeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + CustomRange customRange = + CustomRange.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .addAllAttributes(new ArrayList()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + CustomRange actualResponse = client.updateCustomRangeAsync(customRange, updateMask).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 updateCustomRangeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CustomRange customRange = + CustomRange.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .addAllAttributes(new ArrayList()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCustomRangeAsync(customRange, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteCustomRangeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCustomRangeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + + client.deleteCustomRangeAsync(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 deleteCustomRangeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + client.deleteCustomRangeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteCustomRangeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCustomRangeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-3303/locations/location-3303/customRanges/customRange-3303"; + + client.deleteCustomRangeAsync(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 deleteCustomRangeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3303/locations/location-3303/customRanges/customRange-3303"; + client.deleteCustomRangeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryClientTest.java b/java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryClientTest.java new file mode 100644 index 000000000000..a21c736d2d38 --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryClientTest.java @@ -0,0 +1,2769 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha; + +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListCustomRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListDiscoveredRangesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListIpamAdminScopesPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRealmsPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.ListRegistryBooksPagedResponse; +import static com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient.SearchIpResourcesPagedResponse; + +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.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +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; +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 CloudNumberRegistryClientTest { + private static MockCloudNumberRegistry mockCloudNumberRegistry; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private CloudNumberRegistryClient client; + + @BeforeClass + public static void startStaticServer() { + mockCloudNumberRegistry = new MockCloudNumberRegistry(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockCloudNumberRegistry)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + CloudNumberRegistrySettings settings = + CloudNumberRegistrySettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CloudNumberRegistryClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listIpamAdminScopesTest() throws Exception { + IpamAdminScope responsesElement = IpamAdminScope.newBuilder().build(); + ListIpamAdminScopesResponse expectedResponse = + ListIpamAdminScopesResponse.newBuilder() + .setNextPageToken("") + .addAllIpamAdminScopes(Arrays.asList(responsesElement)) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListIpamAdminScopesPagedResponse pagedListResponse = client.listIpamAdminScopes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIpamAdminScopesList().get(0), resources.get(0)); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListIpamAdminScopesRequest actualRequest = ((ListIpamAdminScopesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listIpamAdminScopesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listIpamAdminScopes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIpamAdminScopesTest2() throws Exception { + IpamAdminScope responsesElement = IpamAdminScope.newBuilder().build(); + ListIpamAdminScopesResponse expectedResponse = + ListIpamAdminScopesResponse.newBuilder() + .setNextPageToken("") + .addAllIpamAdminScopes(Arrays.asList(responsesElement)) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListIpamAdminScopesPagedResponse pagedListResponse = client.listIpamAdminScopes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIpamAdminScopesList().get(0), resources.get(0)); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListIpamAdminScopesRequest actualRequest = ((ListIpamAdminScopesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listIpamAdminScopesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listIpamAdminScopes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIpamAdminScopeTest() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + + IpamAdminScope actualResponse = client.getIpamAdminScope(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIpamAdminScopeRequest actualRequest = ((GetIpamAdminScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIpamAdminScopeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + client.getIpamAdminScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIpamAdminScopeTest2() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + IpamAdminScope actualResponse = client.getIpamAdminScope(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIpamAdminScopeRequest actualRequest = ((GetIpamAdminScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIpamAdminScopeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getIpamAdminScope(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void checkAvailabilityIpamAdminScopesTest() throws Exception { + CheckAvailabilityIpamAdminScopesResponse expectedResponse = + CheckAvailabilityIpamAdminScopesResponse.newBuilder() + .addAllScopeAvailabilities(new ArrayList()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List scopes = new ArrayList<>(); + + CheckAvailabilityIpamAdminScopesResponse actualResponse = + client.checkAvailabilityIpamAdminScopes(parent, scopes); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CheckAvailabilityIpamAdminScopesRequest actualRequest = + ((CheckAvailabilityIpamAdminScopesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(scopes, actualRequest.getScopesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void checkAvailabilityIpamAdminScopesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List scopes = new ArrayList<>(); + client.checkAvailabilityIpamAdminScopes(parent, scopes); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void checkAvailabilityIpamAdminScopesTest2() throws Exception { + CheckAvailabilityIpamAdminScopesResponse expectedResponse = + CheckAvailabilityIpamAdminScopesResponse.newBuilder() + .addAllScopeAvailabilities(new ArrayList()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + List scopes = new ArrayList<>(); + + CheckAvailabilityIpamAdminScopesResponse actualResponse = + client.checkAvailabilityIpamAdminScopes(parent, scopes); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CheckAvailabilityIpamAdminScopesRequest actualRequest = + ((CheckAvailabilityIpamAdminScopesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(scopes, actualRequest.getScopesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void checkAvailabilityIpamAdminScopesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + List scopes = new ArrayList<>(); + client.checkAvailabilityIpamAdminScopes(parent, scopes); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createIpamAdminScopeTest() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build(); + String ipamAdminScopeId = "ipamAdminScopeId1628703603"; + + IpamAdminScope actualResponse = + client.createIpamAdminScopeAsync(parent, ipamAdminScope, ipamAdminScopeId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateIpamAdminScopeRequest actualRequest = + ((CreateIpamAdminScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(ipamAdminScope, actualRequest.getIpamAdminScope()); + Assert.assertEquals(ipamAdminScopeId, actualRequest.getIpamAdminScopeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createIpamAdminScopeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build(); + String ipamAdminScopeId = "ipamAdminScopeId1628703603"; + client.createIpamAdminScopeAsync(parent, ipamAdminScope, ipamAdminScopeId).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 createIpamAdminScopeTest2() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + String parent = "parent-995424086"; + IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build(); + String ipamAdminScopeId = "ipamAdminScopeId1628703603"; + + IpamAdminScope actualResponse = + client.createIpamAdminScopeAsync(parent, ipamAdminScope, ipamAdminScopeId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateIpamAdminScopeRequest actualRequest = + ((CreateIpamAdminScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(ipamAdminScope, actualRequest.getIpamAdminScope()); + Assert.assertEquals(ipamAdminScopeId, actualRequest.getIpamAdminScopeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createIpamAdminScopeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build(); + String ipamAdminScopeId = "ipamAdminScopeId1628703603"; + client.createIpamAdminScopeAsync(parent, ipamAdminScope, ipamAdminScopeId).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 updateIpamAdminScopeTest() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + IpamAdminScope actualResponse = + client.updateIpamAdminScopeAsync(ipamAdminScope, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateIpamAdminScopeRequest actualRequest = + ((UpdateIpamAdminScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(ipamAdminScope, actualRequest.getIpamAdminScope()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateIpamAdminScopeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateIpamAdminScopeAsync(ipamAdminScope, updateMask).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 deleteIpamAdminScopeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + + client.deleteIpamAdminScopeAsync(name).get(); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteIpamAdminScopeRequest actualRequest = + ((DeleteIpamAdminScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteIpamAdminScopeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + client.deleteIpamAdminScopeAsync(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 deleteIpamAdminScopeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteIpamAdminScopeAsync(name).get(); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteIpamAdminScopeRequest actualRequest = + ((DeleteIpamAdminScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteIpamAdminScopeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.deleteIpamAdminScopeAsync(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 disableIpamAdminScopeTest() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("disableIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + + IpamAdminScope actualResponse = client.disableIpamAdminScopeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DisableIpamAdminScopeRequest actualRequest = + ((DisableIpamAdminScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void disableIpamAdminScopeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + client.disableIpamAdminScopeAsync(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 disableIpamAdminScopeTest2() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("disableIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + String name = "name3373707"; + + IpamAdminScope actualResponse = client.disableIpamAdminScopeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DisableIpamAdminScopeRequest actualRequest = + ((DisableIpamAdminScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void disableIpamAdminScopeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.disableIpamAdminScopeAsync(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 cleanupIpamAdminScopeTest() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("cleanupIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + + IpamAdminScope actualResponse = client.cleanupIpamAdminScopeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CleanupIpamAdminScopeRequest actualRequest = + ((CleanupIpamAdminScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cleanupIpamAdminScopeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + client.cleanupIpamAdminScopeAsync(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 cleanupIpamAdminScopeTest2() throws Exception { + IpamAdminScope expectedResponse = + IpamAdminScope.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .addAllEnabledAddonPlatforms(new ArrayList()) + .addAllScopes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("cleanupIpamAdminScopeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + String name = "name3373707"; + + IpamAdminScope actualResponse = client.cleanupIpamAdminScopeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CleanupIpamAdminScopeRequest actualRequest = + ((CleanupIpamAdminScopeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cleanupIpamAdminScopeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.cleanupIpamAdminScopeAsync(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 listRegistryBooksTest() throws Exception { + RegistryBook responsesElement = RegistryBook.newBuilder().build(); + ListRegistryBooksResponse expectedResponse = + ListRegistryBooksResponse.newBuilder() + .setNextPageToken("") + .addAllRegistryBooks(Arrays.asList(responsesElement)) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListRegistryBooksPagedResponse pagedListResponse = client.listRegistryBooks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRegistryBooksList().get(0), resources.get(0)); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRegistryBooksRequest actualRequest = ((ListRegistryBooksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRegistryBooksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listRegistryBooks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRegistryBooksTest2() throws Exception { + RegistryBook responsesElement = RegistryBook.newBuilder().build(); + ListRegistryBooksResponse expectedResponse = + ListRegistryBooksResponse.newBuilder() + .setNextPageToken("") + .addAllRegistryBooks(Arrays.asList(responsesElement)) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRegistryBooksPagedResponse pagedListResponse = client.listRegistryBooks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRegistryBooksList().get(0), resources.get(0)); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRegistryBooksRequest actualRequest = ((ListRegistryBooksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRegistryBooksExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRegistryBooks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRegistryBookTest() throws Exception { + RegistryBook expectedResponse = + RegistryBook.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllClaimedScopes(new ArrayList()) + .setIsDefault(true) + .setAggregatedData(RegistryBook.AggregatedData.newBuilder().build()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + + RegistryBook actualResponse = client.getRegistryBook(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRegistryBookRequest actualRequest = ((GetRegistryBookRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRegistryBookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + client.getRegistryBook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRegistryBookTest2() throws Exception { + RegistryBook expectedResponse = + RegistryBook.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllClaimedScopes(new ArrayList()) + .setIsDefault(true) + .setAggregatedData(RegistryBook.AggregatedData.newBuilder().build()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + RegistryBook actualResponse = client.getRegistryBook(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRegistryBookRequest actualRequest = ((GetRegistryBookRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRegistryBookExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getRegistryBook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchIpResourcesTest() throws Exception { + Range responsesElement = Range.newBuilder().build(); + SearchIpResourcesResponse expectedResponse = + SearchIpResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllRanges(Arrays.asList(responsesElement)) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + + SearchIpResourcesPagedResponse pagedListResponse = client.searchIpResources(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRangesList().get(0), resources.get(0)); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchIpResourcesRequest actualRequest = ((SearchIpResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchIpResourcesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + client.searchIpResources(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchIpResourcesTest2() throws Exception { + Range responsesElement = Range.newBuilder().build(); + SearchIpResourcesResponse expectedResponse = + SearchIpResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllRanges(Arrays.asList(responsesElement)) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + SearchIpResourcesPagedResponse pagedListResponse = client.searchIpResources(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRangesList().get(0), resources.get(0)); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchIpResourcesRequest actualRequest = ((SearchIpResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchIpResourcesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.searchIpResources(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createRegistryBookTest() throws Exception { + RegistryBook expectedResponse = + RegistryBook.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllClaimedScopes(new ArrayList()) + .setIsDefault(true) + .setAggregatedData(RegistryBook.AggregatedData.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRegistryBookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RegistryBook registryBook = RegistryBook.newBuilder().build(); + String registryBookId = "registryBookId2126801025"; + + RegistryBook actualResponse = + client.createRegistryBookAsync(parent, registryBook, registryBookId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRegistryBookRequest actualRequest = ((CreateRegistryBookRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(registryBook, actualRequest.getRegistryBook()); + Assert.assertEquals(registryBookId, actualRequest.getRegistryBookId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRegistryBookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RegistryBook registryBook = RegistryBook.newBuilder().build(); + String registryBookId = "registryBookId2126801025"; + client.createRegistryBookAsync(parent, registryBook, registryBookId).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 createRegistryBookTest2() throws Exception { + RegistryBook expectedResponse = + RegistryBook.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllClaimedScopes(new ArrayList()) + .setIsDefault(true) + .setAggregatedData(RegistryBook.AggregatedData.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRegistryBookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + String parent = "parent-995424086"; + RegistryBook registryBook = RegistryBook.newBuilder().build(); + String registryBookId = "registryBookId2126801025"; + + RegistryBook actualResponse = + client.createRegistryBookAsync(parent, registryBook, registryBookId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRegistryBookRequest actualRequest = ((CreateRegistryBookRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(registryBook, actualRequest.getRegistryBook()); + Assert.assertEquals(registryBookId, actualRequest.getRegistryBookId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRegistryBookExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + RegistryBook registryBook = RegistryBook.newBuilder().build(); + String registryBookId = "registryBookId2126801025"; + client.createRegistryBookAsync(parent, registryBook, registryBookId).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 updateRegistryBookTest() throws Exception { + RegistryBook expectedResponse = + RegistryBook.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .addAllClaimedScopes(new ArrayList()) + .setIsDefault(true) + .setAggregatedData(RegistryBook.AggregatedData.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateRegistryBookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + RegistryBook registryBook = RegistryBook.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + RegistryBook actualResponse = client.updateRegistryBookAsync(registryBook, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateRegistryBookRequest actualRequest = ((UpdateRegistryBookRequest) actualRequests.get(0)); + + Assert.assertEquals(registryBook, actualRequest.getRegistryBook()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateRegistryBookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + RegistryBook registryBook = RegistryBook.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateRegistryBookAsync(registryBook, updateMask).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 deleteRegistryBookTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRegistryBookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + + client.deleteRegistryBookAsync(name).get(); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRegistryBookRequest actualRequest = ((DeleteRegistryBookRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRegistryBookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + client.deleteRegistryBookAsync(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 deleteRegistryBookTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRegistryBookTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteRegistryBookAsync(name).get(); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRegistryBookRequest actualRequest = ((DeleteRegistryBookRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRegistryBookExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.deleteRegistryBookAsync(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 listRealmsTest() throws Exception { + Realm responsesElement = Realm.newBuilder().build(); + ListRealmsResponse expectedResponse = + ListRealmsResponse.newBuilder() + .setNextPageToken("") + .addAllRealms(Arrays.asList(responsesElement)) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListRealmsPagedResponse pagedListResponse = client.listRealms(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRealmsList().get(0), resources.get(0)); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRealmsRequest actualRequest = ((ListRealmsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRealmsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listRealms(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRealmsTest2() throws Exception { + Realm responsesElement = Realm.newBuilder().build(); + ListRealmsResponse expectedResponse = + ListRealmsResponse.newBuilder() + .setNextPageToken("") + .addAllRealms(Arrays.asList(responsesElement)) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRealmsPagedResponse pagedListResponse = client.listRealms(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRealmsList().get(0), resources.get(0)); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRealmsRequest actualRequest = ((ListRealmsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRealmsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRealms(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRealmTest() throws Exception { + Realm expectedResponse = + Realm.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRegistryBook( + RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setIpVersion(IpVersion.forNumber(0)) + .setAggregatedData(Realm.RealmAggregatedData.newBuilder().build()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]"); + + Realm actualResponse = client.getRealm(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRealmRequest actualRequest = ((GetRealmRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRealmExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]"); + client.getRealm(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRealmTest2() throws Exception { + Realm expectedResponse = + Realm.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRegistryBook( + RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setIpVersion(IpVersion.forNumber(0)) + .setAggregatedData(Realm.RealmAggregatedData.newBuilder().build()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + Realm actualResponse = client.getRealm(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRealmRequest actualRequest = ((GetRealmRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRealmExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getRealm(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createRealmTest() throws Exception { + Realm expectedResponse = + Realm.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRegistryBook( + RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setIpVersion(IpVersion.forNumber(0)) + .setAggregatedData(Realm.RealmAggregatedData.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRealmTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Realm realm = Realm.newBuilder().build(); + String realmId = "realmId1080654858"; + + Realm actualResponse = client.createRealmAsync(parent, realm, realmId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRealmRequest actualRequest = ((CreateRealmRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(realm, actualRequest.getRealm()); + Assert.assertEquals(realmId, actualRequest.getRealmId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRealmExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Realm realm = Realm.newBuilder().build(); + String realmId = "realmId1080654858"; + client.createRealmAsync(parent, realm, realmId).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 createRealmTest2() throws Exception { + Realm expectedResponse = + Realm.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRegistryBook( + RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setIpVersion(IpVersion.forNumber(0)) + .setAggregatedData(Realm.RealmAggregatedData.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRealmTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + String parent = "parent-995424086"; + Realm realm = Realm.newBuilder().build(); + String realmId = "realmId1080654858"; + + Realm actualResponse = client.createRealmAsync(parent, realm, realmId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRealmRequest actualRequest = ((CreateRealmRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(realm, actualRequest.getRealm()); + Assert.assertEquals(realmId, actualRequest.getRealmId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRealmExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + Realm realm = Realm.newBuilder().build(); + String realmId = "realmId1080654858"; + client.createRealmAsync(parent, realm, realmId).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 updateRealmTest() throws Exception { + Realm expectedResponse = + Realm.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRegistryBook( + RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setIpVersion(IpVersion.forNumber(0)) + .setAggregatedData(Realm.RealmAggregatedData.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateRealmTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + Realm realm = Realm.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Realm actualResponse = client.updateRealmAsync(realm, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateRealmRequest actualRequest = ((UpdateRealmRequest) actualRequests.get(0)); + + Assert.assertEquals(realm, actualRequest.getRealm()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateRealmExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + Realm realm = Realm.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateRealmAsync(realm, updateMask).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 deleteRealmTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRealmTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]"); + + client.deleteRealmAsync(name).get(); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRealmRequest actualRequest = ((DeleteRealmRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRealmExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]"); + client.deleteRealmAsync(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 deleteRealmTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRealmTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteRealmAsync(name).get(); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRealmRequest actualRequest = ((DeleteRealmRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRealmExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.deleteRealmAsync(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 listDiscoveredRangesTest() throws Exception { + DiscoveredRange responsesElement = DiscoveredRange.newBuilder().build(); + ListDiscoveredRangesResponse expectedResponse = + ListDiscoveredRangesResponse.newBuilder() + .setNextPageToken("") + .addAllDiscoveredRanges(Arrays.asList(responsesElement)) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDiscoveredRangesPagedResponse pagedListResponse = client.listDiscoveredRanges(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDiscoveredRangesList().get(0), resources.get(0)); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDiscoveredRangesRequest actualRequest = + ((ListDiscoveredRangesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDiscoveredRangesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDiscoveredRanges(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDiscoveredRangesTest2() throws Exception { + DiscoveredRange responsesElement = DiscoveredRange.newBuilder().build(); + ListDiscoveredRangesResponse expectedResponse = + ListDiscoveredRangesResponse.newBuilder() + .setNextPageToken("") + .addAllDiscoveredRanges(Arrays.asList(responsesElement)) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDiscoveredRangesPagedResponse pagedListResponse = client.listDiscoveredRanges(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDiscoveredRangesList().get(0), resources.get(0)); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDiscoveredRangesRequest actualRequest = + ((ListDiscoveredRangesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDiscoveredRangesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDiscoveredRanges(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDiscoveredRangeTest() throws Exception { + DiscoveredRange expectedResponse = + DiscoveredRange.newBuilder() + .setName( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .setDescription("description-1724546052") + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChildCidrOverlapAllowed(true) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + + DiscoveredRange actualResponse = client.getDiscoveredRange(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDiscoveredRangeRequest actualRequest = ((GetDiscoveredRangeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDiscoveredRangeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + client.getDiscoveredRange(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDiscoveredRangeTest2() throws Exception { + DiscoveredRange expectedResponse = + DiscoveredRange.newBuilder() + .setName( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .setDescription("description-1724546052") + .setDiscoveryMetadata(DiscoveryMetadata.newBuilder().build()) + .addAllAttributes(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChildCidrOverlapAllowed(true) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + DiscoveredRange actualResponse = client.getDiscoveredRange(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDiscoveredRangeRequest actualRequest = ((GetDiscoveredRangeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDiscoveredRangeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getDiscoveredRange(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void findDiscoveredRangeFreeIpRangesTest() throws Exception { + FindDiscoveredRangeFreeIpRangesResponse expectedResponse = + FindDiscoveredRangeFreeIpRangesResponse.newBuilder() + .addAllFreeIpCidrRanges(new ArrayList()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + int cidrPrefixLength = -954389592; + + FindDiscoveredRangeFreeIpRangesResponse actualResponse = + client.findDiscoveredRangeFreeIpRanges(name, cidrPrefixLength); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FindDiscoveredRangeFreeIpRangesRequest actualRequest = + ((FindDiscoveredRangeFreeIpRangesRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(cidrPrefixLength, actualRequest.getCidrPrefixLength()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void findDiscoveredRangeFreeIpRangesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + int cidrPrefixLength = -954389592; + client.findDiscoveredRangeFreeIpRanges(name, cidrPrefixLength); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void findDiscoveredRangeFreeIpRangesTest2() throws Exception { + FindDiscoveredRangeFreeIpRangesResponse expectedResponse = + FindDiscoveredRangeFreeIpRangesResponse.newBuilder() + .addAllFreeIpCidrRanges(new ArrayList()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + int cidrPrefixLength = -954389592; + + FindDiscoveredRangeFreeIpRangesResponse actualResponse = + client.findDiscoveredRangeFreeIpRanges(name, cidrPrefixLength); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FindDiscoveredRangeFreeIpRangesRequest actualRequest = + ((FindDiscoveredRangeFreeIpRangesRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(cidrPrefixLength, actualRequest.getCidrPrefixLength()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void findDiscoveredRangeFreeIpRangesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + int cidrPrefixLength = -954389592; + client.findDiscoveredRangeFreeIpRanges(name, cidrPrefixLength); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCustomRangesTest() throws Exception { + CustomRange responsesElement = CustomRange.newBuilder().build(); + ListCustomRangesResponse expectedResponse = + ListCustomRangesResponse.newBuilder() + .setNextPageToken("") + .addAllCustomRanges(Arrays.asList(responsesElement)) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListCustomRangesPagedResponse pagedListResponse = client.listCustomRanges(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomRangesList().get(0), resources.get(0)); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCustomRangesRequest actualRequest = ((ListCustomRangesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCustomRangesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listCustomRanges(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCustomRangesTest2() throws Exception { + CustomRange responsesElement = CustomRange.newBuilder().build(); + ListCustomRangesResponse expectedResponse = + ListCustomRangesResponse.newBuilder() + .setNextPageToken("") + .addAllCustomRanges(Arrays.asList(responsesElement)) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListCustomRangesPagedResponse pagedListResponse = client.listCustomRanges(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomRangesList().get(0), resources.get(0)); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCustomRangesRequest actualRequest = ((ListCustomRangesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCustomRangesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + client.listCustomRanges(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomRangeTest() throws Exception { + CustomRange expectedResponse = + CustomRange.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .addAllAttributes(new ArrayList()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + + CustomRange actualResponse = client.getCustomRange(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCustomRangeRequest actualRequest = ((GetCustomRangeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCustomRangeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + client.getCustomRange(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomRangeTest2() throws Exception { + CustomRange expectedResponse = + CustomRange.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .addAllAttributes(new ArrayList()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + CustomRange actualResponse = client.getCustomRange(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCustomRangeRequest actualRequest = ((GetCustomRangeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCustomRangeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.getCustomRange(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void showCustomRangeUtilizationTest() throws Exception { + ShowCustomRangeUtilizationResponse expectedResponse = + ShowCustomRangeUtilizationResponse.newBuilder() + .setCustomRange(CustomRange.newBuilder().build()) + .setRangeUtilization(RangeUtilization.newBuilder().build()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + + ShowCustomRangeUtilizationResponse actualResponse = client.showCustomRangeUtilization(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ShowCustomRangeUtilizationRequest actualRequest = + ((ShowCustomRangeUtilizationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void showCustomRangeUtilizationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + client.showCustomRangeUtilization(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void showCustomRangeUtilizationTest2() throws Exception { + ShowCustomRangeUtilizationResponse expectedResponse = + ShowCustomRangeUtilizationResponse.newBuilder() + .setCustomRange(CustomRange.newBuilder().build()) + .setRangeUtilization(RangeUtilization.newBuilder().build()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + ShowCustomRangeUtilizationResponse actualResponse = client.showCustomRangeUtilization(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ShowCustomRangeUtilizationRequest actualRequest = + ((ShowCustomRangeUtilizationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void showCustomRangeUtilizationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.showCustomRangeUtilization(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void showDiscoveredRangeUtilizationTest() throws Exception { + ShowDiscoveredRangeUtilizationResponse expectedResponse = + ShowDiscoveredRangeUtilizationResponse.newBuilder() + .setDiscoveredRange(DiscoveredRange.newBuilder().build()) + .setRangeUtilization(RangeUtilization.newBuilder().build()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + + ShowDiscoveredRangeUtilizationResponse actualResponse = + client.showDiscoveredRangeUtilization(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ShowDiscoveredRangeUtilizationRequest actualRequest = + ((ShowDiscoveredRangeUtilizationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void showDiscoveredRangeUtilizationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + client.showDiscoveredRangeUtilization(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void showDiscoveredRangeUtilizationTest2() throws Exception { + ShowDiscoveredRangeUtilizationResponse expectedResponse = + ShowDiscoveredRangeUtilizationResponse.newBuilder() + .setDiscoveredRange(DiscoveredRange.newBuilder().build()) + .setRangeUtilization(RangeUtilization.newBuilder().build()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + + ShowDiscoveredRangeUtilizationResponse actualResponse = + client.showDiscoveredRangeUtilization(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ShowDiscoveredRangeUtilizationRequest actualRequest = + ((ShowDiscoveredRangeUtilizationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void showDiscoveredRangeUtilizationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.showDiscoveredRangeUtilization(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void findCustomRangeFreeIpRangesTest() throws Exception { + FindCustomRangeFreeIpRangesResponse expectedResponse = + FindCustomRangeFreeIpRangesResponse.newBuilder() + .addAllFreeIpCidrRanges(new ArrayList()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + int cidrPrefixLength = -954389592; + + FindCustomRangeFreeIpRangesResponse actualResponse = + client.findCustomRangeFreeIpRanges(name, cidrPrefixLength); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FindCustomRangeFreeIpRangesRequest actualRequest = + ((FindCustomRangeFreeIpRangesRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(cidrPrefixLength, actualRequest.getCidrPrefixLength()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void findCustomRangeFreeIpRangesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + int cidrPrefixLength = -954389592; + client.findCustomRangeFreeIpRanges(name, cidrPrefixLength); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void findCustomRangeFreeIpRangesTest2() throws Exception { + FindCustomRangeFreeIpRangesResponse expectedResponse = + FindCustomRangeFreeIpRangesResponse.newBuilder() + .addAllFreeIpCidrRanges(new ArrayList()) + .build(); + mockCloudNumberRegistry.addResponse(expectedResponse); + + String name = "name3373707"; + int cidrPrefixLength = -954389592; + + FindCustomRangeFreeIpRangesResponse actualResponse = + client.findCustomRangeFreeIpRanges(name, cidrPrefixLength); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FindCustomRangeFreeIpRangesRequest actualRequest = + ((FindCustomRangeFreeIpRangesRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(cidrPrefixLength, actualRequest.getCidrPrefixLength()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void findCustomRangeFreeIpRangesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + int cidrPrefixLength = -954389592; + client.findCustomRangeFreeIpRanges(name, cidrPrefixLength); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCustomRangeTest() throws Exception { + CustomRange expectedResponse = + CustomRange.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .addAllAttributes(new ArrayList()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCustomRangeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + CustomRange customRange = CustomRange.newBuilder().build(); + String customRangeId = "customRangeId1995399815"; + + CustomRange actualResponse = + client.createCustomRangeAsync(parent, customRange, customRangeId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCustomRangeRequest actualRequest = ((CreateCustomRangeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(customRange, actualRequest.getCustomRange()); + Assert.assertEquals(customRangeId, actualRequest.getCustomRangeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCustomRangeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + CustomRange customRange = CustomRange.newBuilder().build(); + String customRangeId = "customRangeId1995399815"; + client.createCustomRangeAsync(parent, customRange, customRangeId).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 createCustomRangeTest2() throws Exception { + CustomRange expectedResponse = + CustomRange.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .addAllAttributes(new ArrayList()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCustomRangeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + String parent = "parent-995424086"; + CustomRange customRange = CustomRange.newBuilder().build(); + String customRangeId = "customRangeId1995399815"; + + CustomRange actualResponse = + client.createCustomRangeAsync(parent, customRange, customRangeId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCustomRangeRequest actualRequest = ((CreateCustomRangeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(customRange, actualRequest.getCustomRange()); + Assert.assertEquals(customRangeId, actualRequest.getCustomRangeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCustomRangeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String parent = "parent-995424086"; + CustomRange customRange = CustomRange.newBuilder().build(); + String customRangeId = "customRangeId1995399815"; + client.createCustomRangeAsync(parent, customRange, customRangeId).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 updateCustomRangeTest() throws Exception { + CustomRange expectedResponse = + CustomRange.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRealm(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setParentRange( + CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRegistryBook("registryBook-1329628986") + .addAllAttributes(new ArrayList()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateCustomRangeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + CustomRange customRange = CustomRange.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + CustomRange actualResponse = client.updateCustomRangeAsync(customRange, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCustomRangeRequest actualRequest = ((UpdateCustomRangeRequest) actualRequests.get(0)); + + Assert.assertEquals(customRange, actualRequest.getCustomRange()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateCustomRangeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + CustomRange customRange = CustomRange.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCustomRangeAsync(customRange, updateMask).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 deleteCustomRangeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCustomRangeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + + client.deleteCustomRangeAsync(name).get(); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCustomRangeRequest actualRequest = ((DeleteCustomRangeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCustomRangeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + client.deleteCustomRangeAsync(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 deleteCustomRangeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCustomRangeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudNumberRegistry.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteCustomRangeAsync(name).get(); + + List actualRequests = mockCloudNumberRegistry.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCustomRangeRequest actualRequest = ((DeleteCustomRangeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCustomRangeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudNumberRegistry.addException(exception); + + try { + String name = "name3373707"; + client.deleteCustomRangeAsync(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()); + } + } +} diff --git a/java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/MockCloudNumberRegistry.java b/java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/MockCloudNumberRegistry.java new file mode 100644 index 000000000000..871a8eb68166 --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/MockCloudNumberRegistry.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha; + +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 MockCloudNumberRegistry implements MockGrpcService { + private final MockCloudNumberRegistryImpl serviceImpl; + + public MockCloudNumberRegistry() { + serviceImpl = new MockCloudNumberRegistryImpl(); + } + + @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-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/MockCloudNumberRegistryImpl.java b/java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/MockCloudNumberRegistryImpl.java new file mode 100644 index 000000000000..77a6177ffb41 --- /dev/null +++ b/java-numberregistry/google-cloud-numberregistry/src/test/java/com/google/cloud/numberregistry/v1alpha/MockCloudNumberRegistryImpl.java @@ -0,0 +1,707 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryGrpc.CloudNumberRegistryImplBase; +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 MockCloudNumberRegistryImpl extends CloudNumberRegistryImplBase { + private List requests; + private Queue responses; + + public MockCloudNumberRegistryImpl() { + 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 listIpamAdminScopes( + ListIpamAdminScopesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListIpamAdminScopesResponse) { + requests.add(request); + responseObserver.onNext(((ListIpamAdminScopesResponse) 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 ListIpamAdminScopes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListIpamAdminScopesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIpamAdminScope( + GetIpamAdminScopeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof IpamAdminScope) { + requests.add(request); + responseObserver.onNext(((IpamAdminScope) 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 GetIpamAdminScope, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + IpamAdminScope.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void checkAvailabilityIpamAdminScopes( + CheckAvailabilityIpamAdminScopesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CheckAvailabilityIpamAdminScopesResponse) { + requests.add(request); + responseObserver.onNext(((CheckAvailabilityIpamAdminScopesResponse) 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 CheckAvailabilityIpamAdminScopes," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CheckAvailabilityIpamAdminScopesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createIpamAdminScope( + CreateIpamAdminScopeRequest 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 CreateIpamAdminScope, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateIpamAdminScope( + UpdateIpamAdminScopeRequest 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 UpdateIpamAdminScope, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteIpamAdminScope( + DeleteIpamAdminScopeRequest 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 DeleteIpamAdminScope, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void disableIpamAdminScope( + DisableIpamAdminScopeRequest 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 DisableIpamAdminScope, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void cleanupIpamAdminScope( + CleanupIpamAdminScopeRequest 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 CleanupIpamAdminScope, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRegistryBooks( + ListRegistryBooksRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRegistryBooksResponse) { + requests.add(request); + responseObserver.onNext(((ListRegistryBooksResponse) 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 ListRegistryBooks, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRegistryBooksResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRegistryBook( + GetRegistryBookRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RegistryBook) { + requests.add(request); + responseObserver.onNext(((RegistryBook) 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 GetRegistryBook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RegistryBook.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchIpResources( + SearchIpResourcesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchIpResourcesResponse) { + requests.add(request); + responseObserver.onNext(((SearchIpResourcesResponse) 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 SearchIpResources, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchIpResourcesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createRegistryBook( + CreateRegistryBookRequest 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 CreateRegistryBook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateRegistryBook( + UpdateRegistryBookRequest 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 UpdateRegistryBook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteRegistryBook( + DeleteRegistryBookRequest 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 DeleteRegistryBook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRealms( + ListRealmsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRealmsResponse) { + requests.add(request); + responseObserver.onNext(((ListRealmsResponse) 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 ListRealms, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRealmsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRealm(GetRealmRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Realm) { + requests.add(request); + responseObserver.onNext(((Realm) 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 GetRealm, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Realm.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createRealm(CreateRealmRequest 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 CreateRealm, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateRealm(UpdateRealmRequest 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 UpdateRealm, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteRealm(DeleteRealmRequest 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 DeleteRealm, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDiscoveredRanges( + ListDiscoveredRangesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDiscoveredRangesResponse) { + requests.add(request); + responseObserver.onNext(((ListDiscoveredRangesResponse) 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 ListDiscoveredRanges, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + ListDiscoveredRangesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDiscoveredRange( + GetDiscoveredRangeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DiscoveredRange) { + requests.add(request); + responseObserver.onNext(((DiscoveredRange) 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 GetDiscoveredRange, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DiscoveredRange.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void findDiscoveredRangeFreeIpRanges( + FindDiscoveredRangeFreeIpRangesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FindDiscoveredRangeFreeIpRangesResponse) { + requests.add(request); + responseObserver.onNext(((FindDiscoveredRangeFreeIpRangesResponse) 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 FindDiscoveredRangeFreeIpRanges," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FindDiscoveredRangeFreeIpRangesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listCustomRanges( + ListCustomRangesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListCustomRangesResponse) { + requests.add(request); + responseObserver.onNext(((ListCustomRangesResponse) 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 ListCustomRanges, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListCustomRangesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getCustomRange( + GetCustomRangeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CustomRange) { + requests.add(request); + responseObserver.onNext(((CustomRange) 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 GetCustomRange, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CustomRange.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void showCustomRangeUtilization( + ShowCustomRangeUtilizationRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ShowCustomRangeUtilizationResponse) { + requests.add(request); + responseObserver.onNext(((ShowCustomRangeUtilizationResponse) 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 ShowCustomRangeUtilization, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + ShowCustomRangeUtilizationResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void showDiscoveredRangeUtilization( + ShowDiscoveredRangeUtilizationRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ShowDiscoveredRangeUtilizationResponse) { + requests.add(request); + responseObserver.onNext(((ShowDiscoveredRangeUtilizationResponse) 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 ShowDiscoveredRangeUtilization," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ShowDiscoveredRangeUtilizationResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void findCustomRangeFreeIpRanges( + FindCustomRangeFreeIpRangesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FindCustomRangeFreeIpRangesResponse) { + requests.add(request); + responseObserver.onNext(((FindCustomRangeFreeIpRangesResponse) 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 FindCustomRangeFreeIpRanges, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + FindCustomRangeFreeIpRangesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createCustomRange( + CreateCustomRangeRequest 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 CreateCustomRange, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateCustomRange( + UpdateCustomRangeRequest 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 UpdateCustomRange, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteCustomRange( + DeleteCustomRangeRequest 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 DeleteCustomRange, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-numberregistry/grpc-google-cloud-numberregistry-v1alpha/pom.xml b/java-numberregistry/grpc-google-cloud-numberregistry-v1alpha/pom.xml new file mode 100644 index 000000000000..f752e911e291 --- /dev/null +++ b/java-numberregistry/grpc-google-cloud-numberregistry-v1alpha/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-numberregistry-v1alpha + 0.1.0-SNAPSHOT + grpc-google-cloud-numberregistry-v1alpha + GRPC library for google-cloud-numberregistry + + com.google.cloud + google-cloud-numberregistry-parent + 0.1.0-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-numberregistry-v1alpha + + + com.google.guava + guava + + + diff --git a/java-numberregistry/grpc-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryGrpc.java b/java-numberregistry/grpc-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryGrpc.java new file mode 100644 index 000000000000..1fc435c93fa4 --- /dev/null +++ b/java-numberregistry/grpc-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CloudNumberRegistryGrpc.java @@ -0,0 +1,4434 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The Cloud Number Registry service manages IP address space visibility and
+ * tracking. It enables the discovery, organization, and monitoring of IP
+ * address ranges across different cloud infrastructure platforms.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class CloudNumberRegistryGrpc { + + private CloudNumberRegistryGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.numberregistry.v1alpha.CloudNumberRegistry"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest, + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse> + getListIpamAdminScopesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListIpamAdminScopes", + requestType = com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest.class, + responseType = com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest, + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse> + getListIpamAdminScopesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest, + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse> + getListIpamAdminScopesMethod; + if ((getListIpamAdminScopesMethod = CloudNumberRegistryGrpc.getListIpamAdminScopesMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getListIpamAdminScopesMethod = CloudNumberRegistryGrpc.getListIpamAdminScopesMethod) + == null) { + CloudNumberRegistryGrpc.getListIpamAdminScopesMethod = + getListIpamAdminScopesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListIpamAdminScopes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("ListIpamAdminScopes")) + .build(); + } + } + } + return getListIpamAdminScopesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope> + getGetIpamAdminScopeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetIpamAdminScope", + requestType = com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest.class, + responseType = com.google.cloud.numberregistry.v1alpha.IpamAdminScope.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope> + getGetIpamAdminScopeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope> + getGetIpamAdminScopeMethod; + if ((getGetIpamAdminScopeMethod = CloudNumberRegistryGrpc.getGetIpamAdminScopeMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getGetIpamAdminScopeMethod = CloudNumberRegistryGrpc.getGetIpamAdminScopeMethod) + == null) { + CloudNumberRegistryGrpc.getGetIpamAdminScopeMethod = + getGetIpamAdminScopeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIpamAdminScope")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.IpamAdminScope + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("GetIpamAdminScope")) + .build(); + } + } + } + return getGetIpamAdminScopeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest, + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse> + getCheckAvailabilityIpamAdminScopesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CheckAvailabilityIpamAdminScopes", + requestType = + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest.class, + responseType = + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest, + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse> + getCheckAvailabilityIpamAdminScopesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest, + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse> + getCheckAvailabilityIpamAdminScopesMethod; + if ((getCheckAvailabilityIpamAdminScopesMethod = + CloudNumberRegistryGrpc.getCheckAvailabilityIpamAdminScopesMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getCheckAvailabilityIpamAdminScopesMethod = + CloudNumberRegistryGrpc.getCheckAvailabilityIpamAdminScopesMethod) + == null) { + CloudNumberRegistryGrpc.getCheckAvailabilityIpamAdminScopesMethod = + getCheckAvailabilityIpamAdminScopesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CheckAvailabilityIpamAdminScopes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha + .CheckAvailabilityIpamAdminScopesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha + .CheckAvailabilityIpamAdminScopesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier( + "CheckAvailabilityIpamAdminScopes")) + .build(); + } + } + } + return getCheckAvailabilityIpamAdminScopesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest, + com.google.longrunning.Operation> + getCreateIpamAdminScopeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateIpamAdminScope", + requestType = com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest, + com.google.longrunning.Operation> + getCreateIpamAdminScopeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest, + com.google.longrunning.Operation> + getCreateIpamAdminScopeMethod; + if ((getCreateIpamAdminScopeMethod = CloudNumberRegistryGrpc.getCreateIpamAdminScopeMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getCreateIpamAdminScopeMethod = CloudNumberRegistryGrpc.getCreateIpamAdminScopeMethod) + == null) { + CloudNumberRegistryGrpc.getCreateIpamAdminScopeMethod = + getCreateIpamAdminScopeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateIpamAdminScope")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("CreateIpamAdminScope")) + .build(); + } + } + } + return getCreateIpamAdminScopeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest, + com.google.longrunning.Operation> + getUpdateIpamAdminScopeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateIpamAdminScope", + requestType = com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest, + com.google.longrunning.Operation> + getUpdateIpamAdminScopeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest, + com.google.longrunning.Operation> + getUpdateIpamAdminScopeMethod; + if ((getUpdateIpamAdminScopeMethod = CloudNumberRegistryGrpc.getUpdateIpamAdminScopeMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getUpdateIpamAdminScopeMethod = CloudNumberRegistryGrpc.getUpdateIpamAdminScopeMethod) + == null) { + CloudNumberRegistryGrpc.getUpdateIpamAdminScopeMethod = + getUpdateIpamAdminScopeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateIpamAdminScope")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("UpdateIpamAdminScope")) + .build(); + } + } + } + return getUpdateIpamAdminScopeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest, + com.google.longrunning.Operation> + getDeleteIpamAdminScopeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteIpamAdminScope", + requestType = com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest, + com.google.longrunning.Operation> + getDeleteIpamAdminScopeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest, + com.google.longrunning.Operation> + getDeleteIpamAdminScopeMethod; + if ((getDeleteIpamAdminScopeMethod = CloudNumberRegistryGrpc.getDeleteIpamAdminScopeMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getDeleteIpamAdminScopeMethod = CloudNumberRegistryGrpc.getDeleteIpamAdminScopeMethod) + == null) { + CloudNumberRegistryGrpc.getDeleteIpamAdminScopeMethod = + getDeleteIpamAdminScopeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteIpamAdminScope")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("DeleteIpamAdminScope")) + .build(); + } + } + } + return getDeleteIpamAdminScopeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest, + com.google.longrunning.Operation> + getDisableIpamAdminScopeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DisableIpamAdminScope", + requestType = com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest, + com.google.longrunning.Operation> + getDisableIpamAdminScopeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest, + com.google.longrunning.Operation> + getDisableIpamAdminScopeMethod; + if ((getDisableIpamAdminScopeMethod = CloudNumberRegistryGrpc.getDisableIpamAdminScopeMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getDisableIpamAdminScopeMethod = + CloudNumberRegistryGrpc.getDisableIpamAdminScopeMethod) + == null) { + CloudNumberRegistryGrpc.getDisableIpamAdminScopeMethod = + getDisableIpamAdminScopeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DisableIpamAdminScope")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("DisableIpamAdminScope")) + .build(); + } + } + } + return getDisableIpamAdminScopeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest, + com.google.longrunning.Operation> + getCleanupIpamAdminScopeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CleanupIpamAdminScope", + requestType = com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest, + com.google.longrunning.Operation> + getCleanupIpamAdminScopeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest, + com.google.longrunning.Operation> + getCleanupIpamAdminScopeMethod; + if ((getCleanupIpamAdminScopeMethod = CloudNumberRegistryGrpc.getCleanupIpamAdminScopeMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getCleanupIpamAdminScopeMethod = + CloudNumberRegistryGrpc.getCleanupIpamAdminScopeMethod) + == null) { + CloudNumberRegistryGrpc.getCleanupIpamAdminScopeMethod = + getCleanupIpamAdminScopeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CleanupIpamAdminScope")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("CleanupIpamAdminScope")) + .build(); + } + } + } + return getCleanupIpamAdminScopeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest, + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse> + getListRegistryBooksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRegistryBooks", + requestType = com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest.class, + responseType = com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest, + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse> + getListRegistryBooksMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest, + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse> + getListRegistryBooksMethod; + if ((getListRegistryBooksMethod = CloudNumberRegistryGrpc.getListRegistryBooksMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getListRegistryBooksMethod = CloudNumberRegistryGrpc.getListRegistryBooksMethod) + == null) { + CloudNumberRegistryGrpc.getListRegistryBooksMethod = + getListRegistryBooksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRegistryBooks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("ListRegistryBooks")) + .build(); + } + } + } + return getListRegistryBooksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest, + com.google.cloud.numberregistry.v1alpha.RegistryBook> + getGetRegistryBookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRegistryBook", + requestType = com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest.class, + responseType = com.google.cloud.numberregistry.v1alpha.RegistryBook.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest, + com.google.cloud.numberregistry.v1alpha.RegistryBook> + getGetRegistryBookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest, + com.google.cloud.numberregistry.v1alpha.RegistryBook> + getGetRegistryBookMethod; + if ((getGetRegistryBookMethod = CloudNumberRegistryGrpc.getGetRegistryBookMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getGetRegistryBookMethod = CloudNumberRegistryGrpc.getGetRegistryBookMethod) == null) { + CloudNumberRegistryGrpc.getGetRegistryBookMethod = + getGetRegistryBookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRegistryBook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.RegistryBook + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("GetRegistryBook")) + .build(); + } + } + } + return getGetRegistryBookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse> + getSearchIpResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchIpResources", + requestType = com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.class, + responseType = com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse> + getSearchIpResourcesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse> + getSearchIpResourcesMethod; + if ((getSearchIpResourcesMethod = CloudNumberRegistryGrpc.getSearchIpResourcesMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getSearchIpResourcesMethod = CloudNumberRegistryGrpc.getSearchIpResourcesMethod) + == null) { + CloudNumberRegistryGrpc.getSearchIpResourcesMethod = + getSearchIpResourcesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchIpResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("SearchIpResources")) + .build(); + } + } + } + return getSearchIpResourcesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest, + com.google.longrunning.Operation> + getCreateRegistryBookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateRegistryBook", + requestType = com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest, + com.google.longrunning.Operation> + getCreateRegistryBookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest, + com.google.longrunning.Operation> + getCreateRegistryBookMethod; + if ((getCreateRegistryBookMethod = CloudNumberRegistryGrpc.getCreateRegistryBookMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getCreateRegistryBookMethod = CloudNumberRegistryGrpc.getCreateRegistryBookMethod) + == null) { + CloudNumberRegistryGrpc.getCreateRegistryBookMethod = + getCreateRegistryBookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateRegistryBook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("CreateRegistryBook")) + .build(); + } + } + } + return getCreateRegistryBookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest, + com.google.longrunning.Operation> + getUpdateRegistryBookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateRegistryBook", + requestType = com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest, + com.google.longrunning.Operation> + getUpdateRegistryBookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest, + com.google.longrunning.Operation> + getUpdateRegistryBookMethod; + if ((getUpdateRegistryBookMethod = CloudNumberRegistryGrpc.getUpdateRegistryBookMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getUpdateRegistryBookMethod = CloudNumberRegistryGrpc.getUpdateRegistryBookMethod) + == null) { + CloudNumberRegistryGrpc.getUpdateRegistryBookMethod = + getUpdateRegistryBookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateRegistryBook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("UpdateRegistryBook")) + .build(); + } + } + } + return getUpdateRegistryBookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest, + com.google.longrunning.Operation> + getDeleteRegistryBookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteRegistryBook", + requestType = com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest, + com.google.longrunning.Operation> + getDeleteRegistryBookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest, + com.google.longrunning.Operation> + getDeleteRegistryBookMethod; + if ((getDeleteRegistryBookMethod = CloudNumberRegistryGrpc.getDeleteRegistryBookMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getDeleteRegistryBookMethod = CloudNumberRegistryGrpc.getDeleteRegistryBookMethod) + == null) { + CloudNumberRegistryGrpc.getDeleteRegistryBookMethod = + getDeleteRegistryBookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteRegistryBook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("DeleteRegistryBook")) + .build(); + } + } + } + return getDeleteRegistryBookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest, + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse> + getListRealmsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRealms", + requestType = com.google.cloud.numberregistry.v1alpha.ListRealmsRequest.class, + responseType = com.google.cloud.numberregistry.v1alpha.ListRealmsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest, + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse> + getListRealmsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest, + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse> + getListRealmsMethod; + if ((getListRealmsMethod = CloudNumberRegistryGrpc.getListRealmsMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getListRealmsMethod = CloudNumberRegistryGrpc.getListRealmsMethod) == null) { + CloudNumberRegistryGrpc.getListRealmsMethod = + getListRealmsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRealms")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("ListRealms")) + .build(); + } + } + } + return getListRealmsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetRealmRequest, + com.google.cloud.numberregistry.v1alpha.Realm> + getGetRealmMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRealm", + requestType = com.google.cloud.numberregistry.v1alpha.GetRealmRequest.class, + responseType = com.google.cloud.numberregistry.v1alpha.Realm.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetRealmRequest, + com.google.cloud.numberregistry.v1alpha.Realm> + getGetRealmMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetRealmRequest, + com.google.cloud.numberregistry.v1alpha.Realm> + getGetRealmMethod; + if ((getGetRealmMethod = CloudNumberRegistryGrpc.getGetRealmMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getGetRealmMethod = CloudNumberRegistryGrpc.getGetRealmMethod) == null) { + CloudNumberRegistryGrpc.getGetRealmMethod = + getGetRealmMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRealm")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.GetRealmRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("GetRealm")) + .build(); + } + } + } + return getGetRealmMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest, + com.google.longrunning.Operation> + getCreateRealmMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateRealm", + requestType = com.google.cloud.numberregistry.v1alpha.CreateRealmRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest, + com.google.longrunning.Operation> + getCreateRealmMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest, + com.google.longrunning.Operation> + getCreateRealmMethod; + if ((getCreateRealmMethod = CloudNumberRegistryGrpc.getCreateRealmMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getCreateRealmMethod = CloudNumberRegistryGrpc.getCreateRealmMethod) == null) { + CloudNumberRegistryGrpc.getCreateRealmMethod = + getCreateRealmMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateRealm")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("CreateRealm")) + .build(); + } + } + } + return getCreateRealmMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest, + com.google.longrunning.Operation> + getUpdateRealmMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateRealm", + requestType = com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest, + com.google.longrunning.Operation> + getUpdateRealmMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest, + com.google.longrunning.Operation> + getUpdateRealmMethod; + if ((getUpdateRealmMethod = CloudNumberRegistryGrpc.getUpdateRealmMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getUpdateRealmMethod = CloudNumberRegistryGrpc.getUpdateRealmMethod) == null) { + CloudNumberRegistryGrpc.getUpdateRealmMethod = + getUpdateRealmMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateRealm")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("UpdateRealm")) + .build(); + } + } + } + return getUpdateRealmMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest, + com.google.longrunning.Operation> + getDeleteRealmMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteRealm", + requestType = com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest, + com.google.longrunning.Operation> + getDeleteRealmMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest, + com.google.longrunning.Operation> + getDeleteRealmMethod; + if ((getDeleteRealmMethod = CloudNumberRegistryGrpc.getDeleteRealmMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getDeleteRealmMethod = CloudNumberRegistryGrpc.getDeleteRealmMethod) == null) { + CloudNumberRegistryGrpc.getDeleteRealmMethod = + getDeleteRealmMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteRealm")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("DeleteRealm")) + .build(); + } + } + } + return getDeleteRealmMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest, + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse> + getListDiscoveredRangesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDiscoveredRanges", + requestType = com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest.class, + responseType = com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest, + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse> + getListDiscoveredRangesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest, + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse> + getListDiscoveredRangesMethod; + if ((getListDiscoveredRangesMethod = CloudNumberRegistryGrpc.getListDiscoveredRangesMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getListDiscoveredRangesMethod = CloudNumberRegistryGrpc.getListDiscoveredRangesMethod) + == null) { + CloudNumberRegistryGrpc.getListDiscoveredRangesMethod = + getListDiscoveredRangesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListDiscoveredRanges")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("ListDiscoveredRanges")) + .build(); + } + } + } + return getListDiscoveredRangesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange> + getGetDiscoveredRangeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDiscoveredRange", + requestType = com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest.class, + responseType = com.google.cloud.numberregistry.v1alpha.DiscoveredRange.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange> + getGetDiscoveredRangeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange> + getGetDiscoveredRangeMethod; + if ((getGetDiscoveredRangeMethod = CloudNumberRegistryGrpc.getGetDiscoveredRangeMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getGetDiscoveredRangeMethod = CloudNumberRegistryGrpc.getGetDiscoveredRangeMethod) + == null) { + CloudNumberRegistryGrpc.getGetDiscoveredRangeMethod = + getGetDiscoveredRangeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDiscoveredRange")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("GetDiscoveredRange")) + .build(); + } + } + } + return getGetDiscoveredRangeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest, + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse> + getFindDiscoveredRangeFreeIpRangesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FindDiscoveredRangeFreeIpRanges", + requestType = + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest.class, + responseType = + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest, + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse> + getFindDiscoveredRangeFreeIpRangesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest, + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse> + getFindDiscoveredRangeFreeIpRangesMethod; + if ((getFindDiscoveredRangeFreeIpRangesMethod = + CloudNumberRegistryGrpc.getFindDiscoveredRangeFreeIpRangesMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getFindDiscoveredRangeFreeIpRangesMethod = + CloudNumberRegistryGrpc.getFindDiscoveredRangeFreeIpRangesMethod) + == null) { + CloudNumberRegistryGrpc.getFindDiscoveredRangeFreeIpRangesMethod = + getFindDiscoveredRangeFreeIpRangesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "FindDiscoveredRangeFreeIpRanges")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha + .FindDiscoveredRangeFreeIpRangesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha + .FindDiscoveredRangeFreeIpRangesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier( + "FindDiscoveredRangeFreeIpRanges")) + .build(); + } + } + } + return getFindDiscoveredRangeFreeIpRangesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest, + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse> + getListCustomRangesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCustomRanges", + requestType = com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest.class, + responseType = com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest, + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse> + getListCustomRangesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest, + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse> + getListCustomRangesMethod; + if ((getListCustomRangesMethod = CloudNumberRegistryGrpc.getListCustomRangesMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getListCustomRangesMethod = CloudNumberRegistryGrpc.getListCustomRangesMethod) + == null) { + CloudNumberRegistryGrpc.getListCustomRangesMethod = + getListCustomRangesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListCustomRanges")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("ListCustomRanges")) + .build(); + } + } + } + return getListCustomRangesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest, + com.google.cloud.numberregistry.v1alpha.CustomRange> + getGetCustomRangeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCustomRange", + requestType = com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest.class, + responseType = com.google.cloud.numberregistry.v1alpha.CustomRange.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest, + com.google.cloud.numberregistry.v1alpha.CustomRange> + getGetCustomRangeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest, + com.google.cloud.numberregistry.v1alpha.CustomRange> + getGetCustomRangeMethod; + if ((getGetCustomRangeMethod = CloudNumberRegistryGrpc.getGetCustomRangeMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getGetCustomRangeMethod = CloudNumberRegistryGrpc.getGetCustomRangeMethod) == null) { + CloudNumberRegistryGrpc.getGetCustomRangeMethod = + getGetCustomRangeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCustomRange")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.CustomRange + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("GetCustomRange")) + .build(); + } + } + } + return getGetCustomRangeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest, + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse> + getShowCustomRangeUtilizationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ShowCustomRangeUtilization", + requestType = com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest.class, + responseType = + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest, + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse> + getShowCustomRangeUtilizationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest, + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse> + getShowCustomRangeUtilizationMethod; + if ((getShowCustomRangeUtilizationMethod = + CloudNumberRegistryGrpc.getShowCustomRangeUtilizationMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getShowCustomRangeUtilizationMethod = + CloudNumberRegistryGrpc.getShowCustomRangeUtilizationMethod) + == null) { + CloudNumberRegistryGrpc.getShowCustomRangeUtilizationMethod = + getShowCustomRangeUtilizationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ShowCustomRangeUtilization")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha + .ShowCustomRangeUtilizationRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha + .ShowCustomRangeUtilizationResponse.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier( + "ShowCustomRangeUtilization")) + .build(); + } + } + } + return getShowCustomRangeUtilizationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest, + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse> + getShowDiscoveredRangeUtilizationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ShowDiscoveredRangeUtilization", + requestType = + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest.class, + responseType = + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest, + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse> + getShowDiscoveredRangeUtilizationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest, + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse> + getShowDiscoveredRangeUtilizationMethod; + if ((getShowDiscoveredRangeUtilizationMethod = + CloudNumberRegistryGrpc.getShowDiscoveredRangeUtilizationMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getShowDiscoveredRangeUtilizationMethod = + CloudNumberRegistryGrpc.getShowDiscoveredRangeUtilizationMethod) + == null) { + CloudNumberRegistryGrpc.getShowDiscoveredRangeUtilizationMethod = + getShowDiscoveredRangeUtilizationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ShowDiscoveredRangeUtilization")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha + .ShowDiscoveredRangeUtilizationRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha + .ShowDiscoveredRangeUtilizationResponse.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier( + "ShowDiscoveredRangeUtilization")) + .build(); + } + } + } + return getShowDiscoveredRangeUtilizationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest, + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse> + getFindCustomRangeFreeIpRangesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FindCustomRangeFreeIpRanges", + requestType = + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest.class, + responseType = + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest, + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse> + getFindCustomRangeFreeIpRangesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest, + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse> + getFindCustomRangeFreeIpRangesMethod; + if ((getFindCustomRangeFreeIpRangesMethod = + CloudNumberRegistryGrpc.getFindCustomRangeFreeIpRangesMethod) + == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getFindCustomRangeFreeIpRangesMethod = + CloudNumberRegistryGrpc.getFindCustomRangeFreeIpRangesMethod) + == null) { + CloudNumberRegistryGrpc.getFindCustomRangeFreeIpRangesMethod = + getFindCustomRangeFreeIpRangesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "FindCustomRangeFreeIpRanges")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha + .FindCustomRangeFreeIpRangesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha + .FindCustomRangeFreeIpRangesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier( + "FindCustomRangeFreeIpRanges")) + .build(); + } + } + } + return getFindCustomRangeFreeIpRangesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest, + com.google.longrunning.Operation> + getCreateCustomRangeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCustomRange", + requestType = com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest, + com.google.longrunning.Operation> + getCreateCustomRangeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest, + com.google.longrunning.Operation> + getCreateCustomRangeMethod; + if ((getCreateCustomRangeMethod = CloudNumberRegistryGrpc.getCreateCustomRangeMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getCreateCustomRangeMethod = CloudNumberRegistryGrpc.getCreateCustomRangeMethod) + == null) { + CloudNumberRegistryGrpc.getCreateCustomRangeMethod = + getCreateCustomRangeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCustomRange")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("CreateCustomRange")) + .build(); + } + } + } + return getCreateCustomRangeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest, + com.google.longrunning.Operation> + getUpdateCustomRangeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCustomRange", + requestType = com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest, + com.google.longrunning.Operation> + getUpdateCustomRangeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest, + com.google.longrunning.Operation> + getUpdateCustomRangeMethod; + if ((getUpdateCustomRangeMethod = CloudNumberRegistryGrpc.getUpdateCustomRangeMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getUpdateCustomRangeMethod = CloudNumberRegistryGrpc.getUpdateCustomRangeMethod) + == null) { + CloudNumberRegistryGrpc.getUpdateCustomRangeMethod = + getUpdateCustomRangeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCustomRange")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("UpdateCustomRange")) + .build(); + } + } + } + return getUpdateCustomRangeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest, + com.google.longrunning.Operation> + getDeleteCustomRangeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCustomRange", + requestType = com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest, + com.google.longrunning.Operation> + getDeleteCustomRangeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest, + com.google.longrunning.Operation> + getDeleteCustomRangeMethod; + if ((getDeleteCustomRangeMethod = CloudNumberRegistryGrpc.getDeleteCustomRangeMethod) == null) { + synchronized (CloudNumberRegistryGrpc.class) { + if ((getDeleteCustomRangeMethod = CloudNumberRegistryGrpc.getDeleteCustomRangeMethod) + == null) { + CloudNumberRegistryGrpc.getDeleteCustomRangeMethod = + getDeleteCustomRangeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCustomRange")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudNumberRegistryMethodDescriptorSupplier("DeleteCustomRange")) + .build(); + } + } + } + return getDeleteCustomRangeMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static CloudNumberRegistryStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudNumberRegistryStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudNumberRegistryStub(channel, callOptions); + } + }; + return CloudNumberRegistryStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static CloudNumberRegistryBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudNumberRegistryBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudNumberRegistryBlockingV2Stub(channel, callOptions); + } + }; + return CloudNumberRegistryBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CloudNumberRegistryBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudNumberRegistryBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudNumberRegistryBlockingStub(channel, callOptions); + } + }; + return CloudNumberRegistryBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static CloudNumberRegistryFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudNumberRegistryFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudNumberRegistryFutureStub(channel, callOptions); + } + }; + return CloudNumberRegistryFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The Cloud Number Registry service manages IP address space visibility and
+   * tracking. It enables the discovery, organization, and monitoring of IP
+   * address ranges across different cloud infrastructure platforms.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists IpamAdminScopes in a given project and location.
+     * 
+ */ + default void listIpamAdminScopes( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListIpamAdminScopesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single IpamAdminScope.
+     * 
+ */ + default void getIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetIpamAdminScopeMethod(), responseObserver); + } + + /** + * + * + *
+     * Checks the availability of IpamAdminScopes in a given project and
+     * location.
+     * 
+ */ + default void checkAvailabilityIpamAdminScopes( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCheckAvailabilityIpamAdminScopesMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new IpamAdminScope in a given project and location.
+     * 
+ */ + default void createIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateIpamAdminScopeMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single IpamAdminScope.
+     * 
+ */ + default void updateIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateIpamAdminScopeMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single IpamAdminScope.
+     * 
+ */ + default void deleteIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteIpamAdminScopeMethod(), responseObserver); + } + + /** + * + * + *
+     * Disables a single IpamAdminScope.
+     * 
+ */ + default void disableIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDisableIpamAdminScopeMethod(), responseObserver); + } + + /** + * + * + *
+     * Cleans up a single IpamAdminScope.
+     * 
+ */ + default void cleanupIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCleanupIpamAdminScopeMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists RegistryBooks in a given project and location.
+     * 
+ */ + default void listRegistryBooks( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListRegistryBooksMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single RegistryBook.
+     * 
+ */ + default void getRegistryBook( + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetRegistryBookMethod(), responseObserver); + } + + /** + * + * + *
+     * Searches IP resources in a given RegistryBook.
+     * 
+ */ + default void searchIpResources( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchIpResourcesMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new RegistryBook in a given project and location.
+     * 
+ */ + default void createRegistryBook( + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateRegistryBookMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single RegistryBook.
+     * 
+ */ + default void updateRegistryBook( + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateRegistryBookMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single RegistryBook.
+     * 
+ */ + default void deleteRegistryBook( + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteRegistryBookMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Realms in a given project and location.
+     * 
+ */ + default void listRealms( + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListRealmsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Realm.
+     * 
+ */ + default void getRealm( + com.google.cloud.numberregistry.v1alpha.GetRealmRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRealmMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Realm in a given project and location.
+     * 
+ */ + default void createRealm( + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateRealmMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Realm.
+     * 
+ */ + default void updateRealm( + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateRealmMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Realm.
+     * 
+ */ + default void deleteRealm( + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteRealmMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists DiscoveredRanges in a given project and location.
+     * 
+ */ + default void listDiscoveredRanges( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDiscoveredRangesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single DiscoveredRange.
+     * 
+ */ + default void getDiscoveredRange( + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDiscoveredRangeMethod(), responseObserver); + } + + /** + * + * + *
+     * Finds free IP ranges in a single DiscoveredRange.
+     * 
+ */ + default void findDiscoveredRangeFreeIpRanges( + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFindDiscoveredRangeFreeIpRangesMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists CustomRanges in a given project and location.
+     * 
+ */ + default void listCustomRanges( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListCustomRangesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single CustomRange.
+     * 
+ */ + default void getCustomRange( + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetCustomRangeMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of a single CustomRange and its utilization.
+     * 
+ */ + default void showCustomRangeUtilization( + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getShowCustomRangeUtilizationMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of a single DiscoveredRange and its utilization.
+     * 
+ */ + default void showDiscoveredRangeUtilization( + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getShowDiscoveredRangeUtilizationMethod(), responseObserver); + } + + /** + * + * + *
+     * Finds free IP ranges in a single CustomRange.
+     * 
+ */ + default void findCustomRangeFreeIpRanges( + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFindCustomRangeFreeIpRangesMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new CustomRange in a given project and location.
+     * 
+ */ + default void createCustomRange( + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateCustomRangeMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single CustomRange.
+     * 
+ */ + default void updateCustomRange( + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateCustomRangeMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single CustomRange.
+     * 
+ */ + default void deleteCustomRange( + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteCustomRangeMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service CloudNumberRegistry. + * + *
+   * The Cloud Number Registry service manages IP address space visibility and
+   * tracking. It enables the discovery, organization, and monitoring of IP
+   * address ranges across different cloud infrastructure platforms.
+   * 
+ */ + public abstract static class CloudNumberRegistryImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return CloudNumberRegistryGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service CloudNumberRegistry. + * + *
+   * The Cloud Number Registry service manages IP address space visibility and
+   * tracking. It enables the discovery, organization, and monitoring of IP
+   * address ranges across different cloud infrastructure platforms.
+   * 
+ */ + public static final class CloudNumberRegistryStub + extends io.grpc.stub.AbstractAsyncStub { + private CloudNumberRegistryStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudNumberRegistryStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudNumberRegistryStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists IpamAdminScopes in a given project and location.
+     * 
+ */ + public void listIpamAdminScopes( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListIpamAdminScopesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single IpamAdminScope.
+     * 
+ */ + public void getIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIpamAdminScopeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Checks the availability of IpamAdminScopes in a given project and
+     * location.
+     * 
+ */ + public void checkAvailabilityIpamAdminScopes( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCheckAvailabilityIpamAdminScopesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new IpamAdminScope in a given project and location.
+     * 
+ */ + public void createIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateIpamAdminScopeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single IpamAdminScope.
+     * 
+ */ + public void updateIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateIpamAdminScopeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single IpamAdminScope.
+     * 
+ */ + public void deleteIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteIpamAdminScopeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Disables a single IpamAdminScope.
+     * 
+ */ + public void disableIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDisableIpamAdminScopeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Cleans up a single IpamAdminScope.
+     * 
+ */ + public void cleanupIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCleanupIpamAdminScopeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists RegistryBooks in a given project and location.
+     * 
+ */ + public void listRegistryBooks( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRegistryBooksMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single RegistryBook.
+     * 
+ */ + public void getRegistryBook( + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRegistryBookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Searches IP resources in a given RegistryBook.
+     * 
+ */ + public void searchIpResources( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchIpResourcesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new RegistryBook in a given project and location.
+     * 
+ */ + public void createRegistryBook( + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateRegistryBookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single RegistryBook.
+     * 
+ */ + public void updateRegistryBook( + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateRegistryBookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single RegistryBook.
+     * 
+ */ + public void deleteRegistryBook( + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteRegistryBookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Realms in a given project and location.
+     * 
+ */ + public void listRealms( + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRealmsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Realm.
+     * 
+ */ + public void getRealm( + com.google.cloud.numberregistry.v1alpha.GetRealmRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRealmMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Realm in a given project and location.
+     * 
+ */ + public void createRealm( + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateRealmMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Realm.
+     * 
+ */ + public void updateRealm( + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateRealmMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Realm.
+     * 
+ */ + public void deleteRealm( + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteRealmMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists DiscoveredRanges in a given project and location.
+     * 
+ */ + public void listDiscoveredRanges( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDiscoveredRangesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single DiscoveredRange.
+     * 
+ */ + public void getDiscoveredRange( + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDiscoveredRangeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Finds free IP ranges in a single DiscoveredRange.
+     * 
+ */ + public void findDiscoveredRangeFreeIpRanges( + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFindDiscoveredRangeFreeIpRangesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists CustomRanges in a given project and location.
+     * 
+ */ + public void listCustomRanges( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListCustomRangesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single CustomRange.
+     * 
+ */ + public void getCustomRange( + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetCustomRangeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of a single CustomRange and its utilization.
+     * 
+ */ + public void showCustomRangeUtilization( + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getShowCustomRangeUtilizationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of a single DiscoveredRange and its utilization.
+     * 
+ */ + public void showDiscoveredRangeUtilization( + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getShowDiscoveredRangeUtilizationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Finds free IP ranges in a single CustomRange.
+     * 
+ */ + public void findCustomRangeFreeIpRanges( + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFindCustomRangeFreeIpRangesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new CustomRange in a given project and location.
+     * 
+ */ + public void createCustomRange( + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateCustomRangeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single CustomRange.
+     * 
+ */ + public void updateCustomRange( + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateCustomRangeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single CustomRange.
+     * 
+ */ + public void deleteCustomRange( + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteCustomRangeMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service CloudNumberRegistry. + * + *
+   * The Cloud Number Registry service manages IP address space visibility and
+   * tracking. It enables the discovery, organization, and monitoring of IP
+   * address ranges across different cloud infrastructure platforms.
+   * 
+ */ + public static final class CloudNumberRegistryBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private CloudNumberRegistryBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudNumberRegistryBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudNumberRegistryBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Lists IpamAdminScopes in a given project and location.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse listIpamAdminScopes( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListIpamAdminScopesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single IpamAdminScope.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope getIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetIpamAdminScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Checks the availability of IpamAdminScopes in a given project and
+     * location.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + checkAvailabilityIpamAdminScopes( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCheckAvailabilityIpamAdminScopesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new IpamAdminScope in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateIpamAdminScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single IpamAdminScope.
+     * 
+ */ + public com.google.longrunning.Operation updateIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateIpamAdminScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single IpamAdminScope.
+     * 
+ */ + public com.google.longrunning.Operation deleteIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteIpamAdminScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Disables a single IpamAdminScope.
+     * 
+ */ + public com.google.longrunning.Operation disableIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDisableIpamAdminScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Cleans up a single IpamAdminScope.
+     * 
+ */ + public com.google.longrunning.Operation cleanupIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCleanupIpamAdminScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists RegistryBooks in a given project and location.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse listRegistryBooks( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListRegistryBooksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single RegistryBook.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.RegistryBook getRegistryBook( + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetRegistryBookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Searches IP resources in a given RegistryBook.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse searchIpResources( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getSearchIpResourcesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new RegistryBook in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createRegistryBook( + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateRegistryBookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single RegistryBook.
+     * 
+ */ + public com.google.longrunning.Operation updateRegistryBook( + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateRegistryBookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single RegistryBook.
+     * 
+ */ + public com.google.longrunning.Operation deleteRegistryBook( + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteRegistryBookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Realms in a given project and location.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ListRealmsResponse listRealms( + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListRealmsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Realm.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.Realm getRealm( + com.google.cloud.numberregistry.v1alpha.GetRealmRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetRealmMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Realm in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createRealm( + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateRealmMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Realm.
+     * 
+ */ + public com.google.longrunning.Operation updateRealm( + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateRealmMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Realm.
+     * 
+ */ + public com.google.longrunning.Operation deleteRealm( + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteRealmMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DiscoveredRanges in a given project and location.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse + listDiscoveredRanges( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListDiscoveredRangesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single DiscoveredRange.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange getDiscoveredRange( + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetDiscoveredRangeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Finds free IP ranges in a single DiscoveredRange.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + findDiscoveredRangeFreeIpRanges( + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getFindDiscoveredRangeFreeIpRangesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists CustomRanges in a given project and location.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse listCustomRanges( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListCustomRangesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single CustomRange.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange( + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetCustomRangeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a single CustomRange and its utilization.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + showCustomRangeUtilization( + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getShowCustomRangeUtilizationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a single DiscoveredRange and its utilization.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + showDiscoveredRangeUtilization( + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getShowDiscoveredRangeUtilizationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Finds free IP ranges in a single CustomRange.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + findCustomRangeFreeIpRanges( + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getFindCustomRangeFreeIpRangesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new CustomRange in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createCustomRange( + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateCustomRangeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single CustomRange.
+     * 
+ */ + public com.google.longrunning.Operation updateCustomRange( + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateCustomRangeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single CustomRange.
+     * 
+ */ + public com.google.longrunning.Operation deleteCustomRange( + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteCustomRangeMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service CloudNumberRegistry. + * + *
+   * The Cloud Number Registry service manages IP address space visibility and
+   * tracking. It enables the discovery, organization, and monitoring of IP
+   * address ranges across different cloud infrastructure platforms.
+   * 
+ */ + public static final class CloudNumberRegistryBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private CloudNumberRegistryBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudNumberRegistryBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudNumberRegistryBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists IpamAdminScopes in a given project and location.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse listIpamAdminScopes( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListIpamAdminScopesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single IpamAdminScope.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope getIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIpamAdminScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Checks the availability of IpamAdminScopes in a given project and
+     * location.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + checkAvailabilityIpamAdminScopes( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCheckAvailabilityIpamAdminScopesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new IpamAdminScope in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateIpamAdminScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single IpamAdminScope.
+     * 
+ */ + public com.google.longrunning.Operation updateIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateIpamAdminScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single IpamAdminScope.
+     * 
+ */ + public com.google.longrunning.Operation deleteIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteIpamAdminScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Disables a single IpamAdminScope.
+     * 
+ */ + public com.google.longrunning.Operation disableIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDisableIpamAdminScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Cleans up a single IpamAdminScope.
+     * 
+ */ + public com.google.longrunning.Operation cleanupIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCleanupIpamAdminScopeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists RegistryBooks in a given project and location.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse listRegistryBooks( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRegistryBooksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single RegistryBook.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.RegistryBook getRegistryBook( + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRegistryBookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Searches IP resources in a given RegistryBook.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse searchIpResources( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchIpResourcesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new RegistryBook in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createRegistryBook( + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateRegistryBookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single RegistryBook.
+     * 
+ */ + public com.google.longrunning.Operation updateRegistryBook( + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateRegistryBookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single RegistryBook.
+     * 
+ */ + public com.google.longrunning.Operation deleteRegistryBook( + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteRegistryBookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Realms in a given project and location.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ListRealmsResponse listRealms( + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRealmsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Realm.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.Realm getRealm( + com.google.cloud.numberregistry.v1alpha.GetRealmRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRealmMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Realm in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createRealm( + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateRealmMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Realm.
+     * 
+ */ + public com.google.longrunning.Operation updateRealm( + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateRealmMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Realm.
+     * 
+ */ + public com.google.longrunning.Operation deleteRealm( + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteRealmMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DiscoveredRanges in a given project and location.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse + listDiscoveredRanges( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDiscoveredRangesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single DiscoveredRange.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange getDiscoveredRange( + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDiscoveredRangeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Finds free IP ranges in a single DiscoveredRange.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + findDiscoveredRangeFreeIpRanges( + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFindDiscoveredRangeFreeIpRangesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists CustomRanges in a given project and location.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse listCustomRanges( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListCustomRangesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single CustomRange.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange( + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetCustomRangeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a single CustomRange and its utilization.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + showCustomRangeUtilization( + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getShowCustomRangeUtilizationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a single DiscoveredRange and its utilization.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + showDiscoveredRangeUtilization( + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getShowDiscoveredRangeUtilizationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Finds free IP ranges in a single CustomRange.
+     * 
+ */ + public com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + findCustomRangeFreeIpRanges( + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFindCustomRangeFreeIpRangesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new CustomRange in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createCustomRange( + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateCustomRangeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single CustomRange.
+     * 
+ */ + public com.google.longrunning.Operation updateCustomRange( + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateCustomRangeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single CustomRange.
+     * 
+ */ + public com.google.longrunning.Operation deleteCustomRange( + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteCustomRangeMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service CloudNumberRegistry. + * + *
+   * The Cloud Number Registry service manages IP address space visibility and
+   * tracking. It enables the discovery, organization, and monitoring of IP
+   * address ranges across different cloud infrastructure platforms.
+   * 
+ */ + public static final class CloudNumberRegistryFutureStub + extends io.grpc.stub.AbstractFutureStub { + private CloudNumberRegistryFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudNumberRegistryFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudNumberRegistryFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists IpamAdminScopes in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse> + listIpamAdminScopes( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListIpamAdminScopesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single IpamAdminScope.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope> + getIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIpamAdminScopeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Checks the availability of IpamAdminScopes in a given project and
+     * location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse> + checkAvailabilityIpamAdminScopes( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCheckAvailabilityIpamAdminScopesMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Creates a new IpamAdminScope in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateIpamAdminScopeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single IpamAdminScope.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateIpamAdminScopeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single IpamAdminScope.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteIpamAdminScopeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Disables a single IpamAdminScope.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + disableIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDisableIpamAdminScopeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Cleans up a single IpamAdminScope.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + cleanupIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCleanupIpamAdminScopeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists RegistryBooks in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse> + listRegistryBooks( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRegistryBooksMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single RegistryBook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.RegistryBook> + getRegistryBook(com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRegistryBookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Searches IP resources in a given RegistryBook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse> + searchIpResources( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchIpResourcesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new RegistryBook in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createRegistryBook( + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateRegistryBookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single RegistryBook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateRegistryBook( + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateRegistryBookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single RegistryBook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteRegistryBook( + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteRegistryBookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Realms in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse> + listRealms(com.google.cloud.numberregistry.v1alpha.ListRealmsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRealmsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Realm.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.Realm> + getRealm(com.google.cloud.numberregistry.v1alpha.GetRealmRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRealmMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Realm in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createRealm(com.google.cloud.numberregistry.v1alpha.CreateRealmRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateRealmMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Realm.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateRealm(com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateRealmMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Realm.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteRealm(com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteRealmMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists DiscoveredRanges in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse> + listDiscoveredRanges( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDiscoveredRangesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single DiscoveredRange.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.DiscoveredRange> + getDiscoveredRange( + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDiscoveredRangeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Finds free IP ranges in a single DiscoveredRange.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse> + findDiscoveredRangeFreeIpRanges( + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFindDiscoveredRangeFreeIpRangesMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Lists CustomRanges in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse> + listCustomRanges(com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListCustomRangesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single CustomRange.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.CustomRange> + getCustomRange(com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetCustomRangeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of a single CustomRange and its utilization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse> + showCustomRangeUtilization( + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getShowCustomRangeUtilizationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of a single DiscoveredRange and its utilization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse> + showDiscoveredRangeUtilization( + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getShowDiscoveredRangeUtilizationMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Finds free IP ranges in a single CustomRange.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse> + findCustomRangeFreeIpRanges( + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFindCustomRangeFreeIpRangesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new CustomRange in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createCustomRange( + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateCustomRangeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single CustomRange.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateCustomRange( + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateCustomRangeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single CustomRange.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteCustomRange( + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteCustomRangeMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_IPAM_ADMIN_SCOPES = 0; + private static final int METHODID_GET_IPAM_ADMIN_SCOPE = 1; + private static final int METHODID_CHECK_AVAILABILITY_IPAM_ADMIN_SCOPES = 2; + private static final int METHODID_CREATE_IPAM_ADMIN_SCOPE = 3; + private static final int METHODID_UPDATE_IPAM_ADMIN_SCOPE = 4; + private static final int METHODID_DELETE_IPAM_ADMIN_SCOPE = 5; + private static final int METHODID_DISABLE_IPAM_ADMIN_SCOPE = 6; + private static final int METHODID_CLEANUP_IPAM_ADMIN_SCOPE = 7; + private static final int METHODID_LIST_REGISTRY_BOOKS = 8; + private static final int METHODID_GET_REGISTRY_BOOK = 9; + private static final int METHODID_SEARCH_IP_RESOURCES = 10; + private static final int METHODID_CREATE_REGISTRY_BOOK = 11; + private static final int METHODID_UPDATE_REGISTRY_BOOK = 12; + private static final int METHODID_DELETE_REGISTRY_BOOK = 13; + private static final int METHODID_LIST_REALMS = 14; + private static final int METHODID_GET_REALM = 15; + private static final int METHODID_CREATE_REALM = 16; + private static final int METHODID_UPDATE_REALM = 17; + private static final int METHODID_DELETE_REALM = 18; + private static final int METHODID_LIST_DISCOVERED_RANGES = 19; + private static final int METHODID_GET_DISCOVERED_RANGE = 20; + private static final int METHODID_FIND_DISCOVERED_RANGE_FREE_IP_RANGES = 21; + private static final int METHODID_LIST_CUSTOM_RANGES = 22; + private static final int METHODID_GET_CUSTOM_RANGE = 23; + private static final int METHODID_SHOW_CUSTOM_RANGE_UTILIZATION = 24; + private static final int METHODID_SHOW_DISCOVERED_RANGE_UTILIZATION = 25; + private static final int METHODID_FIND_CUSTOM_RANGE_FREE_IP_RANGES = 26; + private static final int METHODID_CREATE_CUSTOM_RANGE = 27; + private static final int METHODID_UPDATE_CUSTOM_RANGE = 28; + private static final int METHODID_DELETE_CUSTOM_RANGE = 29; + + 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_LIST_IPAM_ADMIN_SCOPES: + serviceImpl.listIpamAdminScopes( + (com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse>) + responseObserver); + break; + case METHODID_GET_IPAM_ADMIN_SCOPE: + serviceImpl.getIpamAdminScope( + (com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CHECK_AVAILABILITY_IPAM_ADMIN_SCOPES: + serviceImpl.checkAvailabilityIpamAdminScopes( + (com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha + .CheckAvailabilityIpamAdminScopesResponse>) + responseObserver); + break; + case METHODID_CREATE_IPAM_ADMIN_SCOPE: + serviceImpl.createIpamAdminScope( + (com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_IPAM_ADMIN_SCOPE: + serviceImpl.updateIpamAdminScope( + (com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_IPAM_ADMIN_SCOPE: + serviceImpl.deleteIpamAdminScope( + (com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DISABLE_IPAM_ADMIN_SCOPE: + serviceImpl.disableIpamAdminScope( + (com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CLEANUP_IPAM_ADMIN_SCOPE: + serviceImpl.cleanupIpamAdminScope( + (com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_REGISTRY_BOOKS: + serviceImpl.listRegistryBooks( + (com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse>) + responseObserver); + break; + case METHODID_GET_REGISTRY_BOOK: + serviceImpl.getRegistryBook( + (com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_SEARCH_IP_RESOURCES: + serviceImpl.searchIpResources( + (com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse>) + responseObserver); + break; + case METHODID_CREATE_REGISTRY_BOOK: + serviceImpl.createRegistryBook( + (com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_REGISTRY_BOOK: + serviceImpl.updateRegistryBook( + (com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_REGISTRY_BOOK: + serviceImpl.deleteRegistryBook( + (com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_REALMS: + serviceImpl.listRealms( + (com.google.cloud.numberregistry.v1alpha.ListRealmsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse>) + responseObserver); + break; + case METHODID_GET_REALM: + serviceImpl.getRealm( + (com.google.cloud.numberregistry.v1alpha.GetRealmRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_REALM: + serviceImpl.createRealm( + (com.google.cloud.numberregistry.v1alpha.CreateRealmRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_REALM: + serviceImpl.updateRealm( + (com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_REALM: + serviceImpl.deleteRealm( + (com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DISCOVERED_RANGES: + serviceImpl.listDiscoveredRanges( + (com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse>) + responseObserver); + break; + case METHODID_GET_DISCOVERED_RANGE: + serviceImpl.getDiscoveredRange( + (com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_FIND_DISCOVERED_RANGE_FREE_IP_RANGES: + serviceImpl.findDiscoveredRangeFreeIpRanges( + (com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha + .FindDiscoveredRangeFreeIpRangesResponse>) + responseObserver); + break; + case METHODID_LIST_CUSTOM_RANGES: + serviceImpl.listCustomRanges( + (com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse>) + responseObserver); + break; + case METHODID_GET_CUSTOM_RANGE: + serviceImpl.getCustomRange( + (com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_SHOW_CUSTOM_RANGE_UTILIZATION: + serviceImpl.showCustomRangeUtilization( + (com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse>) + responseObserver); + break; + case METHODID_SHOW_DISCOVERED_RANGE_UTILIZATION: + serviceImpl.showDiscoveredRangeUtilization( + (com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha + .ShowDiscoveredRangeUtilizationResponse>) + responseObserver); + break; + case METHODID_FIND_CUSTOM_RANGE_FREE_IP_RANGES: + serviceImpl.findCustomRangeFreeIpRanges( + (com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse>) + responseObserver); + break; + case METHODID_CREATE_CUSTOM_RANGE: + serviceImpl.createCustomRange( + (com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CUSTOM_RANGE: + serviceImpl.updateCustomRange( + (com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_CUSTOM_RANGE: + serviceImpl.deleteCustomRange( + (com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest) request, + (io.grpc.stub.StreamObserver) 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( + getListIpamAdminScopesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest, + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse>( + service, METHODID_LIST_IPAM_ADMIN_SCOPES))) + .addMethod( + getGetIpamAdminScopeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope>( + service, METHODID_GET_IPAM_ADMIN_SCOPE))) + .addMethod( + getCheckAvailabilityIpamAdminScopesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest, + com.google.cloud.numberregistry.v1alpha + .CheckAvailabilityIpamAdminScopesResponse>( + service, METHODID_CHECK_AVAILABILITY_IPAM_ADMIN_SCOPES))) + .addMethod( + getCreateIpamAdminScopeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_IPAM_ADMIN_SCOPE))) + .addMethod( + getUpdateIpamAdminScopeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_IPAM_ADMIN_SCOPE))) + .addMethod( + getDeleteIpamAdminScopeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_IPAM_ADMIN_SCOPE))) + .addMethod( + getDisableIpamAdminScopeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest, + com.google.longrunning.Operation>(service, METHODID_DISABLE_IPAM_ADMIN_SCOPE))) + .addMethod( + getCleanupIpamAdminScopeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest, + com.google.longrunning.Operation>(service, METHODID_CLEANUP_IPAM_ADMIN_SCOPE))) + .addMethod( + getListRegistryBooksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest, + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse>( + service, METHODID_LIST_REGISTRY_BOOKS))) + .addMethod( + getGetRegistryBookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest, + com.google.cloud.numberregistry.v1alpha.RegistryBook>( + service, METHODID_GET_REGISTRY_BOOK))) + .addMethod( + getSearchIpResourcesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse>( + service, METHODID_SEARCH_IP_RESOURCES))) + .addMethod( + getCreateRegistryBookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_REGISTRY_BOOK))) + .addMethod( + getUpdateRegistryBookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_REGISTRY_BOOK))) + .addMethod( + getDeleteRegistryBookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_REGISTRY_BOOK))) + .addMethod( + getListRealmsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest, + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse>( + service, METHODID_LIST_REALMS))) + .addMethod( + getGetRealmMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.GetRealmRequest, + com.google.cloud.numberregistry.v1alpha.Realm>(service, METHODID_GET_REALM))) + .addMethod( + getCreateRealmMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_REALM))) + .addMethod( + getUpdateRealmMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_REALM))) + .addMethod( + getDeleteRealmMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_REALM))) + .addMethod( + getListDiscoveredRangesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest, + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse>( + service, METHODID_LIST_DISCOVERED_RANGES))) + .addMethod( + getGetDiscoveredRangeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange>( + service, METHODID_GET_DISCOVERED_RANGE))) + .addMethod( + getFindDiscoveredRangeFreeIpRangesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest, + com.google.cloud.numberregistry.v1alpha + .FindDiscoveredRangeFreeIpRangesResponse>( + service, METHODID_FIND_DISCOVERED_RANGE_FREE_IP_RANGES))) + .addMethod( + getListCustomRangesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest, + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse>( + service, METHODID_LIST_CUSTOM_RANGES))) + .addMethod( + getGetCustomRangeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest, + com.google.cloud.numberregistry.v1alpha.CustomRange>( + service, METHODID_GET_CUSTOM_RANGE))) + .addMethod( + getShowCustomRangeUtilizationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest, + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse>( + service, METHODID_SHOW_CUSTOM_RANGE_UTILIZATION))) + .addMethod( + getShowDiscoveredRangeUtilizationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest, + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse>( + service, METHODID_SHOW_DISCOVERED_RANGE_UTILIZATION))) + .addMethod( + getFindCustomRangeFreeIpRangesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest, + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse>( + service, METHODID_FIND_CUSTOM_RANGE_FREE_IP_RANGES))) + .addMethod( + getCreateCustomRangeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_CUSTOM_RANGE))) + .addMethod( + getUpdateCustomRangeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_CUSTOM_RANGE))) + .addMethod( + getDeleteCustomRangeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_CUSTOM_RANGE))) + .build(); + } + + private abstract static class CloudNumberRegistryBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CloudNumberRegistryBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.numberregistry.v1alpha.ServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("CloudNumberRegistry"); + } + } + + private static final class CloudNumberRegistryFileDescriptorSupplier + extends CloudNumberRegistryBaseDescriptorSupplier { + CloudNumberRegistryFileDescriptorSupplier() {} + } + + private static final class CloudNumberRegistryMethodDescriptorSupplier + extends CloudNumberRegistryBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + CloudNumberRegistryMethodDescriptorSupplier(java.lang.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 (CloudNumberRegistryGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new CloudNumberRegistryFileDescriptorSupplier()) + .addMethod(getListIpamAdminScopesMethod()) + .addMethod(getGetIpamAdminScopeMethod()) + .addMethod(getCheckAvailabilityIpamAdminScopesMethod()) + .addMethod(getCreateIpamAdminScopeMethod()) + .addMethod(getUpdateIpamAdminScopeMethod()) + .addMethod(getDeleteIpamAdminScopeMethod()) + .addMethod(getDisableIpamAdminScopeMethod()) + .addMethod(getCleanupIpamAdminScopeMethod()) + .addMethod(getListRegistryBooksMethod()) + .addMethod(getGetRegistryBookMethod()) + .addMethod(getSearchIpResourcesMethod()) + .addMethod(getCreateRegistryBookMethod()) + .addMethod(getUpdateRegistryBookMethod()) + .addMethod(getDeleteRegistryBookMethod()) + .addMethod(getListRealmsMethod()) + .addMethod(getGetRealmMethod()) + .addMethod(getCreateRealmMethod()) + .addMethod(getUpdateRealmMethod()) + .addMethod(getDeleteRealmMethod()) + .addMethod(getListDiscoveredRangesMethod()) + .addMethod(getGetDiscoveredRangeMethod()) + .addMethod(getFindDiscoveredRangeFreeIpRangesMethod()) + .addMethod(getListCustomRangesMethod()) + .addMethod(getGetCustomRangeMethod()) + .addMethod(getShowCustomRangeUtilizationMethod()) + .addMethod(getShowDiscoveredRangeUtilizationMethod()) + .addMethod(getFindCustomRangeFreeIpRangesMethod()) + .addMethod(getCreateCustomRangeMethod()) + .addMethod(getUpdateCustomRangeMethod()) + .addMethod(getDeleteCustomRangeMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-numberregistry/owlbot.py b/java-numberregistry/owlbot.py new file mode 100755 index 000000000000..5caf2fc427bc --- /dev/null +++ b/java-numberregistry/owlbot.py @@ -0,0 +1,38 @@ +# Copyright 2026 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. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates( + monorepo=True, + excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore" +]) diff --git a/java-numberregistry/pom.xml b/java-numberregistry/pom.xml new file mode 100644 index 000000000000..dc623b492e78 --- /dev/null +++ b/java-numberregistry/pom.xml @@ -0,0 +1,58 @@ + + + 4.0.0 + com.google.cloud + google-cloud-numberregistry-parent + pom + 0.1.0-SNAPSHOT + Google Cloud Number Registry Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.87.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-numberregistry-parent + + + + + + + com.google.cloud + google-cloud-numberregistry + 0.1.0-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-numberregistry-v1alpha + 0.1.0-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-numberregistry-v1alpha + 0.1.0-SNAPSHOT + + + + + + + + google-cloud-numberregistry + grpc-google-cloud-numberregistry-v1alpha + proto-google-cloud-numberregistry-v1alpha + + google-cloud-numberregistry-bom + + + \ No newline at end of file diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/clirr-ignored-differences.xml b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/clirr-ignored-differences.xml new file mode 100644 index 000000000000..cf365ed96022 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/cloud/numberregistry/v1alpha/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/numberregistry/v1alpha/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/numberregistry/v1alpha/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/cloud/numberregistry/v1alpha/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/cloud/numberregistry/v1alpha/** + * addRepeatedField(*) + ** + + + 7006 + com/google/cloud/numberregistry/v1alpha/** + * clear() + ** + + + 7006 + com/google/cloud/numberregistry/v1alpha/** + * clearField(*) + ** + + + 7006 + com/google/cloud/numberregistry/v1alpha/** + * clearOneof(*) + ** + + + 7006 + com/google/cloud/numberregistry/v1alpha/** + * clone() + ** + + + 7006 + com/google/cloud/numberregistry/v1alpha/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/cloud/numberregistry/v1alpha/** + * setField(*) + ** + + + 7006 + com/google/cloud/numberregistry/v1alpha/** + * setRepeatedField(*) + ** + + + 7006 + com/google/cloud/numberregistry/v1alpha/** + * setUnknownFields(*) + ** + + diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/pom.xml b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/pom.xml new file mode 100644 index 000000000000..905aede6d61f --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-numberregistry-v1alpha + 0.1.0-SNAPSHOT + proto-google-cloud-numberregistry-v1alpha + Proto library for google-cloud-numberregistry + + com.google.cloud + google-cloud-numberregistry-parent + 0.1.0-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/Attribute.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/Attribute.java new file mode 100644 index 000000000000..2c6f011e5ed4 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/Attribute.java @@ -0,0 +1,785 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * A key-value pair representing a custom attribute associated with a resource.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.Attribute} + */ +@com.google.protobuf.Generated +public final class Attribute extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.Attribute) + AttributeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Attribute"); + } + + // Use Attribute.newBuilder() to construct. + private Attribute(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Attribute() { + key_ = ""; + value_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Attribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Attribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.Attribute.class, + com.google.cloud.numberregistry.v1alpha.Attribute.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + + /** + * + * + *
+   * Required. The key of the attribute.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The key of the attribute.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + + /** + * + * + *
+   * Required. The value of the attribute.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The value of the attribute.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = 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.GeneratedMessage.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, value_); + } + 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.numberregistry.v1alpha.Attribute)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.Attribute other = + (com.google.cloud.numberregistry.v1alpha.Attribute) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getValue().equals(other.getValue())) 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) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.Attribute parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.Attribute 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.numberregistry.v1alpha.Attribute parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.Attribute 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.numberregistry.v1alpha.Attribute parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.Attribute parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.Attribute parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.Attribute parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.Attribute parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.Attribute parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.Attribute parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.Attribute parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.Attribute 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A key-value pair representing a custom attribute associated with a resource.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.Attribute} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.Attribute) + com.google.cloud.numberregistry.v1alpha.AttributeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Attribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Attribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.Attribute.class, + com.google.cloud.numberregistry.v1alpha.Attribute.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.Attribute.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + value_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Attribute_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Attribute getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.Attribute.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Attribute build() { + com.google.cloud.numberregistry.v1alpha.Attribute result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Attribute buildPartial() { + com.google.cloud.numberregistry.v1alpha.Attribute result = + new com.google.cloud.numberregistry.v1alpha.Attribute(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.Attribute result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.Attribute) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.Attribute) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.Attribute other) { + if (other == com.google.cloud.numberregistry.v1alpha.Attribute.getDefaultInstance()) + return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + 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: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + value_ = 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.lang.Object key_ = ""; + + /** + * + * + *
+     * Required. The key of the attribute.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The key of the attribute.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The key of the attribute.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The key of the attribute.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The key of the attribute.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + + /** + * + * + *
+     * Required. The value of the attribute.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The value of the attribute.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The value of the attribute.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The value of the attribute.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The value of the attribute.
+     * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.Attribute) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.Attribute) + private static final com.google.cloud.numberregistry.v1alpha.Attribute DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.Attribute(); + } + + public static com.google.cloud.numberregistry.v1alpha.Attribute getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Attribute 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.numberregistry.v1alpha.Attribute getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/AttributeOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/AttributeOrBuilder.java new file mode 100644 index 000000000000..242b18d684aa --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/AttributeOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface AttributeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.Attribute) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The key of the attribute.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + java.lang.String getKey(); + + /** + * + * + *
+   * Required. The key of the attribute.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+   * Required. The value of the attribute.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + java.lang.String getValue(); + + /** + * + * + *
+   * Required. The value of the attribute.
+   * 
+ * + * string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesRequest.java new file mode 100644 index 000000000000..07b42a5db81a --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesRequest.java @@ -0,0 +1,935 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.CheckAvailabilityIpamAdminScopes][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CheckAvailabilityIpamAdminScopes]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest} + */ +@com.google.protobuf.Generated +public final class CheckAvailabilityIpamAdminScopesRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest) + CheckAvailabilityIpamAdminScopesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CheckAvailabilityIpamAdminScopesRequest"); + } + + // Use CheckAvailabilityIpamAdminScopesRequest.newBuilder() to construct. + private CheckAvailabilityIpamAdminScopesRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CheckAvailabilityIpamAdminScopesRequest() { + parent_ = ""; + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest.class, + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * 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 SCOPES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Required. The administrative scopes to check for availability.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + return scopes_; + } + + /** + * + * + *
+   * Required. The administrative scopes to check for availability.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+   * Required. The administrative scopes to check for availability.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+   * Required. The administrative scopes to check for availability.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + + 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + for (int i = 0; i < scopes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, scopes_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + { + int dataSize = 0; + for (int i = 0; i < scopes_.size(); i++) { + dataSize += computeStringSizeNoTag(scopes_.getRaw(i)); + } + size += dataSize; + size += 1 * getScopesList().size(); + } + 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.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest other = + (com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getScopesList().equals(other.getScopesList())) 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 (getScopesCount() > 0) { + hash = (37 * hash) + SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getScopesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + 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.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + 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.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.CheckAvailabilityIpamAdminScopes][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CheckAvailabilityIpamAdminScopes]
+   * method.
+   * 
+ * + * Protobuf type {@code + * google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest) + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest.class, + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest build() { + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + buildPartial() { + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest result = + new com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + scopes_.makeImmutable(); + result.scopes_ = scopes_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.scopes_.isEmpty()) { + if (scopes_.isEmpty()) { + scopes_ = other.scopes_; + bitField0_ |= 0x00000002; + } else { + ensureScopesIsMutable(); + scopes_.addAll(other.scopes_); + } + 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 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopesIsMutable(); + scopes_.add(s); + 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.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureScopesIsMutable() { + if (!scopes_.isModifiable()) { + scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Required. The administrative scopes to check for availability.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + scopes_.makeImmutable(); + return scopes_; + } + + /** + * + * + *
+     * Required. The administrative scopes to check for availability.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+     * Required. The administrative scopes to check for availability.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+     * Required. The administrative scopes to check for availability.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + + /** + * + * + *
+     * Required. The administrative scopes to check for availability.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The scopes to set. + * @return This builder for chaining. + */ + public Builder setScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The administrative scopes to check for availability.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The scopes to add. + * @return This builder for chaining. + */ + public Builder addScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The administrative scopes to check for availability.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The scopes to add. + * @return This builder for chaining. + */ + public Builder addAllScopes(java.lang.Iterable values) { + ensureScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scopes_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The administrative scopes to check for availability.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearScopes() { + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The administrative scopes to check for availability.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the scopes to add. + * @return This builder for chaining. + */ + public Builder addScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest) + private static final com.google.cloud.numberregistry.v1alpha + .CheckAvailabilityIpamAdminScopesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckAvailabilityIpamAdminScopesRequest 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.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesRequestOrBuilder.java new file mode 100644 index 000000000000..9042c8b16f40 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesRequestOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface CheckAvailabilityIpamAdminScopesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The administrative scopes to check for availability.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the scopes. + */ + java.util.List getScopesList(); + + /** + * + * + *
+   * Required. The administrative scopes to check for availability.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of scopes. + */ + int getScopesCount(); + + /** + * + * + *
+   * Required. The administrative scopes to check for availability.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + java.lang.String getScopes(int index); + + /** + * + * + *
+   * Required. The administrative scopes to check for availability.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + com.google.protobuf.ByteString getScopesBytes(int index); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesResponse.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesResponse.java new file mode 100644 index 000000000000..f7ef9eb4fb29 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesResponse.java @@ -0,0 +1,1044 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Response message for the
+ * [CloudNumberRegistry.CheckAvailabilityIpamAdminScopes][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CheckAvailabilityIpamAdminScopes]
+ * method.
+ * 
+ * + * Protobuf type {@code + * google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse} + */ +@com.google.protobuf.Generated +public final class CheckAvailabilityIpamAdminScopesResponse + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse) + CheckAvailabilityIpamAdminScopesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CheckAvailabilityIpamAdminScopesResponse"); + } + + // Use CheckAvailabilityIpamAdminScopesResponse.newBuilder() to construct. + private CheckAvailabilityIpamAdminScopesResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CheckAvailabilityIpamAdminScopesResponse() { + scopeAvailabilities_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse.class, + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse.Builder + .class); + } + + public static final int SCOPE_AVAILABILITIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + scopeAvailabilities_; + + /** + * + * + *
+   * The details of the requested scopes.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + @java.lang.Override + public java.util.List + getScopeAvailabilitiesList() { + return scopeAvailabilities_; + } + + /** + * + * + *
+   * The details of the requested scopes.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailabilityOrBuilder> + getScopeAvailabilitiesOrBuilderList() { + return scopeAvailabilities_; + } + + /** + * + * + *
+   * The details of the requested scopes.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + @java.lang.Override + public int getScopeAvailabilitiesCount() { + return scopeAvailabilities_.size(); + } + + /** + * + * + *
+   * The details of the requested scopes.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability getScopeAvailabilities( + int index) { + return scopeAvailabilities_.get(index); + } + + /** + * + * + *
+   * The details of the requested scopes.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailabilityOrBuilder + getScopeAvailabilitiesOrBuilder(int index) { + return scopeAvailabilities_.get(index); + } + + 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 < scopeAvailabilities_.size(); i++) { + output.writeMessage(1, scopeAvailabilities_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < scopeAvailabilities_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, scopeAvailabilities_.get(i)); + } + 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.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse other = + (com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse) obj; + + if (!getScopeAvailabilitiesList().equals(other.getScopeAvailabilitiesList())) 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 (getScopeAvailabilitiesCount() > 0) { + hash = (37 * hash) + SCOPE_AVAILABILITIES_FIELD_NUMBER; + hash = (53 * hash) + getScopeAvailabilitiesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + 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.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + 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.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for the
+   * [CloudNumberRegistry.CheckAvailabilityIpamAdminScopes][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CheckAvailabilityIpamAdminScopes]
+   * method.
+   * 
+ * + * Protobuf type {@code + * google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse) + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + .class, + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (scopeAvailabilitiesBuilder_ == null) { + scopeAvailabilities_ = java.util.Collections.emptyList(); + } else { + scopeAvailabilities_ = null; + scopeAvailabilitiesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + build() { + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + buildPartial() { + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse result = + new com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse result) { + if (scopeAvailabilitiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + scopeAvailabilities_ = java.util.Collections.unmodifiableList(scopeAvailabilities_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.scopeAvailabilities_ = scopeAvailabilities_; + } else { + result.scopeAvailabilities_ = scopeAvailabilitiesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse other) { + if (other + == com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + .getDefaultInstance()) return this; + if (scopeAvailabilitiesBuilder_ == null) { + if (!other.scopeAvailabilities_.isEmpty()) { + if (scopeAvailabilities_.isEmpty()) { + scopeAvailabilities_ = other.scopeAvailabilities_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureScopeAvailabilitiesIsMutable(); + scopeAvailabilities_.addAll(other.scopeAvailabilities_); + } + onChanged(); + } + } else { + if (!other.scopeAvailabilities_.isEmpty()) { + if (scopeAvailabilitiesBuilder_.isEmpty()) { + scopeAvailabilitiesBuilder_.dispose(); + scopeAvailabilitiesBuilder_ = null; + scopeAvailabilities_ = other.scopeAvailabilities_; + bitField0_ = (bitField0_ & ~0x00000001); + scopeAvailabilitiesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetScopeAvailabilitiesFieldBuilder() + : null; + } else { + scopeAvailabilitiesBuilder_.addAllMessages(other.scopeAvailabilities_); + } + } + } + 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.numberregistry.v1alpha.IpamAdminScopeAvailability m = + input.readMessage( + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.parser(), + extensionRegistry); + if (scopeAvailabilitiesBuilder_ == null) { + ensureScopeAvailabilitiesIsMutable(); + scopeAvailabilities_.add(m); + } else { + scopeAvailabilitiesBuilder_.addMessage(m); + } + 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.util.List + scopeAvailabilities_ = java.util.Collections.emptyList(); + + private void ensureScopeAvailabilitiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + scopeAvailabilities_ = + new java.util.ArrayList< + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability>( + scopeAvailabilities_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Builder, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailabilityOrBuilder> + scopeAvailabilitiesBuilder_; + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public java.util.List + getScopeAvailabilitiesList() { + if (scopeAvailabilitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(scopeAvailabilities_); + } else { + return scopeAvailabilitiesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public int getScopeAvailabilitiesCount() { + if (scopeAvailabilitiesBuilder_ == null) { + return scopeAvailabilities_.size(); + } else { + return scopeAvailabilitiesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability + getScopeAvailabilities(int index) { + if (scopeAvailabilitiesBuilder_ == null) { + return scopeAvailabilities_.get(index); + } else { + return scopeAvailabilitiesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public Builder setScopeAvailabilities( + int index, com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability value) { + if (scopeAvailabilitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopeAvailabilitiesIsMutable(); + scopeAvailabilities_.set(index, value); + onChanged(); + } else { + scopeAvailabilitiesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public Builder setScopeAvailabilities( + int index, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Builder + builderForValue) { + if (scopeAvailabilitiesBuilder_ == null) { + ensureScopeAvailabilitiesIsMutable(); + scopeAvailabilities_.set(index, builderForValue.build()); + onChanged(); + } else { + scopeAvailabilitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public Builder addScopeAvailabilities( + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability value) { + if (scopeAvailabilitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopeAvailabilitiesIsMutable(); + scopeAvailabilities_.add(value); + onChanged(); + } else { + scopeAvailabilitiesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public Builder addScopeAvailabilities( + int index, com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability value) { + if (scopeAvailabilitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopeAvailabilitiesIsMutable(); + scopeAvailabilities_.add(index, value); + onChanged(); + } else { + scopeAvailabilitiesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public Builder addScopeAvailabilities( + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Builder + builderForValue) { + if (scopeAvailabilitiesBuilder_ == null) { + ensureScopeAvailabilitiesIsMutable(); + scopeAvailabilities_.add(builderForValue.build()); + onChanged(); + } else { + scopeAvailabilitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public Builder addScopeAvailabilities( + int index, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Builder + builderForValue) { + if (scopeAvailabilitiesBuilder_ == null) { + ensureScopeAvailabilitiesIsMutable(); + scopeAvailabilities_.add(index, builderForValue.build()); + onChanged(); + } else { + scopeAvailabilitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public Builder addAllScopeAvailabilities( + java.lang.Iterable< + ? extends com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability> + values) { + if (scopeAvailabilitiesBuilder_ == null) { + ensureScopeAvailabilitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scopeAvailabilities_); + onChanged(); + } else { + scopeAvailabilitiesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public Builder clearScopeAvailabilities() { + if (scopeAvailabilitiesBuilder_ == null) { + scopeAvailabilities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + scopeAvailabilitiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public Builder removeScopeAvailabilities(int index) { + if (scopeAvailabilitiesBuilder_ == null) { + ensureScopeAvailabilitiesIsMutable(); + scopeAvailabilities_.remove(index); + onChanged(); + } else { + scopeAvailabilitiesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Builder + getScopeAvailabilitiesBuilder(int index) { + return internalGetScopeAvailabilitiesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailabilityOrBuilder + getScopeAvailabilitiesOrBuilder(int index) { + if (scopeAvailabilitiesBuilder_ == null) { + return scopeAvailabilities_.get(index); + } else { + return scopeAvailabilitiesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailabilityOrBuilder> + getScopeAvailabilitiesOrBuilderList() { + if (scopeAvailabilitiesBuilder_ != null) { + return scopeAvailabilitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(scopeAvailabilities_); + } + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Builder + addScopeAvailabilitiesBuilder() { + return internalGetScopeAvailabilitiesFieldBuilder() + .addBuilder( + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability + .getDefaultInstance()); + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Builder + addScopeAvailabilitiesBuilder(int index) { + return internalGetScopeAvailabilitiesFieldBuilder() + .addBuilder( + index, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability + .getDefaultInstance()); + } + + /** + * + * + *
+     * The details of the requested scopes.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + public java.util.List< + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Builder> + getScopeAvailabilitiesBuilderList() { + return internalGetScopeAvailabilitiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Builder, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailabilityOrBuilder> + internalGetScopeAvailabilitiesFieldBuilder() { + if (scopeAvailabilitiesBuilder_ == null) { + scopeAvailabilitiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Builder, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailabilityOrBuilder>( + scopeAvailabilities_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + scopeAvailabilities_ = null; + } + return scopeAvailabilitiesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse) + private static final com.google.cloud.numberregistry.v1alpha + .CheckAvailabilityIpamAdminScopesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse(); + } + + public static com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckAvailabilityIpamAdminScopesResponse 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.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesResponseOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesResponseOrBuilder.java new file mode 100644 index 000000000000..0c79e8e753e5 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CheckAvailabilityIpamAdminScopesResponseOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface CheckAvailabilityIpamAdminScopesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The details of the requested scopes.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + java.util.List + getScopeAvailabilitiesList(); + + /** + * + * + *
+   * The details of the requested scopes.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability getScopeAvailabilities( + int index); + + /** + * + * + *
+   * The details of the requested scopes.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + int getScopeAvailabilitiesCount(); + + /** + * + * + *
+   * The details of the requested scopes.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + java.util.List< + ? extends com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailabilityOrBuilder> + getScopeAvailabilitiesOrBuilderList(); + + /** + * + * + *
+   * The details of the requested scopes.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability scope_availabilities = 1; + * + */ + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailabilityOrBuilder + getScopeAvailabilitiesOrBuilder(int index); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CleanupIpamAdminScopeRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CleanupIpamAdminScopeRequest.java new file mode 100644 index 000000000000..9e8ff4840981 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CleanupIpamAdminScopeRequest.java @@ -0,0 +1,913 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.CleanupIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CleanupIpamAdminScope]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest} + */ +@com.google.protobuf.Generated +public final class CleanupIpamAdminScopeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest) + CleanupIpamAdminScopeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CleanupIpamAdminScopeRequest"); + } + + // Use CleanupIpamAdminScopeRequest.newBuilder() to construct. + private CleanupIpamAdminScopeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CleanupIpamAdminScopeRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CleanupIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CleanupIpamAdminScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest.class, + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the IpamAdminScope to clean up.
+   * 
+ * + * + * 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 IpamAdminScope to clean up.
+   * 
+ * + * + * 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 REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + 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.numberregistry.v1alpha.CleanupIpamAdminScopeRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest other = + (com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest 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.numberregistry.v1alpha.CleanupIpamAdminScopeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest 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.numberregistry.v1alpha.CleanupIpamAdminScopeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.CleanupIpamAdminScopeRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.CleanupIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CleanupIpamAdminScope]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest) + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CleanupIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CleanupIpamAdminScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest.class, + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CleanupIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest build() { + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest result = + new com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = 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.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the IpamAdminScope to clean up.
+     * 
+ * + * + * 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 IpamAdminScope to clean up.
+     * 
+ * + * + * 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 IpamAdminScope to clean up.
+     * 
+ * + * + * 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 IpamAdminScope to clean up.
+     * 
+ * + * + * 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 IpamAdminScope to clean up.
+     * 
+ * + * + * 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 java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest) + private static final com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CleanupIpamAdminScopeRequest 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.numberregistry.v1alpha.CleanupIpamAdminScopeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CleanupIpamAdminScopeRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CleanupIpamAdminScopeRequestOrBuilder.java new file mode 100644 index 000000000000..7bd65cc1b6a4 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CleanupIpamAdminScopeRequestOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface CleanupIpamAdminScopeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the IpamAdminScope to clean up.
+   * 
+ * + * + * 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 IpamAdminScope to clean up.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CoreProto.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CoreProto.java new file mode 100644 index 000000000000..f130d126ea72 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CoreProto.java @@ -0,0 +1,1285 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public final class CoreProto extends com.google.protobuf.GeneratedFile { + private CoreProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CoreProto"); + } + + 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_numberregistry_v1alpha_IpamAdminScope_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_GetIpamAdminScopeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_GetIpamAdminScopeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScopeAvailability_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScopeAvailability_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_CreateIpamAdminScopeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_CreateIpamAdminScopeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_DisableIpamAdminScopeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_DisableIpamAdminScopeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_CleanupIpamAdminScopeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_CleanupIpamAdminScopeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_UpdateIpamAdminScopeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_UpdateIpamAdminScopeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_DeleteIpamAdminScopeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_DeleteIpamAdminScopeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_AggregatedData_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_AggregatedData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_GetRegistryBookRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_GetRegistryBookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_Range_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_Range_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_SearchIpResourcesResult_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_SearchIpResourcesResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_CreateRegistryBookRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_CreateRegistryBookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_UpdateRegistryBookRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_UpdateRegistryBookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_DeleteRegistryBookRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_DeleteRegistryBookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_Realm_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_Realm_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_Realm_RealmAggregatedData_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_Realm_RealmAggregatedData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_Realm_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_Realm_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_DiscoveryMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_DiscoveryMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ListRealmsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ListRealmsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ListRealmsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ListRealmsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_GetRealmRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_GetRealmRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_CreateRealmRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_CreateRealmRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_UpdateRealmRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_UpdateRealmRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_DeleteRealmRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_DeleteRealmRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_GetDiscoveredRangeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_GetDiscoveredRangeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_CustomRange_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_CustomRange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_CustomRange_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_CustomRange_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_Attribute_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_Attribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_GetCustomRangeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_GetCustomRangeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_RangeUtilization_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_RangeUtilization_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_CreateCustomRangeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_CreateCustomRangeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_UpdateCustomRangeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_UpdateCustomRangeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_DeleteCustomRangeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_DeleteCustomRangeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesResponse_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/numberregistry/v1alpha/core.proto\022#google.cloud.numberregistry.v1" + + "alpha\032\037google/api/field_behavior.proto\032\033" + + "google/api/field_info.proto\032\031google/api/resource.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\223\010\n" + + "\016IpamAdminScope\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\010\340A\002\022g\n" + + "\027enabled_addon_platforms\030\002 \003(\0162A.go" + + "ogle.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatformB\003\340A\002\022\023\n" + + "\006scopes\030\003 \003(\tB\003\340A\002\022^\n" + + "\005state\030\004 \001(\0162J.google.cloud.n" + + "umberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineStateB\003\340A\003\0224\n" + + "\013create_time\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022T\n" + + "\006labels\030\007 \003(\0132?.google.cl" + + "oud.numberregistry.v1alpha.IpamAdminScope.LabelsEntryB\003\340A\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"U\n\r" + + "AddOnPlatform\022\037\n" + + "\033ADD_ON_PLATFORM_UNSPECIFIED\020\000\022\022\n" + + "\016COMPUTE_ENGINE\020\001\022\013\n" + + "\003GCE\020\001\032\002\010\001\032\002\020\001\"\235\002\n" + + "\026DiscoveryPipelineState\022(\n" + + "$DISCOVERY_PIPELINE_STATE_UNSPECIFIED\020\000\022\024\n" + + "\020INTERNAL_FAILURE\020\001\022\n\n" + + "\006FAILED\020\002\022\025\n" + + "\021SETUP_IN_PROGRESS\020\003\022\021\n\r" + + "READY_FOR_USE\020\004\022\030\n" + + "\024DELETING_IN_PROGRESS\020\005\022\014\n" + + "\010UPDATING\020\006\022\016\n\n" + + "RECOVERING\020\007\022\014\n" + + "\010DISABLED\020\010\022\026\n" + + "\022DELETION_COMPLETED\020\t\022\027\n" + + "\023CLEANUP_IN_PROGRESS\020\013\022\026\n" + + "\022READY_FOR_DELETION\020\014:\244\001\352A\240\001\n" + + "1cloudnumberregistry.googleapis.com/IpamAdminScope\022Jprojects/{project}/l" + + "ocations/{location}/ipamAdminScopes/{ipa" + + "m_admin_scope}*\017ipamAdminScopes2\016ipamAdminScope\"\304\001\n" + + "\032ListIpamAdminScopesRequest\022I\n" + + "\006parent\030\001 \001(" + + "\tB9\340A\002\372A3\0221cloudnumberregistry.googleapis.com/IpamAdminScope\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\233\001\n" + + "\033ListIpamAdminScopesResponse\022N\n" + + "\021ipam_admin_scopes\030\001 \003(\01323.google.cloud" + + ".numberregistry.v1alpha.IpamAdminScope\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"c\n" + + "\030GetIpamAdminScopeRequest\022G\n" + + "\004name\030\001 \001(\tB9\340A\002\372A3\n" + + "1cloudnumberregistry.googleapis.com/IpamAdminScope\"\211\001\n" + + "\'CheckAvailabilityIpamAdminScopesRequest\022I\n" + + "\006parent\030\001 \001(" + + "\tB9\340A\002\372A3\0221cloudnumberregistry.googleapis.com/IpamAdminScope\022\023\n" + + "\006scopes\030\002 \003(\tB\003\340A\002\"\211\001\n" + + "(CheckAvailabilityIpamAdminScopesResponse\022]\n" + + "\024scope_availabilities\030\001 \003(\013" + + "2?.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability\"\364\001\n" + + "\032IpamAdminScopeAvailability\022\r\n" + + "\005scope\030\001 \001(\t\022\025\n\r" + + "admin_project\030\002 \001(\003\022b\n" + + "\014availability\030\003 \001(\0162L.g" + + "oogle.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability\"L\n" + + "\014Availability\022\034\n" + + "\030AVAILABILITY_UNSPECIFIED\020\000\022\r\n" + + "\tAVAILABLE\020\001\022\017\n" + + "\013UNAVAILABLE\020\002\"\377\001\n" + + "\033CreateIpamAdminScopeRequest\022I\n" + + "\006parent\030\001 \001(\t" + + "B9\340A\002\372A3\0221cloudnumberregistry.googleapis.com/IpamAdminScope\022 \n" + + "\023ipam_admin_scope_id\030\002 \001(\tB\003\340A\002\022R\n" + + "\020ipam_admin_scope\030\003 \001(\0132" + + "3.google.cloud.numberregistry.v1alpha.IpamAdminScopeB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\210\001\n" + + "\034DisableIpamAdminScopeRequest\022G\n" + + "\004name\030\001 \001(\tB9\340A\002\372A3\n" + + "1cloudnumberregistry.googleapis.com/IpamAdminScope\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\210\001\n" + + "\034CleanupIpamAdminScopeRequest\022G\n" + + "\004name\030\001 \001(\tB9\340A\002\372A3\n" + + "1cloudnumberregistry.googleapis.com/IpamAdminScope\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\310\001\n" + + "\033UpdateIpamAdminScopeRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022R\n" + + "\020ipam_admin_scope\030\002 \001(\013" + + "23.google.cloud.numberregistry.v1alpha.IpamAdminScopeB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\233\001\n" + + "\033DeleteIpamAdminScopeRequest\022G\n" + + "\004name\030\001 \001(\tB9\340A\002\372A3\n" + + "1cloudnumberregistry.googleapis.com/IpamAdminScope\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\022\n" + + "\005force\030\003 \001(\010B\003\340A\001\"\212\006\n" + + "\014RegistryBook\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\010\340A\002\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022R\n" + + "\006labels\030\004 \003(\0132=.google.cloud.numberregist" + + "ry.v1alpha.RegistryBook.LabelsEntryB\003\340A\001\022\033\n" + + "\016claimed_scopes\030\005 \003(\tB\003\340A\001\022\027\n\n" + + "is_default\030\006 \001(\010B\003\340A\003\022^\n" + + "\017aggregated_data\030\007 \001(\0132" + + "@.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedDataB\003\340A\003\032\302\001\n" + + "\016AggregatedData\022 \n" + + "\023unique_scopes_count\030\001 \001(\005B\003\340A\003\022$\n" + + "\027discovered_realms_count\030\002 \001(\005B\003\340A\003\022$\n" + + "\027discovered_ranges_count\030\003 \001(\005B\003\340A\003\022 \n" + + "\023custom_realms_count\030\004 \001(\005B\003\340A\003\022 \n" + + "\023custom_ranges_count\030\005 \001(\005B\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\231\001\352A\225\001\n" + + "/cloudnumberregistry.googleapis.com/RegistryBook\022Eprojects/{project}/locations" + + "/{location}/registryBooks/{registry_book}*\r" + + "registryBooks2\014registryBook\"\212\002\n" + + "\030ListRegistryBooksRequest\022G\n" + + "\006parent\030\001 \001(\tB7\340A\002" + + "\372A1\022/cloudnumberregistry.googleapis.com/RegistryBook\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\022H\n" + + "\004view\030\006 \001(\0162" + + "5.google.cloud.numberregistry.v1alpha.RegistryBookViewB\003\340A\001\"\224\001\n" + + "\031ListRegistryBooksResponse\022I\n" + + "\016registry_books\030\001 \003(\01321.goog" + + "le.cloud.numberregistry.v1alpha.RegistryBook\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\251\001\n" + + "\026GetRegistryBookRequest\022E\n" + + "\004name\030\001 \001(\tB7\340A\002\372A1\n" + + "/cloudnumberregistry.googleapis.com/RegistryBook\022H\n" + + "\004view\030\002 \001" + + "(\01625.google.cloud.numberregistry.v1alpha.RegistryBookViewB\003\340A\001\"\246\003\n" + + "\030SearchIpResourcesRequest\022E\n" + + "\004name\030\001 \001(\tB7\340A\002\372A1\n" + + "/cloudnumberregistry.googleapis.com/RegistryBook\022\022\n" + + "\005query\030\002 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\003 \001(\tB\003\340A\001\022\026\n" + + "\tpage_size\030\004 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\005 \001(\tB\003\340A\001\022\035\n" + + "\020show_utilization\030\006 \001(\010B\003\340A\001\022t\n" + + "\025search_resource_types\030\007 \003(\0162P.g" + + "oogle.cloud.numberregistry.v1alpha.Searc" + + "hIpResourcesRequest.SearchResourceTypeB\003\340A\001\"R\n" + + "\022SearchResourceType\022$\n" + + " SEARCH_RESOURCE_TYPE_UNSPECIFIED\020\000\022\n\n" + + "\006RANGES\020\001\022\n\n" + + "\006REALMS\020\002\"\370\001\n" + + "\005Range\022H\n" + + "\014custom_range\030\001 \001(\0132" + + "0.google.cloud.numberregistry.v1alpha.CustomRangeH\000\022P\n" + + "\020discovered_range\030\002 \001(\01324." + + "google.cloud.numberregistry.v1alpha.DiscoveredRangeH\000\022J\n" + + "\013utilization\030\003 \001(\01325.goo" + + "gle.cloud.numberregistry.v1alpha.RangeUtilizationB\007\n" + + "\005range\"\222\003\n" + + "\031SearchIpResourcesResponse\022>\n" + + "\006ranges\030\001" + + " \003(\0132*.google.cloud.numberregistry.v1alpha.RangeB\002\030\001\022g\n" + + "\007results\030\004 \003(\0132V.google.cloud.numberregistry." + + "v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\032\235\001\n" + + "\027SearchIpResourcesResult\022;\n" + + "\005range\030\001 \001(\0132*.google.cloud.numberregistry.v1alpha.RangeH\000\022;\n" + + "\005realm\030\002 \001(\0132*.google.cloud.numberregistry.v1alpha.RealmH\000B\010\n" + + "\006result\"\363\001\n" + + "\031CreateRegistryBookRequest\022G\n" + + "\006parent\030\001 \001(\tB7\340A\002\372A1\022/c" + + "loudnumberregistry.googleapis.com/RegistryBook\022\035\n" + + "\020registry_book_id\030\002 \001(\tB\003\340A\002\022M\n" + + "\r" + + "registry_book\030\003" + + " \001(\01321.google.cloud.numberregistry.v1alpha.RegistryBookB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\301\001\n" + + "\031UpdateRegistryBookRequest\0224\n" + + "\013update_mask\030\001" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022M\n\r" + + "registry_book\030\002" + + " \001(\01321.google.cloud.numberregistry.v1alpha.RegistryBookB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\227\001\n" + + "\031DeleteRegistryBookRequest\022E\n" + + "\004name\030\001 \001(\tB7\340A\002\372A1\n" + + "/cloudnumberregistry.googleapis.com/RegistryBook\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\022\n" + + "\005force\030\003 \001(\010B\003\340A\001\"\313\t\n" + + "\005Realm\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\010\340A\002\022Q\n" + + "\014traffic_type\030\002 \001(\01626.goog" + + "le.cloud.numberregistry.v1alpha.Realm.TrafficTypeB\003\340A\002\022W\n" + + "\017management_type\030\003 \001(\0162" + + "9.google.cloud.numberregistry.v1alpha.Realm.ManagementTypeB\003\340A\002\022N\n\r" + + "registry_book\030\004 \001(\tB7\340A\002\372A1\n" + + "/cloudnumberregistry.googleapis.com/RegistryBook\022W\n" + + "\022discovery_metadata\030\005" + + " \001(\01326.google.cloud.numberregistry.v1alpha.DiscoveryMetadataB\003\340A\003\0224\n" + + "\013create_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022K\n" + + "\006labels\030\010 \003(\01326.g" + + "oogle.cloud.numberregistry.v1alpha.Realm.LabelsEntryB\003\340A\001\022G\n\n" + + "ip_version\030\t \001(\0162.." + + "google.cloud.numberregistry.v1alpha.IpVersionB\003\340A\001\022\\\n" + + "\017aggregated_data\030\n" + + " \001(\0132>.go" + + "ogle.cloud.numberregistry.v1alpha.Realm.RealmAggregatedDataB\003\340A\003\032]\n" + + "\023RealmAggregatedData\022$\n" + + "\027discovered_ranges_count\030\001 \001(\005B\003\340A\003\022 \n" + + "\023custom_ranges_count\030\002 \001(\005B\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"`\n" + + "\013TrafficType\022\034\n" + + "\030TRAFFIC_TYPE_UNSPECIFIED\020\000\022\t\n" + + "\005UNSET\020\001\022\014\n" + + "\010INTERNET\020\002\022\013\n" + + "\007PRIVATE\020\003\022\r\n" + + "\tLINKLOCAL\020\004\"D\n" + + "\016ManagementType\022\037\n" + + "\033MANAGEMENT_TYPE_UNSPECIFIED\020\000\022\007\n" + + "\003CNR\020\001\022\010\n" + + "\004USER\020\002\"K\n" + + "\tRealmView\022\032\n" + + "\026REALM_VIEW_UNSPECIFIED\020\000\022\t\n" + + "\005BASIC\020\001\022\010\n" + + "\004FULL\020\002\022\r\n" + + "\tAGGREGATE\020\003:t\352Aq\n" + + "(cloudnumberregistry.googleapis.com/Realm\0226projects/{project}/l" + + "ocations/{location}/realms/{realm}*\006realms2\005realm\"\335\003\n" + + "\021DiscoveryMetadata\0223\n\n" + + "event_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022X\n" + + "\005state\030\004 \001(\0162D.google.cloud.numberregistry.v1" + + "alpha.DiscoveryMetadata.ResourceStateB\003\340A\003\022\025\n" + + "\010resource\030\005 \001(\tB\003\340A\003\022\031\n" + + "\014resource_uri\030\006 \001(\tB\003\340A\003\022\026\n" + + "\tsource_id\030\007 \001(\tB\003\340A\003\022\032\n\r" + + "source_sub_id\030\010 \001(\tB\003\340A\003\"g\n\r" + + "ResourceState\022\036\n" + + "\032RESOURCE_STATE_UNSPECIFIED\020\000\022\013\n" + + "\007INVALID\020\001\022\n\n" + + "\006EXISTS\020\002\022\022\n" + + "\016DOES_NOT_EXIST\020\003\022\t\n" + + "\005ERROR\020\004\"\373\001\n" + + "\021ListRealmsRequest\022@\n" + + "\006parent\030\001 \001(" + + "\tB0\340A\002\372A*\022(cloudnumberregistry.googleapis.com/Realm\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\022G\n" + + "\004view\030\006" + + " \001(\01624.google.cloud.numberregistry.v1alpha.Realm.RealmViewB\003\340A\001\"~\n" + + "\022ListRealmsResponse\022:\n" + + "\006realms\030\001 \003(\0132*.google.cloud.numberregistry.v1alpha.Realm\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\232\001\n" + + "\017GetRealmRequest\022>\n" + + "\004name\030\001 \001(\tB0\340A\002\372A*\n" + + "(cloudnumberregistry.googleapis.com/Realm\022G\n" + + "\004view\030\002" + + " \001(\01624.google.cloud.numberregistry.v1alpha.Realm.RealmViewB\003\340A\001\"\316\001\n" + + "\022CreateRealmRequest\022@\n" + + "\006parent\030\001 \001(" + + "\tB0\340A\002\372A*\022(cloudnumberregistry.googleapis.com/Realm\022\025\n" + + "\010realm_id\030\002 \001(\tB\003\340A\002\022>\n" + + "\005realm\030\003 \001(\0132*.go" + + "ogle.cloud.numberregistry.v1alpha.RealmB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\253\001\n" + + "\022UpdateRealmRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022>\n" + + "\005realm\030\002" + + " \001(\0132*.google.cloud.numberregistry.v1alpha.RealmB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\211\001\n" + + "\022DeleteRealmRequest\022>\n" + + "\004name\030\001 \001(\tB0\340A\002\372A*\n" + + "(cloudnumberregistry.googleapis.com/Realm\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\022\n" + + "\005force\030\003 \001(\010B\003\340A\001\"\251\007\n" + + "\017DiscoveredRange\022\036\n" + + "\017ipv4_cidr_range\030\002 \001(\tB\003\340A\001H\000\022\036\n" + + "\017ipv6_cidr_range\030\003 \001(\tB\003\340A\001H\000\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\010\340A\002\022?\n" + + "\005realm\030\004 \001(\tB0\340A\001\372A*\n" + + "(cloudnumberregistry.googleapis.com/Realm\022P\n" + + "\014parent_range\030\006 \001(\tB:\340A\001\372A4\n" + + "2cloudnumberregistry.googleapis.com/DiscoveredRange\022\032\n\r" + + "registry_book\030\005 \001(\tB\003\340A\003\022\030\n" + + "\013description\030\007 \001(\tB\003\340A\001\022W\n" + + "\022discovery_metadata\030\010" + + " \001(\01326.google.cloud.numberregistry.v1alpha.DiscoveryMetadataB\003\340A\003\022G\n\n" + + "attributes\030\t" + + " \003(\0132..google.cloud.numberregistry.v1alpha.AttributeB\003\340A\001\0224\n" + + "\013create_time\030\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\013 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022U\n" + + "\006labels\030\014 \003(\0132@.google.cloud." + + "numberregistry.v1alpha.DiscoveredRange.LabelsEntryB\003\340A\001\022\'\n" + + "\032child_cidr_overlap_allowed\030\r" + + " \001(\010B\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\250\001\352A\244\001\n" + + "2cloudnumberregistry.googleapis.com/DiscoveredRan" + + "ge\022Kprojects/{project}/locations/{locati" + + "on}/discoveredRanges/{discovered_range}*\020discoveredRanges2\017discoveredRangeB\017\n\r" + + "ip_cidr_range\"\306\001\n" + + "\033ListDiscoveredRangesRequest\022J\n" + + "\006parent\030\001 \001(\tB:\340A\002\372A4\0222cloudnumber" + + "registry.googleapis.com/DiscoveredRange\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\235\001\n" + + "\034ListDiscoveredRangesResponse\022O\n" + + "\021discovered_ranges\030\001 \003(\01324.googl" + + "e.cloud.numberregistry.v1alpha.DiscoveredRange\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"e\n" + + "\031GetDiscoveredRangeRequest\022H\n" + + "\004name\030\001 \001(\tB:\340A\002\372A4\n" + + "2cloudnumberregistry.googleapis.com/DiscoveredRange\"\316\001\n" + + "&FindDiscoveredRangeFreeIpRangesRequest\022H\n" + + "\004name\030\001 \001(\tB:\340A\002\372A4\n" + + "2cloudnumberregistry.googleapis.com/DiscoveredRange\022\037\n" + + "\022cidr_prefix_length\030\002 \001(\005B\003\340A\002\022\030\n" + + "\013range_count\030\003 \001(\005B\003\340A\001\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"K\n" + + "\'FindDiscoveredRangeFreeIpRangesResponse\022 \n" + + "\023free_ip_cidr_ranges\030\001 \003(\tB\003\340A\003\"\233\005\n" + + "\013CustomRange\022\036\n" + + "\017ipv4_cidr_range\030\002 \001(\tB\003\340A\001H\000\022\036\n" + + "\017ipv6_cidr_range\030\003 \001(\tB\003\340A\001H\000\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\010\340A\002\022?\n" + + "\005realm\030\004 \001(\tB0\340A\001\372A*\n" + + "(cloudnumberregistry.googleapis.com/Realm\022L\n" + + "\014parent_range\030\006 \001(\tB6\340A\001\372A0\n" + + ".cloudnumberregistry.googleapis.com/CustomRange\022\032\n\r" + + "registry_book\030\005 \001(\tB\003\340A\003\022G\n\n" + + "attributes\030\007" + + " \003(\0132..google.cloud.numberregistry.v1alpha.AttributeB\003\340A\001\022\030\n" + + "\013description\030\010 \001(\tB\003\340A\001\022Q\n" + + "\006labels\030\t \003(\0132<.google.c" + + "loud.numberregistry.v1alpha.CustomRange.LabelsEntryB\003\340A\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\224\001\352A\220\001\n" + + ".cloudnumberregistry.googleapis.com/CustomRange\022C" + + "projects/{project}/locations/{location}/" + + "customRanges/{custom_range}*\014customRanges2\013customRangeB\017\n\r" + + "ip_cidr_range\"1\n" + + "\tAttribute\022\020\n" + + "\003key\030\001 \001(\tB\003\340A\002\022\022\n" + + "\005value\030\002 \001(\tB\003\340A\002\"\276\001\n" + + "\027ListCustomRangesRequest\022F\n" + + "\006parent\030\001 \001(" + + "\tB6\340A\002\372A0\022.cloudnumberregistry.googleapis.com/CustomRange\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\221\001\n" + + "\030ListCustomRangesResponse\022G\n\r" + + "custom_ranges\030\001" + + " \003(\01320.google.cloud.numberregistry.v1alpha.CustomRange\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"]\n" + + "\025GetCustomRangeRequest\022D\n" + + "\004name\030\001 \001(\tB6\340A\002\372A0\n" + + ".cloudnumberregistry.googleapis.com/CustomRange\"i\n" + + "!ShowCustomRangeUtilizationRequest\022D\n" + + "\004name\030\001 \001(\tB6\340A\002\372A0\n" + + ".cloudnumberregistry.googleapis.com/CustomRange\"\276\001\n" + + "\"ShowCustomRangeUtilizationResponse\022F\n" + + "\014custom_range\030\001" + + " \001(\01320.google.cloud.numberregistry.v1alpha.CustomRange\022P\n" + + "\021range_utilization\030\002 " + + "\001(\01325.google.cloud.numberregistry.v1alpha.RangeUtilization\"q\n" + + "%ShowDiscoveredRangeUtilizationRequest\022H\n" + + "\004name\030\001 \001(\tB:\340A\002\372A4\n" + + "2cloudnumberregistry.googleapis.com/DiscoveredRange\"\312\001\n" + + "&ShowDiscoveredRangeUtilizationResponse\022N\n" + + "\020discovered_range\030\001 \001" + + "(\01324.google.cloud.numberregistry.v1alpha.DiscoveredRange\022P\n" + + "\021range_utilization\030\002 " + + "\001(\01325.google.cloud.numberregistry.v1alpha.RangeUtilization\"o\n" + + "\020RangeUtilization\022\033\n" + + "\016total_consumed\030\001 \001(\tB\003\340A\003\022\033\n" + + "\016total_produced\030\002 \001(\tB\003\340A\003\022\027\n" + + "\005usage\030\003 \001(\001B\003\340A\003H\000\210\001\001B\010\n" + + "\006_usage\"\356\001\n" + + "\030CreateCustomRangeRequest\022F\n" + + "\006parent\030\001 \001(" + + "\tB6\340A\002\372A0\022.cloudnumberregistry.googleapis.com/CustomRange\022\034\n" + + "\017custom_range_id\030\002 \001(\tB\003\340A\002\022K\n" + + "\014custom_range\030\003" + + " \001(\01320.google.cloud.numberregistry.v1alpha.CustomRangeB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\276\001\n" + + "\030UpdateCustomRangeRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022K\n" + + "\014custom_range\030\002 \001(\01320." + + "google.cloud.numberregistry.v1alpha.CustomRangeB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\225\001\n" + + "\030DeleteCustomRangeRequest\022D\n" + + "\004name\030\001 \001(\tB6\340A\002\372A0\n" + + ".cloudnumberregistry.googleapis.com/CustomRange\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\022\n" + + "\005force\030\003 \001(\010B\003\340A\001\"\306\001\n" + + "\"FindCustomRangeFreeIpRangesRequest\022D\n" + + "\004name\030\001 \001(\tB6\340A\002\372A0\n" + + ".cloudnumberregistry.googleapis.com/CustomRange\022\037\n" + + "\022cidr_prefix_length\030\002 \001(\005B\003\340A\002\022\030\n" + + "\013range_count\030\003 \001(\005B\003\340A\001\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"G\n" + + "#FindCustomRangeFreeIpRangesResponse\022 \n" + + "\023free_ip_cidr_ranges\030\001 \003(\tB\003\340A\003*;\n" + + "\tIpVersion\022\032\n" + + "\026IP_VERSION_UNSPECIFIED\020\000\022\010\n" + + "\004IPV4\020\001\022\010\n" + + "\004IPV6\020\002*Z\n" + + "\020RegistryBookView\022\"\n" + + "\036REGISTRY_BOOK_VIEW_UNSPECIFIED\020\000\022\t\n" + + "\005BASIC\020\001\022\010\n" + + "\004FULL\020\002\022\r\n" + + "\tAGGREGATE\020\003B\373\001\n" + + "\'com.google.cloud.numberregistry.v1alphaB\tCoreProtoP" + + "\001ZNcloud.google.com/go/numberregistry/apiv1main/numberregistrypb;numberregistryp" + + "b\252\002#Google.Cloud.NumberRegistry.V1Alpha\312" + + "\002#Google\\Cloud\\NumberRegistry\\V1alpha\352\002&" + + "Google::Cloud::NumberRegistry::V1alphab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_descriptor, + new java.lang.String[] { + "Name", + "EnabledAddonPlatforms", + "Scopes", + "State", + "CreateTime", + "UpdateTime", + "Labels", + }); + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_LabelsEntry_descriptor = + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_descriptor.getNestedType( + 0); + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesResponse_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesResponse_descriptor, + new java.lang.String[] { + "IpamAdminScopes", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_numberregistry_v1alpha_GetIpamAdminScopeRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_numberregistry_v1alpha_GetIpamAdminScopeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_GetIpamAdminScopeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesRequest_descriptor, + new java.lang.String[] { + "Parent", "Scopes", + }); + internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesResponse_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_CheckAvailabilityIpamAdminScopesResponse_descriptor, + new java.lang.String[] { + "ScopeAvailabilities", + }); + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScopeAvailability_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScopeAvailability_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScopeAvailability_descriptor, + new java.lang.String[] { + "Scope", "AdminProject", "Availability", + }); + internal_static_google_cloud_numberregistry_v1alpha_CreateIpamAdminScopeRequest_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_numberregistry_v1alpha_CreateIpamAdminScopeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_CreateIpamAdminScopeRequest_descriptor, + new java.lang.String[] { + "Parent", "IpamAdminScopeId", "IpamAdminScope", "RequestId", + }); + internal_static_google_cloud_numberregistry_v1alpha_DisableIpamAdminScopeRequest_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_numberregistry_v1alpha_DisableIpamAdminScopeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_DisableIpamAdminScopeRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_numberregistry_v1alpha_CleanupIpamAdminScopeRequest_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_cloud_numberregistry_v1alpha_CleanupIpamAdminScopeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_CleanupIpamAdminScopeRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_numberregistry_v1alpha_UpdateIpamAdminScopeRequest_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_cloud_numberregistry_v1alpha_UpdateIpamAdminScopeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_UpdateIpamAdminScopeRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "IpamAdminScope", "RequestId", + }); + internal_static_google_cloud_numberregistry_v1alpha_DeleteIpamAdminScopeRequest_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_cloud_numberregistry_v1alpha_DeleteIpamAdminScopeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_DeleteIpamAdminScopeRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "Force", + }); + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "ClaimedScopes", + "IsDefault", + "AggregatedData", + }); + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_AggregatedData_descriptor = + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_descriptor.getNestedType( + 0); + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_AggregatedData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_AggregatedData_descriptor, + new java.lang.String[] { + "UniqueScopesCount", + "DiscoveredRealmsCount", + "DiscoveredRangesCount", + "CustomRealmsCount", + "CustomRangesCount", + }); + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_LabelsEntry_descriptor = + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_descriptor.getNestedType( + 1); + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksRequest_descriptor = + getDescriptor().getMessageType(13); + internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", "View", + }); + internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksResponse_descriptor = + getDescriptor().getMessageType(14); + internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksResponse_descriptor, + new java.lang.String[] { + "RegistryBooks", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_numberregistry_v1alpha_GetRegistryBookRequest_descriptor = + getDescriptor().getMessageType(15); + internal_static_google_cloud_numberregistry_v1alpha_GetRegistryBookRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_GetRegistryBookRequest_descriptor, + new java.lang.String[] { + "Name", "View", + }); + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesRequest_descriptor = + getDescriptor().getMessageType(16); + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesRequest_descriptor, + new java.lang.String[] { + "Name", + "Query", + "OrderBy", + "PageSize", + "PageToken", + "ShowUtilization", + "SearchResourceTypes", + }); + internal_static_google_cloud_numberregistry_v1alpha_Range_descriptor = + getDescriptor().getMessageType(17); + internal_static_google_cloud_numberregistry_v1alpha_Range_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_Range_descriptor, + new java.lang.String[] { + "CustomRange", "DiscoveredRange", "Utilization", "Range", + }); + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_descriptor = + getDescriptor().getMessageType(18); + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_descriptor, + new java.lang.String[] { + "Ranges", "Results", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_SearchIpResourcesResult_descriptor = + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_descriptor + .getNestedType(0); + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_SearchIpResourcesResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_SearchIpResourcesResult_descriptor, + new java.lang.String[] { + "Range", "Realm", "Result", + }); + internal_static_google_cloud_numberregistry_v1alpha_CreateRegistryBookRequest_descriptor = + getDescriptor().getMessageType(19); + internal_static_google_cloud_numberregistry_v1alpha_CreateRegistryBookRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_CreateRegistryBookRequest_descriptor, + new java.lang.String[] { + "Parent", "RegistryBookId", "RegistryBook", "RequestId", + }); + internal_static_google_cloud_numberregistry_v1alpha_UpdateRegistryBookRequest_descriptor = + getDescriptor().getMessageType(20); + internal_static_google_cloud_numberregistry_v1alpha_UpdateRegistryBookRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_UpdateRegistryBookRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "RegistryBook", "RequestId", + }); + internal_static_google_cloud_numberregistry_v1alpha_DeleteRegistryBookRequest_descriptor = + getDescriptor().getMessageType(21); + internal_static_google_cloud_numberregistry_v1alpha_DeleteRegistryBookRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_DeleteRegistryBookRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "Force", + }); + internal_static_google_cloud_numberregistry_v1alpha_Realm_descriptor = + getDescriptor().getMessageType(22); + internal_static_google_cloud_numberregistry_v1alpha_Realm_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_Realm_descriptor, + new java.lang.String[] { + "Name", + "TrafficType", + "ManagementType", + "RegistryBook", + "DiscoveryMetadata", + "CreateTime", + "UpdateTime", + "Labels", + "IpVersion", + "AggregatedData", + }); + internal_static_google_cloud_numberregistry_v1alpha_Realm_RealmAggregatedData_descriptor = + internal_static_google_cloud_numberregistry_v1alpha_Realm_descriptor.getNestedType(0); + internal_static_google_cloud_numberregistry_v1alpha_Realm_RealmAggregatedData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_Realm_RealmAggregatedData_descriptor, + new java.lang.String[] { + "DiscoveredRangesCount", "CustomRangesCount", + }); + internal_static_google_cloud_numberregistry_v1alpha_Realm_LabelsEntry_descriptor = + internal_static_google_cloud_numberregistry_v1alpha_Realm_descriptor.getNestedType(1); + internal_static_google_cloud_numberregistry_v1alpha_Realm_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_Realm_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_numberregistry_v1alpha_DiscoveryMetadata_descriptor = + getDescriptor().getMessageType(23); + internal_static_google_cloud_numberregistry_v1alpha_DiscoveryMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_DiscoveryMetadata_descriptor, + new java.lang.String[] { + "EventTime", + "CreateTime", + "UpdateTime", + "State", + "Resource", + "ResourceUri", + "SourceId", + "SourceSubId", + }); + internal_static_google_cloud_numberregistry_v1alpha_ListRealmsRequest_descriptor = + getDescriptor().getMessageType(24); + internal_static_google_cloud_numberregistry_v1alpha_ListRealmsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ListRealmsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", "View", + }); + internal_static_google_cloud_numberregistry_v1alpha_ListRealmsResponse_descriptor = + getDescriptor().getMessageType(25); + internal_static_google_cloud_numberregistry_v1alpha_ListRealmsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ListRealmsResponse_descriptor, + new java.lang.String[] { + "Realms", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_numberregistry_v1alpha_GetRealmRequest_descriptor = + getDescriptor().getMessageType(26); + internal_static_google_cloud_numberregistry_v1alpha_GetRealmRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_GetRealmRequest_descriptor, + new java.lang.String[] { + "Name", "View", + }); + internal_static_google_cloud_numberregistry_v1alpha_CreateRealmRequest_descriptor = + getDescriptor().getMessageType(27); + internal_static_google_cloud_numberregistry_v1alpha_CreateRealmRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_CreateRealmRequest_descriptor, + new java.lang.String[] { + "Parent", "RealmId", "Realm", "RequestId", + }); + internal_static_google_cloud_numberregistry_v1alpha_UpdateRealmRequest_descriptor = + getDescriptor().getMessageType(28); + internal_static_google_cloud_numberregistry_v1alpha_UpdateRealmRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_UpdateRealmRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Realm", "RequestId", + }); + internal_static_google_cloud_numberregistry_v1alpha_DeleteRealmRequest_descriptor = + getDescriptor().getMessageType(29); + internal_static_google_cloud_numberregistry_v1alpha_DeleteRealmRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_DeleteRealmRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "Force", + }); + internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_descriptor = + getDescriptor().getMessageType(30); + internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_descriptor, + new java.lang.String[] { + "Ipv4CidrRange", + "Ipv6CidrRange", + "Name", + "Realm", + "ParentRange", + "RegistryBook", + "Description", + "DiscoveryMetadata", + "Attributes", + "CreateTime", + "UpdateTime", + "Labels", + "ChildCidrOverlapAllowed", + "IpCidrRange", + }); + internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_LabelsEntry_descriptor = + internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_descriptor + .getNestedType(0); + internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesRequest_descriptor = + getDescriptor().getMessageType(31); + internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesResponse_descriptor = + getDescriptor().getMessageType(32); + internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesResponse_descriptor, + new java.lang.String[] { + "DiscoveredRanges", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_numberregistry_v1alpha_GetDiscoveredRangeRequest_descriptor = + getDescriptor().getMessageType(33); + internal_static_google_cloud_numberregistry_v1alpha_GetDiscoveredRangeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_GetDiscoveredRangeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesRequest_descriptor = + getDescriptor().getMessageType(34); + internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesRequest_descriptor, + new java.lang.String[] { + "Name", "CidrPrefixLength", "RangeCount", "RequestId", + }); + internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesResponse_descriptor = + getDescriptor().getMessageType(35); + internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesResponse_descriptor, + new java.lang.String[] { + "FreeIpCidrRanges", + }); + internal_static_google_cloud_numberregistry_v1alpha_CustomRange_descriptor = + getDescriptor().getMessageType(36); + internal_static_google_cloud_numberregistry_v1alpha_CustomRange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_CustomRange_descriptor, + new java.lang.String[] { + "Ipv4CidrRange", + "Ipv6CidrRange", + "Name", + "Realm", + "ParentRange", + "RegistryBook", + "Attributes", + "Description", + "Labels", + "IpCidrRange", + }); + internal_static_google_cloud_numberregistry_v1alpha_CustomRange_LabelsEntry_descriptor = + internal_static_google_cloud_numberregistry_v1alpha_CustomRange_descriptor.getNestedType(0); + internal_static_google_cloud_numberregistry_v1alpha_CustomRange_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_CustomRange_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_numberregistry_v1alpha_Attribute_descriptor = + getDescriptor().getMessageType(37); + internal_static_google_cloud_numberregistry_v1alpha_Attribute_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_Attribute_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesRequest_descriptor = + getDescriptor().getMessageType(38); + internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesResponse_descriptor = + getDescriptor().getMessageType(39); + internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesResponse_descriptor, + new java.lang.String[] { + "CustomRanges", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_numberregistry_v1alpha_GetCustomRangeRequest_descriptor = + getDescriptor().getMessageType(40); + internal_static_google_cloud_numberregistry_v1alpha_GetCustomRangeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_GetCustomRangeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationRequest_descriptor = + getDescriptor().getMessageType(41); + internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationResponse_descriptor = + getDescriptor().getMessageType(42); + internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationResponse_descriptor, + new java.lang.String[] { + "CustomRange", "RangeUtilization", + }); + internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationRequest_descriptor = + getDescriptor().getMessageType(43); + internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationResponse_descriptor = + getDescriptor().getMessageType(44); + internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationResponse_descriptor, + new java.lang.String[] { + "DiscoveredRange", "RangeUtilization", + }); + internal_static_google_cloud_numberregistry_v1alpha_RangeUtilization_descriptor = + getDescriptor().getMessageType(45); + internal_static_google_cloud_numberregistry_v1alpha_RangeUtilization_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_RangeUtilization_descriptor, + new java.lang.String[] { + "TotalConsumed", "TotalProduced", "Usage", + }); + internal_static_google_cloud_numberregistry_v1alpha_CreateCustomRangeRequest_descriptor = + getDescriptor().getMessageType(46); + internal_static_google_cloud_numberregistry_v1alpha_CreateCustomRangeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_CreateCustomRangeRequest_descriptor, + new java.lang.String[] { + "Parent", "CustomRangeId", "CustomRange", "RequestId", + }); + internal_static_google_cloud_numberregistry_v1alpha_UpdateCustomRangeRequest_descriptor = + getDescriptor().getMessageType(47); + internal_static_google_cloud_numberregistry_v1alpha_UpdateCustomRangeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_UpdateCustomRangeRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "CustomRange", "RequestId", + }); + internal_static_google_cloud_numberregistry_v1alpha_DeleteCustomRangeRequest_descriptor = + getDescriptor().getMessageType(48); + internal_static_google_cloud_numberregistry_v1alpha_DeleteCustomRangeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_DeleteCustomRangeRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "Force", + }); + internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesRequest_descriptor = + getDescriptor().getMessageType(49); + internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesRequest_descriptor, + new java.lang.String[] { + "Name", "CidrPrefixLength", "RangeCount", "RequestId", + }); + internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesResponse_descriptor = + getDescriptor().getMessageType(50); + internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesResponse_descriptor, + new java.lang.String[] { + "FreeIpCidrRanges", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateCustomRangeRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateCustomRangeRequest.java new file mode 100644 index 000000000000..deaec6428a73 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateCustomRangeRequest.java @@ -0,0 +1,1424 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.CreateCustomRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CreateCustomRange]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest} + */ +@com.google.protobuf.Generated +public final class CreateCustomRangeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest) + CreateCustomRangeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateCustomRangeRequest"); + } + + // Use CreateCustomRangeRequest.newBuilder() to construct. + private CreateCustomRangeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateCustomRangeRequest() { + parent_ = ""; + customRangeId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateCustomRangeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateCustomRangeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest.class, + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name where the CustomRange will be created.
+   * 
+ * + * + * 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 parent resource name where the CustomRange will be created.
+   * 
+ * + * + * 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 CUSTOM_RANGE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object customRangeId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the CustomRange, which will become the final
+   * segment of the resource name.
+   * 
+ * + * string custom_range_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The customRangeId. + */ + @java.lang.Override + public java.lang.String getCustomRangeId() { + java.lang.Object ref = customRangeId_; + 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(); + customRangeId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the CustomRange, which will become the final
+   * segment of the resource name.
+   * 
+ * + * string custom_range_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for customRangeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomRangeIdBytes() { + java.lang.Object ref = customRangeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customRangeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOM_RANGE_FIELD_NUMBER = 3; + private com.google.cloud.numberregistry.v1alpha.CustomRange customRange_; + + /** + * + * + *
+   * Required. The CustomRange resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customRange field is set. + */ + @java.lang.Override + public boolean hasCustomRange() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The CustomRange resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customRange. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange() { + return customRange_ == null + ? com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance() + : customRange_; + } + + /** + * + * + *
+   * Required. The CustomRange resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangeOrBuilder() { + return customRange_ == null + ? com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance() + : customRange_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(customRangeId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, customRangeId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCustomRange()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(customRangeId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, customRangeId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCustomRange()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + 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.numberregistry.v1alpha.CreateCustomRangeRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest other = + (com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getCustomRangeId().equals(other.getCustomRangeId())) return false; + if (hasCustomRange() != other.hasCustomRange()) return false; + if (hasCustomRange()) { + if (!getCustomRange().equals(other.getCustomRange())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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) + CUSTOM_RANGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getCustomRangeId().hashCode(); + if (hasCustomRange()) { + hash = (37 * hash) + CUSTOM_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getCustomRange().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest 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.numberregistry.v1alpha.CreateCustomRangeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest 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.numberregistry.v1alpha.CreateCustomRangeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.CreateCustomRangeRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.CreateCustomRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CreateCustomRange]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest) + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateCustomRangeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateCustomRangeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest.class, + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCustomRangeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + customRangeId_ = ""; + customRange_ = null; + if (customRangeBuilder_ != null) { + customRangeBuilder_.dispose(); + customRangeBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateCustomRangeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest build() { + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest result = + new com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.customRangeId_ = customRangeId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.customRange_ = + customRangeBuilder_ == null ? customRange_ : customRangeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCustomRangeId().isEmpty()) { + customRangeId_ = other.customRangeId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCustomRange()) { + mergeCustomRange(other.getCustomRange()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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 18: + { + customRangeId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetCustomRangeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = 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 parent resource name where the CustomRange will be created.
+     * 
+ * + * + * 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 parent resource name where the CustomRange will be created.
+     * 
+ * + * + * 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 parent resource name where the CustomRange will be created.
+     * 
+ * + * + * 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 parent resource name where the CustomRange will be created.
+     * 
+ * + * + * 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 parent resource name where the CustomRange will be created.
+     * 
+ * + * + * 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 java.lang.Object customRangeId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the CustomRange, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string custom_range_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The customRangeId. + */ + public java.lang.String getCustomRangeId() { + java.lang.Object ref = customRangeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customRangeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the CustomRange, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string custom_range_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for customRangeId. + */ + public com.google.protobuf.ByteString getCustomRangeIdBytes() { + java.lang.Object ref = customRangeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customRangeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the CustomRange, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string custom_range_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The customRangeId to set. + * @return This builder for chaining. + */ + public Builder setCustomRangeId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + customRangeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the CustomRange, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string custom_range_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCustomRangeId() { + customRangeId_ = getDefaultInstance().getCustomRangeId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the CustomRange, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string custom_range_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for customRangeId to set. + * @return This builder for chaining. + */ + public Builder setCustomRangeIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + customRangeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.numberregistry.v1alpha.CustomRange customRange_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder> + customRangeBuilder_; + + /** + * + * + *
+     * Required. The CustomRange resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customRange field is set. + */ + public boolean hasCustomRange() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The CustomRange resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customRange. + */ + public com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange() { + if (customRangeBuilder_ == null) { + return customRange_ == null + ? com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance() + : customRange_; + } else { + return customRangeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The CustomRange resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomRange(com.google.cloud.numberregistry.v1alpha.CustomRange value) { + if (customRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customRange_ = value; + } else { + customRangeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The CustomRange resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomRange( + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder builderForValue) { + if (customRangeBuilder_ == null) { + customRange_ = builderForValue.build(); + } else { + customRangeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The CustomRange resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCustomRange(com.google.cloud.numberregistry.v1alpha.CustomRange value) { + if (customRangeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && customRange_ != null + && customRange_ + != com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance()) { + getCustomRangeBuilder().mergeFrom(value); + } else { + customRange_ = value; + } + } else { + customRangeBuilder_.mergeFrom(value); + } + if (customRange_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The CustomRange resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCustomRange() { + bitField0_ = (bitField0_ & ~0x00000004); + customRange_ = null; + if (customRangeBuilder_ != null) { + customRangeBuilder_.dispose(); + customRangeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The CustomRange resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.CustomRange.Builder getCustomRangeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetCustomRangeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The CustomRange resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangeOrBuilder() { + if (customRangeBuilder_ != null) { + return customRangeBuilder_.getMessageOrBuilder(); + } else { + return customRange_ == null + ? com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance() + : customRange_; + } + } + + /** + * + * + *
+     * Required. The CustomRange resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder> + internalGetCustomRangeFieldBuilder() { + if (customRangeBuilder_ == null) { + customRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder>( + getCustomRange(), getParentForChildren(), isClean()); + customRange_ = null; + } + return customRangeBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest) + private static final com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCustomRangeRequest 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.numberregistry.v1alpha.CreateCustomRangeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateCustomRangeRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateCustomRangeRequestOrBuilder.java new file mode 100644 index 000000000000..e08b2b2ba044 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateCustomRangeRequestOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface CreateCustomRangeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name where the CustomRange will be created.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name where the CustomRange will be created.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the CustomRange, which will become the final
+   * segment of the resource name.
+   * 
+ * + * string custom_range_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The customRangeId. + */ + java.lang.String getCustomRangeId(); + + /** + * + * + *
+   * Required. The ID to use for the CustomRange, which will become the final
+   * segment of the resource name.
+   * 
+ * + * string custom_range_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for customRangeId. + */ + com.google.protobuf.ByteString getCustomRangeIdBytes(); + + /** + * + * + *
+   * Required. The CustomRange resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customRange field is set. + */ + boolean hasCustomRange(); + + /** + * + * + *
+   * Required. The CustomRange resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customRange. + */ + com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange(); + + /** + * + * + *
+   * Required. The CustomRange resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangeOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateIpamAdminScopeRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateIpamAdminScopeRequest.java new file mode 100644 index 000000000000..ad938eee838d --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateIpamAdminScopeRequest.java @@ -0,0 +1,1439 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.CreateIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CreateIpamAdminScope]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest} + */ +@com.google.protobuf.Generated +public final class CreateIpamAdminScopeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest) + CreateIpamAdminScopeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateIpamAdminScopeRequest"); + } + + // Use CreateIpamAdminScopeRequest.newBuilder() to construct. + private CreateIpamAdminScopeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateIpamAdminScopeRequest() { + parent_ = ""; + ipamAdminScopeId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateIpamAdminScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest.class, + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name where the IpamAdminScope will be
+   * created.
+   * 
+ * + * + * 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 parent resource name where the IpamAdminScope will be
+   * created.
+   * 
+ * + * + * 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 IPAM_ADMIN_SCOPE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipamAdminScopeId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the IpamAdminScope, which will become the final
+   * segment of the resource name.
+   * 
+ * + * string ipam_admin_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The ipamAdminScopeId. + */ + @java.lang.Override + public java.lang.String getIpamAdminScopeId() { + java.lang.Object ref = ipamAdminScopeId_; + 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(); + ipamAdminScopeId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the IpamAdminScope, which will become the final
+   * segment of the resource name.
+   * 
+ * + * string ipam_admin_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for ipamAdminScopeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpamAdminScopeIdBytes() { + java.lang.Object ref = ipamAdminScopeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipamAdminScopeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IPAM_ADMIN_SCOPE_FIELD_NUMBER = 3; + private com.google.cloud.numberregistry.v1alpha.IpamAdminScope ipamAdminScope_; + + /** + * + * + *
+   * Required. The IpamAdminScope resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ipamAdminScope field is set. + */ + @java.lang.Override + public boolean hasIpamAdminScope() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The IpamAdminScope resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ipamAdminScope. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope getIpamAdminScope() { + return ipamAdminScope_ == null + ? com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance() + : ipamAdminScope_; + } + + /** + * + * + *
+   * Required. The IpamAdminScope resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder + getIpamAdminScopeOrBuilder() { + return ipamAdminScope_ == null + ? com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance() + : ipamAdminScope_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipamAdminScopeId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, ipamAdminScopeId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getIpamAdminScope()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipamAdminScopeId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, ipamAdminScopeId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getIpamAdminScope()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + 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.numberregistry.v1alpha.CreateIpamAdminScopeRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest other = + (com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getIpamAdminScopeId().equals(other.getIpamAdminScopeId())) return false; + if (hasIpamAdminScope() != other.hasIpamAdminScope()) return false; + if (hasIpamAdminScope()) { + if (!getIpamAdminScope().equals(other.getIpamAdminScope())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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) + IPAM_ADMIN_SCOPE_ID_FIELD_NUMBER; + hash = (53 * hash) + getIpamAdminScopeId().hashCode(); + if (hasIpamAdminScope()) { + hash = (37 * hash) + IPAM_ADMIN_SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getIpamAdminScope().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest 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.numberregistry.v1alpha.CreateIpamAdminScopeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest 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.numberregistry.v1alpha.CreateIpamAdminScopeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.CreateIpamAdminScopeRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.CreateIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CreateIpamAdminScope]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest) + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateIpamAdminScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest.class, + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIpamAdminScopeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + ipamAdminScopeId_ = ""; + ipamAdminScope_ = null; + if (ipamAdminScopeBuilder_ != null) { + ipamAdminScopeBuilder_.dispose(); + ipamAdminScopeBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest build() { + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest result = + new com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ipamAdminScopeId_ = ipamAdminScopeId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ipamAdminScope_ = + ipamAdminScopeBuilder_ == null ? ipamAdminScope_ : ipamAdminScopeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIpamAdminScopeId().isEmpty()) { + ipamAdminScopeId_ = other.ipamAdminScopeId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasIpamAdminScope()) { + mergeIpamAdminScope(other.getIpamAdminScope()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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 18: + { + ipamAdminScopeId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetIpamAdminScopeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = 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 parent resource name where the IpamAdminScope will be
+     * created.
+     * 
+ * + * + * 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 parent resource name where the IpamAdminScope will be
+     * created.
+     * 
+ * + * + * 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 parent resource name where the IpamAdminScope will be
+     * created.
+     * 
+ * + * + * 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 parent resource name where the IpamAdminScope will be
+     * created.
+     * 
+ * + * + * 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 parent resource name where the IpamAdminScope will be
+     * created.
+     * 
+ * + * + * 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 java.lang.Object ipamAdminScopeId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the IpamAdminScope, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string ipam_admin_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The ipamAdminScopeId. + */ + public java.lang.String getIpamAdminScopeId() { + java.lang.Object ref = ipamAdminScopeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipamAdminScopeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the IpamAdminScope, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string ipam_admin_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for ipamAdminScopeId. + */ + public com.google.protobuf.ByteString getIpamAdminScopeIdBytes() { + java.lang.Object ref = ipamAdminScopeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipamAdminScopeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the IpamAdminScope, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string ipam_admin_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The ipamAdminScopeId to set. + * @return This builder for chaining. + */ + public Builder setIpamAdminScopeId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipamAdminScopeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the IpamAdminScope, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string ipam_admin_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearIpamAdminScopeId() { + ipamAdminScopeId_ = getDefaultInstance().getIpamAdminScopeId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the IpamAdminScope, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string ipam_admin_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for ipamAdminScopeId to set. + * @return This builder for chaining. + */ + public Builder setIpamAdminScopeIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipamAdminScopeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.numberregistry.v1alpha.IpamAdminScope ipamAdminScope_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder> + ipamAdminScopeBuilder_; + + /** + * + * + *
+     * Required. The IpamAdminScope resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ipamAdminScope field is set. + */ + public boolean hasIpamAdminScope() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ipamAdminScope. + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope getIpamAdminScope() { + if (ipamAdminScopeBuilder_ == null) { + return ipamAdminScope_ == null + ? com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance() + : ipamAdminScope_; + } else { + return ipamAdminScopeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIpamAdminScope(com.google.cloud.numberregistry.v1alpha.IpamAdminScope value) { + if (ipamAdminScopeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ipamAdminScope_ = value; + } else { + ipamAdminScopeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder builderForValue) { + if (ipamAdminScopeBuilder_ == null) { + ipamAdminScope_ = builderForValue.build(); + } else { + ipamAdminScopeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.IpamAdminScope value) { + if (ipamAdminScopeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && ipamAdminScope_ != null + && ipamAdminScope_ + != com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance()) { + getIpamAdminScopeBuilder().mergeFrom(value); + } else { + ipamAdminScope_ = value; + } + } else { + ipamAdminScopeBuilder_.mergeFrom(value); + } + if (ipamAdminScope_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearIpamAdminScope() { + bitField0_ = (bitField0_ & ~0x00000004); + ipamAdminScope_ = null; + if (ipamAdminScopeBuilder_ != null) { + ipamAdminScopeBuilder_.dispose(); + ipamAdminScopeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder + getIpamAdminScopeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetIpamAdminScopeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder + getIpamAdminScopeOrBuilder() { + if (ipamAdminScopeBuilder_ != null) { + return ipamAdminScopeBuilder_.getMessageOrBuilder(); + } else { + return ipamAdminScope_ == null + ? com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance() + : ipamAdminScope_; + } + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder> + internalGetIpamAdminScopeFieldBuilder() { + if (ipamAdminScopeBuilder_ == null) { + ipamAdminScopeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder>( + getIpamAdminScope(), getParentForChildren(), isClean()); + ipamAdminScope_ = null; + } + return ipamAdminScopeBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest) + private static final com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateIpamAdminScopeRequest 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.numberregistry.v1alpha.CreateIpamAdminScopeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateIpamAdminScopeRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateIpamAdminScopeRequestOrBuilder.java new file mode 100644 index 000000000000..9486e0bc809f --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateIpamAdminScopeRequestOrBuilder.java @@ -0,0 +1,185 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface CreateIpamAdminScopeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name where the IpamAdminScope will be
+   * created.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name where the IpamAdminScope will be
+   * created.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the IpamAdminScope, which will become the final
+   * segment of the resource name.
+   * 
+ * + * string ipam_admin_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The ipamAdminScopeId. + */ + java.lang.String getIpamAdminScopeId(); + + /** + * + * + *
+   * Required. The ID to use for the IpamAdminScope, which will become the final
+   * segment of the resource name.
+   * 
+ * + * string ipam_admin_scope_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for ipamAdminScopeId. + */ + com.google.protobuf.ByteString getIpamAdminScopeIdBytes(); + + /** + * + * + *
+   * Required. The IpamAdminScope resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ipamAdminScope field is set. + */ + boolean hasIpamAdminScope(); + + /** + * + * + *
+   * Required. The IpamAdminScope resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ipamAdminScope. + */ + com.google.cloud.numberregistry.v1alpha.IpamAdminScope getIpamAdminScope(); + + /** + * + * + *
+   * Required. The IpamAdminScope resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder getIpamAdminScopeOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRealmRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRealmRequest.java new file mode 100644 index 000000000000..d6ad15a0b659 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRealmRequest.java @@ -0,0 +1,1350 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.CreateRealm][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CreateRealm]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.CreateRealmRequest} + */ +@com.google.protobuf.Generated +public final class CreateRealmRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.CreateRealmRequest) + CreateRealmRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateRealmRequest"); + } + + // Use CreateRealmRequest.newBuilder() to construct. + private CreateRealmRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateRealmRequest() { + parent_ = ""; + realmId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateRealmRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateRealmRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest.class, + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name where the Realm will be created.
+   * 
+ * + * + * 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 parent resource name where the Realm will be created.
+   * 
+ * + * + * 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 REALM_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object realmId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the Realm, which will become the final segment
+   * of the resource name.
+   * 
+ * + * string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The realmId. + */ + @java.lang.Override + public java.lang.String getRealmId() { + java.lang.Object ref = realmId_; + 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(); + realmId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the Realm, which will become the final segment
+   * of the resource name.
+   * 
+ * + * string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for realmId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRealmIdBytes() { + java.lang.Object ref = realmId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + realmId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REALM_FIELD_NUMBER = 3; + private com.google.cloud.numberregistry.v1alpha.Realm realm_; + + /** + * + * + *
+   * Required. The Realm resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the realm field is set. + */ + @java.lang.Override + public boolean hasRealm() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The Realm resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The realm. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm getRealm() { + return realm_ == null + ? com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance() + : realm_; + } + + /** + * + * + *
+   * Required. The Realm resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RealmOrBuilder getRealmOrBuilder() { + return realm_ == null + ? com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance() + : realm_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(realmId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, realmId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getRealm()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(realmId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, realmId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRealm()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + 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.numberregistry.v1alpha.CreateRealmRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest other = + (com.google.cloud.numberregistry.v1alpha.CreateRealmRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getRealmId().equals(other.getRealmId())) return false; + if (hasRealm() != other.hasRealm()) return false; + if (hasRealm()) { + if (!getRealm().equals(other.getRealm())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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) + REALM_ID_FIELD_NUMBER; + hash = (53 * hash) + getRealmId().hashCode(); + if (hasRealm()) { + hash = (37 * hash) + REALM_FIELD_NUMBER; + hash = (53 * hash) + getRealm().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRealmRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRealmRequest 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.numberregistry.v1alpha.CreateRealmRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRealmRequest 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.numberregistry.v1alpha.CreateRealmRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRealmRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRealmRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRealmRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRealmRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRealmRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRealmRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRealmRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.CreateRealmRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.CreateRealm][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CreateRealm]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.CreateRealmRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.CreateRealmRequest) + com.google.cloud.numberregistry.v1alpha.CreateRealmRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateRealmRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateRealmRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest.class, + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.CreateRealmRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRealmFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + realmId_ = ""; + realm_ = null; + if (realmBuilder_ != null) { + realmBuilder_.dispose(); + realmBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateRealmRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CreateRealmRequest getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.CreateRealmRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CreateRealmRequest build() { + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CreateRealmRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.CreateRealmRequest result = + new com.google.cloud.numberregistry.v1alpha.CreateRealmRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.CreateRealmRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.realmId_ = realmId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.realm_ = realmBuilder_ == null ? realm_ : realmBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.CreateRealmRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.CreateRealmRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.CreateRealmRequest other) { + if (other == com.google.cloud.numberregistry.v1alpha.CreateRealmRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRealmId().isEmpty()) { + realmId_ = other.realmId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasRealm()) { + mergeRealm(other.getRealm()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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 18: + { + realmId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetRealmFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = 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 parent resource name where the Realm will be created.
+     * 
+ * + * + * 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 parent resource name where the Realm will be created.
+     * 
+ * + * + * 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 parent resource name where the Realm will be created.
+     * 
+ * + * + * 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 parent resource name where the Realm will be created.
+     * 
+ * + * + * 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 parent resource name where the Realm will be created.
+     * 
+ * + * + * 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 java.lang.Object realmId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the Realm, which will become the final segment
+     * of the resource name.
+     * 
+ * + * string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The realmId. + */ + public java.lang.String getRealmId() { + java.lang.Object ref = realmId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + realmId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the Realm, which will become the final segment
+     * of the resource name.
+     * 
+ * + * string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for realmId. + */ + public com.google.protobuf.ByteString getRealmIdBytes() { + java.lang.Object ref = realmId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + realmId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the Realm, which will become the final segment
+     * of the resource name.
+     * 
+ * + * string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The realmId to set. + * @return This builder for chaining. + */ + public Builder setRealmId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + realmId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the Realm, which will become the final segment
+     * of the resource name.
+     * 
+ * + * string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRealmId() { + realmId_ = getDefaultInstance().getRealmId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the Realm, which will become the final segment
+     * of the resource name.
+     * 
+ * + * string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for realmId to set. + * @return This builder for chaining. + */ + public Builder setRealmIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + realmId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.numberregistry.v1alpha.Realm realm_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm, + com.google.cloud.numberregistry.v1alpha.Realm.Builder, + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder> + realmBuilder_; + + /** + * + * + *
+     * Required. The Realm resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the realm field is set. + */ + public boolean hasRealm() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The Realm resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The realm. + */ + public com.google.cloud.numberregistry.v1alpha.Realm getRealm() { + if (realmBuilder_ == null) { + return realm_ == null + ? com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance() + : realm_; + } else { + return realmBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The Realm resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRealm(com.google.cloud.numberregistry.v1alpha.Realm value) { + if (realmBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + realm_ = value; + } else { + realmBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Realm resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRealm(com.google.cloud.numberregistry.v1alpha.Realm.Builder builderForValue) { + if (realmBuilder_ == null) { + realm_ = builderForValue.build(); + } else { + realmBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Realm resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRealm(com.google.cloud.numberregistry.v1alpha.Realm value) { + if (realmBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && realm_ != null + && realm_ != com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance()) { + getRealmBuilder().mergeFrom(value); + } else { + realm_ = value; + } + } else { + realmBuilder_.mergeFrom(value); + } + if (realm_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The Realm resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRealm() { + bitField0_ = (bitField0_ & ~0x00000004); + realm_ = null; + if (realmBuilder_ != null) { + realmBuilder_.dispose(); + realmBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Realm resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.Realm.Builder getRealmBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetRealmFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The Realm resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.RealmOrBuilder getRealmOrBuilder() { + if (realmBuilder_ != null) { + return realmBuilder_.getMessageOrBuilder(); + } else { + return realm_ == null + ? com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance() + : realm_; + } + } + + /** + * + * + *
+     * Required. The Realm resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm, + com.google.cloud.numberregistry.v1alpha.Realm.Builder, + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder> + internalGetRealmFieldBuilder() { + if (realmBuilder_ == null) { + realmBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm, + com.google.cloud.numberregistry.v1alpha.Realm.Builder, + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder>( + getRealm(), getParentForChildren(), isClean()); + realm_ = null; + } + return realmBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.CreateRealmRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.CreateRealmRequest) + private static final com.google.cloud.numberregistry.v1alpha.CreateRealmRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.CreateRealmRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRealmRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateRealmRequest 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.numberregistry.v1alpha.CreateRealmRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRealmRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRealmRequestOrBuilder.java new file mode 100644 index 000000000000..bfd3858a9822 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRealmRequestOrBuilder.java @@ -0,0 +1,165 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface CreateRealmRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.CreateRealmRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name where the Realm will be created.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name where the Realm will be created.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the Realm, which will become the final segment
+   * of the resource name.
+   * 
+ * + * string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The realmId. + */ + java.lang.String getRealmId(); + + /** + * + * + *
+   * Required. The ID to use for the Realm, which will become the final segment
+   * of the resource name.
+   * 
+ * + * string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for realmId. + */ + com.google.protobuf.ByteString getRealmIdBytes(); + + /** + * + * + *
+   * Required. The Realm resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the realm field is set. + */ + boolean hasRealm(); + + /** + * + * + *
+   * Required. The Realm resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The realm. + */ + com.google.cloud.numberregistry.v1alpha.Realm getRealm(); + + /** + * + * + *
+   * Required. The Realm resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder getRealmOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRegistryBookRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRegistryBookRequest.java new file mode 100644 index 000000000000..4776dc939163 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRegistryBookRequest.java @@ -0,0 +1,1427 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.CreateRegistryBook][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CreateRegistryBook]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest} + */ +@com.google.protobuf.Generated +public final class CreateRegistryBookRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest) + CreateRegistryBookRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateRegistryBookRequest"); + } + + // Use CreateRegistryBookRequest.newBuilder() to construct. + private CreateRegistryBookRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateRegistryBookRequest() { + parent_ = ""; + registryBookId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateRegistryBookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateRegistryBookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest.class, + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name where the RegistryBook will be created.
+   * 
+ * + * + * 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 parent resource name where the RegistryBook will be created.
+   * 
+ * + * + * 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 REGISTRY_BOOK_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object registryBookId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the RegistryBook, which will become the final
+   * segment of the resource name.
+   * 
+ * + * string registry_book_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The registryBookId. + */ + @java.lang.Override + public java.lang.String getRegistryBookId() { + java.lang.Object ref = registryBookId_; + 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(); + registryBookId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the RegistryBook, which will become the final
+   * segment of the resource name.
+   * 
+ * + * string registry_book_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for registryBookId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegistryBookIdBytes() { + java.lang.Object ref = registryBookId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + registryBookId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGISTRY_BOOK_FIELD_NUMBER = 3; + private com.google.cloud.numberregistry.v1alpha.RegistryBook registryBook_; + + /** + * + * + *
+   * Required. The RegistryBook resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the registryBook field is set. + */ + @java.lang.Override + public boolean hasRegistryBook() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The RegistryBook resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The registryBook. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBook getRegistryBook() { + return registryBook_ == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance() + : registryBook_; + } + + /** + * + * + *
+   * Required. The RegistryBook resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder getRegistryBookOrBuilder() { + return registryBook_ == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance() + : registryBook_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registryBookId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, registryBookId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getRegistryBook()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registryBookId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, registryBookId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRegistryBook()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + 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.numberregistry.v1alpha.CreateRegistryBookRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest other = + (com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getRegistryBookId().equals(other.getRegistryBookId())) return false; + if (hasRegistryBook() != other.hasRegistryBook()) return false; + if (hasRegistryBook()) { + if (!getRegistryBook().equals(other.getRegistryBook())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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) + REGISTRY_BOOK_ID_FIELD_NUMBER; + hash = (53 * hash) + getRegistryBookId().hashCode(); + if (hasRegistryBook()) { + hash = (37 * hash) + REGISTRY_BOOK_FIELD_NUMBER; + hash = (53 * hash) + getRegistryBook().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest 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.numberregistry.v1alpha.CreateRegistryBookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest 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.numberregistry.v1alpha.CreateRegistryBookRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.CreateRegistryBookRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.CreateRegistryBook][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CreateRegistryBook]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest) + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateRegistryBookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateRegistryBookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest.class, + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRegistryBookFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + registryBookId_ = ""; + registryBook_ = null; + if (registryBookBuilder_ != null) { + registryBookBuilder_.dispose(); + registryBookBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CreateRegistryBookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest build() { + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest result = + new com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.registryBookId_ = registryBookId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.registryBook_ = + registryBookBuilder_ == null ? registryBook_ : registryBookBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRegistryBookId().isEmpty()) { + registryBookId_ = other.registryBookId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasRegistryBook()) { + mergeRegistryBook(other.getRegistryBook()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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 18: + { + registryBookId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetRegistryBookFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = 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 parent resource name where the RegistryBook will be created.
+     * 
+ * + * + * 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 parent resource name where the RegistryBook will be created.
+     * 
+ * + * + * 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 parent resource name where the RegistryBook will be created.
+     * 
+ * + * + * 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 parent resource name where the RegistryBook will be created.
+     * 
+ * + * + * 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 parent resource name where the RegistryBook will be created.
+     * 
+ * + * + * 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 java.lang.Object registryBookId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the RegistryBook, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string registry_book_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The registryBookId. + */ + public java.lang.String getRegistryBookId() { + java.lang.Object ref = registryBookId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + registryBookId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the RegistryBook, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string registry_book_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for registryBookId. + */ + public com.google.protobuf.ByteString getRegistryBookIdBytes() { + java.lang.Object ref = registryBookId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + registryBookId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the RegistryBook, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string registry_book_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The registryBookId to set. + * @return This builder for chaining. + */ + public Builder setRegistryBookId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + registryBookId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the RegistryBook, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string registry_book_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRegistryBookId() { + registryBookId_ = getDefaultInstance().getRegistryBookId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the RegistryBook, which will become the final
+     * segment of the resource name.
+     * 
+ * + * string registry_book_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for registryBookId to set. + * @return This builder for chaining. + */ + public Builder setRegistryBookIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + registryBookId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.numberregistry.v1alpha.RegistryBook registryBook_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RegistryBook, + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder, + com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder> + registryBookBuilder_; + + /** + * + * + *
+     * Required. The RegistryBook resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the registryBook field is set. + */ + public boolean hasRegistryBook() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The RegistryBook resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The registryBook. + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBook getRegistryBook() { + if (registryBookBuilder_ == null) { + return registryBook_ == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance() + : registryBook_; + } else { + return registryBookBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The RegistryBook resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRegistryBook(com.google.cloud.numberregistry.v1alpha.RegistryBook value) { + if (registryBookBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + registryBook_ = value; + } else { + registryBookBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The RegistryBook resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRegistryBook( + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder builderForValue) { + if (registryBookBuilder_ == null) { + registryBook_ = builderForValue.build(); + } else { + registryBookBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The RegistryBook resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRegistryBook(com.google.cloud.numberregistry.v1alpha.RegistryBook value) { + if (registryBookBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && registryBook_ != null + && registryBook_ + != com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance()) { + getRegistryBookBuilder().mergeFrom(value); + } else { + registryBook_ = value; + } + } else { + registryBookBuilder_.mergeFrom(value); + } + if (registryBook_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The RegistryBook resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRegistryBook() { + bitField0_ = (bitField0_ & ~0x00000004); + registryBook_ = null; + if (registryBookBuilder_ != null) { + registryBookBuilder_.dispose(); + registryBookBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The RegistryBook resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder getRegistryBookBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetRegistryBookFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The RegistryBook resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder + getRegistryBookOrBuilder() { + if (registryBookBuilder_ != null) { + return registryBookBuilder_.getMessageOrBuilder(); + } else { + return registryBook_ == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance() + : registryBook_; + } + } + + /** + * + * + *
+     * Required. The RegistryBook resource to create.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RegistryBook, + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder, + com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder> + internalGetRegistryBookFieldBuilder() { + if (registryBookBuilder_ == null) { + registryBookBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RegistryBook, + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder, + com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder>( + getRegistryBook(), getParentForChildren(), isClean()); + registryBook_ = null; + } + return registryBookBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest) + private static final com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateRegistryBookRequest 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.numberregistry.v1alpha.CreateRegistryBookRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRegistryBookRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRegistryBookRequestOrBuilder.java new file mode 100644 index 000000000000..4815141e468c --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CreateRegistryBookRequestOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface CreateRegistryBookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name where the RegistryBook will be created.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name where the RegistryBook will be created.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the RegistryBook, which will become the final
+   * segment of the resource name.
+   * 
+ * + * string registry_book_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The registryBookId. + */ + java.lang.String getRegistryBookId(); + + /** + * + * + *
+   * Required. The ID to use for the RegistryBook, which will become the final
+   * segment of the resource name.
+   * 
+ * + * string registry_book_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for registryBookId. + */ + com.google.protobuf.ByteString getRegistryBookIdBytes(); + + /** + * + * + *
+   * Required. The RegistryBook resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the registryBook field is set. + */ + boolean hasRegistryBook(); + + /** + * + * + *
+   * Required. The RegistryBook resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The registryBook. + */ + com.google.cloud.numberregistry.v1alpha.RegistryBook getRegistryBook(); + + /** + * + * + *
+   * Required. The RegistryBook resource to create.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder getRegistryBookOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CustomRange.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CustomRange.java new file mode 100644 index 000000000000..2adde9ef083a --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CustomRange.java @@ -0,0 +1,2949 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * A CustomRange represents a user-defined IP address range.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.CustomRange} + */ +@com.google.protobuf.Generated +public final class CustomRange extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.CustomRange) + CustomRangeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CustomRange"); + } + + // Use CustomRange.newBuilder() to construct. + private CustomRange(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CustomRange() { + name_ = ""; + realm_ = ""; + parentRange_ = ""; + registryBook_ = ""; + attributes_ = java.util.Collections.emptyList(); + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CustomRange_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CustomRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CustomRange.class, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder.class); + } + + private int ipCidrRangeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object ipCidrRange_; + + public enum IpCidrRangeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + IPV4_CIDR_RANGE(2), + IPV6_CIDR_RANGE(3), + IPCIDRRANGE_NOT_SET(0); + private final int value; + + private IpCidrRangeCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IpCidrRangeCase valueOf(int value) { + return forNumber(value); + } + + public static IpCidrRangeCase forNumber(int value) { + switch (value) { + case 2: + return IPV4_CIDR_RANGE; + case 3: + return IPV6_CIDR_RANGE; + case 0: + return IPCIDRRANGE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public IpCidrRangeCase getIpCidrRangeCase() { + return IpCidrRangeCase.forNumber(ipCidrRangeCase_); + } + + public static final int IPV4_CIDR_RANGE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Optional. The IPv4 CIDR range of the CustomRange.
+   * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipv4CidrRange field is set. + */ + public boolean hasIpv4CidrRange() { + return ipCidrRangeCase_ == 2; + } + + /** + * + * + *
+   * Optional. The IPv4 CIDR range of the CustomRange.
+   * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipv4CidrRange. + */ + public java.lang.String getIpv4CidrRange() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 2) { + ref = ipCidrRange_; + } + 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(); + if (ipCidrRangeCase_ == 2) { + ipCidrRange_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Optional. The IPv4 CIDR range of the CustomRange.
+   * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipv4CidrRange. + */ + public com.google.protobuf.ByteString getIpv4CidrRangeBytes() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 2) { + ref = ipCidrRange_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (ipCidrRangeCase_ == 2) { + ipCidrRange_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IPV6_CIDR_RANGE_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Optional. The IPv6 CIDR range of the CustomRange.
+   * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipv6CidrRange field is set. + */ + public boolean hasIpv6CidrRange() { + return ipCidrRangeCase_ == 3; + } + + /** + * + * + *
+   * Optional. The IPv6 CIDR range of the CustomRange.
+   * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipv6CidrRange. + */ + public java.lang.String getIpv6CidrRange() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 3) { + ref = ipCidrRange_; + } + 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(); + if (ipCidrRangeCase_ == 3) { + ipCidrRange_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Optional. The IPv6 CIDR range of the CustomRange.
+   * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipv6CidrRange. + */ + public com.google.protobuf.ByteString getIpv6CidrRangeBytes() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 3) { + ref = ipCidrRange_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (ipCidrRangeCase_ == 3) { + ipCidrRange_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Identifier. The resource name of the CustomRange, in the format
+   * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the CustomRange, in the format
+   * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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 REALM_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object realm_ = ""; + + /** + * + * + *
+   * Optional. The resource name of the Realm associated with the CustomRange,
+   * in the format `projects/{project}/locations/{location}/realms/{realm}`. The
+   * Realm must be in the same project as the CustomRange. This field must not
+   * be set if the `parent_range` field is set, as the Realm will be inherited
+   * from the parent CustomRange.
+   * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The realm. + */ + @java.lang.Override + public java.lang.String getRealm() { + java.lang.Object ref = realm_; + 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(); + realm_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The resource name of the Realm associated with the CustomRange,
+   * in the format `projects/{project}/locations/{location}/realms/{realm}`. The
+   * Realm must be in the same project as the CustomRange. This field must not
+   * be set if the `parent_range` field is set, as the Realm will be inherited
+   * from the parent CustomRange.
+   * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for realm. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRealmBytes() { + java.lang.Object ref = realm_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + realm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_RANGE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object parentRange_ = ""; + + /** + * + * + *
+   * Optional. The resource name of the parent CustomRange, in the format
+   * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+   * If specified, the parent CustomRange must be in the same RegistryBook.
+   * This field is mutually exclusive with the `realm` field, as the Realm is
+   * inherited from the parent CustomRange.
+   * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentRange. + */ + @java.lang.Override + public java.lang.String getParentRange() { + java.lang.Object ref = parentRange_; + 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(); + parentRange_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The resource name of the parent CustomRange, in the format
+   * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+   * If specified, the parent CustomRange must be in the same RegistryBook.
+   * This field is mutually exclusive with the `realm` field, as the Realm is
+   * inherited from the parent CustomRange.
+   * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentRangeBytes() { + java.lang.Object ref = parentRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGISTRY_BOOK_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object registryBook_ = ""; + + /** + * + * + *
+   * Output only. The RegistryBook of the CustomRange. This field is inherited
+   * from the Realm or parent CustomRange depending on which one is specified.
+   * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The registryBook. + */ + @java.lang.Override + public java.lang.String getRegistryBook() { + java.lang.Object ref = registryBook_; + 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(); + registryBook_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The RegistryBook of the CustomRange. This field is inherited
+   * from the Realm or parent CustomRange depending on which one is specified.
+   * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for registryBook. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegistryBookBytes() { + java.lang.Object ref = registryBook_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + registryBook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List attributes_; + + /** + * + * + *
+   * Optional. The attributes of the CustomRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getAttributesList() { + return attributes_; + } + + /** + * + * + *
+   * Optional. The attributes of the CustomRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getAttributesOrBuilderList() { + return attributes_; + } + + /** + * + * + *
+   * Optional. The attributes of the CustomRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getAttributesCount() { + return attributes_.size(); + } + + /** + * + * + *
+   * Optional. The attributes of the CustomRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Attribute getAttributes(int index) { + return attributes_.get(index); + } + + /** + * + * + *
+   * Optional. The attributes of the CustomRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.AttributeOrBuilder getAttributesOrBuilder( + int index) { + return attributes_.get(index); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. The description of the CustomRange.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The description of the CustomRange.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 9; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CustomRange_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (ipCidrRangeCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, ipCidrRange_); + } + if (ipCidrRangeCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, ipCidrRange_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(realm_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, realm_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registryBook_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, registryBook_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parentRange_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, parentRange_); + } + for (int i = 0; i < attributes_.size(); i++) { + output.writeMessage(7, attributes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, description_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 9); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (ipCidrRangeCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, ipCidrRange_); + } + if (ipCidrRangeCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, ipCidrRange_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(realm_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, realm_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registryBook_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, registryBook_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parentRange_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, parentRange_); + } + for (int i = 0; i < attributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, attributes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, description_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, labels__); + } + 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.numberregistry.v1alpha.CustomRange)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.CustomRange other = + (com.google.cloud.numberregistry.v1alpha.CustomRange) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRealm().equals(other.getRealm())) return false; + if (!getParentRange().equals(other.getParentRange())) return false; + if (!getRegistryBook().equals(other.getRegistryBook())) return false; + if (!getAttributesList().equals(other.getAttributesList())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getIpCidrRangeCase().equals(other.getIpCidrRangeCase())) return false; + switch (ipCidrRangeCase_) { + case 2: + if (!getIpv4CidrRange().equals(other.getIpv4CidrRange())) return false; + break; + case 3: + if (!getIpv6CidrRange().equals(other.getIpv6CidrRange())) return false; + break; + case 0: + default: + } + 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) + REALM_FIELD_NUMBER; + hash = (53 * hash) + getRealm().hashCode(); + hash = (37 * hash) + PARENT_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getParentRange().hashCode(); + hash = (37 * hash) + REGISTRY_BOOK_FIELD_NUMBER; + hash = (53 * hash) + getRegistryBook().hashCode(); + if (getAttributesCount() > 0) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAttributesList().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + switch (ipCidrRangeCase_) { + case 2: + hash = (37 * hash) + IPV4_CIDR_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getIpv4CidrRange().hashCode(); + break; + case 3: + hash = (37 * hash) + IPV6_CIDR_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getIpv6CidrRange().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.CustomRange parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CustomRange 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.numberregistry.v1alpha.CustomRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CustomRange 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.numberregistry.v1alpha.CustomRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.CustomRange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CustomRange parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CustomRange parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CustomRange parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CustomRange parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.CustomRange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.CustomRange parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.CustomRange 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A CustomRange represents a user-defined IP address range.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.CustomRange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.CustomRange) + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CustomRange_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 9: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CustomRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.CustomRange.class, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.CustomRange.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + realm_ = ""; + parentRange_ = ""; + registryBook_ = ""; + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + } else { + attributes_ = null; + attributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + description_ = ""; + internalGetMutableLabels().clear(); + ipCidrRangeCase_ = 0; + ipCidrRange_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_CustomRange_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRange getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRange build() { + com.google.cloud.numberregistry.v1alpha.CustomRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRange buildPartial() { + com.google.cloud.numberregistry.v1alpha.CustomRange result = + new com.google.cloud.numberregistry.v1alpha.CustomRange(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.numberregistry.v1alpha.CustomRange result) { + if (attributesBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + attributes_ = java.util.Collections.unmodifiableList(attributes_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.attributes_ = attributes_; + } else { + result.attributes_ = attributesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.CustomRange result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.realm_ = realm_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.parentRange_ = parentRange_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.registryBook_ = registryBook_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + } + + private void buildPartialOneofs(com.google.cloud.numberregistry.v1alpha.CustomRange result) { + result.ipCidrRangeCase_ = ipCidrRangeCase_; + result.ipCidrRange_ = this.ipCidrRange_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.CustomRange) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.CustomRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.CustomRange other) { + if (other == com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getRealm().isEmpty()) { + realm_ = other.realm_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getParentRange().isEmpty()) { + parentRange_ = other.parentRange_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getRegistryBook().isEmpty()) { + registryBook_ = other.registryBook_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (attributesBuilder_ == null) { + if (!other.attributes_.isEmpty()) { + if (attributes_.isEmpty()) { + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureAttributesIsMutable(); + attributes_.addAll(other.attributes_); + } + onChanged(); + } + } else { + if (!other.attributes_.isEmpty()) { + if (attributesBuilder_.isEmpty()) { + attributesBuilder_.dispose(); + attributesBuilder_ = null; + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000040); + attributesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAttributesFieldBuilder() + : null; + } else { + attributesBuilder_.addAllMessages(other.attributes_); + } + } + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000080; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000100; + switch (other.getIpCidrRangeCase()) { + case IPV4_CIDR_RANGE: + { + ipCidrRangeCase_ = 2; + ipCidrRange_ = other.ipCidrRange_; + onChanged(); + break; + } + case IPV6_CIDR_RANGE: + { + ipCidrRangeCase_ = 3; + ipCidrRange_ = other.ipCidrRange_; + onChanged(); + break; + } + case IPCIDRRANGE_NOT_SET: + { + break; + } + } + 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_ |= 0x00000004; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ipCidrRangeCase_ = 2; + ipCidrRange_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ipCidrRangeCase_ = 3; + ipCidrRange_ = s; + break; + } // case 26 + case 34: + { + realm_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + registryBook_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + parentRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + com.google.cloud.numberregistry.v1alpha.Attribute m = + input.readMessage( + com.google.cloud.numberregistry.v1alpha.Attribute.parser(), + extensionRegistry); + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(m); + } else { + attributesBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000100; + break; + } // case 74 + 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 ipCidrRangeCase_ = 0; + private java.lang.Object ipCidrRange_; + + public IpCidrRangeCase getIpCidrRangeCase() { + return IpCidrRangeCase.forNumber(ipCidrRangeCase_); + } + + public Builder clearIpCidrRange() { + ipCidrRangeCase_ = 0; + ipCidrRange_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Optional. The IPv4 CIDR range of the CustomRange.
+     * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipv4CidrRange field is set. + */ + @java.lang.Override + public boolean hasIpv4CidrRange() { + return ipCidrRangeCase_ == 2; + } + + /** + * + * + *
+     * Optional. The IPv4 CIDR range of the CustomRange.
+     * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipv4CidrRange. + */ + @java.lang.Override + public java.lang.String getIpv4CidrRange() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 2) { + ref = ipCidrRange_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (ipCidrRangeCase_ == 2) { + ipCidrRange_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The IPv4 CIDR range of the CustomRange.
+     * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipv4CidrRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpv4CidrRangeBytes() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 2) { + ref = ipCidrRange_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (ipCidrRangeCase_ == 2) { + ipCidrRange_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The IPv4 CIDR range of the CustomRange.
+     * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ipv4CidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpv4CidrRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipCidrRangeCase_ = 2; + ipCidrRange_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The IPv4 CIDR range of the CustomRange.
+     * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIpv4CidrRange() { + if (ipCidrRangeCase_ == 2) { + ipCidrRangeCase_ = 0; + ipCidrRange_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The IPv4 CIDR range of the CustomRange.
+     * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for ipv4CidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpv4CidrRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipCidrRangeCase_ = 2; + ipCidrRange_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The IPv6 CIDR range of the CustomRange.
+     * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipv6CidrRange field is set. + */ + @java.lang.Override + public boolean hasIpv6CidrRange() { + return ipCidrRangeCase_ == 3; + } + + /** + * + * + *
+     * Optional. The IPv6 CIDR range of the CustomRange.
+     * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipv6CidrRange. + */ + @java.lang.Override + public java.lang.String getIpv6CidrRange() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 3) { + ref = ipCidrRange_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (ipCidrRangeCase_ == 3) { + ipCidrRange_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The IPv6 CIDR range of the CustomRange.
+     * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipv6CidrRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpv6CidrRangeBytes() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 3) { + ref = ipCidrRange_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (ipCidrRangeCase_ == 3) { + ipCidrRange_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The IPv6 CIDR range of the CustomRange.
+     * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ipv6CidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpv6CidrRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipCidrRangeCase_ = 3; + ipCidrRange_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The IPv6 CIDR range of the CustomRange.
+     * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIpv6CidrRange() { + if (ipCidrRangeCase_ == 3) { + ipCidrRangeCase_ = 0; + ipCidrRange_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The IPv6 CIDR range of the CustomRange.
+     * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for ipv6CidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpv6CidrRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipCidrRangeCase_ = 3; + ipCidrRange_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Identifier. The resource name of the CustomRange, in the format
+     * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the CustomRange, in the format
+     * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the CustomRange, in the format
+     * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Identifier. The resource name of the CustomRange, in the format
+     * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Identifier. The resource name of the CustomRange, in the format
+     * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object realm_ = ""; + + /** + * + * + *
+     * Optional. The resource name of the Realm associated with the CustomRange,
+     * in the format `projects/{project}/locations/{location}/realms/{realm}`. The
+     * Realm must be in the same project as the CustomRange. This field must not
+     * be set if the `parent_range` field is set, as the Realm will be inherited
+     * from the parent CustomRange.
+     * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The realm. + */ + public java.lang.String getRealm() { + java.lang.Object ref = realm_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + realm_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name of the Realm associated with the CustomRange,
+     * in the format `projects/{project}/locations/{location}/realms/{realm}`. The
+     * Realm must be in the same project as the CustomRange. This field must not
+     * be set if the `parent_range` field is set, as the Realm will be inherited
+     * from the parent CustomRange.
+     * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for realm. + */ + public com.google.protobuf.ByteString getRealmBytes() { + java.lang.Object ref = realm_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + realm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name of the Realm associated with the CustomRange,
+     * in the format `projects/{project}/locations/{location}/realms/{realm}`. The
+     * Realm must be in the same project as the CustomRange. This field must not
+     * be set if the `parent_range` field is set, as the Realm will be inherited
+     * from the parent CustomRange.
+     * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The realm to set. + * @return This builder for chaining. + */ + public Builder setRealm(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + realm_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of the Realm associated with the CustomRange,
+     * in the format `projects/{project}/locations/{location}/realms/{realm}`. The
+     * Realm must be in the same project as the CustomRange. This field must not
+     * be set if the `parent_range` field is set, as the Realm will be inherited
+     * from the parent CustomRange.
+     * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRealm() { + realm_ = getDefaultInstance().getRealm(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of the Realm associated with the CustomRange,
+     * in the format `projects/{project}/locations/{location}/realms/{realm}`. The
+     * Realm must be in the same project as the CustomRange. This field must not
+     * be set if the `parent_range` field is set, as the Realm will be inherited
+     * from the parent CustomRange.
+     * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for realm to set. + * @return This builder for chaining. + */ + public Builder setRealmBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + realm_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object parentRange_ = ""; + + /** + * + * + *
+     * Optional. The resource name of the parent CustomRange, in the format
+     * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+     * If specified, the parent CustomRange must be in the same RegistryBook.
+     * This field is mutually exclusive with the `realm` field, as the Realm is
+     * inherited from the parent CustomRange.
+     * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentRange. + */ + public java.lang.String getParentRange() { + java.lang.Object ref = parentRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name of the parent CustomRange, in the format
+     * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+     * If specified, the parent CustomRange must be in the same RegistryBook.
+     * This field is mutually exclusive with the `realm` field, as the Realm is
+     * inherited from the parent CustomRange.
+     * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentRange. + */ + public com.google.protobuf.ByteString getParentRangeBytes() { + java.lang.Object ref = parentRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name of the parent CustomRange, in the format
+     * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+     * If specified, the parent CustomRange must be in the same RegistryBook.
+     * This field is mutually exclusive with the `realm` field, as the Realm is
+     * inherited from the parent CustomRange.
+     * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The parentRange to set. + * @return This builder for chaining. + */ + public Builder setParentRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parentRange_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of the parent CustomRange, in the format
+     * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+     * If specified, the parent CustomRange must be in the same RegistryBook.
+     * This field is mutually exclusive with the `realm` field, as the Realm is
+     * inherited from the parent CustomRange.
+     * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParentRange() { + parentRange_ = getDefaultInstance().getParentRange(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of the parent CustomRange, in the format
+     * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+     * If specified, the parent CustomRange must be in the same RegistryBook.
+     * This field is mutually exclusive with the `realm` field, as the Realm is
+     * inherited from the parent CustomRange.
+     * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parentRange to set. + * @return This builder for chaining. + */ + public Builder setParentRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parentRange_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object registryBook_ = ""; + + /** + * + * + *
+     * Output only. The RegistryBook of the CustomRange. This field is inherited
+     * from the Realm or parent CustomRange depending on which one is specified.
+     * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The registryBook. + */ + public java.lang.String getRegistryBook() { + java.lang.Object ref = registryBook_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + registryBook_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The RegistryBook of the CustomRange. This field is inherited
+     * from the Realm or parent CustomRange depending on which one is specified.
+     * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for registryBook. + */ + public com.google.protobuf.ByteString getRegistryBookBytes() { + java.lang.Object ref = registryBook_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + registryBook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The RegistryBook of the CustomRange. This field is inherited
+     * from the Realm or parent CustomRange depending on which one is specified.
+     * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The registryBook to set. + * @return This builder for chaining. + */ + public Builder setRegistryBook(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + registryBook_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The RegistryBook of the CustomRange. This field is inherited
+     * from the Realm or parent CustomRange depending on which one is specified.
+     * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRegistryBook() { + registryBook_ = getDefaultInstance().getRegistryBook(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The RegistryBook of the CustomRange. This field is inherited
+     * from the Realm or parent CustomRange depending on which one is specified.
+     * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for registryBook to set. + * @return This builder for chaining. + */ + public Builder setRegistryBookBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + registryBook_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.util.List attributes_ = + java.util.Collections.emptyList(); + + private void ensureAttributesIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + attributes_ = + new java.util.ArrayList(attributes_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Attribute, + com.google.cloud.numberregistry.v1alpha.Attribute.Builder, + com.google.cloud.numberregistry.v1alpha.AttributeOrBuilder> + attributesBuilder_; + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getAttributesList() { + if (attributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(attributes_); + } else { + return attributesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getAttributesCount() { + if (attributesBuilder_ == null) { + return attributes_.size(); + } else { + return attributesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.numberregistry.v1alpha.Attribute getAttributes(int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAttributes( + int index, com.google.cloud.numberregistry.v1alpha.Attribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.set(index, value); + onChanged(); + } else { + attributesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAttributes( + int index, com.google.cloud.numberregistry.v1alpha.Attribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.set(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAttributes(com.google.cloud.numberregistry.v1alpha.Attribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(value); + onChanged(); + } else { + attributesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAttributes( + int index, com.google.cloud.numberregistry.v1alpha.Attribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(index, value); + onChanged(); + } else { + attributesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAttributes( + com.google.cloud.numberregistry.v1alpha.Attribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAttributes( + int index, com.google.cloud.numberregistry.v1alpha.Attribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllAttributes( + java.lang.Iterable values) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributes_); + onChanged(); + } else { + attributesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAttributes() { + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + attributesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAttributes(int index) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.remove(index); + onChanged(); + } else { + attributesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.numberregistry.v1alpha.Attribute.Builder getAttributesBuilder( + int index) { + return internalGetAttributesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.numberregistry.v1alpha.AttributeOrBuilder getAttributesOrBuilder( + int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAttributesOrBuilderList() { + if (attributesBuilder_ != null) { + return attributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attributes_); + } + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.numberregistry.v1alpha.Attribute.Builder addAttributesBuilder() { + return internalGetAttributesFieldBuilder() + .addBuilder(com.google.cloud.numberregistry.v1alpha.Attribute.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.numberregistry.v1alpha.Attribute.Builder addAttributesBuilder( + int index) { + return internalGetAttributesFieldBuilder() + .addBuilder( + index, com.google.cloud.numberregistry.v1alpha.Attribute.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The attributes of the CustomRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAttributesBuilderList() { + return internalGetAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Attribute, + com.google.cloud.numberregistry.v1alpha.Attribute.Builder, + com.google.cloud.numberregistry.v1alpha.AttributeOrBuilder> + internalGetAttributesFieldBuilder() { + if (attributesBuilder_ == null) { + attributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Attribute, + com.google.cloud.numberregistry.v1alpha.Attribute.Builder, + com.google.cloud.numberregistry.v1alpha.AttributeOrBuilder>( + attributes_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + attributes_ = null; + } + return attributesBuilder_; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. The description of the CustomRange.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the CustomRange.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the CustomRange.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the CustomRange.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the CustomRange.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000100; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000100; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000100; + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000100; + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.CustomRange) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.CustomRange) + private static final com.google.cloud.numberregistry.v1alpha.CustomRange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.CustomRange(); + } + + public static com.google.cloud.numberregistry.v1alpha.CustomRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomRange 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.numberregistry.v1alpha.CustomRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CustomRangeName.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CustomRangeName.java new file mode 100644 index 000000000000..ed7d1d77a342 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CustomRangeName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha; + +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 CustomRangeName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CUSTOM_RANGE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/customRanges/{custom_range}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String customRange; + + @Deprecated + protected CustomRangeName() { + project = null; + location = null; + customRange = null; + } + + private CustomRangeName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + customRange = Preconditions.checkNotNull(builder.getCustomRange()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCustomRange() { + return customRange; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CustomRangeName of(String project, String location, String customRange) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCustomRange(customRange) + .build(); + } + + public static String format(String project, String location, String customRange) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCustomRange(customRange) + .build() + .toString(); + } + + public static CustomRangeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CUSTOM_RANGE.validatedMatch( + formattedString, "CustomRangeName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("custom_range")); + } + + 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 (CustomRangeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CUSTOM_RANGE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (customRange != null) { + fieldMapBuilder.put("custom_range", customRange); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CUSTOM_RANGE.instantiate( + "project", project, "location", location, "custom_range", customRange); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + CustomRangeName that = ((CustomRangeName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.customRange, that.customRange); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(customRange); + return h; + } + + /** Builder for projects/{project}/locations/{location}/customRanges/{custom_range}. */ + public static class Builder { + private String project; + private String location; + private String customRange; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCustomRange() { + return customRange; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCustomRange(String customRange) { + this.customRange = customRange; + return this; + } + + private Builder(CustomRangeName customRangeName) { + this.project = customRangeName.project; + this.location = customRangeName.location; + this.customRange = customRangeName.customRange; + } + + public CustomRangeName build() { + return new CustomRangeName(this); + } + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CustomRangeOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CustomRangeOrBuilder.java new file mode 100644 index 000000000000..7c898c0728b9 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/CustomRangeOrBuilder.java @@ -0,0 +1,399 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface CustomRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.CustomRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The IPv4 CIDR range of the CustomRange.
+   * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipv4CidrRange field is set. + */ + boolean hasIpv4CidrRange(); + + /** + * + * + *
+   * Optional. The IPv4 CIDR range of the CustomRange.
+   * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipv4CidrRange. + */ + java.lang.String getIpv4CidrRange(); + + /** + * + * + *
+   * Optional. The IPv4 CIDR range of the CustomRange.
+   * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipv4CidrRange. + */ + com.google.protobuf.ByteString getIpv4CidrRangeBytes(); + + /** + * + * + *
+   * Optional. The IPv6 CIDR range of the CustomRange.
+   * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipv6CidrRange field is set. + */ + boolean hasIpv6CidrRange(); + + /** + * + * + *
+   * Optional. The IPv6 CIDR range of the CustomRange.
+   * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipv6CidrRange. + */ + java.lang.String getIpv6CidrRange(); + + /** + * + * + *
+   * Optional. The IPv6 CIDR range of the CustomRange.
+   * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipv6CidrRange. + */ + com.google.protobuf.ByteString getIpv6CidrRangeBytes(); + + /** + * + * + *
+   * Required. Identifier. The resource name of the CustomRange, in the format
+   * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Identifier. The resource name of the CustomRange, in the format
+   * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The resource name of the Realm associated with the CustomRange,
+   * in the format `projects/{project}/locations/{location}/realms/{realm}`. The
+   * Realm must be in the same project as the CustomRange. This field must not
+   * be set if the `parent_range` field is set, as the Realm will be inherited
+   * from the parent CustomRange.
+   * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The realm. + */ + java.lang.String getRealm(); + + /** + * + * + *
+   * Optional. The resource name of the Realm associated with the CustomRange,
+   * in the format `projects/{project}/locations/{location}/realms/{realm}`. The
+   * Realm must be in the same project as the CustomRange. This field must not
+   * be set if the `parent_range` field is set, as the Realm will be inherited
+   * from the parent CustomRange.
+   * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for realm. + */ + com.google.protobuf.ByteString getRealmBytes(); + + /** + * + * + *
+   * Optional. The resource name of the parent CustomRange, in the format
+   * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+   * If specified, the parent CustomRange must be in the same RegistryBook.
+   * This field is mutually exclusive with the `realm` field, as the Realm is
+   * inherited from the parent CustomRange.
+   * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentRange. + */ + java.lang.String getParentRange(); + + /** + * + * + *
+   * Optional. The resource name of the parent CustomRange, in the format
+   * `projects/{project}/locations/{location}/customRanges/{custom_range}`.
+   * If specified, the parent CustomRange must be in the same RegistryBook.
+   * This field is mutually exclusive with the `realm` field, as the Realm is
+   * inherited from the parent CustomRange.
+   * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentRange. + */ + com.google.protobuf.ByteString getParentRangeBytes(); + + /** + * + * + *
+   * Output only. The RegistryBook of the CustomRange. This field is inherited
+   * from the Realm or parent CustomRange depending on which one is specified.
+   * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The registryBook. + */ + java.lang.String getRegistryBook(); + + /** + * + * + *
+   * Output only. The RegistryBook of the CustomRange. This field is inherited
+   * from the Realm or parent CustomRange depending on which one is specified.
+   * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for registryBook. + */ + com.google.protobuf.ByteString getRegistryBookBytes(); + + /** + * + * + *
+   * Optional. The attributes of the CustomRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getAttributesList(); + + /** + * + * + *
+   * Optional. The attributes of the CustomRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.numberregistry.v1alpha.Attribute getAttributes(int index); + + /** + * + * + *
+   * Optional. The attributes of the CustomRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAttributesCount(); + + /** + * + * + *
+   * Optional. The attributes of the CustomRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getAttributesOrBuilderList(); + + /** + * + * + *
+   * Optional. The attributes of the CustomRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.numberregistry.v1alpha.AttributeOrBuilder getAttributesOrBuilder(int index); + + /** + * + * + *
+   * Optional. The description of the CustomRange.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. The description of the CustomRange.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + com.google.cloud.numberregistry.v1alpha.CustomRange.IpCidrRangeCase getIpCidrRangeCase(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteCustomRangeRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteCustomRangeRequest.java new file mode 100644 index 000000000000..203e3fa60768 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteCustomRangeRequest.java @@ -0,0 +1,1006 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.DeleteCustomRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DeleteCustomRange]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest} + */ +@com.google.protobuf.Generated +public final class DeleteCustomRangeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest) + DeleteCustomRangeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteCustomRangeRequest"); + } + + // Use DeleteCustomRangeRequest.newBuilder() to construct. + private DeleteCustomRangeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteCustomRangeRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteCustomRangeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteCustomRangeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest.class, + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the CustomRange to delete.
+   * 
+ * + * + * 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 CustomRange to delete.
+   * 
+ * + * + * 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 REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + + /** + * + * + *
+   * Optional. If set to true, all associated resources will be deleted.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + 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.numberregistry.v1alpha.DeleteCustomRangeRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest other = + (com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getForce() != other.getForce()) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest 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.numberregistry.v1alpha.DeleteCustomRangeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest 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.numberregistry.v1alpha.DeleteCustomRangeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.DeleteCustomRangeRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.DeleteCustomRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DeleteCustomRange]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest) + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteCustomRangeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteCustomRangeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest.class, + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteCustomRangeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest build() { + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest result = + new com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + 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: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = 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 name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the CustomRange to delete.
+     * 
+ * + * + * 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 CustomRange to delete.
+     * 
+ * + * + * 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 CustomRange to delete.
+     * 
+ * + * + * 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 CustomRange to delete.
+     * 
+ * + * + * 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 CustomRange to delete.
+     * 
+ * + * + * 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 java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
+     * Optional. If set to true, all associated resources will be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
+     * Optional. If set to true, all associated resources will be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, all associated resources will be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest) + private static final com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCustomRangeRequest 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.numberregistry.v1alpha.DeleteCustomRangeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteCustomRangeRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteCustomRangeRequestOrBuilder.java new file mode 100644 index 000000000000..6aa562204d46 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteCustomRangeRequestOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface DeleteCustomRangeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the CustomRange to delete.
+   * 
+ * + * + * 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 CustomRange to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, all associated resources will be deleted.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteIpamAdminScopeRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteIpamAdminScopeRequest.java new file mode 100644 index 000000000000..e42527de1d32 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteIpamAdminScopeRequest.java @@ -0,0 +1,1010 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.DeleteIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DeleteIpamAdminScope]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest} + */ +@com.google.protobuf.Generated +public final class DeleteIpamAdminScopeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest) + DeleteIpamAdminScopeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteIpamAdminScopeRequest"); + } + + // Use DeleteIpamAdminScopeRequest.newBuilder() to construct. + private DeleteIpamAdminScopeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteIpamAdminScopeRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteIpamAdminScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest.class, + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the IpamAdminScope to delete.
+   * 
+ * + * + * 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 IpamAdminScope to delete.
+   * 
+ * + * + * 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 REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + + /** + * + * + *
+   * Optional. If set to true, all associated resources will be deleted.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + 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.numberregistry.v1alpha.DeleteIpamAdminScopeRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest other = + (com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getForce() != other.getForce()) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest 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.numberregistry.v1alpha.DeleteIpamAdminScopeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest 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.numberregistry.v1alpha.DeleteIpamAdminScopeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.DeleteIpamAdminScopeRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.DeleteIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DeleteIpamAdminScope]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest) + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteIpamAdminScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest.class, + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest build() { + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest result = + new com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + 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: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = 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 name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the IpamAdminScope to delete.
+     * 
+ * + * + * 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 IpamAdminScope to delete.
+     * 
+ * + * + * 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 IpamAdminScope to delete.
+     * 
+ * + * + * 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 IpamAdminScope to delete.
+     * 
+ * + * + * 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 IpamAdminScope to delete.
+     * 
+ * + * + * 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 java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
+     * Optional. If set to true, all associated resources will be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
+     * Optional. If set to true, all associated resources will be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, all associated resources will be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest) + private static final com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteIpamAdminScopeRequest 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.numberregistry.v1alpha.DeleteIpamAdminScopeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteIpamAdminScopeRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteIpamAdminScopeRequestOrBuilder.java new file mode 100644 index 000000000000..13eb024cff2c --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteIpamAdminScopeRequestOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface DeleteIpamAdminScopeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the IpamAdminScope to delete.
+   * 
+ * + * + * 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 IpamAdminScope to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, all associated resources will be deleted.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRealmRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRealmRequest.java new file mode 100644 index 000000000000..c20d4363ebe8 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRealmRequest.java @@ -0,0 +1,936 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.DeleteRealm][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DeleteRealm]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DeleteRealmRequest} + */ +@com.google.protobuf.Generated +public final class DeleteRealmRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.DeleteRealmRequest) + DeleteRealmRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteRealmRequest"); + } + + // Use DeleteRealmRequest.newBuilder() to construct. + private DeleteRealmRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteRealmRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteRealmRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteRealmRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest.class, + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the Realm to delete.
+   * 
+ * + * + * 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 Realm to delete.
+   * 
+ * + * + * 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 REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + + /** + * + * + *
+   * Optional. If set to true, all associated resources will be deleted.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + 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.numberregistry.v1alpha.DeleteRealmRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest other = + (com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getForce() != other.getForce()) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest 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.numberregistry.v1alpha.DeleteRealmRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest 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.numberregistry.v1alpha.DeleteRealmRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.DeleteRealmRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.DeleteRealm][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DeleteRealm]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DeleteRealmRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.DeleteRealmRequest) + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteRealmRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteRealmRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest.class, + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteRealmRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest build() { + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest result = + new com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest other) { + if (other == com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + 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: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = 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 name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the Realm to delete.
+     * 
+ * + * + * 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 Realm to delete.
+     * 
+ * + * + * 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 Realm to delete.
+     * 
+ * + * + * 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 Realm to delete.
+     * 
+ * + * + * 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 Realm to delete.
+     * 
+ * + * + * 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 java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
+     * Optional. If set to true, all associated resources will be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
+     * Optional. If set to true, all associated resources will be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, all associated resources will be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.DeleteRealmRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.DeleteRealmRequest) + private static final com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteRealmRequest 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.numberregistry.v1alpha.DeleteRealmRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRealmRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRealmRequestOrBuilder.java new file mode 100644 index 000000000000..7996a3ce20c7 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRealmRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface DeleteRealmRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.DeleteRealmRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Realm to delete.
+   * 
+ * + * + * 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 Realm to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, all associated resources will be deleted.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRegistryBookRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRegistryBookRequest.java new file mode 100644 index 000000000000..d65ef9b6693d --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRegistryBookRequest.java @@ -0,0 +1,1008 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.DeleteRegistryBook][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DeleteRegistryBook]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest} + */ +@com.google.protobuf.Generated +public final class DeleteRegistryBookRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest) + DeleteRegistryBookRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteRegistryBookRequest"); + } + + // Use DeleteRegistryBookRequest.newBuilder() to construct. + private DeleteRegistryBookRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteRegistryBookRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteRegistryBookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteRegistryBookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest.class, + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the RegistryBook to delete.
+   * 
+ * + * + * 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 RegistryBook to delete.
+   * 
+ * + * + * 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 REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + + /** + * + * + *
+   * Optional. If set to true, all associated resources will be deleted.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + 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.numberregistry.v1alpha.DeleteRegistryBookRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest other = + (com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getForce() != other.getForce()) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest 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.numberregistry.v1alpha.DeleteRegistryBookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest 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.numberregistry.v1alpha.DeleteRegistryBookRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.DeleteRegistryBookRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.DeleteRegistryBook][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DeleteRegistryBook]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest) + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteRegistryBookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteRegistryBookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest.class, + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DeleteRegistryBookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest build() { + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest result = + new com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + 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: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = 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 name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the RegistryBook to delete.
+     * 
+ * + * + * 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 RegistryBook to delete.
+     * 
+ * + * + * 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 RegistryBook to delete.
+     * 
+ * + * + * 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 RegistryBook to delete.
+     * 
+ * + * + * 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 RegistryBook to delete.
+     * 
+ * + * + * 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 java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
+     * Optional. If set to true, all associated resources will be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
+     * Optional. If set to true, all associated resources will be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, all associated resources will be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest) + private static final com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteRegistryBookRequest 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.numberregistry.v1alpha.DeleteRegistryBookRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRegistryBookRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRegistryBookRequestOrBuilder.java new file mode 100644 index 000000000000..b2baa98f9794 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DeleteRegistryBookRequestOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface DeleteRegistryBookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the RegistryBook to delete.
+   * 
+ * + * + * 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 RegistryBook to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, all associated resources will be deleted.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DisableIpamAdminScopeRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DisableIpamAdminScopeRequest.java new file mode 100644 index 000000000000..6766b217de4d --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DisableIpamAdminScopeRequest.java @@ -0,0 +1,913 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.DisableIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DisableIpamAdminScope]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest} + */ +@com.google.protobuf.Generated +public final class DisableIpamAdminScopeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest) + DisableIpamAdminScopeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DisableIpamAdminScopeRequest"); + } + + // Use DisableIpamAdminScopeRequest.newBuilder() to construct. + private DisableIpamAdminScopeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DisableIpamAdminScopeRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DisableIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DisableIpamAdminScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest.class, + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the IpamAdminScope to disable.
+   * 
+ * + * + * 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 IpamAdminScope to disable.
+   * 
+ * + * + * 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 REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + 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.numberregistry.v1alpha.DisableIpamAdminScopeRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest other = + (com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest 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.numberregistry.v1alpha.DisableIpamAdminScopeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest 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.numberregistry.v1alpha.DisableIpamAdminScopeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.DisableIpamAdminScopeRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.DisableIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DisableIpamAdminScope]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest) + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DisableIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DisableIpamAdminScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest.class, + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DisableIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest build() { + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest result = + new com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = 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.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the IpamAdminScope to disable.
+     * 
+ * + * + * 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 IpamAdminScope to disable.
+     * 
+ * + * + * 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 IpamAdminScope to disable.
+     * 
+ * + * + * 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 IpamAdminScope to disable.
+     * 
+ * + * + * 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 IpamAdminScope to disable.
+     * 
+ * + * + * 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 java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest) + private static final com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisableIpamAdminScopeRequest 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.numberregistry.v1alpha.DisableIpamAdminScopeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DisableIpamAdminScopeRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DisableIpamAdminScopeRequestOrBuilder.java new file mode 100644 index 000000000000..ad9366eecca7 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DisableIpamAdminScopeRequestOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface DisableIpamAdminScopeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the IpamAdminScope to disable.
+   * 
+ * + * + * 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 IpamAdminScope to disable.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveredRange.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveredRange.java new file mode 100644 index 000000000000..2854e59497a4 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveredRange.java @@ -0,0 +1,4003 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * A DiscoveredRange represents an IP address range automatically detected by
+ * the discovery pipeline.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DiscoveredRange} + */ +@com.google.protobuf.Generated +public final class DiscoveredRange extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.DiscoveredRange) + DiscoveredRangeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DiscoveredRange"); + } + + // Use DiscoveredRange.newBuilder() to construct. + private DiscoveredRange(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DiscoveredRange() { + name_ = ""; + realm_ = ""; + parentRange_ = ""; + registryBook_ = ""; + description_ = ""; + attributes_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 12: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.class, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder.class); + } + + private int bitField0_; + private int ipCidrRangeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object ipCidrRange_; + + public enum IpCidrRangeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + IPV4_CIDR_RANGE(2), + IPV6_CIDR_RANGE(3), + IPCIDRRANGE_NOT_SET(0); + private final int value; + + private IpCidrRangeCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IpCidrRangeCase valueOf(int value) { + return forNumber(value); + } + + public static IpCidrRangeCase forNumber(int value) { + switch (value) { + case 2: + return IPV4_CIDR_RANGE; + case 3: + return IPV6_CIDR_RANGE; + case 0: + return IPCIDRRANGE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public IpCidrRangeCase getIpCidrRangeCase() { + return IpCidrRangeCase.forNumber(ipCidrRangeCase_); + } + + public static final int IPV4_CIDR_RANGE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Optional. The IPv4 CIDR range of the DiscoveredRange.
+   * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipv4CidrRange field is set. + */ + public boolean hasIpv4CidrRange() { + return ipCidrRangeCase_ == 2; + } + + /** + * + * + *
+   * Optional. The IPv4 CIDR range of the DiscoveredRange.
+   * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipv4CidrRange. + */ + public java.lang.String getIpv4CidrRange() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 2) { + ref = ipCidrRange_; + } + 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(); + if (ipCidrRangeCase_ == 2) { + ipCidrRange_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Optional. The IPv4 CIDR range of the DiscoveredRange.
+   * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipv4CidrRange. + */ + public com.google.protobuf.ByteString getIpv4CidrRangeBytes() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 2) { + ref = ipCidrRange_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (ipCidrRangeCase_ == 2) { + ipCidrRange_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IPV6_CIDR_RANGE_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Optional. The IPv6 CIDR range of the DiscoveredRange.
+   * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipv6CidrRange field is set. + */ + public boolean hasIpv6CidrRange() { + return ipCidrRangeCase_ == 3; + } + + /** + * + * + *
+   * Optional. The IPv6 CIDR range of the DiscoveredRange.
+   * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipv6CidrRange. + */ + public java.lang.String getIpv6CidrRange() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 3) { + ref = ipCidrRange_; + } + 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(); + if (ipCidrRangeCase_ == 3) { + ipCidrRange_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Optional. The IPv6 CIDR range of the DiscoveredRange.
+   * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipv6CidrRange. + */ + public com.google.protobuf.ByteString getIpv6CidrRangeBytes() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 3) { + ref = ipCidrRange_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (ipCidrRangeCase_ == 3) { + ipCidrRange_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Identifier. The resource name of the DiscoveredRange, in the
+   * format
+   * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the DiscoveredRange, in the
+   * format
+   * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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 REALM_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object realm_ = ""; + + /** + * + * + *
+   * Optional. The Realm of the DiscoveredRange.
+   * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The realm. + */ + @java.lang.Override + public java.lang.String getRealm() { + java.lang.Object ref = realm_; + 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(); + realm_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The Realm of the DiscoveredRange.
+   * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for realm. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRealmBytes() { + java.lang.Object ref = realm_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + realm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_RANGE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object parentRange_ = ""; + + /** + * + * + *
+   * Optional. The resource name of the parent DiscoveredRange, in the format
+   * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+   * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentRange. + */ + @java.lang.Override + public java.lang.String getParentRange() { + java.lang.Object ref = parentRange_; + 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(); + parentRange_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The resource name of the parent DiscoveredRange, in the format
+   * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+   * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentRangeBytes() { + java.lang.Object ref = parentRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGISTRY_BOOK_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object registryBook_ = ""; + + /** + * + * + *
+   * Output only. The RegistryBook of the DiscoveredRange.
+   * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The registryBook. + */ + @java.lang.Override + public java.lang.String getRegistryBook() { + java.lang.Object ref = registryBook_; + 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(); + registryBook_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The RegistryBook of the DiscoveredRange.
+   * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for registryBook. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegistryBookBytes() { + java.lang.Object ref = registryBook_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + registryBook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. Description of the DiscoveredRange.
+   * 
+ * + * string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Description of the DiscoveredRange.
+   * 
+ * + * string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISCOVERY_METADATA_FIELD_NUMBER = 8; + private com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata discoveryMetadata_; + + /** + * + * + *
+   * Output only. Owner metadata for this DiscoveredRange.
+   * A unique set of metadata is associated with each DiscoveredRange.
+   * If an IP range is shared by multiple resources (e.g., an Address resource
+   * and an Instance resource, or multiple ForwardingRules),separate
+   * DiscoveredRanges are created, each with a distinct owner. This ensures each
+   * DiscoveredRange has its own unique set of attributes, labels, create time
+   * and update time.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the discoveryMetadata field is set. + */ + @java.lang.Override + public boolean hasDiscoveryMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Owner metadata for this DiscoveredRange.
+   * A unique set of metadata is associated with each DiscoveredRange.
+   * If an IP range is shared by multiple resources (e.g., an Address resource
+   * and an Instance resource, or multiple ForwardingRules),separate
+   * DiscoveredRanges are created, each with a distinct owner. This ensures each
+   * DiscoveredRange has its own unique set of attributes, labels, create time
+   * and update time.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The discoveryMetadata. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata getDiscoveryMetadata() { + return discoveryMetadata_ == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.getDefaultInstance() + : discoveryMetadata_; + } + + /** + * + * + *
+   * Output only. Owner metadata for this DiscoveredRange.
+   * A unique set of metadata is associated with each DiscoveredRange.
+   * If an IP range is shared by multiple resources (e.g., an Address resource
+   * and an Instance resource, or multiple ForwardingRules),separate
+   * DiscoveredRanges are created, each with a distinct owner. This ensures each
+   * DiscoveredRange has its own unique set of attributes, labels, create time
+   * and update time.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadataOrBuilder + getDiscoveryMetadataOrBuilder() { + return discoveryMetadata_ == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.getDefaultInstance() + : discoveryMetadata_; + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List attributes_; + + /** + * + * + *
+   * Optional. The attributes of the DiscoveredRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getAttributesList() { + return attributes_; + } + + /** + * + * + *
+   * Optional. The attributes of the DiscoveredRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getAttributesOrBuilderList() { + return attributes_; + } + + /** + * + * + *
+   * Optional. The attributes of the DiscoveredRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getAttributesCount() { + return attributes_.size(); + } + + /** + * + * + *
+   * Optional. The attributes of the DiscoveredRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Attribute getAttributes(int index) { + return attributes_.get(index); + } + + /** + * + * + *
+   * Optional. The attributes of the DiscoveredRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.AttributeOrBuilder getAttributesOrBuilder( + int index) { + return attributes_.get(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time at which the DiscoveredRange was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time at which the DiscoveredRange was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.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 at which the DiscoveredRange was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time at which the DiscoveredRange was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The time at which the DiscoveredRange was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time at which the DiscoveredRange was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 12; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CHILD_CIDR_OVERLAP_ALLOWED_FIELD_NUMBER = 13; + private boolean childCidrOverlapAllowed_ = false; + + /** + * + * + *
+   * Output only. If true, allows child DiscoveredRanges of this DiscoveredRange
+   * to overlap with each other.
+   * 
+ * + * bool child_cidr_overlap_allowed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The childCidrOverlapAllowed. + */ + @java.lang.Override + public boolean getChildCidrOverlapAllowed() { + return childCidrOverlapAllowed_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (ipCidrRangeCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, ipCidrRange_); + } + if (ipCidrRangeCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, ipCidrRange_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(realm_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, realm_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registryBook_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, registryBook_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parentRange_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, parentRange_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getDiscoveryMetadata()); + } + for (int i = 0; i < attributes_.size(); i++) { + output.writeMessage(9, attributes_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(10, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(11, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 12); + if (childCidrOverlapAllowed_ != false) { + output.writeBool(13, childCidrOverlapAllowed_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (ipCidrRangeCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, ipCidrRange_); + } + if (ipCidrRangeCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, ipCidrRange_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(realm_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, realm_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registryBook_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, registryBook_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parentRange_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, parentRange_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDiscoveryMetadata()); + } + for (int i = 0; i < attributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, attributes_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, labels__); + } + if (childCidrOverlapAllowed_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, childCidrOverlapAllowed_); + } + 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.numberregistry.v1alpha.DiscoveredRange)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.DiscoveredRange other = + (com.google.cloud.numberregistry.v1alpha.DiscoveredRange) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRealm().equals(other.getRealm())) return false; + if (!getParentRange().equals(other.getParentRange())) return false; + if (!getRegistryBook().equals(other.getRegistryBook())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasDiscoveryMetadata() != other.hasDiscoveryMetadata()) return false; + if (hasDiscoveryMetadata()) { + if (!getDiscoveryMetadata().equals(other.getDiscoveryMetadata())) return false; + } + if (!getAttributesList().equals(other.getAttributesList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (getChildCidrOverlapAllowed() != other.getChildCidrOverlapAllowed()) return false; + if (!getIpCidrRangeCase().equals(other.getIpCidrRangeCase())) return false; + switch (ipCidrRangeCase_) { + case 2: + if (!getIpv4CidrRange().equals(other.getIpv4CidrRange())) return false; + break; + case 3: + if (!getIpv6CidrRange().equals(other.getIpv6CidrRange())) return false; + break; + case 0: + default: + } + 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) + REALM_FIELD_NUMBER; + hash = (53 * hash) + getRealm().hashCode(); + hash = (37 * hash) + PARENT_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getParentRange().hashCode(); + hash = (37 * hash) + REGISTRY_BOOK_FIELD_NUMBER; + hash = (53 * hash) + getRegistryBook().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasDiscoveryMetadata()) { + hash = (37 * hash) + DISCOVERY_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveryMetadata().hashCode(); + } + if (getAttributesCount() > 0) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAttributesList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + CHILD_CIDR_OVERLAP_ALLOWED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getChildCidrOverlapAllowed()); + switch (ipCidrRangeCase_) { + case 2: + hash = (37 * hash) + IPV4_CIDR_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getIpv4CidrRange().hashCode(); + break; + case 3: + hash = (37 * hash) + IPV6_CIDR_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getIpv6CidrRange().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveredRange parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveredRange 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.numberregistry.v1alpha.DiscoveredRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveredRange 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.numberregistry.v1alpha.DiscoveredRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveredRange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveredRange parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveredRange parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveredRange parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveredRange parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveredRange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveredRange parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.DiscoveredRange 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A DiscoveredRange represents an IP address range automatically detected by
+   * the discovery pipeline.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DiscoveredRange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.DiscoveredRange) + com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 12: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 12: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.class, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.DiscoveredRange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDiscoveryMetadataFieldBuilder(); + internalGetAttributesFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + realm_ = ""; + parentRange_ = ""; + registryBook_ = ""; + description_ = ""; + discoveryMetadata_ = null; + if (discoveryMetadataBuilder_ != null) { + discoveryMetadataBuilder_.dispose(); + discoveryMetadataBuilder_ = null; + } + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + } else { + attributes_ = null; + attributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + childCidrOverlapAllowed_ = false; + ipCidrRangeCase_ = 0; + ipCidrRange_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DiscoveredRange_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange build() { + com.google.cloud.numberregistry.v1alpha.DiscoveredRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange buildPartial() { + com.google.cloud.numberregistry.v1alpha.DiscoveredRange result = + new com.google.cloud.numberregistry.v1alpha.DiscoveredRange(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange result) { + if (attributesBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + attributes_ = java.util.Collections.unmodifiableList(attributes_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.attributes_ = attributes_; + } else { + result.attributes_ = attributesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.DiscoveredRange result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.realm_ = realm_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.parentRange_ = parentRange_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.registryBook_ = registryBook_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.discoveryMetadata_ = + discoveryMetadataBuilder_ == null + ? discoveryMetadata_ + : discoveryMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.childCidrOverlapAllowed_ = childCidrOverlapAllowed_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange result) { + result.ipCidrRangeCase_ = ipCidrRangeCase_; + result.ipCidrRange_ = this.ipCidrRange_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.DiscoveredRange) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.DiscoveredRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.DiscoveredRange other) { + if (other == com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getRealm().isEmpty()) { + realm_ = other.realm_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getParentRange().isEmpty()) { + parentRange_ = other.parentRange_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getRegistryBook().isEmpty()) { + registryBook_ = other.registryBook_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasDiscoveryMetadata()) { + mergeDiscoveryMetadata(other.getDiscoveryMetadata()); + } + if (attributesBuilder_ == null) { + if (!other.attributes_.isEmpty()) { + if (attributes_.isEmpty()) { + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureAttributesIsMutable(); + attributes_.addAll(other.attributes_); + } + onChanged(); + } + } else { + if (!other.attributes_.isEmpty()) { + if (attributesBuilder_.isEmpty()) { + attributesBuilder_.dispose(); + attributesBuilder_ = null; + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000100); + attributesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAttributesFieldBuilder() + : null; + } else { + attributesBuilder_.addAllMessages(other.attributes_); + } + } + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000800; + if (other.getChildCidrOverlapAllowed() != false) { + setChildCidrOverlapAllowed(other.getChildCidrOverlapAllowed()); + } + switch (other.getIpCidrRangeCase()) { + case IPV4_CIDR_RANGE: + { + ipCidrRangeCase_ = 2; + ipCidrRange_ = other.ipCidrRange_; + onChanged(); + break; + } + case IPV6_CIDR_RANGE: + { + ipCidrRangeCase_ = 3; + ipCidrRange_ = other.ipCidrRange_; + onChanged(); + break; + } + case IPCIDRRANGE_NOT_SET: + { + break; + } + } + 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_ |= 0x00000004; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ipCidrRangeCase_ = 2; + ipCidrRange_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ipCidrRangeCase_ = 3; + ipCidrRange_ = s; + break; + } // case 26 + case 34: + { + realm_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + registryBook_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + parentRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetDiscoveryMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + com.google.cloud.numberregistry.v1alpha.Attribute m = + input.readMessage( + com.google.cloud.numberregistry.v1alpha.Attribute.parser(), + extensionRegistry); + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(m); + } else { + attributesBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 104: + { + childCidrOverlapAllowed_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 104 + 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 ipCidrRangeCase_ = 0; + private java.lang.Object ipCidrRange_; + + public IpCidrRangeCase getIpCidrRangeCase() { + return IpCidrRangeCase.forNumber(ipCidrRangeCase_); + } + + public Builder clearIpCidrRange() { + ipCidrRangeCase_ = 0; + ipCidrRange_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Optional. The IPv4 CIDR range of the DiscoveredRange.
+     * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipv4CidrRange field is set. + */ + @java.lang.Override + public boolean hasIpv4CidrRange() { + return ipCidrRangeCase_ == 2; + } + + /** + * + * + *
+     * Optional. The IPv4 CIDR range of the DiscoveredRange.
+     * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipv4CidrRange. + */ + @java.lang.Override + public java.lang.String getIpv4CidrRange() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 2) { + ref = ipCidrRange_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (ipCidrRangeCase_ == 2) { + ipCidrRange_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The IPv4 CIDR range of the DiscoveredRange.
+     * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipv4CidrRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpv4CidrRangeBytes() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 2) { + ref = ipCidrRange_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (ipCidrRangeCase_ == 2) { + ipCidrRange_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The IPv4 CIDR range of the DiscoveredRange.
+     * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ipv4CidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpv4CidrRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipCidrRangeCase_ = 2; + ipCidrRange_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The IPv4 CIDR range of the DiscoveredRange.
+     * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIpv4CidrRange() { + if (ipCidrRangeCase_ == 2) { + ipCidrRangeCase_ = 0; + ipCidrRange_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The IPv4 CIDR range of the DiscoveredRange.
+     * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for ipv4CidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpv4CidrRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipCidrRangeCase_ = 2; + ipCidrRange_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The IPv6 CIDR range of the DiscoveredRange.
+     * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipv6CidrRange field is set. + */ + @java.lang.Override + public boolean hasIpv6CidrRange() { + return ipCidrRangeCase_ == 3; + } + + /** + * + * + *
+     * Optional. The IPv6 CIDR range of the DiscoveredRange.
+     * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipv6CidrRange. + */ + @java.lang.Override + public java.lang.String getIpv6CidrRange() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 3) { + ref = ipCidrRange_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (ipCidrRangeCase_ == 3) { + ipCidrRange_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The IPv6 CIDR range of the DiscoveredRange.
+     * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipv6CidrRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpv6CidrRangeBytes() { + java.lang.Object ref = ""; + if (ipCidrRangeCase_ == 3) { + ref = ipCidrRange_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (ipCidrRangeCase_ == 3) { + ipCidrRange_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The IPv6 CIDR range of the DiscoveredRange.
+     * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ipv6CidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpv6CidrRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipCidrRangeCase_ = 3; + ipCidrRange_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The IPv6 CIDR range of the DiscoveredRange.
+     * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIpv6CidrRange() { + if (ipCidrRangeCase_ == 3) { + ipCidrRangeCase_ = 0; + ipCidrRange_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The IPv6 CIDR range of the DiscoveredRange.
+     * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for ipv6CidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpv6CidrRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipCidrRangeCase_ = 3; + ipCidrRange_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Identifier. The resource name of the DiscoveredRange, in the
+     * format
+     * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the DiscoveredRange, in the
+     * format
+     * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the DiscoveredRange, in the
+     * format
+     * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Identifier. The resource name of the DiscoveredRange, in the
+     * format
+     * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Identifier. The resource name of the DiscoveredRange, in the
+     * format
+     * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object realm_ = ""; + + /** + * + * + *
+     * Optional. The Realm of the DiscoveredRange.
+     * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The realm. + */ + public java.lang.String getRealm() { + java.lang.Object ref = realm_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + realm_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The Realm of the DiscoveredRange.
+     * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for realm. + */ + public com.google.protobuf.ByteString getRealmBytes() { + java.lang.Object ref = realm_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + realm_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The Realm of the DiscoveredRange.
+     * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The realm to set. + * @return This builder for chaining. + */ + public Builder setRealm(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + realm_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The Realm of the DiscoveredRange.
+     * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRealm() { + realm_ = getDefaultInstance().getRealm(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The Realm of the DiscoveredRange.
+     * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for realm to set. + * @return This builder for chaining. + */ + public Builder setRealmBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + realm_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object parentRange_ = ""; + + /** + * + * + *
+     * Optional. The resource name of the parent DiscoveredRange, in the format
+     * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+     * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentRange. + */ + public java.lang.String getParentRange() { + java.lang.Object ref = parentRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name of the parent DiscoveredRange, in the format
+     * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+     * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentRange. + */ + public com.google.protobuf.ByteString getParentRangeBytes() { + java.lang.Object ref = parentRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name of the parent DiscoveredRange, in the format
+     * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+     * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The parentRange to set. + * @return This builder for chaining. + */ + public Builder setParentRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parentRange_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of the parent DiscoveredRange, in the format
+     * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+     * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParentRange() { + parentRange_ = getDefaultInstance().getParentRange(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of the parent DiscoveredRange, in the format
+     * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+     * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parentRange to set. + * @return This builder for chaining. + */ + public Builder setParentRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parentRange_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object registryBook_ = ""; + + /** + * + * + *
+     * Output only. The RegistryBook of the DiscoveredRange.
+     * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The registryBook. + */ + public java.lang.String getRegistryBook() { + java.lang.Object ref = registryBook_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + registryBook_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The RegistryBook of the DiscoveredRange.
+     * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for registryBook. + */ + public com.google.protobuf.ByteString getRegistryBookBytes() { + java.lang.Object ref = registryBook_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + registryBook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The RegistryBook of the DiscoveredRange.
+     * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The registryBook to set. + * @return This builder for chaining. + */ + public Builder setRegistryBook(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + registryBook_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The RegistryBook of the DiscoveredRange.
+     * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRegistryBook() { + registryBook_ = getDefaultInstance().getRegistryBook(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The RegistryBook of the DiscoveredRange.
+     * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for registryBook to set. + * @return This builder for chaining. + */ + public Builder setRegistryBookBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + registryBook_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. Description of the DiscoveredRange.
+     * 
+ * + * string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Description of the DiscoveredRange.
+     * 
+ * + * string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Description of the DiscoveredRange.
+     * 
+ * + * string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the DiscoveredRange.
+     * 
+ * + * string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the DiscoveredRange.
+     * 
+ * + * string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata discoveryMetadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadataOrBuilder> + discoveryMetadataBuilder_; + + /** + * + * + *
+     * Output only. Owner metadata for this DiscoveredRange.
+     * A unique set of metadata is associated with each DiscoveredRange.
+     * If an IP range is shared by multiple resources (e.g., an Address resource
+     * and an Instance resource, or multiple ForwardingRules),separate
+     * DiscoveredRanges are created, each with a distinct owner. This ensures each
+     * DiscoveredRange has its own unique set of attributes, labels, create time
+     * and update time.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the discoveryMetadata field is set. + */ + public boolean hasDiscoveryMetadata() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. Owner metadata for this DiscoveredRange.
+     * A unique set of metadata is associated with each DiscoveredRange.
+     * If an IP range is shared by multiple resources (e.g., an Address resource
+     * and an Instance resource, or multiple ForwardingRules),separate
+     * DiscoveredRanges are created, each with a distinct owner. This ensures each
+     * DiscoveredRange has its own unique set of attributes, labels, create time
+     * and update time.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The discoveryMetadata. + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata getDiscoveryMetadata() { + if (discoveryMetadataBuilder_ == null) { + return discoveryMetadata_ == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.getDefaultInstance() + : discoveryMetadata_; + } else { + return discoveryMetadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Owner metadata for this DiscoveredRange.
+     * A unique set of metadata is associated with each DiscoveredRange.
+     * If an IP range is shared by multiple resources (e.g., an Address resource
+     * and an Instance resource, or multiple ForwardingRules),separate
+     * DiscoveredRanges are created, each with a distinct owner. This ensures each
+     * DiscoveredRange has its own unique set of attributes, labels, create time
+     * and update time.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDiscoveryMetadata( + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata value) { + if (discoveryMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + discoveryMetadata_ = value; + } else { + discoveryMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Owner metadata for this DiscoveredRange.
+     * A unique set of metadata is associated with each DiscoveredRange.
+     * If an IP range is shared by multiple resources (e.g., an Address resource
+     * and an Instance resource, or multiple ForwardingRules),separate
+     * DiscoveredRanges are created, each with a distinct owner. This ensures each
+     * DiscoveredRange has its own unique set of attributes, labels, create time
+     * and update time.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDiscoveryMetadata( + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.Builder builderForValue) { + if (discoveryMetadataBuilder_ == null) { + discoveryMetadata_ = builderForValue.build(); + } else { + discoveryMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Owner metadata for this DiscoveredRange.
+     * A unique set of metadata is associated with each DiscoveredRange.
+     * If an IP range is shared by multiple resources (e.g., an Address resource
+     * and an Instance resource, or multiple ForwardingRules),separate
+     * DiscoveredRanges are created, each with a distinct owner. This ensures each
+     * DiscoveredRange has its own unique set of attributes, labels, create time
+     * and update time.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDiscoveryMetadata( + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata value) { + if (discoveryMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && discoveryMetadata_ != null + && discoveryMetadata_ + != com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.getDefaultInstance()) { + getDiscoveryMetadataBuilder().mergeFrom(value); + } else { + discoveryMetadata_ = value; + } + } else { + discoveryMetadataBuilder_.mergeFrom(value); + } + if (discoveryMetadata_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Owner metadata for this DiscoveredRange.
+     * A unique set of metadata is associated with each DiscoveredRange.
+     * If an IP range is shared by multiple resources (e.g., an Address resource
+     * and an Instance resource, or multiple ForwardingRules),separate
+     * DiscoveredRanges are created, each with a distinct owner. This ensures each
+     * DiscoveredRange has its own unique set of attributes, labels, create time
+     * and update time.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDiscoveryMetadata() { + bitField0_ = (bitField0_ & ~0x00000080); + discoveryMetadata_ = null; + if (discoveryMetadataBuilder_ != null) { + discoveryMetadataBuilder_.dispose(); + discoveryMetadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Owner metadata for this DiscoveredRange.
+     * A unique set of metadata is associated with each DiscoveredRange.
+     * If an IP range is shared by multiple resources (e.g., an Address resource
+     * and an Instance resource, or multiple ForwardingRules),separate
+     * DiscoveredRanges are created, each with a distinct owner. This ensures each
+     * DiscoveredRange has its own unique set of attributes, labels, create time
+     * and update time.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.Builder + getDiscoveryMetadataBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetDiscoveryMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Owner metadata for this DiscoveredRange.
+     * A unique set of metadata is associated with each DiscoveredRange.
+     * If an IP range is shared by multiple resources (e.g., an Address resource
+     * and an Instance resource, or multiple ForwardingRules),separate
+     * DiscoveredRanges are created, each with a distinct owner. This ensures each
+     * DiscoveredRange has its own unique set of attributes, labels, create time
+     * and update time.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadataOrBuilder + getDiscoveryMetadataOrBuilder() { + if (discoveryMetadataBuilder_ != null) { + return discoveryMetadataBuilder_.getMessageOrBuilder(); + } else { + return discoveryMetadata_ == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.getDefaultInstance() + : discoveryMetadata_; + } + } + + /** + * + * + *
+     * Output only. Owner metadata for this DiscoveredRange.
+     * A unique set of metadata is associated with each DiscoveredRange.
+     * If an IP range is shared by multiple resources (e.g., an Address resource
+     * and an Instance resource, or multiple ForwardingRules),separate
+     * DiscoveredRanges are created, each with a distinct owner. This ensures each
+     * DiscoveredRange has its own unique set of attributes, labels, create time
+     * and update time.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadataOrBuilder> + internalGetDiscoveryMetadataFieldBuilder() { + if (discoveryMetadataBuilder_ == null) { + discoveryMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadataOrBuilder>( + getDiscoveryMetadata(), getParentForChildren(), isClean()); + discoveryMetadata_ = null; + } + return discoveryMetadataBuilder_; + } + + private java.util.List attributes_ = + java.util.Collections.emptyList(); + + private void ensureAttributesIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + attributes_ = + new java.util.ArrayList(attributes_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Attribute, + com.google.cloud.numberregistry.v1alpha.Attribute.Builder, + com.google.cloud.numberregistry.v1alpha.AttributeOrBuilder> + attributesBuilder_; + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getAttributesList() { + if (attributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(attributes_); + } else { + return attributesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getAttributesCount() { + if (attributesBuilder_ == null) { + return attributes_.size(); + } else { + return attributesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.numberregistry.v1alpha.Attribute getAttributes(int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAttributes( + int index, com.google.cloud.numberregistry.v1alpha.Attribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.set(index, value); + onChanged(); + } else { + attributesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAttributes( + int index, com.google.cloud.numberregistry.v1alpha.Attribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.set(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAttributes(com.google.cloud.numberregistry.v1alpha.Attribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(value); + onChanged(); + } else { + attributesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAttributes( + int index, com.google.cloud.numberregistry.v1alpha.Attribute value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(index, value); + onChanged(); + } else { + attributesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAttributes( + com.google.cloud.numberregistry.v1alpha.Attribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAttributes( + int index, com.google.cloud.numberregistry.v1alpha.Attribute.Builder builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllAttributes( + java.lang.Iterable values) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributes_); + onChanged(); + } else { + attributesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAttributes() { + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + attributesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAttributes(int index) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.remove(index); + onChanged(); + } else { + attributesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.numberregistry.v1alpha.Attribute.Builder getAttributesBuilder( + int index) { + return internalGetAttributesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.numberregistry.v1alpha.AttributeOrBuilder getAttributesOrBuilder( + int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAttributesOrBuilderList() { + if (attributesBuilder_ != null) { + return attributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attributes_); + } + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.numberregistry.v1alpha.Attribute.Builder addAttributesBuilder() { + return internalGetAttributesFieldBuilder() + .addBuilder(com.google.cloud.numberregistry.v1alpha.Attribute.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.numberregistry.v1alpha.Attribute.Builder addAttributesBuilder( + int index) { + return internalGetAttributesFieldBuilder() + .addBuilder( + index, com.google.cloud.numberregistry.v1alpha.Attribute.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The attributes of the DiscoveredRange.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAttributesBuilderList() { + return internalGetAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Attribute, + com.google.cloud.numberregistry.v1alpha.Attribute.Builder, + com.google.cloud.numberregistry.v1alpha.AttributeOrBuilder> + internalGetAttributesFieldBuilder() { + if (attributesBuilder_ == null) { + attributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Attribute, + com.google.cloud.numberregistry.v1alpha.Attribute.Builder, + com.google.cloud.numberregistry.v1alpha.AttributeOrBuilder>( + attributes_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); + attributes_ = null; + } + return attributesBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.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 at which the DiscoveredRange was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.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_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.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_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000200); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.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 at which the DiscoveredRange was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000400); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time at which the DiscoveredRange was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000800; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000800); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000800; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000800; + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000800; + return this; + } + + private boolean childCidrOverlapAllowed_; + + /** + * + * + *
+     * Output only. If true, allows child DiscoveredRanges of this DiscoveredRange
+     * to overlap with each other.
+     * 
+ * + * bool child_cidr_overlap_allowed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The childCidrOverlapAllowed. + */ + @java.lang.Override + public boolean getChildCidrOverlapAllowed() { + return childCidrOverlapAllowed_; + } + + /** + * + * + *
+     * Output only. If true, allows child DiscoveredRanges of this DiscoveredRange
+     * to overlap with each other.
+     * 
+ * + * bool child_cidr_overlap_allowed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The childCidrOverlapAllowed to set. + * @return This builder for chaining. + */ + public Builder setChildCidrOverlapAllowed(boolean value) { + + childCidrOverlapAllowed_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. If true, allows child DiscoveredRanges of this DiscoveredRange
+     * to overlap with each other.
+     * 
+ * + * bool child_cidr_overlap_allowed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearChildCidrOverlapAllowed() { + bitField0_ = (bitField0_ & ~0x00001000); + childCidrOverlapAllowed_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.DiscoveredRange) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.DiscoveredRange) + private static final com.google.cloud.numberregistry.v1alpha.DiscoveredRange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.DiscoveredRange(); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveredRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiscoveredRange 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.numberregistry.v1alpha.DiscoveredRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveredRangeName.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveredRangeName.java new file mode 100644 index 000000000000..e5240964090f --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveredRangeName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha; + +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 DiscoveredRangeName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DISCOVERED_RANGE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/discoveredRanges/{discovered_range}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String discoveredRange; + + @Deprecated + protected DiscoveredRangeName() { + project = null; + location = null; + discoveredRange = null; + } + + private DiscoveredRangeName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + discoveredRange = Preconditions.checkNotNull(builder.getDiscoveredRange()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDiscoveredRange() { + return discoveredRange; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DiscoveredRangeName of(String project, String location, String discoveredRange) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDiscoveredRange(discoveredRange) + .build(); + } + + public static String format(String project, String location, String discoveredRange) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDiscoveredRange(discoveredRange) + .build() + .toString(); + } + + public static DiscoveredRangeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DISCOVERED_RANGE.validatedMatch( + formattedString, "DiscoveredRangeName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("discovered_range")); + } + + 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 (DiscoveredRangeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DISCOVERED_RANGE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (discoveredRange != null) { + fieldMapBuilder.put("discovered_range", discoveredRange); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DISCOVERED_RANGE.instantiate( + "project", project, "location", location, "discovered_range", discoveredRange); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DiscoveredRangeName that = ((DiscoveredRangeName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.discoveredRange, that.discoveredRange); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(discoveredRange); + return h; + } + + /** Builder for projects/{project}/locations/{location}/discoveredRanges/{discovered_range}. */ + public static class Builder { + private String project; + private String location; + private String discoveredRange; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDiscoveredRange() { + return discoveredRange; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDiscoveredRange(String discoveredRange) { + this.discoveredRange = discoveredRange; + return this; + } + + private Builder(DiscoveredRangeName discoveredRangeName) { + this.project = discoveredRangeName.project; + this.location = discoveredRangeName.location; + this.discoveredRange = discoveredRangeName.discoveredRange; + } + + public DiscoveredRangeName build() { + return new DiscoveredRangeName(this); + } + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveredRangeOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveredRangeOrBuilder.java new file mode 100644 index 000000000000..32761b882fd7 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveredRangeOrBuilder.java @@ -0,0 +1,541 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface DiscoveredRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.DiscoveredRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The IPv4 CIDR range of the DiscoveredRange.
+   * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipv4CidrRange field is set. + */ + boolean hasIpv4CidrRange(); + + /** + * + * + *
+   * Optional. The IPv4 CIDR range of the DiscoveredRange.
+   * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipv4CidrRange. + */ + java.lang.String getIpv4CidrRange(); + + /** + * + * + *
+   * Optional. The IPv4 CIDR range of the DiscoveredRange.
+   * 
+ * + * string ipv4_cidr_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipv4CidrRange. + */ + com.google.protobuf.ByteString getIpv4CidrRangeBytes(); + + /** + * + * + *
+   * Optional. The IPv6 CIDR range of the DiscoveredRange.
+   * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipv6CidrRange field is set. + */ + boolean hasIpv6CidrRange(); + + /** + * + * + *
+   * Optional. The IPv6 CIDR range of the DiscoveredRange.
+   * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipv6CidrRange. + */ + java.lang.String getIpv6CidrRange(); + + /** + * + * + *
+   * Optional. The IPv6 CIDR range of the DiscoveredRange.
+   * 
+ * + * string ipv6_cidr_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipv6CidrRange. + */ + com.google.protobuf.ByteString getIpv6CidrRangeBytes(); + + /** + * + * + *
+   * Required. Identifier. The resource name of the DiscoveredRange, in the
+   * format
+   * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Identifier. The resource name of the DiscoveredRange, in the
+   * format
+   * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The Realm of the DiscoveredRange.
+   * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The realm. + */ + java.lang.String getRealm(); + + /** + * + * + *
+   * Optional. The Realm of the DiscoveredRange.
+   * 
+ * + * + * string realm = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for realm. + */ + com.google.protobuf.ByteString getRealmBytes(); + + /** + * + * + *
+   * Optional. The resource name of the parent DiscoveredRange, in the format
+   * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+   * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentRange. + */ + java.lang.String getParentRange(); + + /** + * + * + *
+   * Optional. The resource name of the parent DiscoveredRange, in the format
+   * `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
+   * 
+ * + * + * string parent_range = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentRange. + */ + com.google.protobuf.ByteString getParentRangeBytes(); + + /** + * + * + *
+   * Output only. The RegistryBook of the DiscoveredRange.
+   * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The registryBook. + */ + java.lang.String getRegistryBook(); + + /** + * + * + *
+   * Output only. The RegistryBook of the DiscoveredRange.
+   * 
+ * + * string registry_book = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for registryBook. + */ + com.google.protobuf.ByteString getRegistryBookBytes(); + + /** + * + * + *
+   * Optional. Description of the DiscoveredRange.
+   * 
+ * + * string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. Description of the DiscoveredRange.
+   * 
+ * + * string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Owner metadata for this DiscoveredRange.
+   * A unique set of metadata is associated with each DiscoveredRange.
+   * If an IP range is shared by multiple resources (e.g., an Address resource
+   * and an Instance resource, or multiple ForwardingRules),separate
+   * DiscoveredRanges are created, each with a distinct owner. This ensures each
+   * DiscoveredRange has its own unique set of attributes, labels, create time
+   * and update time.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the discoveryMetadata field is set. + */ + boolean hasDiscoveryMetadata(); + + /** + * + * + *
+   * Output only. Owner metadata for this DiscoveredRange.
+   * A unique set of metadata is associated with each DiscoveredRange.
+   * If an IP range is shared by multiple resources (e.g., an Address resource
+   * and an Instance resource, or multiple ForwardingRules),separate
+   * DiscoveredRanges are created, each with a distinct owner. This ensures each
+   * DiscoveredRange has its own unique set of attributes, labels, create time
+   * and update time.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The discoveryMetadata. + */ + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata getDiscoveryMetadata(); + + /** + * + * + *
+   * Output only. Owner metadata for this DiscoveredRange.
+   * A unique set of metadata is associated with each DiscoveredRange.
+   * If an IP range is shared by multiple resources (e.g., an Address resource
+   * and an Instance resource, or multiple ForwardingRules),separate
+   * DiscoveredRanges are created, each with a distinct owner. This ensures each
+   * DiscoveredRange has its own unique set of attributes, labels, create time
+   * and update time.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadataOrBuilder + getDiscoveryMetadataOrBuilder(); + + /** + * + * + *
+   * Optional. The attributes of the DiscoveredRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getAttributesList(); + + /** + * + * + *
+   * Optional. The attributes of the DiscoveredRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.numberregistry.v1alpha.Attribute getAttributes(int index); + + /** + * + * + *
+   * Optional. The attributes of the DiscoveredRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAttributesCount(); + + /** + * + * + *
+   * Optional. The attributes of the DiscoveredRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getAttributesOrBuilderList(); + + /** + * + * + *
+   * Optional. The attributes of the DiscoveredRange.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.Attribute attributes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.numberregistry.v1alpha.AttributeOrBuilder getAttributesOrBuilder(int index); + + /** + * + * + *
+   * Output only. The time at which the DiscoveredRange was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time at which the DiscoveredRange was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time at which the DiscoveredRange was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which the DiscoveredRange was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time at which the DiscoveredRange was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time at which the DiscoveredRange was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. If true, allows child DiscoveredRanges of this DiscoveredRange
+   * to overlap with each other.
+   * 
+ * + * bool child_cidr_overlap_allowed = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The childCidrOverlapAllowed. + */ + boolean getChildCidrOverlapAllowed(); + + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.IpCidrRangeCase getIpCidrRangeCase(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveryMetadata.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveryMetadata.java new file mode 100644 index 000000000000..86b419c6050c --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveryMetadata.java @@ -0,0 +1,2494 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Metadata about a discovered resource, tracking event times, state, and source
+ * information.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DiscoveryMetadata} + */ +@com.google.protobuf.Generated +public final class DiscoveryMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.DiscoveryMetadata) + DiscoveryMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DiscoveryMetadata"); + } + + // Use DiscoveryMetadata.newBuilder() to construct. + private DiscoveryMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DiscoveryMetadata() { + state_ = 0; + resource_ = ""; + resourceUri_ = ""; + sourceId_ = ""; + sourceSubId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DiscoveryMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DiscoveryMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.class, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.Builder.class); + } + + /** + * + * + *
+   * The state of the resource.
+   * 
+ * + * Protobuf enum {@code google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState} + */ + public enum ResourceState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * RESOURCE_STATE_UNSPECIFIED = 0; + */ + RESOURCE_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The resource is in an invalid state.
+     * 
+ * + * INVALID = 1; + */ + INVALID(1), + /** + * + * + *
+     * The resource exists in the backing store (is not tombstoned or
+     * completely missing) and there were no failures reading out the resource
+     * level metadata.
+     * 
+ * + * EXISTS = 2; + */ + EXISTS(2), + /** + * + * + *
+     * Resource does not exist or has been deleted or soft-deleted.
+     * 
+ * + * DOES_NOT_EXIST = 3; + */ + DOES_NOT_EXIST(3), + /** + * + * + *
+     * There was an error reading out the resource level metadata.
+     * 
+ * + * ERROR = 4; + */ + ERROR(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ResourceState"); + } + + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * RESOURCE_STATE_UNSPECIFIED = 0; + */ + public static final int RESOURCE_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The resource is in an invalid state.
+     * 
+ * + * INVALID = 1; + */ + public static final int INVALID_VALUE = 1; + + /** + * + * + *
+     * The resource exists in the backing store (is not tombstoned or
+     * completely missing) and there were no failures reading out the resource
+     * level metadata.
+     * 
+ * + * EXISTS = 2; + */ + public static final int EXISTS_VALUE = 2; + + /** + * + * + *
+     * Resource does not exist or has been deleted or soft-deleted.
+     * 
+ * + * DOES_NOT_EXIST = 3; + */ + public static final int DOES_NOT_EXIST_VALUE = 3; + + /** + * + * + *
+     * There was an error reading out the resource level metadata.
+     * 
+ * + * ERROR = 4; + */ + public static final int ERROR_VALUE = 4; + + 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 ResourceState 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 ResourceState forNumber(int value) { + switch (value) { + case 0: + return RESOURCE_STATE_UNSPECIFIED; + case 1: + return INVALID; + case 2: + return EXISTS; + case 3: + return DOES_NOT_EXIST; + case 4: + return ERROR; + 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 ResourceState findValueByNumber(int number) { + return ResourceState.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ResourceState[] VALUES = values(); + + public static ResourceState 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 ResourceState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState) + } + + private int bitField0_; + public static final int EVENT_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp eventTime_; + + /** + * + * + *
+   * Output only. The time when the event happened.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the eventTime field is set. + */ + @java.lang.Override + public boolean hasEventTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time when the event happened.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The eventTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEventTime() { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } + + /** + * + * + *
+   * Output only. The time when the event happened.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the resource was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The time when the resource was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the resource was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The state of the resource.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. The state of the resource.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState getState() { + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState result = + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState.forNumber(state_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object resource_ = ""; + + /** + * + * + *
+   * Output only. The resource name of the discovered resource, should be
+   * API-agnostic. Example: "projects/{project_number}/networks/{network_id}".
+   * 
+ * + * string resource = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + 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(); + resource_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the discovered resource, should be
+   * API-agnostic. Example: "projects/{project_number}/networks/{network_id}".
+   * 
+ * + * string resource = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceUri_ = ""; + + /** + * + * + *
+   * Output only. The resource uri of the discovered resource.
+   * 
+ * + * string resource_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + 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(); + resourceUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource uri of the discovered resource.
+   * 
+ * + * string resource_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_ID_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceId_ = ""; + + /** + * + * + *
+   * Output only. The canonical google.aip.dev/122 name of the source resource.
+   * 
+ * + * string source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sourceId. + */ + @java.lang.Override + public java.lang.String getSourceId() { + java.lang.Object ref = sourceId_; + 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(); + sourceId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The canonical google.aip.dev/122 name of the source resource.
+   * 
+ * + * string source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for sourceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceIdBytes() { + java.lang.Object ref = sourceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_SUB_ID_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceSubId_ = ""; + + /** + * + * + *
+   * Output only. A single source resource can be the source of multiple CNR
+   * resources. This sub_id is used to distinguish between the different CNR
+   * resources derived from the same upstream resource. For example, a single
+   * subnetwork can be the source of multiple Ranges, one for each protocol. In
+   * this case, the sub_id could be "private-ipv4" or "private-ipv6".
+   * 
+ * + * string source_sub_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sourceSubId. + */ + @java.lang.Override + public java.lang.String getSourceSubId() { + java.lang.Object ref = sourceSubId_; + 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(); + sourceSubId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. A single source resource can be the source of multiple CNR
+   * resources. This sub_id is used to distinguish between the different CNR
+   * resources derived from the same upstream resource. For example, a single
+   * subnetwork can be the source of multiple Ranges, one for each protocol. In
+   * this case, the sub_id could be "private-ipv4" or "private-ipv6".
+   * 
+ * + * string source_sub_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for sourceSubId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceSubIdBytes() { + java.lang.Object ref = sourceSubId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceSubId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getEventTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + if (state_ + != com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState + .RESOURCE_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, resource_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, resourceUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, sourceId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceSubId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, sourceSubId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEventTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (state_ + != com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState + .RESOURCE_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, resource_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, resourceUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, sourceId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceSubId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, sourceSubId_); + } + 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.numberregistry.v1alpha.DiscoveryMetadata)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata other = + (com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata) obj; + + if (hasEventTime() != other.hasEventTime()) return false; + if (hasEventTime()) { + if (!getEventTime().equals(other.getEventTime())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (state_ != other.state_) return false; + if (!getResource().equals(other.getResource())) return false; + if (!getResourceUri().equals(other.getResourceUri())) return false; + if (!getSourceId().equals(other.getSourceId())) return false; + if (!getSourceSubId().equals(other.getSourceSubId())) 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 (hasEventTime()) { + hash = (37 * hash) + EVENT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEventTime().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (37 * hash) + SOURCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSourceId().hashCode(); + hash = (37 * hash) + SOURCE_SUB_ID_FIELD_NUMBER; + hash = (53 * hash) + getSourceSubId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata 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.numberregistry.v1alpha.DiscoveryMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata 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.numberregistry.v1alpha.DiscoveryMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.DiscoveryMetadata 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Metadata about a discovered resource, tracking event times, state, and source
+   * information.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.DiscoveryMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.DiscoveryMetadata) + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DiscoveryMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DiscoveryMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.class, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEventTimeFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + eventTime_ = null; + if (eventTimeBuilder_ != null) { + eventTimeBuilder_.dispose(); + eventTimeBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + state_ = 0; + resource_ = ""; + resourceUri_ = ""; + sourceId_ = ""; + sourceSubId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_DiscoveryMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata build() { + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata buildPartial() { + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata result = + new com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.eventTime_ = eventTimeBuilder_ == null ? eventTime_ : eventTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.resource_ = resource_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.resourceUri_ = resourceUri_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.sourceId_ = sourceId_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.sourceSubId_ = sourceSubId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata other) { + if (other == com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.getDefaultInstance()) + return this; + if (other.hasEventTime()) { + mergeEventTime(other.getEventTime()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getSourceId().isEmpty()) { + sourceId_ = other.sourceId_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getSourceSubId().isEmpty()) { + sourceSubId_ = other.sourceSubId_; + bitField0_ |= 0x00000080; + 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: + { + input.readMessage( + internalGetEventTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + resource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + resourceUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + sourceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + sourceSubId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + 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 com.google.protobuf.Timestamp eventTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + eventTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the eventTime field is set. + */ + public boolean hasEventTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time when the event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The eventTime. + */ + public com.google.protobuf.Timestamp getEventTime() { + if (eventTimeBuilder_ == null) { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } else { + return eventTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEventTime(com.google.protobuf.Timestamp value) { + if (eventTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eventTime_ = value; + } else { + eventTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEventTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (eventTimeBuilder_ == null) { + eventTime_ = builderForValue.build(); + } else { + eventTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEventTime(com.google.protobuf.Timestamp value) { + if (eventTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && eventTime_ != null + && eventTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEventTimeBuilder().mergeFrom(value); + } else { + eventTime_ = value; + } + } else { + eventTimeBuilder_.mergeFrom(value); + } + if (eventTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEventTime() { + bitField0_ = (bitField0_ & ~0x00000001); + eventTime_ = null; + if (eventTimeBuilder_ != null) { + eventTimeBuilder_.dispose(); + eventTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEventTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetEventTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { + if (eventTimeBuilder_ != null) { + return eventTimeBuilder_.getMessageOrBuilder(); + } else { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the event happened.
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEventTimeFieldBuilder() { + if (eventTimeBuilder_ == null) { + eventTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEventTime(), getParentForChildren(), isClean()); + eventTime_ = null; + } + return eventTimeBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the resource was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The time when the resource was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the resource was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the resource was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the resource was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the resource was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the resource was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the resource was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the resource was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The state of the resource.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The state of the resource.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The state of the resource.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState getState() { + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState result = + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState.forNumber(state_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The state of the resource.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The state of the resource.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resource_ = ""; + + /** + * + * + *
+     * Output only. The resource name of the discovered resource, should be
+     * API-agnostic. Example: "projects/{project_number}/networks/{network_id}".
+     * 
+ * + * string resource = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the discovered resource, should be
+     * API-agnostic. Example: "projects/{project_number}/networks/{network_id}".
+     * 
+ * + * string resource = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the discovered resource, should be
+     * API-agnostic. Example: "projects/{project_number}/networks/{network_id}".
+     * 
+ * + * string resource = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the discovered resource, should be
+     * API-agnostic. Example: "projects/{project_number}/networks/{network_id}".
+     * 
+ * + * string resource = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearResource() { + resource_ = getDefaultInstance().getResource(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the discovered resource, should be
+     * API-agnostic. Example: "projects/{project_number}/networks/{network_id}".
+     * 
+ * + * string resource = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resource_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object resourceUri_ = ""; + + /** + * + * + *
+     * Output only. The resource uri of the discovered resource.
+     * 
+ * + * string resource_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource uri of the discovered resource.
+     * 
+ * + * string resource_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource uri of the discovered resource.
+     * 
+ * + * string resource_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource uri of the discovered resource.
+     * 
+ * + * string resource_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + resourceUri_ = getDefaultInstance().getResourceUri(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource uri of the discovered resource.
+     * 
+ * + * string resource_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object sourceId_ = ""; + + /** + * + * + *
+     * Output only. The canonical google.aip.dev/122 name of the source resource.
+     * 
+ * + * string source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sourceId. + */ + public java.lang.String getSourceId() { + java.lang.Object ref = sourceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The canonical google.aip.dev/122 name of the source resource.
+     * 
+ * + * string source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for sourceId. + */ + public com.google.protobuf.ByteString getSourceIdBytes() { + java.lang.Object ref = sourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The canonical google.aip.dev/122 name of the source resource.
+     * 
+ * + * string source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sourceId to set. + * @return This builder for chaining. + */ + public Builder setSourceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The canonical google.aip.dev/122 name of the source resource.
+     * 
+ * + * string source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSourceId() { + sourceId_ = getDefaultInstance().getSourceId(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The canonical google.aip.dev/122 name of the source resource.
+     * 
+ * + * string source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for sourceId to set. + * @return This builder for chaining. + */ + public Builder setSourceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object sourceSubId_ = ""; + + /** + * + * + *
+     * Output only. A single source resource can be the source of multiple CNR
+     * resources. This sub_id is used to distinguish between the different CNR
+     * resources derived from the same upstream resource. For example, a single
+     * subnetwork can be the source of multiple Ranges, one for each protocol. In
+     * this case, the sub_id could be "private-ipv4" or "private-ipv6".
+     * 
+ * + * string source_sub_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sourceSubId. + */ + public java.lang.String getSourceSubId() { + java.lang.Object ref = sourceSubId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceSubId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. A single source resource can be the source of multiple CNR
+     * resources. This sub_id is used to distinguish between the different CNR
+     * resources derived from the same upstream resource. For example, a single
+     * subnetwork can be the source of multiple Ranges, one for each protocol. In
+     * this case, the sub_id could be "private-ipv4" or "private-ipv6".
+     * 
+ * + * string source_sub_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for sourceSubId. + */ + public com.google.protobuf.ByteString getSourceSubIdBytes() { + java.lang.Object ref = sourceSubId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceSubId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. A single source resource can be the source of multiple CNR
+     * resources. This sub_id is used to distinguish between the different CNR
+     * resources derived from the same upstream resource. For example, a single
+     * subnetwork can be the source of multiple Ranges, one for each protocol. In
+     * this case, the sub_id could be "private-ipv4" or "private-ipv6".
+     * 
+ * + * string source_sub_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sourceSubId to set. + * @return This builder for chaining. + */ + public Builder setSourceSubId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceSubId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A single source resource can be the source of multiple CNR
+     * resources. This sub_id is used to distinguish between the different CNR
+     * resources derived from the same upstream resource. For example, a single
+     * subnetwork can be the source of multiple Ranges, one for each protocol. In
+     * this case, the sub_id could be "private-ipv4" or "private-ipv6".
+     * 
+ * + * string source_sub_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSourceSubId() { + sourceSubId_ = getDefaultInstance().getSourceSubId(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A single source resource can be the source of multiple CNR
+     * resources. This sub_id is used to distinguish between the different CNR
+     * resources derived from the same upstream resource. For example, a single
+     * subnetwork can be the source of multiple Ranges, one for each protocol. In
+     * this case, the sub_id could be "private-ipv4" or "private-ipv6".
+     * 
+ * + * string source_sub_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for sourceSubId to set. + * @return This builder for chaining. + */ + public Builder setSourceSubIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceSubId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.DiscoveryMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.DiscoveryMetadata) + private static final com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata(); + } + + public static com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiscoveryMetadata 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.numberregistry.v1alpha.DiscoveryMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveryMetadataOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveryMetadataOrBuilder.java new file mode 100644 index 000000000000..b64258e8e317 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/DiscoveryMetadataOrBuilder.java @@ -0,0 +1,292 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface DiscoveryMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.DiscoveryMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time when the event happened.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the eventTime field is set. + */ + boolean hasEventTime(); + + /** + * + * + *
+   * Output only. The time when the event happened.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The eventTime. + */ + com.google.protobuf.Timestamp getEventTime(); + + /** + * + * + *
+   * Output only. The time when the event happened.
+   * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the resource was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the resource was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the resource was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The state of the resource.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The state of the resource.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.ResourceState getState(); + + /** + * + * + *
+   * Output only. The resource name of the discovered resource, should be
+   * API-agnostic. Example: "projects/{project_number}/networks/{network_id}".
+   * 
+ * + * string resource = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resource. + */ + java.lang.String getResource(); + + /** + * + * + *
+   * Output only. The resource name of the discovered resource, should be
+   * API-agnostic. Example: "projects/{project_number}/networks/{network_id}".
+   * 
+ * + * string resource = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); + + /** + * + * + *
+   * Output only. The resource uri of the discovered resource.
+   * 
+ * + * string resource_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + + /** + * + * + *
+   * Output only. The resource uri of the discovered resource.
+   * 
+ * + * string resource_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); + + /** + * + * + *
+   * Output only. The canonical google.aip.dev/122 name of the source resource.
+   * 
+ * + * string source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sourceId. + */ + java.lang.String getSourceId(); + + /** + * + * + *
+   * Output only. The canonical google.aip.dev/122 name of the source resource.
+   * 
+ * + * string source_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for sourceId. + */ + com.google.protobuf.ByteString getSourceIdBytes(); + + /** + * + * + *
+   * Output only. A single source resource can be the source of multiple CNR
+   * resources. This sub_id is used to distinguish between the different CNR
+   * resources derived from the same upstream resource. For example, a single
+   * subnetwork can be the source of multiple Ranges, one for each protocol. In
+   * this case, the sub_id could be "private-ipv4" or "private-ipv6".
+   * 
+ * + * string source_sub_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sourceSubId. + */ + java.lang.String getSourceSubId(); + + /** + * + * + *
+   * Output only. A single source resource can be the source of multiple CNR
+   * resources. This sub_id is used to distinguish between the different CNR
+   * resources derived from the same upstream resource. For example, a single
+   * subnetwork can be the source of multiple Ranges, one for each protocol. In
+   * this case, the sub_id could be "private-ipv4" or "private-ipv6".
+   * 
+ * + * string source_sub_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for sourceSubId. + */ + com.google.protobuf.ByteString getSourceSubIdBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesRequest.java new file mode 100644 index 000000000000..e2e60947c13d --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesRequest.java @@ -0,0 +1,1120 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.FindCustomRangeFreeIpRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.FindCustomRangeFreeIpRanges]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest} + */ +@com.google.protobuf.Generated +public final class FindCustomRangeFreeIpRangesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest) + FindCustomRangeFreeIpRangesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FindCustomRangeFreeIpRangesRequest"); + } + + // Use FindCustomRangeFreeIpRangesRequest.newBuilder() to construct. + private FindCustomRangeFreeIpRangesRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FindCustomRangeFreeIpRangesRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest.class, + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the CustomRange to search within.
+   * 
+ * + * + * 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 CustomRange to search within.
+   * 
+ * + * + * 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 CIDR_PREFIX_LENGTH_FIELD_NUMBER = 2; + private int cidrPrefixLength_ = 0; + + /** + * + * + *
+   * Required. The prefix length of the free IP ranges to find.
+   * 
+ * + * int32 cidr_prefix_length = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cidrPrefixLength. + */ + @java.lang.Override + public int getCidrPrefixLength() { + return cidrPrefixLength_; + } + + public static final int RANGE_COUNT_FIELD_NUMBER = 3; + private int rangeCount_ = 0; + + /** + * + * + *
+   * Optional. The number of free IP ranges to find.
+   * 
+ * + * int32 range_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rangeCount. + */ + @java.lang.Override + public int getRangeCount() { + return rangeCount_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (cidrPrefixLength_ != 0) { + output.writeInt32(2, cidrPrefixLength_); + } + if (rangeCount_ != 0) { + output.writeInt32(3, rangeCount_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (cidrPrefixLength_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, cidrPrefixLength_); + } + if (rangeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, rangeCount_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + 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.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest other = + (com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getCidrPrefixLength() != other.getCidrPrefixLength()) return false; + if (getRangeCount() != other.getRangeCount()) return false; + if (!getRequestId().equals(other.getRequestId())) 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) + CIDR_PREFIX_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + getCidrPrefixLength(); + hash = (37 * hash) + RANGE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getRangeCount(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + 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.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + 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.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.FindCustomRangeFreeIpRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.FindCustomRangeFreeIpRanges]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest) + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest.class, + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + cidrPrefixLength_ = 0; + rangeCount_ = 0; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest build() { + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + buildPartial() { + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest result = + new com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cidrPrefixLength_ = cidrPrefixLength_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.rangeCount_ = rangeCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getCidrPrefixLength() != 0) { + setCidrPrefixLength(other.getCidrPrefixLength()); + } + if (other.getRangeCount() != 0) { + setRangeCount(other.getRangeCount()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + cidrPrefixLength_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + rangeCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + requestId_ = 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 name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the CustomRange to search within.
+     * 
+ * + * + * 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 CustomRange to search within.
+     * 
+ * + * + * 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 CustomRange to search within.
+     * 
+ * + * + * 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 CustomRange to search within.
+     * 
+ * + * + * 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 CustomRange to search within.
+     * 
+ * + * + * 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 int cidrPrefixLength_; + + /** + * + * + *
+     * Required. The prefix length of the free IP ranges to find.
+     * 
+ * + * int32 cidr_prefix_length = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cidrPrefixLength. + */ + @java.lang.Override + public int getCidrPrefixLength() { + return cidrPrefixLength_; + } + + /** + * + * + *
+     * Required. The prefix length of the free IP ranges to find.
+     * 
+ * + * int32 cidr_prefix_length = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The cidrPrefixLength to set. + * @return This builder for chaining. + */ + public Builder setCidrPrefixLength(int value) { + + cidrPrefixLength_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The prefix length of the free IP ranges to find.
+     * 
+ * + * int32 cidr_prefix_length = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCidrPrefixLength() { + bitField0_ = (bitField0_ & ~0x00000002); + cidrPrefixLength_ = 0; + onChanged(); + return this; + } + + private int rangeCount_; + + /** + * + * + *
+     * Optional. The number of free IP ranges to find.
+     * 
+ * + * int32 range_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rangeCount. + */ + @java.lang.Override + public int getRangeCount() { + return rangeCount_; + } + + /** + * + * + *
+     * Optional. The number of free IP ranges to find.
+     * 
+ * + * int32 range_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The rangeCount to set. + * @return This builder for chaining. + */ + public Builder setRangeCount(int value) { + + rangeCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The number of free IP ranges to find.
+     * 
+ * + * int32 range_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRangeCount() { + bitField0_ = (bitField0_ & ~0x00000004); + rangeCount_ = 0; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest) + private static final com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FindCustomRangeFreeIpRangesRequest 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.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesRequestOrBuilder.java new file mode 100644 index 000000000000..bcc0794add38 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesRequestOrBuilder.java @@ -0,0 +1,138 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface FindCustomRangeFreeIpRangesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the CustomRange to search within.
+   * 
+ * + * + * 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 CustomRange to search within.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The prefix length of the free IP ranges to find.
+   * 
+ * + * int32 cidr_prefix_length = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cidrPrefixLength. + */ + int getCidrPrefixLength(); + + /** + * + * + *
+   * Optional. The number of free IP ranges to find.
+   * 
+ * + * int32 range_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rangeCount. + */ + int getRangeCount(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesResponse.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesResponse.java new file mode 100644 index 000000000000..63ec30d009cf --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesResponse.java @@ -0,0 +1,739 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Response message for the
+ * [CloudNumberRegistry.FindCustomRangeFreeIpRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.FindCustomRangeFreeIpRanges]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse} + */ +@com.google.protobuf.Generated +public final class FindCustomRangeFreeIpRangesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse) + FindCustomRangeFreeIpRangesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FindCustomRangeFreeIpRangesResponse"); + } + + // Use FindCustomRangeFreeIpRangesResponse.newBuilder() to construct. + private FindCustomRangeFreeIpRangesResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FindCustomRangeFreeIpRangesResponse() { + freeIpCidrRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse.class, + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse.Builder + .class); + } + + public static final int FREE_IP_CIDR_RANGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList freeIpCidrRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the freeIpCidrRanges. + */ + public com.google.protobuf.ProtocolStringList getFreeIpCidrRangesList() { + return freeIpCidrRanges_; + } + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of freeIpCidrRanges. + */ + public int getFreeIpCidrRangesCount() { + return freeIpCidrRanges_.size(); + } + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The freeIpCidrRanges at the given index. + */ + public java.lang.String getFreeIpCidrRanges(int index) { + return freeIpCidrRanges_.get(index); + } + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the freeIpCidrRanges at the given index. + */ + public com.google.protobuf.ByteString getFreeIpCidrRangesBytes(int index) { + return freeIpCidrRanges_.getByteString(index); + } + + 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 < freeIpCidrRanges_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, freeIpCidrRanges_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < freeIpCidrRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(freeIpCidrRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getFreeIpCidrRangesList().size(); + } + 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.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse other = + (com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse) obj; + + if (!getFreeIpCidrRangesList().equals(other.getFreeIpCidrRangesList())) 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 (getFreeIpCidrRangesCount() > 0) { + hash = (37 * hash) + FREE_IP_CIDR_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getFreeIpCidrRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + 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.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + 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.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for the
+   * [CloudNumberRegistry.FindCustomRangeFreeIpRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.FindCustomRangeFreeIpRanges]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse) + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse.class, + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + freeIpCidrRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindCustomRangeFreeIpRangesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse build() { + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + buildPartial() { + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse result = + new com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + freeIpCidrRanges_.makeImmutable(); + result.freeIpCidrRanges_ = freeIpCidrRanges_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse other) { + if (other + == com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + .getDefaultInstance()) return this; + if (!other.freeIpCidrRanges_.isEmpty()) { + if (freeIpCidrRanges_.isEmpty()) { + freeIpCidrRanges_ = other.freeIpCidrRanges_; + bitField0_ |= 0x00000001; + } else { + ensureFreeIpCidrRangesIsMutable(); + freeIpCidrRanges_.addAll(other.freeIpCidrRanges_); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFreeIpCidrRangesIsMutable(); + freeIpCidrRanges_.add(s); + 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 com.google.protobuf.LazyStringArrayList freeIpCidrRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureFreeIpCidrRangesIsMutable() { + if (!freeIpCidrRanges_.isModifiable()) { + freeIpCidrRanges_ = new com.google.protobuf.LazyStringArrayList(freeIpCidrRanges_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the freeIpCidrRanges. + */ + public com.google.protobuf.ProtocolStringList getFreeIpCidrRangesList() { + freeIpCidrRanges_.makeImmutable(); + return freeIpCidrRanges_; + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of freeIpCidrRanges. + */ + public int getFreeIpCidrRangesCount() { + return freeIpCidrRanges_.size(); + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The freeIpCidrRanges at the given index. + */ + public java.lang.String getFreeIpCidrRanges(int index) { + return freeIpCidrRanges_.get(index); + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the freeIpCidrRanges at the given index. + */ + public com.google.protobuf.ByteString getFreeIpCidrRangesBytes(int index) { + return freeIpCidrRanges_.getByteString(index); + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The freeIpCidrRanges to set. + * @return This builder for chaining. + */ + public Builder setFreeIpCidrRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFreeIpCidrRangesIsMutable(); + freeIpCidrRanges_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The freeIpCidrRanges to add. + * @return This builder for chaining. + */ + public Builder addFreeIpCidrRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFreeIpCidrRangesIsMutable(); + freeIpCidrRanges_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The freeIpCidrRanges to add. + * @return This builder for chaining. + */ + public Builder addAllFreeIpCidrRanges(java.lang.Iterable values) { + ensureFreeIpCidrRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, freeIpCidrRanges_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearFreeIpCidrRanges() { + freeIpCidrRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the freeIpCidrRanges to add. + * @return This builder for chaining. + */ + public Builder addFreeIpCidrRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFreeIpCidrRangesIsMutable(); + freeIpCidrRanges_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse) + private static final com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse(); + } + + public static com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FindCustomRangeFreeIpRangesResponse 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.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesResponseOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesResponseOrBuilder.java new file mode 100644 index 000000000000..7f330617064d --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindCustomRangeFreeIpRangesResponseOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface FindCustomRangeFreeIpRangesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the freeIpCidrRanges. + */ + java.util.List getFreeIpCidrRangesList(); + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of freeIpCidrRanges. + */ + int getFreeIpCidrRangesCount(); + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The freeIpCidrRanges at the given index. + */ + java.lang.String getFreeIpCidrRanges(int index); + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the freeIpCidrRanges at the given index. + */ + com.google.protobuf.ByteString getFreeIpCidrRangesBytes(int index); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesRequest.java new file mode 100644 index 000000000000..0af8d088b495 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesRequest.java @@ -0,0 +1,1125 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest} + */ +@com.google.protobuf.Generated +public final class FindDiscoveredRangeFreeIpRangesRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest) + FindDiscoveredRangeFreeIpRangesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FindDiscoveredRangeFreeIpRangesRequest"); + } + + // Use FindDiscoveredRangeFreeIpRangesRequest.newBuilder() to construct. + private FindDiscoveredRangeFreeIpRangesRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FindDiscoveredRangeFreeIpRangesRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest.class, + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the DiscoveredRange to search within.
+   * 
+ * + * + * 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 DiscoveredRange to search within.
+   * 
+ * + * + * 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 CIDR_PREFIX_LENGTH_FIELD_NUMBER = 2; + private int cidrPrefixLength_ = 0; + + /** + * + * + *
+   * Required. The prefix length of the free IP ranges to find.
+   * 
+ * + * int32 cidr_prefix_length = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cidrPrefixLength. + */ + @java.lang.Override + public int getCidrPrefixLength() { + return cidrPrefixLength_; + } + + public static final int RANGE_COUNT_FIELD_NUMBER = 3; + private int rangeCount_ = 0; + + /** + * + * + *
+   * Optional. The number of free IP ranges to find.
+   * 
+ * + * int32 range_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rangeCount. + */ + @java.lang.Override + public int getRangeCount() { + return rangeCount_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (cidrPrefixLength_ != 0) { + output.writeInt32(2, cidrPrefixLength_); + } + if (rangeCount_ != 0) { + output.writeInt32(3, rangeCount_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (cidrPrefixLength_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, cidrPrefixLength_); + } + if (rangeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, rangeCount_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + 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.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest other = + (com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getCidrPrefixLength() != other.getCidrPrefixLength()) return false; + if (getRangeCount() != other.getRangeCount()) return false; + if (!getRequestId().equals(other.getRequestId())) 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) + CIDR_PREFIX_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + getCidrPrefixLength(); + hash = (37 * hash) + RANGE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getRangeCount(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + 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.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + 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.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges]
+   * method.
+   * 
+ * + * Protobuf type {@code + * google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest) + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest.class, + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + cidrPrefixLength_ = 0; + rangeCount_ = 0; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest build() { + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + buildPartial() { + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest result = + new com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cidrPrefixLength_ = cidrPrefixLength_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.rangeCount_ = rangeCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getCidrPrefixLength() != 0) { + setCidrPrefixLength(other.getCidrPrefixLength()); + } + if (other.getRangeCount() != 0) { + setRangeCount(other.getRangeCount()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + cidrPrefixLength_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + rangeCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + requestId_ = 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 name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the DiscoveredRange to search within.
+     * 
+ * + * + * 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 DiscoveredRange to search within.
+     * 
+ * + * + * 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 DiscoveredRange to search within.
+     * 
+ * + * + * 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 DiscoveredRange to search within.
+     * 
+ * + * + * 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 DiscoveredRange to search within.
+     * 
+ * + * + * 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 int cidrPrefixLength_; + + /** + * + * + *
+     * Required. The prefix length of the free IP ranges to find.
+     * 
+ * + * int32 cidr_prefix_length = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cidrPrefixLength. + */ + @java.lang.Override + public int getCidrPrefixLength() { + return cidrPrefixLength_; + } + + /** + * + * + *
+     * Required. The prefix length of the free IP ranges to find.
+     * 
+ * + * int32 cidr_prefix_length = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The cidrPrefixLength to set. + * @return This builder for chaining. + */ + public Builder setCidrPrefixLength(int value) { + + cidrPrefixLength_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The prefix length of the free IP ranges to find.
+     * 
+ * + * int32 cidr_prefix_length = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCidrPrefixLength() { + bitField0_ = (bitField0_ & ~0x00000002); + cidrPrefixLength_ = 0; + onChanged(); + return this; + } + + private int rangeCount_; + + /** + * + * + *
+     * Optional. The number of free IP ranges to find.
+     * 
+ * + * int32 range_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rangeCount. + */ + @java.lang.Override + public int getRangeCount() { + return rangeCount_; + } + + /** + * + * + *
+     * Optional. The number of free IP ranges to find.
+     * 
+ * + * int32 range_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The rangeCount to set. + * @return This builder for chaining. + */ + public Builder setRangeCount(int value) { + + rangeCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The number of free IP ranges to find.
+     * 
+ * + * int32 range_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRangeCount() { + bitField0_ = (bitField0_ & ~0x00000004); + rangeCount_ = 0; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest) + private static final com.google.cloud.numberregistry.v1alpha + .FindDiscoveredRangeFreeIpRangesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FindDiscoveredRangeFreeIpRangesRequest 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.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesRequestOrBuilder.java new file mode 100644 index 000000000000..5d88034cf905 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesRequestOrBuilder.java @@ -0,0 +1,138 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface FindDiscoveredRangeFreeIpRangesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the DiscoveredRange to search within.
+   * 
+ * + * + * 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 DiscoveredRange to search within.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The prefix length of the free IP ranges to find.
+   * 
+ * + * int32 cidr_prefix_length = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cidrPrefixLength. + */ + int getCidrPrefixLength(); + + /** + * + * + *
+   * Optional. The number of free IP ranges to find.
+   * 
+ * + * int32 range_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rangeCount. + */ + int getRangeCount(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesResponse.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesResponse.java new file mode 100644 index 000000000000..b719ed48a97b --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesResponse.java @@ -0,0 +1,745 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Response message for the
+ * [CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse} + */ +@com.google.protobuf.Generated +public final class FindDiscoveredRangeFreeIpRangesResponse + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse) + FindDiscoveredRangeFreeIpRangesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FindDiscoveredRangeFreeIpRangesResponse"); + } + + // Use FindDiscoveredRangeFreeIpRangesResponse.newBuilder() to construct. + private FindDiscoveredRangeFreeIpRangesResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FindDiscoveredRangeFreeIpRangesResponse() { + freeIpCidrRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse.class, + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse.Builder + .class); + } + + public static final int FREE_IP_CIDR_RANGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList freeIpCidrRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the freeIpCidrRanges. + */ + public com.google.protobuf.ProtocolStringList getFreeIpCidrRangesList() { + return freeIpCidrRanges_; + } + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of freeIpCidrRanges. + */ + public int getFreeIpCidrRangesCount() { + return freeIpCidrRanges_.size(); + } + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The freeIpCidrRanges at the given index. + */ + public java.lang.String getFreeIpCidrRanges(int index) { + return freeIpCidrRanges_.get(index); + } + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the freeIpCidrRanges at the given index. + */ + public com.google.protobuf.ByteString getFreeIpCidrRangesBytes(int index) { + return freeIpCidrRanges_.getByteString(index); + } + + 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 < freeIpCidrRanges_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, freeIpCidrRanges_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < freeIpCidrRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(freeIpCidrRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getFreeIpCidrRangesList().size(); + } + 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.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse other = + (com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse) obj; + + if (!getFreeIpCidrRangesList().equals(other.getFreeIpCidrRangesList())) 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 (getFreeIpCidrRangesCount() > 0) { + hash = (37 * hash) + FREE_IP_CIDR_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getFreeIpCidrRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + 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.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + 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.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for the
+   * [CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges]
+   * method.
+   * 
+ * + * Protobuf type {@code + * google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse) + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse.class, + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + freeIpCidrRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_FindDiscoveredRangeFreeIpRangesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse build() { + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + buildPartial() { + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse result = + new com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + freeIpCidrRanges_.makeImmutable(); + result.freeIpCidrRanges_ = freeIpCidrRanges_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse other) { + if (other + == com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + .getDefaultInstance()) return this; + if (!other.freeIpCidrRanges_.isEmpty()) { + if (freeIpCidrRanges_.isEmpty()) { + freeIpCidrRanges_ = other.freeIpCidrRanges_; + bitField0_ |= 0x00000001; + } else { + ensureFreeIpCidrRangesIsMutable(); + freeIpCidrRanges_.addAll(other.freeIpCidrRanges_); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFreeIpCidrRangesIsMutable(); + freeIpCidrRanges_.add(s); + 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 com.google.protobuf.LazyStringArrayList freeIpCidrRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureFreeIpCidrRangesIsMutable() { + if (!freeIpCidrRanges_.isModifiable()) { + freeIpCidrRanges_ = new com.google.protobuf.LazyStringArrayList(freeIpCidrRanges_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the freeIpCidrRanges. + */ + public com.google.protobuf.ProtocolStringList getFreeIpCidrRangesList() { + freeIpCidrRanges_.makeImmutable(); + return freeIpCidrRanges_; + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of freeIpCidrRanges. + */ + public int getFreeIpCidrRangesCount() { + return freeIpCidrRanges_.size(); + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The freeIpCidrRanges at the given index. + */ + public java.lang.String getFreeIpCidrRanges(int index) { + return freeIpCidrRanges_.get(index); + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the freeIpCidrRanges at the given index. + */ + public com.google.protobuf.ByteString getFreeIpCidrRangesBytes(int index) { + return freeIpCidrRanges_.getByteString(index); + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The freeIpCidrRanges to set. + * @return This builder for chaining. + */ + public Builder setFreeIpCidrRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFreeIpCidrRangesIsMutable(); + freeIpCidrRanges_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The freeIpCidrRanges to add. + * @return This builder for chaining. + */ + public Builder addFreeIpCidrRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFreeIpCidrRangesIsMutable(); + freeIpCidrRanges_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The freeIpCidrRanges to add. + * @return This builder for chaining. + */ + public Builder addAllFreeIpCidrRanges(java.lang.Iterable values) { + ensureFreeIpCidrRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, freeIpCidrRanges_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearFreeIpCidrRanges() { + freeIpCidrRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The free IP CIDR ranges found.
+     * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the freeIpCidrRanges to add. + * @return This builder for chaining. + */ + public Builder addFreeIpCidrRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFreeIpCidrRangesIsMutable(); + freeIpCidrRanges_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse) + private static final com.google.cloud.numberregistry.v1alpha + .FindDiscoveredRangeFreeIpRangesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse(); + } + + public static com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FindDiscoveredRangeFreeIpRangesResponse 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.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesResponseOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesResponseOrBuilder.java new file mode 100644 index 000000000000..4f9fe2f99c0c --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/FindDiscoveredRangeFreeIpRangesResponseOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface FindDiscoveredRangeFreeIpRangesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the freeIpCidrRanges. + */ + java.util.List getFreeIpCidrRangesList(); + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of freeIpCidrRanges. + */ + int getFreeIpCidrRangesCount(); + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The freeIpCidrRanges at the given index. + */ + java.lang.String getFreeIpCidrRanges(int index); + + /** + * + * + *
+   * Output only. The free IP CIDR ranges found.
+   * 
+ * + * repeated string free_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the freeIpCidrRanges at the given index. + */ + com.google.protobuf.ByteString getFreeIpCidrRangesBytes(int index); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetCustomRangeRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetCustomRangeRequest.java new file mode 100644 index 000000000000..959b2cb09dc5 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetCustomRangeRequest.java @@ -0,0 +1,619 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.GetCustomRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetCustomRange]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.GetCustomRangeRequest} + */ +@com.google.protobuf.Generated +public final class GetCustomRangeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.GetCustomRangeRequest) + GetCustomRangeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetCustomRangeRequest"); + } + + // Use GetCustomRangeRequest.newBuilder() to construct. + private GetCustomRangeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetCustomRangeRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetCustomRangeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetCustomRangeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest.class, + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the CustomRange to retrieve.
+   * 
+ * + * + * 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 CustomRange to retrieve.
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.GetCustomRangeRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest other = + (com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest) 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.numberregistry.v1alpha.GetCustomRangeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest 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.numberregistry.v1alpha.GetCustomRangeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest 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.numberregistry.v1alpha.GetCustomRangeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.GetCustomRangeRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.GetCustomRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetCustomRange]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.GetCustomRangeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.GetCustomRangeRequest) + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetCustomRangeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetCustomRangeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest.class, + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetCustomRangeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest build() { + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest result = + new com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest.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. The resource name of the CustomRange to retrieve.
+     * 
+ * + * + * 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 CustomRange to retrieve.
+     * 
+ * + * + * 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 CustomRange to retrieve.
+     * 
+ * + * + * 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 CustomRange to retrieve.
+     * 
+ * + * + * 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 CustomRange to retrieve.
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.GetCustomRangeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.GetCustomRangeRequest) + private static final com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCustomRangeRequest 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.numberregistry.v1alpha.GetCustomRangeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetCustomRangeRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetCustomRangeRequestOrBuilder.java new file mode 100644 index 000000000000..8bec49357419 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetCustomRangeRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface GetCustomRangeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.GetCustomRangeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the CustomRange to retrieve.
+   * 
+ * + * + * 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 CustomRange to retrieve.
+   * 
+ * + * + * 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-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetDiscoveredRangeRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetDiscoveredRangeRequest.java new file mode 100644 index 000000000000..9e72b1b7fee2 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetDiscoveredRangeRequest.java @@ -0,0 +1,624 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.GetDiscoveredRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetDiscoveredRange]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest} + */ +@com.google.protobuf.Generated +public final class GetDiscoveredRangeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest) + GetDiscoveredRangeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetDiscoveredRangeRequest"); + } + + // Use GetDiscoveredRangeRequest.newBuilder() to construct. + private GetDiscoveredRangeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetDiscoveredRangeRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetDiscoveredRangeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetDiscoveredRangeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest.class, + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the DiscoveredRange to retrieve.
+   * 
+ * + * + * 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 DiscoveredRange to retrieve.
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.GetDiscoveredRangeRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest other = + (com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest) 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.numberregistry.v1alpha.GetDiscoveredRangeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest 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.numberregistry.v1alpha.GetDiscoveredRangeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest 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.numberregistry.v1alpha.GetDiscoveredRangeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.GetDiscoveredRangeRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.GetDiscoveredRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetDiscoveredRange]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest) + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetDiscoveredRangeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetDiscoveredRangeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest.class, + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetDiscoveredRangeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest build() { + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest result = + new com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest.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. The resource name of the DiscoveredRange to retrieve.
+     * 
+ * + * + * 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 DiscoveredRange to retrieve.
+     * 
+ * + * + * 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 DiscoveredRange to retrieve.
+     * 
+ * + * + * 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 DiscoveredRange to retrieve.
+     * 
+ * + * + * 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 DiscoveredRange to retrieve.
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest) + private static final com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDiscoveredRangeRequest 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.numberregistry.v1alpha.GetDiscoveredRangeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetDiscoveredRangeRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetDiscoveredRangeRequestOrBuilder.java new file mode 100644 index 000000000000..cb9bd845763a --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetDiscoveredRangeRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface GetDiscoveredRangeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the DiscoveredRange to retrieve.
+   * 
+ * + * + * 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 DiscoveredRange to retrieve.
+   * 
+ * + * + * 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-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetIpamAdminScopeRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetIpamAdminScopeRequest.java new file mode 100644 index 000000000000..39fbb5237b57 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetIpamAdminScopeRequest.java @@ -0,0 +1,622 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.GetIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetIpamAdminScope]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest} + */ +@com.google.protobuf.Generated +public final class GetIpamAdminScopeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest) + GetIpamAdminScopeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetIpamAdminScopeRequest"); + } + + // Use GetIpamAdminScopeRequest.newBuilder() to construct. + private GetIpamAdminScopeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetIpamAdminScopeRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetIpamAdminScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest.class, + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the IpamAdminScope to retrieve.
+   * 
+ * + * + * 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 IpamAdminScope to retrieve.
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.GetIpamAdminScopeRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest other = + (com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest) 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.numberregistry.v1alpha.GetIpamAdminScopeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest 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.numberregistry.v1alpha.GetIpamAdminScopeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest 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.numberregistry.v1alpha.GetIpamAdminScopeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.GetIpamAdminScopeRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.GetIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetIpamAdminScope]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest) + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetIpamAdminScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest.class, + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest build() { + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest result = + new com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest.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. The resource name of the IpamAdminScope to retrieve.
+     * 
+ * + * + * 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 IpamAdminScope to retrieve.
+     * 
+ * + * + * 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 IpamAdminScope to retrieve.
+     * 
+ * + * + * 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 IpamAdminScope to retrieve.
+     * 
+ * + * + * 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 IpamAdminScope to retrieve.
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest) + private static final com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetIpamAdminScopeRequest 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.numberregistry.v1alpha.GetIpamAdminScopeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetIpamAdminScopeRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetIpamAdminScopeRequestOrBuilder.java new file mode 100644 index 000000000000..2ca2ff31d7c6 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetIpamAdminScopeRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface GetIpamAdminScopeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the IpamAdminScope to retrieve.
+   * 
+ * + * + * 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 IpamAdminScope to retrieve.
+   * 
+ * + * + * 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-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRealmRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRealmRequest.java new file mode 100644 index 000000000000..385924cabf99 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRealmRequest.java @@ -0,0 +1,792 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.GetRealm][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetRealm]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.GetRealmRequest} + */ +@com.google.protobuf.Generated +public final class GetRealmRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.GetRealmRequest) + GetRealmRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetRealmRequest"); + } + + // Use GetRealmRequest.newBuilder() to construct. + private GetRealmRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetRealmRequest() { + name_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetRealmRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetRealmRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.GetRealmRequest.class, + com.google.cloud.numberregistry.v1alpha.GetRealmRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the Realm to retrieve.
+   * 
+ * + * + * 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 Realm to retrieve.
+   * 
+ * + * + * 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 VIEW_FIELD_NUMBER = 2; + private int view_ = 0; + + /** + * + * + *
+   * Optional. The view of the Realm to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Optional. The view of the Realm to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm.RealmView getView() { + com.google.cloud.numberregistry.v1alpha.Realm.RealmView result = + com.google.cloud.numberregistry.v1alpha.Realm.RealmView.forNumber(view_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.Realm.RealmView.UNRECOGNIZED + : result; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (view_ + != com.google.cloud.numberregistry.v1alpha.Realm.RealmView.REALM_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (view_ + != com.google.cloud.numberregistry.v1alpha.Realm.RealmView.REALM_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + 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.numberregistry.v1alpha.GetRealmRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.GetRealmRequest other = + (com.google.cloud.numberregistry.v1alpha.GetRealmRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) 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) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.GetRealmRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRealmRequest 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.numberregistry.v1alpha.GetRealmRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRealmRequest 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.numberregistry.v1alpha.GetRealmRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRealmRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRealmRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRealmRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRealmRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRealmRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRealmRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRealmRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.GetRealmRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.GetRealm][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetRealm]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.GetRealmRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.GetRealmRequest) + com.google.cloud.numberregistry.v1alpha.GetRealmRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetRealmRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetRealmRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.GetRealmRequest.class, + com.google.cloud.numberregistry.v1alpha.GetRealmRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.GetRealmRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetRealmRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetRealmRequest getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.GetRealmRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetRealmRequest build() { + com.google.cloud.numberregistry.v1alpha.GetRealmRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetRealmRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.GetRealmRequest result = + new com.google.cloud.numberregistry.v1alpha.GetRealmRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.GetRealmRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.GetRealmRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.GetRealmRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.GetRealmRequest other) { + if (other == com.google.cloud.numberregistry.v1alpha.GetRealmRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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: + { + view_ = input.readEnum(); + 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 Realm to retrieve.
+     * 
+ * + * + * 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 Realm to retrieve.
+     * 
+ * + * + * 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 Realm to retrieve.
+     * 
+ * + * + * 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 Realm to retrieve.
+     * 
+ * + * + * 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 Realm to retrieve.
+     * 
+ * + * + * 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 int view_ = 0; + + /** + * + * + *
+     * Optional. The view of the Realm to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Optional. The view of the Realm to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the Realm to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm.RealmView getView() { + com.google.cloud.numberregistry.v1alpha.Realm.RealmView result = + com.google.cloud.numberregistry.v1alpha.Realm.RealmView.forNumber(view_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.Realm.RealmView.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The view of the Realm to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.numberregistry.v1alpha.Realm.RealmView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the Realm to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000002); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.GetRealmRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.GetRealmRequest) + private static final com.google.cloud.numberregistry.v1alpha.GetRealmRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.GetRealmRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRealmRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRealmRequest 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.numberregistry.v1alpha.GetRealmRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRealmRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRealmRequestOrBuilder.java new file mode 100644 index 000000000000..acc74eb8b7bb --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRealmRequestOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface GetRealmRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.GetRealmRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Realm to retrieve.
+   * 
+ * + * + * 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 Realm to retrieve.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The view of the Realm to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Optional. The view of the Realm to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.numberregistry.v1alpha.Realm.RealmView getView(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRegistryBookRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRegistryBookRequest.java new file mode 100644 index 000000000000..cfbc4c5e10fe --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRegistryBookRequest.java @@ -0,0 +1,798 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.GetRegistryBook][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetRegistryBook]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.GetRegistryBookRequest} + */ +@com.google.protobuf.Generated +public final class GetRegistryBookRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.GetRegistryBookRequest) + GetRegistryBookRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetRegistryBookRequest"); + } + + // Use GetRegistryBookRequest.newBuilder() to construct. + private GetRegistryBookRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetRegistryBookRequest() { + name_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetRegistryBookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetRegistryBookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest.class, + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the RegistryBook to retrieve.
+   * 
+ * + * + * 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 RegistryBook to retrieve.
+   * 
+ * + * + * 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 VIEW_FIELD_NUMBER = 2; + private int view_ = 0; + + /** + * + * + *
+   * Optional. The view of the RegistryBook to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Optional. The view of the RegistryBook to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBookView getView() { + com.google.cloud.numberregistry.v1alpha.RegistryBookView result = + com.google.cloud.numberregistry.v1alpha.RegistryBookView.forNumber(view_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBookView.UNRECOGNIZED + : result; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (view_ + != com.google.cloud.numberregistry.v1alpha.RegistryBookView.REGISTRY_BOOK_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (view_ + != com.google.cloud.numberregistry.v1alpha.RegistryBookView.REGISTRY_BOOK_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + 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.numberregistry.v1alpha.GetRegistryBookRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest other = + (com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) 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) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest 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.numberregistry.v1alpha.GetRegistryBookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest 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.numberregistry.v1alpha.GetRegistryBookRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.GetRegistryBookRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.GetRegistryBook][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetRegistryBook]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.GetRegistryBookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.GetRegistryBookRequest) + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetRegistryBookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetRegistryBookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest.class, + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_GetRegistryBookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest build() { + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest result = + new com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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: + { + view_ = input.readEnum(); + 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 RegistryBook to retrieve.
+     * 
+ * + * + * 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 RegistryBook to retrieve.
+     * 
+ * + * + * 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 RegistryBook to retrieve.
+     * 
+ * + * + * 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 RegistryBook to retrieve.
+     * 
+ * + * + * 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 RegistryBook to retrieve.
+     * 
+ * + * + * 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 int view_ = 0; + + /** + * + * + *
+     * Optional. The view of the RegistryBook to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Optional. The view of the RegistryBook to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the RegistryBook to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBookView getView() { + com.google.cloud.numberregistry.v1alpha.RegistryBookView result = + com.google.cloud.numberregistry.v1alpha.RegistryBookView.forNumber(view_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBookView.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The view of the RegistryBook to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.numberregistry.v1alpha.RegistryBookView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the RegistryBook to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000002); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.GetRegistryBookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.GetRegistryBookRequest) + private static final com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRegistryBookRequest 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.numberregistry.v1alpha.GetRegistryBookRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRegistryBookRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRegistryBookRequestOrBuilder.java new file mode 100644 index 000000000000..25051fcf3eae --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/GetRegistryBookRequestOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface GetRegistryBookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.GetRegistryBookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the RegistryBook to retrieve.
+   * 
+ * + * + * 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 RegistryBook to retrieve.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The view of the RegistryBook to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Optional. The view of the RegistryBook to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.numberregistry.v1alpha.RegistryBookView getView(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpVersion.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpVersion.java new file mode 100644 index 000000000000..4407ace2ddfb --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpVersion.java @@ -0,0 +1,191 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * IP version of the Realm.
+ * 
+ * + * Protobuf enum {@code google.cloud.numberregistry.v1alpha.IpVersion} + */ +@com.google.protobuf.Generated +public enum IpVersion implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified IP version.
+   * 
+ * + * IP_VERSION_UNSPECIFIED = 0; + */ + IP_VERSION_UNSPECIFIED(0), + /** + * + * + *
+   * IPv4 IP version.
+   * 
+ * + * IPV4 = 1; + */ + IPV4(1), + /** + * + * + *
+   * IPv6 IP version.
+   * 
+ * + * IPV6 = 2; + */ + IPV6(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IpVersion"); + } + + /** + * + * + *
+   * Unspecified IP version.
+   * 
+ * + * IP_VERSION_UNSPECIFIED = 0; + */ + public static final int IP_VERSION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * IPv4 IP version.
+   * 
+ * + * IPV4 = 1; + */ + public static final int IPV4_VALUE = 1; + + /** + * + * + *
+   * IPv6 IP version.
+   * 
+ * + * IPV6 = 2; + */ + public static final int IPV6_VALUE = 2; + + 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 IpVersion 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 IpVersion forNumber(int value) { + switch (value) { + case 0: + return IP_VERSION_UNSPECIFIED; + case 1: + return IPV4; + case 2: + return IPV6; + 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 IpVersion findValueByNumber(int number) { + return IpVersion.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto.getDescriptor().getEnumTypes().get(0); + } + + private static final IpVersion[] VALUES = values(); + + public static IpVersion 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 IpVersion(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.numberregistry.v1alpha.IpVersion) +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScope.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScope.java new file mode 100644 index 000000000000..99d43c5ef91d --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScope.java @@ -0,0 +1,3091 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * An IpamAdminScope defines the administrative boundary for IP address
+ * discovery and management. It configures which platforms and organizational
+ * scopes are enabled for IP tracking.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.IpamAdminScope} + */ +@com.google.protobuf.Generated +public final class IpamAdminScope extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.IpamAdminScope) + IpamAdminScopeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IpamAdminScope"); + } + + // Use IpamAdminScope.newBuilder() to construct. + private IpamAdminScope(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private IpamAdminScope() { + name_ = ""; + enabledAddonPlatforms_ = emptyIntList(); + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + state_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.class, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder.class); + } + + /** + * + * + *
+   * Enum for add-on platforms.
+   * 
+ * + * Protobuf enum {@code google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform} + */ + public enum AddOnPlatform implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified add-on platform.
+     * 
+ * + * ADD_ON_PLATFORM_UNSPECIFIED = 0; + */ + ADD_ON_PLATFORM_UNSPECIFIED(0), + /** + * + * + *
+     * Google Compute Engine.
+     * 
+ * + * COMPUTE_ENGINE = 1; + */ + COMPUTE_ENGINE(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AddOnPlatform"); + } + + /** + * + * + *
+     * Deprecated: Use COMPUTE_ENGINE instead.
+     * 
+ * + * GCE = 1 [deprecated = true]; + */ + public static final AddOnPlatform GCE = COMPUTE_ENGINE; + + /** + * + * + *
+     * Unspecified add-on platform.
+     * 
+ * + * ADD_ON_PLATFORM_UNSPECIFIED = 0; + */ + public static final int ADD_ON_PLATFORM_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Google Compute Engine.
+     * 
+ * + * COMPUTE_ENGINE = 1; + */ + public static final int COMPUTE_ENGINE_VALUE = 1; + + /** + * + * + *
+     * Deprecated: Use COMPUTE_ENGINE instead.
+     * 
+ * + * GCE = 1 [deprecated = true]; + */ + @java.lang.Deprecated public static final int GCE_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 AddOnPlatform 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 AddOnPlatform forNumber(int value) { + switch (value) { + case 0: + return ADD_ON_PLATFORM_UNSPECIFIED; + case 1: + return COMPUTE_ENGINE; + 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 AddOnPlatform findValueByNumber(int number) { + return AddOnPlatform.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AddOnPlatform[] VALUES = getStaticValuesArray(); + + private static AddOnPlatform[] getStaticValuesArray() { + return new AddOnPlatform[] { + ADD_ON_PLATFORM_UNSPECIFIED, COMPUTE_ENGINE, GCE, + }; + } + + public static AddOnPlatform 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 AddOnPlatform(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform) + } + + /** + * + * + *
+   * Enum for IpamAdminScope discovery pipeline state.
+   * 
+ * + * Protobuf enum {@code google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState} + */ + public enum DiscoveryPipelineState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * DISCOVERY_PIPELINE_STATE_UNSPECIFIED = 0; + */ + DISCOVERY_PIPELINE_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Internal failure.
+     * 
+ * + * INTERNAL_FAILURE = 1; + */ + INTERNAL_FAILURE(1), + /** + * + * + *
+     * Failure.
+     * 
+ * + * FAILED = 2; + */ + FAILED(2), + /** + * + * + *
+     * Setup in progress.
+     * 
+ * + * SETUP_IN_PROGRESS = 3; + */ + SETUP_IN_PROGRESS(3), + /** + * + * + *
+     * Ready for use.
+     * 
+ * + * READY_FOR_USE = 4; + */ + READY_FOR_USE(4), + /** + * + * + *
+     * Deleting in progress.
+     * 
+ * + * DELETING_IN_PROGRESS = 5; + */ + DELETING_IN_PROGRESS(5), + /** + * + * + *
+     * Updating.
+     * 
+ * + * UPDATING = 6; + */ + UPDATING(6), + /** + * + * + *
+     * Recovering.
+     * 
+ * + * RECOVERING = 7; + */ + RECOVERING(7), + /** + * + * + *
+     * Disabled.
+     * 
+ * + * DISABLED = 8; + */ + DISABLED(8), + /** + * + * + *
+     * Deleting completed.
+     * 
+ * + * DELETION_COMPLETED = 9; + */ + DELETION_COMPLETED(9), + /** + * + * + *
+     * Cleanup in progress.
+     * 
+ * + * CLEANUP_IN_PROGRESS = 11; + */ + CLEANUP_IN_PROGRESS(11), + /** + * + * + *
+     * Ready for deletion.
+     * 
+ * + * READY_FOR_DELETION = 12; + */ + READY_FOR_DELETION(12), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DiscoveryPipelineState"); + } + + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * DISCOVERY_PIPELINE_STATE_UNSPECIFIED = 0; + */ + public static final int DISCOVERY_PIPELINE_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Internal failure.
+     * 
+ * + * INTERNAL_FAILURE = 1; + */ + public static final int INTERNAL_FAILURE_VALUE = 1; + + /** + * + * + *
+     * Failure.
+     * 
+ * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; + + /** + * + * + *
+     * Setup in progress.
+     * 
+ * + * SETUP_IN_PROGRESS = 3; + */ + public static final int SETUP_IN_PROGRESS_VALUE = 3; + + /** + * + * + *
+     * Ready for use.
+     * 
+ * + * READY_FOR_USE = 4; + */ + public static final int READY_FOR_USE_VALUE = 4; + + /** + * + * + *
+     * Deleting in progress.
+     * 
+ * + * DELETING_IN_PROGRESS = 5; + */ + public static final int DELETING_IN_PROGRESS_VALUE = 5; + + /** + * + * + *
+     * Updating.
+     * 
+ * + * UPDATING = 6; + */ + public static final int UPDATING_VALUE = 6; + + /** + * + * + *
+     * Recovering.
+     * 
+ * + * RECOVERING = 7; + */ + public static final int RECOVERING_VALUE = 7; + + /** + * + * + *
+     * Disabled.
+     * 
+ * + * DISABLED = 8; + */ + public static final int DISABLED_VALUE = 8; + + /** + * + * + *
+     * Deleting completed.
+     * 
+ * + * DELETION_COMPLETED = 9; + */ + public static final int DELETION_COMPLETED_VALUE = 9; + + /** + * + * + *
+     * Cleanup in progress.
+     * 
+ * + * CLEANUP_IN_PROGRESS = 11; + */ + public static final int CLEANUP_IN_PROGRESS_VALUE = 11; + + /** + * + * + *
+     * Ready for deletion.
+     * 
+ * + * READY_FOR_DELETION = 12; + */ + public static final int READY_FOR_DELETION_VALUE = 12; + + 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 DiscoveryPipelineState 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 DiscoveryPipelineState forNumber(int value) { + switch (value) { + case 0: + return DISCOVERY_PIPELINE_STATE_UNSPECIFIED; + case 1: + return INTERNAL_FAILURE; + case 2: + return FAILED; + case 3: + return SETUP_IN_PROGRESS; + case 4: + return READY_FOR_USE; + case 5: + return DELETING_IN_PROGRESS; + case 6: + return UPDATING; + case 7: + return RECOVERING; + case 8: + return DISABLED; + case 9: + return DELETION_COMPLETED; + case 11: + return CLEANUP_IN_PROGRESS; + case 12: + return READY_FOR_DELETION; + 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 DiscoveryPipelineState findValueByNumber(int number) { + return DiscoveryPipelineState.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final DiscoveryPipelineState[] VALUES = values(); + + public static DiscoveryPipelineState 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 DiscoveryPipelineState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Identifier. The resource name of the IpamAdminScope.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the IpamAdminScope.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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 ENABLED_ADDON_PLATFORMS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList enabledAddonPlatforms_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform> + enabledAddonPlatforms_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform>() { + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform convert( + int from) { + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform result = + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform.forNumber( + from); + return result == null + ? com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform + .UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
+   * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+   * Number Registry only discovers the IP addresses from the enabled platforms.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enabledAddonPlatforms. + */ + @java.lang.Override + public java.util.List + getEnabledAddonPlatformsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform>( + enabledAddonPlatforms_, enabledAddonPlatforms_converter_); + } + + /** + * + * + *
+   * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+   * Number Registry only discovers the IP addresses from the enabled platforms.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of enabledAddonPlatforms. + */ + @java.lang.Override + public int getEnabledAddonPlatformsCount() { + return enabledAddonPlatforms_.size(); + } + + /** + * + * + *
+   * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+   * Number Registry only discovers the IP addresses from the enabled platforms.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The enabledAddonPlatforms at the given index. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform + getEnabledAddonPlatforms(int index) { + return enabledAddonPlatforms_converter_.convert(enabledAddonPlatforms_.getInt(index)); + } + + /** + * + * + *
+   * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+   * Number Registry only discovers the IP addresses from the enabled platforms.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for enabledAddonPlatforms. + */ + @java.lang.Override + public java.util.List getEnabledAddonPlatformsValueList() { + return enabledAddonPlatforms_; + } + + /** + * + * + *
+   * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+   * Number Registry only discovers the IP addresses from the enabled platforms.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enabledAddonPlatforms at the given index. + */ + @java.lang.Override + public int getEnabledAddonPlatformsValue(int index) { + return enabledAddonPlatforms_.getInt(index); + } + + private int enabledAddonPlatformsMemoizedSerializedSize; + + public static final int SCOPES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Required. Administrative scopes enabled for IP address discovery and
+   * management. For example, "organizations/1234567890". Minimum of 1 scope is
+   * required. In preview, only one organization scope is allowed.
+   * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + return scopes_; + } + + /** + * + * + *
+   * Required. Administrative scopes enabled for IP address discovery and
+   * management. For example, "organizations/1234567890". Minimum of 1 scope is
+   * required. In preview, only one organization scope is allowed.
+   * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+   * Required. Administrative scopes enabled for IP address discovery and
+   * management. For example, "organizations/1234567890". Minimum of 1 scope is
+   * required. In preview, only one organization scope is allowed.
+   * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+   * Required. Administrative scopes enabled for IP address discovery and
+   * management. For example, "organizations/1234567890". Minimum of 1 scope is
+   * required. In preview, only one organization scope is allowed.
+   * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + + /** + * + * + *
+   * Output only. State of resource discovery pipeline.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. State of resource discovery pipeline.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState getState() { + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState result = + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState.forNumber( + state_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time at which the IpamAdminScope 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 ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time at which the IpamAdminScope 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 at which the IpamAdminScope 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_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time at which the IpamAdminScope was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time at which the IpamAdminScope was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time at which the IpamAdminScope was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 7; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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 { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (getEnabledAddonPlatformsList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(enabledAddonPlatformsMemoizedSerializedSize); + } + for (int i = 0; i < enabledAddonPlatforms_.size(); i++) { + output.writeEnumNoTag(enabledAddonPlatforms_.getInt(i)); + } + for (int i = 0; i < scopes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, scopes_.getRaw(i)); + } + if (state_ + != com.google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState + .DISCOVERY_PIPELINE_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < enabledAddonPlatforms_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + enabledAddonPlatforms_.getInt(i)); + } + size += dataSize; + if (!getEnabledAddonPlatformsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + enabledAddonPlatformsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < scopes_.size(); i++) { + dataSize += computeStringSizeNoTag(scopes_.getRaw(i)); + } + size += dataSize; + size += 1 * getScopesList().size(); + } + if (state_ + != com.google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState + .DISCOVERY_PIPELINE_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, labels__); + } + 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.numberregistry.v1alpha.IpamAdminScope)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.IpamAdminScope other = + (com.google.cloud.numberregistry.v1alpha.IpamAdminScope) obj; + + if (!getName().equals(other.getName())) return false; + if (!enabledAddonPlatforms_.equals(other.enabledAddonPlatforms_)) return false; + if (!getScopesList().equals(other.getScopesList())) return false; + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) 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(); + if (getEnabledAddonPlatformsCount() > 0) { + hash = (37 * hash) + ENABLED_ADDON_PLATFORMS_FIELD_NUMBER; + hash = (53 * hash) + enabledAddonPlatforms_.hashCode(); + } + if (getScopesCount() > 0) { + hash = (37 * hash) + SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getScopesList().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScope parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScope 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.numberregistry.v1alpha.IpamAdminScope parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScope 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.numberregistry.v1alpha.IpamAdminScope parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScope parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScope parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScope parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScope parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScope parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScope parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScope parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.IpamAdminScope 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An IpamAdminScope defines the administrative boundary for IP address
+   * discovery and management. It configures which platforms and organizational
+   * scopes are enabled for IP tracking.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.IpamAdminScope} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.IpamAdminScope) + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.class, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.IpamAdminScope.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + enabledAddonPlatforms_ = emptyIntList(); + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + state_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScope_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope build() { + com.google.cloud.numberregistry.v1alpha.IpamAdminScope result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope buildPartial() { + com.google.cloud.numberregistry.v1alpha.IpamAdminScope result = + new com.google.cloud.numberregistry.v1alpha.IpamAdminScope(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.IpamAdminScope result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + enabledAddonPlatforms_.makeImmutable(); + result.enabledAddonPlatforms_ = enabledAddonPlatforms_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + scopes_.makeImmutable(); + result.scopes_ = scopes_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.IpamAdminScope) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.IpamAdminScope) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.IpamAdminScope other) { + if (other == com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.enabledAddonPlatforms_.isEmpty()) { + if (enabledAddonPlatforms_.isEmpty()) { + enabledAddonPlatforms_ = other.enabledAddonPlatforms_; + enabledAddonPlatforms_.makeImmutable(); + bitField0_ |= 0x00000002; + } else { + ensureEnabledAddonPlatformsIsMutable(); + enabledAddonPlatforms_.addAll(other.enabledAddonPlatforms_); + } + onChanged(); + } + if (!other.scopes_.isEmpty()) { + if (scopes_.isEmpty()) { + scopes_ = other.scopes_; + bitField0_ |= 0x00000004; + } else { + ensureScopesIsMutable(); + scopes_.addAll(other.scopes_); + } + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + 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: + { + int tmpRaw = input.readEnum(); + ensureEnabledAddonPlatformsIsMutable(); + enabledAddonPlatforms_.addInt(tmpRaw); + break; + } // case 16 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureEnabledAddonPlatformsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + enabledAddonPlatforms_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopesIsMutable(); + scopes_.add(s); + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + 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. Identifier. The resource name of the IpamAdminScope.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the IpamAdminScope.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the IpamAdminScope.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the IpamAdminScope.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Identifier. The resource name of the IpamAdminScope.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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 com.google.protobuf.Internal.IntList enabledAddonPlatforms_ = emptyIntList(); + + private void ensureEnabledAddonPlatformsIsMutable() { + if (!enabledAddonPlatforms_.isModifiable()) { + enabledAddonPlatforms_ = makeMutableCopy(enabledAddonPlatforms_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+     * Number Registry only discovers the IP addresses from the enabled platforms.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enabledAddonPlatforms. + */ + public java.util.List + getEnabledAddonPlatformsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform>( + enabledAddonPlatforms_, enabledAddonPlatforms_converter_); + } + + /** + * + * + *
+     * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+     * Number Registry only discovers the IP addresses from the enabled platforms.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of enabledAddonPlatforms. + */ + public int getEnabledAddonPlatformsCount() { + return enabledAddonPlatforms_.size(); + } + + /** + * + * + *
+     * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+     * Number Registry only discovers the IP addresses from the enabled platforms.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The enabledAddonPlatforms at the given index. + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform + getEnabledAddonPlatforms(int index) { + return enabledAddonPlatforms_converter_.convert(enabledAddonPlatforms_.getInt(index)); + } + + /** + * + * + *
+     * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+     * Number Registry only discovers the IP addresses from the enabled platforms.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The enabledAddonPlatforms to set. + * @return This builder for chaining. + */ + public Builder setEnabledAddonPlatforms( + int index, com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnabledAddonPlatformsIsMutable(); + enabledAddonPlatforms_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+     * Number Registry only discovers the IP addresses from the enabled platforms.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enabledAddonPlatforms to add. + * @return This builder for chaining. + */ + public Builder addEnabledAddonPlatforms( + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnabledAddonPlatformsIsMutable(); + enabledAddonPlatforms_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+     * Number Registry only discovers the IP addresses from the enabled platforms.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The enabledAddonPlatforms to add. + * @return This builder for chaining. + */ + public Builder addAllEnabledAddonPlatforms( + java.lang.Iterable< + ? extends com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform> + values) { + ensureEnabledAddonPlatformsIsMutable(); + for (com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform value : values) { + enabledAddonPlatforms_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+     * Number Registry only discovers the IP addresses from the enabled platforms.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnabledAddonPlatforms() { + enabledAddonPlatforms_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+     * Number Registry only discovers the IP addresses from the enabled platforms.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for enabledAddonPlatforms. + */ + public java.util.List getEnabledAddonPlatformsValueList() { + enabledAddonPlatforms_.makeImmutable(); + return enabledAddonPlatforms_; + } + + /** + * + * + *
+     * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+     * Number Registry only discovers the IP addresses from the enabled platforms.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enabledAddonPlatforms at the given index. + */ + public int getEnabledAddonPlatformsValue(int index) { + return enabledAddonPlatforms_.getInt(index); + } + + /** + * + * + *
+     * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+     * Number Registry only discovers the IP addresses from the enabled platforms.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for enabledAddonPlatforms to set. + * @return This builder for chaining. + */ + public Builder setEnabledAddonPlatformsValue(int index, int value) { + ensureEnabledAddonPlatformsIsMutable(); + enabledAddonPlatforms_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+     * Number Registry only discovers the IP addresses from the enabled platforms.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for enabledAddonPlatforms to add. + * @return This builder for chaining. + */ + public Builder addEnabledAddonPlatformsValue(int value) { + ensureEnabledAddonPlatformsIsMutable(); + enabledAddonPlatforms_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+     * Number Registry only discovers the IP addresses from the enabled platforms.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The enum numeric values on the wire for enabledAddonPlatforms to add. + * @return This builder for chaining. + */ + public Builder addAllEnabledAddonPlatformsValue(java.lang.Iterable values) { + ensureEnabledAddonPlatformsIsMutable(); + for (int value : values) { + enabledAddonPlatforms_.addInt(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureScopesIsMutable() { + if (!scopes_.isModifiable()) { + scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Required. Administrative scopes enabled for IP address discovery and
+     * management. For example, "organizations/1234567890". Minimum of 1 scope is
+     * required. In preview, only one organization scope is allowed.
+     * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + scopes_.makeImmutable(); + return scopes_; + } + + /** + * + * + *
+     * Required. Administrative scopes enabled for IP address discovery and
+     * management. For example, "organizations/1234567890". Minimum of 1 scope is
+     * required. In preview, only one organization scope is allowed.
+     * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+     * Required. Administrative scopes enabled for IP address discovery and
+     * management. For example, "organizations/1234567890". Minimum of 1 scope is
+     * required. In preview, only one organization scope is allowed.
+     * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+     * Required. Administrative scopes enabled for IP address discovery and
+     * management. For example, "organizations/1234567890". Minimum of 1 scope is
+     * required. In preview, only one organization scope is allowed.
+     * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + + /** + * + * + *
+     * Required. Administrative scopes enabled for IP address discovery and
+     * management. For example, "organizations/1234567890". Minimum of 1 scope is
+     * required. In preview, only one organization scope is allowed.
+     * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The scopes to set. + * @return This builder for chaining. + */ + public Builder setScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Administrative scopes enabled for IP address discovery and
+     * management. For example, "organizations/1234567890". Minimum of 1 scope is
+     * required. In preview, only one organization scope is allowed.
+     * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The scopes to add. + * @return This builder for chaining. + */ + public Builder addScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Administrative scopes enabled for IP address discovery and
+     * management. For example, "organizations/1234567890". Minimum of 1 scope is
+     * required. In preview, only one organization scope is allowed.
+     * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The scopes to add. + * @return This builder for chaining. + */ + public Builder addAllScopes(java.lang.Iterable values) { + ensureScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scopes_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Administrative scopes enabled for IP address discovery and
+     * management. For example, "organizations/1234567890". Minimum of 1 scope is
+     * required. In preview, only one organization scope is allowed.
+     * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearScopes() { + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Administrative scopes enabled for IP address discovery and
+     * management. For example, "organizations/1234567890". Minimum of 1 scope is
+     * required. In preview, only one organization scope is allowed.
+     * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the scopes to add. + * @return This builder for chaining. + */ + public Builder addScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. State of resource discovery pipeline.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. State of resource discovery pipeline.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. State of resource discovery pipeline.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState + getState() { + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState result = + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState.forNumber( + state_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. State of resource discovery pipeline.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. State of resource discovery pipeline.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time at which the IpamAdminScope 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 at which the IpamAdminScope 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 at which the IpamAdminScope 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 at which the IpamAdminScope 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 at which the IpamAdminScope 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); + } + if (createTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time at which the IpamAdminScope 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 at which the IpamAdminScope 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 internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time at which the IpamAdminScope 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 at which the IpamAdminScope was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time at which the IpamAdminScope was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. The time at which the IpamAdminScope was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time at which the IpamAdminScope was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the IpamAdminScope was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the IpamAdminScope was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time at which the IpamAdminScope was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the IpamAdminScope was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time at which the IpamAdminScope was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time at which the IpamAdminScope was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.IpamAdminScope) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.IpamAdminScope) + private static final com.google.cloud.numberregistry.v1alpha.IpamAdminScope DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.IpamAdminScope(); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScope getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IpamAdminScope 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.numberregistry.v1alpha.IpamAdminScope getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeAvailability.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeAvailability.java new file mode 100644 index 000000000000..de716b65ef6d --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeAvailability.java @@ -0,0 +1,1063 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Availability details for a specific IpamAdminScope.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability} + */ +@com.google.protobuf.Generated +public final class IpamAdminScopeAvailability extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability) + IpamAdminScopeAvailabilityOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IpamAdminScopeAvailability"); + } + + // Use IpamAdminScopeAvailability.newBuilder() to construct. + private IpamAdminScopeAvailability(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private IpamAdminScopeAvailability() { + scope_ = ""; + availability_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScopeAvailability_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScopeAvailability_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.class, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Builder.class); + } + + /** + * + * + *
+   * Enum for the availability of a given scope.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability} + */ + public enum Availability implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified availability.
+     * 
+ * + * AVAILABILITY_UNSPECIFIED = 0; + */ + AVAILABILITY_UNSPECIFIED(0), + /** + * + * + *
+     * The scope is available.
+     * 
+ * + * AVAILABLE = 1; + */ + AVAILABLE(1), + /** + * + * + *
+     * The scope is not available.
+     * 
+ * + * UNAVAILABLE = 2; + */ + UNAVAILABLE(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Availability"); + } + + /** + * + * + *
+     * Unspecified availability.
+     * 
+ * + * AVAILABILITY_UNSPECIFIED = 0; + */ + public static final int AVAILABILITY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The scope is available.
+     * 
+ * + * AVAILABLE = 1; + */ + public static final int AVAILABLE_VALUE = 1; + + /** + * + * + *
+     * The scope is not available.
+     * 
+ * + * UNAVAILABLE = 2; + */ + public static final int UNAVAILABLE_VALUE = 2; + + 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 Availability 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 Availability forNumber(int value) { + switch (value) { + case 0: + return AVAILABILITY_UNSPECIFIED; + case 1: + return AVAILABLE; + case 2: + return UNAVAILABLE; + 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 Availability findValueByNumber(int number) { + return Availability.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Availability[] VALUES = values(); + + public static Availability 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 Availability(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability) + } + + public static final int SCOPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object scope_ = ""; + + /** + * + * + *
+   * The scope of the IpamAdminScope.
+   * 
+ * + * string scope = 1; + * + * @return The scope. + */ + @java.lang.Override + public java.lang.String getScope() { + java.lang.Object ref = scope_; + 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(); + scope_ = s; + return s; + } + } + + /** + * + * + *
+   * The scope of the IpamAdminScope.
+   * 
+ * + * string scope = 1; + * + * @return The bytes for scope. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADMIN_PROJECT_FIELD_NUMBER = 2; + private long adminProject_ = 0L; + + /** + * + * + *
+   * The admin project of the IpamAdminScope if it exists.
+   * 
+ * + * int64 admin_project = 2; + * + * @return The adminProject. + */ + @java.lang.Override + public long getAdminProject() { + return adminProject_; + } + + public static final int AVAILABILITY_FIELD_NUMBER = 3; + private int availability_ = 0; + + /** + * + * + *
+   * The availability of the scope.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability availability = 3; + * + * + * @return The enum numeric value on the wire for availability. + */ + @java.lang.Override + public int getAvailabilityValue() { + return availability_; + } + + /** + * + * + *
+   * The availability of the scope.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability availability = 3; + * + * + * @return The availability. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability + getAvailability() { + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability result = + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability.forNumber( + availability_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability + .UNRECOGNIZED + : result; + } + + 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.GeneratedMessage.isStringEmpty(scope_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, scope_); + } + if (adminProject_ != 0L) { + output.writeInt64(2, adminProject_); + } + if (availability_ + != com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability + .AVAILABILITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, availability_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(scope_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, scope_); + } + if (adminProject_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, adminProject_); + } + if (availability_ + != com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability + .AVAILABILITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, availability_); + } + 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.numberregistry.v1alpha.IpamAdminScopeAvailability)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability other = + (com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability) obj; + + if (!getScope().equals(other.getScope())) return false; + if (getAdminProject() != other.getAdminProject()) return false; + if (availability_ != other.availability_) 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) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); + hash = (37 * hash) + ADMIN_PROJECT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAdminProject()); + hash = (37 * hash) + AVAILABILITY_FIELD_NUMBER; + hash = (53 * hash) + availability_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability 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.numberregistry.v1alpha.IpamAdminScopeAvailability parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability 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.numberregistry.v1alpha.IpamAdminScopeAvailability parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.IpamAdminScopeAvailability 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Availability details for a specific IpamAdminScope.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability) + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailabilityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScopeAvailability_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScopeAvailability_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.class, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + scope_ = ""; + adminProject_ = 0L; + availability_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_IpamAdminScopeAvailability_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability build() { + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability buildPartial() { + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability result = + new com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.scope_ = scope_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.adminProject_ = adminProject_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.availability_ = availability_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability other) { + if (other + == com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability + .getDefaultInstance()) return this; + if (!other.getScope().isEmpty()) { + scope_ = other.scope_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getAdminProject() != 0L) { + setAdminProject(other.getAdminProject()); + } + if (other.availability_ != 0) { + setAvailabilityValue(other.getAvailabilityValue()); + } + 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: + { + scope_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + adminProject_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + availability_ = input.readEnum(); + 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 scope_ = ""; + + /** + * + * + *
+     * The scope of the IpamAdminScope.
+     * 
+ * + * string scope = 1; + * + * @return The scope. + */ + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The scope of the IpamAdminScope.
+     * 
+ * + * string scope = 1; + * + * @return The bytes for scope. + */ + public com.google.protobuf.ByteString getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The scope of the IpamAdminScope.
+     * 
+ * + * string scope = 1; + * + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + scope_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The scope of the IpamAdminScope.
+     * 
+ * + * string scope = 1; + * + * @return This builder for chaining. + */ + public Builder clearScope() { + scope_ = getDefaultInstance().getScope(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The scope of the IpamAdminScope.
+     * 
+ * + * string scope = 1; + * + * @param value The bytes for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + scope_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long adminProject_; + + /** + * + * + *
+     * The admin project of the IpamAdminScope if it exists.
+     * 
+ * + * int64 admin_project = 2; + * + * @return The adminProject. + */ + @java.lang.Override + public long getAdminProject() { + return adminProject_; + } + + /** + * + * + *
+     * The admin project of the IpamAdminScope if it exists.
+     * 
+ * + * int64 admin_project = 2; + * + * @param value The adminProject to set. + * @return This builder for chaining. + */ + public Builder setAdminProject(long value) { + + adminProject_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The admin project of the IpamAdminScope if it exists.
+     * 
+ * + * int64 admin_project = 2; + * + * @return This builder for chaining. + */ + public Builder clearAdminProject() { + bitField0_ = (bitField0_ & ~0x00000002); + adminProject_ = 0L; + onChanged(); + return this; + } + + private int availability_ = 0; + + /** + * + * + *
+     * The availability of the scope.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability availability = 3; + * + * + * @return The enum numeric value on the wire for availability. + */ + @java.lang.Override + public int getAvailabilityValue() { + return availability_; + } + + /** + * + * + *
+     * The availability of the scope.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability availability = 3; + * + * + * @param value The enum numeric value on the wire for availability to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityValue(int value) { + availability_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The availability of the scope.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability availability = 3; + * + * + * @return The availability. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability + getAvailability() { + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability result = + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability.forNumber( + availability_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The availability of the scope.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability availability = 3; + * + * + * @param value The availability to set. + * @return This builder for chaining. + */ + public Builder setAvailability( + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + availability_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The availability of the scope.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability availability = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearAvailability() { + bitField0_ = (bitField0_ & ~0x00000004); + availability_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability) + private static final com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability(); + } + + public static com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IpamAdminScopeAvailability 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.numberregistry.v1alpha.IpamAdminScopeAvailability + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeAvailabilityOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeAvailabilityOrBuilder.java new file mode 100644 index 000000000000..cc95f92af5cf --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeAvailabilityOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface IpamAdminScopeAvailabilityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The scope of the IpamAdminScope.
+   * 
+ * + * string scope = 1; + * + * @return The scope. + */ + java.lang.String getScope(); + + /** + * + * + *
+   * The scope of the IpamAdminScope.
+   * 
+ * + * string scope = 1; + * + * @return The bytes for scope. + */ + com.google.protobuf.ByteString getScopeBytes(); + + /** + * + * + *
+   * The admin project of the IpamAdminScope if it exists.
+   * 
+ * + * int64 admin_project = 2; + * + * @return The adminProject. + */ + long getAdminProject(); + + /** + * + * + *
+   * The availability of the scope.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability availability = 3; + * + * + * @return The enum numeric value on the wire for availability. + */ + int getAvailabilityValue(); + + /** + * + * + *
+   * The availability of the scope.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability availability = 3; + * + * + * @return The availability. + */ + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeAvailability.Availability getAvailability(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeName.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeName.java new file mode 100644 index 000000000000..32dd630fcda7 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha; + +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 IpamAdminScopeName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_IPAM_ADMIN_SCOPE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/ipamAdminScopes/{ipam_admin_scope}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String ipamAdminScope; + + @Deprecated + protected IpamAdminScopeName() { + project = null; + location = null; + ipamAdminScope = null; + } + + private IpamAdminScopeName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + ipamAdminScope = Preconditions.checkNotNull(builder.getIpamAdminScope()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getIpamAdminScope() { + return ipamAdminScope; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static IpamAdminScopeName of(String project, String location, String ipamAdminScope) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setIpamAdminScope(ipamAdminScope) + .build(); + } + + public static String format(String project, String location, String ipamAdminScope) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setIpamAdminScope(ipamAdminScope) + .build() + .toString(); + } + + public static IpamAdminScopeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_IPAM_ADMIN_SCOPE.validatedMatch( + formattedString, "IpamAdminScopeName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("ipam_admin_scope")); + } + + 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 (IpamAdminScopeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_IPAM_ADMIN_SCOPE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (ipamAdminScope != null) { + fieldMapBuilder.put("ipam_admin_scope", ipamAdminScope); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_IPAM_ADMIN_SCOPE.instantiate( + "project", project, "location", location, "ipam_admin_scope", ipamAdminScope); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + IpamAdminScopeName that = ((IpamAdminScopeName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.ipamAdminScope, that.ipamAdminScope); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(ipamAdminScope); + return h; + } + + /** Builder for projects/{project}/locations/{location}/ipamAdminScopes/{ipam_admin_scope}. */ + public static class Builder { + private String project; + private String location; + private String ipamAdminScope; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getIpamAdminScope() { + return ipamAdminScope; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setIpamAdminScope(String ipamAdminScope) { + this.ipamAdminScope = ipamAdminScope; + return this; + } + + private Builder(IpamAdminScopeName ipamAdminScopeName) { + this.project = ipamAdminScopeName.project; + this.location = ipamAdminScopeName.location; + this.ipamAdminScope = ipamAdminScopeName.ipamAdminScope; + } + + public IpamAdminScopeName build() { + return new IpamAdminScopeName(this); + } + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeOrBuilder.java new file mode 100644 index 000000000000..a072a62cb1f0 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/IpamAdminScopeOrBuilder.java @@ -0,0 +1,377 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface IpamAdminScopeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.IpamAdminScope) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Identifier. The resource name of the IpamAdminScope.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Identifier. The resource name of the IpamAdminScope.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+   * Number Registry only discovers the IP addresses from the enabled platforms.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enabledAddonPlatforms. + */ + java.util.List + getEnabledAddonPlatformsList(); + + /** + * + * + *
+   * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+   * Number Registry only discovers the IP addresses from the enabled platforms.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of enabledAddonPlatforms. + */ + int getEnabledAddonPlatformsCount(); + + /** + * + * + *
+   * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+   * Number Registry only discovers the IP addresses from the enabled platforms.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The enabledAddonPlatforms at the given index. + */ + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform getEnabledAddonPlatforms( + int index); + + /** + * + * + *
+   * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+   * Number Registry only discovers the IP addresses from the enabled platforms.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for enabledAddonPlatforms. + */ + java.util.List getEnabledAddonPlatformsValueList(); + + /** + * + * + *
+   * Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud
+   * Number Registry only discovers the IP addresses from the enabled platforms.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope.AddOnPlatform enabled_addon_platforms = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of enabledAddonPlatforms at the given index. + */ + int getEnabledAddonPlatformsValue(int index); + + /** + * + * + *
+   * Required. Administrative scopes enabled for IP address discovery and
+   * management. For example, "organizations/1234567890". Minimum of 1 scope is
+   * required. In preview, only one organization scope is allowed.
+   * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the scopes. + */ + java.util.List getScopesList(); + + /** + * + * + *
+   * Required. Administrative scopes enabled for IP address discovery and
+   * management. For example, "organizations/1234567890". Minimum of 1 scope is
+   * required. In preview, only one organization scope is allowed.
+   * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of scopes. + */ + int getScopesCount(); + + /** + * + * + *
+   * Required. Administrative scopes enabled for IP address discovery and
+   * management. For example, "organizations/1234567890". Minimum of 1 scope is
+   * required. In preview, only one organization scope is allowed.
+   * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + java.lang.String getScopes(int index); + + /** + * + * + *
+   * Required. Administrative scopes enabled for IP address discovery and
+   * management. For example, "organizations/1234567890". Minimum of 1 scope is
+   * required. In preview, only one organization scope is allowed.
+   * 
+ * + * repeated string scopes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + com.google.protobuf.ByteString getScopesBytes(int index); + + /** + * + * + *
+   * Output only. State of resource discovery pipeline.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. State of resource discovery pipeline.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.DiscoveryPipelineState getState(); + + /** + * + * + *
+   * Output only. The time at which the IpamAdminScope 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 at which the IpamAdminScope 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 at which the IpamAdminScope was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which the IpamAdminScope was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time at which the IpamAdminScope was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time at which the IpamAdminScope was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesRequest.java new file mode 100644 index 000000000000..3e853989d6fb --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesRequest.java @@ -0,0 +1,1290 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.ListCustomRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListCustomRanges]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListCustomRangesRequest} + */ +@com.google.protobuf.Generated +public final class ListCustomRangesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ListCustomRangesRequest) + ListCustomRangesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListCustomRangesRequest"); + } + + // Use ListCustomRangesRequest.newBuilder() to construct. + private ListCustomRangesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListCustomRangesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest.class, + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * 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. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate 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 token identifying a page of results the server should return.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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. Filter expression to filter the results.
+   * 
+ * + * 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. Filter expression to filter the results.
+   * 
+ * + * 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; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + 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.numberregistry.v1alpha.ListCustomRangesRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest other = + (com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest) 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 (!getOrderBy().equals(other.getOrderBy())) 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 = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest 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.numberregistry.v1alpha.ListCustomRangesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest 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.numberregistry.v1alpha.ListCustomRangesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ListCustomRangesRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.ListCustomRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListCustomRanges]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListCustomRangesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ListCustomRangesRequest) + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest.class, + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest build() { + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest result = + new com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest 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_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest.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(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + 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 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + 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 parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ListCustomRangesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ListCustomRangesRequest) + private static final com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCustomRangesRequest 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.numberregistry.v1alpha.ListCustomRangesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesRequestOrBuilder.java new file mode 100644 index 000000000000..30a52b7fffbc --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesRequestOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ListCustomRangesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ListCustomRangesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter expression to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filter expression to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesResponse.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesResponse.java new file mode 100644 index 000000000000..33ab6139b607 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesResponse.java @@ -0,0 +1,1432 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Response message for the
+ * [CloudNumberRegistry.ListCustomRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListCustomRanges]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListCustomRangesResponse} + */ +@com.google.protobuf.Generated +public final class ListCustomRangesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ListCustomRangesResponse) + ListCustomRangesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListCustomRangesResponse"); + } + + // Use ListCustomRangesResponse.newBuilder() to construct. + private ListCustomRangesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListCustomRangesResponse() { + customRanges_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse.class, + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse.Builder.class); + } + + public static final int CUSTOM_RANGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List customRanges_; + + /** + * + * + *
+   * The list of CustomRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + @java.lang.Override + public java.util.List getCustomRangesList() { + return customRanges_; + } + + /** + * + * + *
+   * The list of CustomRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + @java.lang.Override + public java.util.List + getCustomRangesOrBuilderList() { + return customRanges_; + } + + /** + * + * + *
+   * The list of CustomRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + @java.lang.Override + public int getCustomRangesCount() { + return customRanges_.size(); + } + + /** + * + * + *
+   * The list of CustomRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRanges(int index) { + return customRanges_.get(index); + } + + /** + * + * + *
+   * The list of CustomRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangesOrBuilder( + int index) { + return customRanges_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * A token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + 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 < customRanges_.size(); i++) { + output.writeMessage(1, customRanges_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < customRanges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, customRanges_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + 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.numberregistry.v1alpha.ListCustomRangesResponse)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse other = + (com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse) obj; + + if (!getCustomRangesList().equals(other.getCustomRangesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getCustomRangesCount() > 0) { + hash = (37 * hash) + CUSTOM_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getCustomRangesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse 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.numberregistry.v1alpha.ListCustomRangesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse 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.numberregistry.v1alpha.ListCustomRangesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ListCustomRangesResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for the
+   * [CloudNumberRegistry.ListCustomRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListCustomRanges]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListCustomRangesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ListCustomRangesResponse) + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse.class, + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (customRangesBuilder_ == null) { + customRanges_ = java.util.Collections.emptyList(); + } else { + customRanges_ = null; + customRangesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListCustomRangesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse build() { + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse buildPartial() { + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse result = + new com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse result) { + if (customRangesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + customRanges_ = java.util.Collections.unmodifiableList(customRanges_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.customRanges_ = customRanges_; + } else { + result.customRanges_ = customRangesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse other) { + if (other + == com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse.getDefaultInstance()) + return this; + if (customRangesBuilder_ == null) { + if (!other.customRanges_.isEmpty()) { + if (customRanges_.isEmpty()) { + customRanges_ = other.customRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCustomRangesIsMutable(); + customRanges_.addAll(other.customRanges_); + } + onChanged(); + } + } else { + if (!other.customRanges_.isEmpty()) { + if (customRangesBuilder_.isEmpty()) { + customRangesBuilder_.dispose(); + customRangesBuilder_ = null; + customRanges_ = other.customRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + customRangesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetCustomRangesFieldBuilder() + : null; + } else { + customRangesBuilder_.addAllMessages(other.customRanges_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + 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.numberregistry.v1alpha.CustomRange m = + input.readMessage( + com.google.cloud.numberregistry.v1alpha.CustomRange.parser(), + extensionRegistry); + if (customRangesBuilder_ == null) { + ensureCustomRangesIsMutable(); + customRanges_.add(m); + } else { + customRangesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + 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.util.List customRanges_ = + java.util.Collections.emptyList(); + + private void ensureCustomRangesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + customRanges_ = + new java.util.ArrayList( + customRanges_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder> + customRangesBuilder_; + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public java.util.List + getCustomRangesList() { + if (customRangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(customRanges_); + } else { + return customRangesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public int getCustomRangesCount() { + if (customRangesBuilder_ == null) { + return customRanges_.size(); + } else { + return customRangesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRanges(int index) { + if (customRangesBuilder_ == null) { + return customRanges_.get(index); + } else { + return customRangesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public Builder setCustomRanges( + int index, com.google.cloud.numberregistry.v1alpha.CustomRange value) { + if (customRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomRangesIsMutable(); + customRanges_.set(index, value); + onChanged(); + } else { + customRangesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public Builder setCustomRanges( + int index, com.google.cloud.numberregistry.v1alpha.CustomRange.Builder builderForValue) { + if (customRangesBuilder_ == null) { + ensureCustomRangesIsMutable(); + customRanges_.set(index, builderForValue.build()); + onChanged(); + } else { + customRangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public Builder addCustomRanges(com.google.cloud.numberregistry.v1alpha.CustomRange value) { + if (customRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomRangesIsMutable(); + customRanges_.add(value); + onChanged(); + } else { + customRangesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public Builder addCustomRanges( + int index, com.google.cloud.numberregistry.v1alpha.CustomRange value) { + if (customRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomRangesIsMutable(); + customRanges_.add(index, value); + onChanged(); + } else { + customRangesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public Builder addCustomRanges( + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder builderForValue) { + if (customRangesBuilder_ == null) { + ensureCustomRangesIsMutable(); + customRanges_.add(builderForValue.build()); + onChanged(); + } else { + customRangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public Builder addCustomRanges( + int index, com.google.cloud.numberregistry.v1alpha.CustomRange.Builder builderForValue) { + if (customRangesBuilder_ == null) { + ensureCustomRangesIsMutable(); + customRanges_.add(index, builderForValue.build()); + onChanged(); + } else { + customRangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public Builder addAllCustomRanges( + java.lang.Iterable values) { + if (customRangesBuilder_ == null) { + ensureCustomRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, customRanges_); + onChanged(); + } else { + customRangesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public Builder clearCustomRanges() { + if (customRangesBuilder_ == null) { + customRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + customRangesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public Builder removeCustomRanges(int index) { + if (customRangesBuilder_ == null) { + ensureCustomRangesIsMutable(); + customRanges_.remove(index); + onChanged(); + } else { + customRangesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public com.google.cloud.numberregistry.v1alpha.CustomRange.Builder getCustomRangesBuilder( + int index) { + return internalGetCustomRangesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangesOrBuilder( + int index) { + if (customRangesBuilder_ == null) { + return customRanges_.get(index); + } else { + return customRangesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public java.util.List + getCustomRangesOrBuilderList() { + if (customRangesBuilder_ != null) { + return customRangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(customRanges_); + } + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public com.google.cloud.numberregistry.v1alpha.CustomRange.Builder addCustomRangesBuilder() { + return internalGetCustomRangesFieldBuilder() + .addBuilder(com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public com.google.cloud.numberregistry.v1alpha.CustomRange.Builder addCustomRangesBuilder( + int index) { + return internalGetCustomRangesFieldBuilder() + .addBuilder( + index, com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of CustomRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + public java.util.List + getCustomRangesBuilderList() { + return internalGetCustomRangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder> + internalGetCustomRangesFieldBuilder() { + if (customRangesBuilder_ == null) { + customRangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder>( + customRanges_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + customRanges_ = null; + } + return customRangesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ListCustomRangesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ListCustomRangesResponse) + private static final com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse(); + } + + public static com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCustomRangesResponse 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.numberregistry.v1alpha.ListCustomRangesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesResponseOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesResponseOrBuilder.java new file mode 100644 index 000000000000..21f170f9863b --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListCustomRangesResponseOrBuilder.java @@ -0,0 +1,166 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ListCustomRangesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ListCustomRangesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of CustomRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + java.util.List getCustomRangesList(); + + /** + * + * + *
+   * The list of CustomRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRanges(int index); + + /** + * + * + *
+   * The list of CustomRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + int getCustomRangesCount(); + + /** + * + * + *
+   * The list of CustomRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + java.util.List + getCustomRangesOrBuilderList(); + + /** + * + * + *
+   * The list of CustomRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.CustomRange custom_ranges = 1; + */ + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangesOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesRequest.java new file mode 100644 index 000000000000..58d739df7b98 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesRequest.java @@ -0,0 +1,1294 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.ListDiscoveredRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListDiscoveredRanges]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest} + */ +@com.google.protobuf.Generated +public final class ListDiscoveredRangesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest) + ListDiscoveredRangesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDiscoveredRangesRequest"); + } + + // Use ListDiscoveredRangesRequest.newBuilder() to construct. + private ListDiscoveredRangesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDiscoveredRangesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest.class, + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * 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. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate 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 token identifying a page of results the server should return.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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. Filter expression to filter the results.
+   * 
+ * + * 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. Filter expression to filter the results.
+   * 
+ * + * 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; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + 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.numberregistry.v1alpha.ListDiscoveredRangesRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest other = + (com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest) 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 (!getOrderBy().equals(other.getOrderBy())) 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 = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest 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.numberregistry.v1alpha.ListDiscoveredRangesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest 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.numberregistry.v1alpha.ListDiscoveredRangesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ListDiscoveredRangesRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.ListDiscoveredRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListDiscoveredRanges]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest) + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest.class, + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest build() { + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest result = + new com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest 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_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest + .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(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + 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 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + 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 parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest) + private static final com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDiscoveredRangesRequest 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.numberregistry.v1alpha.ListDiscoveredRangesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesRequestOrBuilder.java new file mode 100644 index 000000000000..1564dc8fe916 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesRequestOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ListDiscoveredRangesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter expression to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filter expression to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesResponse.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesResponse.java new file mode 100644 index 000000000000..dcd99f8f18ef --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesResponse.java @@ -0,0 +1,1469 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Response message for the
+ * [CloudNumberRegistry.ListDiscoveredRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListDiscoveredRanges]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse} + */ +@com.google.protobuf.Generated +public final class ListDiscoveredRangesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse) + ListDiscoveredRangesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDiscoveredRangesResponse"); + } + + // Use ListDiscoveredRangesResponse.newBuilder() to construct. + private ListDiscoveredRangesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDiscoveredRangesResponse() { + discoveredRanges_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse.class, + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse.Builder.class); + } + + public static final int DISCOVERED_RANGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List discoveredRanges_; + + /** + * + * + *
+   * The list of DiscoveredRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + @java.lang.Override + public java.util.List + getDiscoveredRangesList() { + return discoveredRanges_; + } + + /** + * + * + *
+   * The list of DiscoveredRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + @java.lang.Override + public java.util.List + getDiscoveredRangesOrBuilderList() { + return discoveredRanges_; + } + + /** + * + * + *
+   * The list of DiscoveredRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + @java.lang.Override + public int getDiscoveredRangesCount() { + return discoveredRanges_.size(); + } + + /** + * + * + *
+   * The list of DiscoveredRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange getDiscoveredRanges(int index) { + return discoveredRanges_.get(index); + } + + /** + * + * + *
+   * The list of DiscoveredRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder + getDiscoveredRangesOrBuilder(int index) { + return discoveredRanges_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * A token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + 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 < discoveredRanges_.size(); i++) { + output.writeMessage(1, discoveredRanges_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < discoveredRanges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, discoveredRanges_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + 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.numberregistry.v1alpha.ListDiscoveredRangesResponse)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse other = + (com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse) obj; + + if (!getDiscoveredRangesList().equals(other.getDiscoveredRangesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getDiscoveredRangesCount() > 0) { + hash = (37 * hash) + DISCOVERED_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveredRangesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse 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.numberregistry.v1alpha.ListDiscoveredRangesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse 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.numberregistry.v1alpha.ListDiscoveredRangesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ListDiscoveredRangesResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for the
+   * [CloudNumberRegistry.ListDiscoveredRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListDiscoveredRanges]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse) + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse.class, + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (discoveredRangesBuilder_ == null) { + discoveredRanges_ = java.util.Collections.emptyList(); + } else { + discoveredRanges_ = null; + discoveredRangesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListDiscoveredRangesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse build() { + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse buildPartial() { + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse result = + new com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse result) { + if (discoveredRangesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + discoveredRanges_ = java.util.Collections.unmodifiableList(discoveredRanges_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.discoveredRanges_ = discoveredRanges_; + } else { + result.discoveredRanges_ = discoveredRangesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse other) { + if (other + == com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse + .getDefaultInstance()) return this; + if (discoveredRangesBuilder_ == null) { + if (!other.discoveredRanges_.isEmpty()) { + if (discoveredRanges_.isEmpty()) { + discoveredRanges_ = other.discoveredRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDiscoveredRangesIsMutable(); + discoveredRanges_.addAll(other.discoveredRanges_); + } + onChanged(); + } + } else { + if (!other.discoveredRanges_.isEmpty()) { + if (discoveredRangesBuilder_.isEmpty()) { + discoveredRangesBuilder_.dispose(); + discoveredRangesBuilder_ = null; + discoveredRanges_ = other.discoveredRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + discoveredRangesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDiscoveredRangesFieldBuilder() + : null; + } else { + discoveredRangesBuilder_.addAllMessages(other.discoveredRanges_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + 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.numberregistry.v1alpha.DiscoveredRange m = + input.readMessage( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.parser(), + extensionRegistry); + if (discoveredRangesBuilder_ == null) { + ensureDiscoveredRangesIsMutable(); + discoveredRanges_.add(m); + } else { + discoveredRangesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + 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.util.List + discoveredRanges_ = java.util.Collections.emptyList(); + + private void ensureDiscoveredRangesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + discoveredRanges_ = + new java.util.ArrayList( + discoveredRanges_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveredRange, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder> + discoveredRangesBuilder_; + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public java.util.List + getDiscoveredRangesList() { + if (discoveredRangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(discoveredRanges_); + } else { + return discoveredRangesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public int getDiscoveredRangesCount() { + if (discoveredRangesBuilder_ == null) { + return discoveredRanges_.size(); + } else { + return discoveredRangesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange getDiscoveredRanges(int index) { + if (discoveredRangesBuilder_ == null) { + return discoveredRanges_.get(index); + } else { + return discoveredRangesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public Builder setDiscoveredRanges( + int index, com.google.cloud.numberregistry.v1alpha.DiscoveredRange value) { + if (discoveredRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiscoveredRangesIsMutable(); + discoveredRanges_.set(index, value); + onChanged(); + } else { + discoveredRangesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public Builder setDiscoveredRanges( + int index, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder builderForValue) { + if (discoveredRangesBuilder_ == null) { + ensureDiscoveredRangesIsMutable(); + discoveredRanges_.set(index, builderForValue.build()); + onChanged(); + } else { + discoveredRangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public Builder addDiscoveredRanges( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange value) { + if (discoveredRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiscoveredRangesIsMutable(); + discoveredRanges_.add(value); + onChanged(); + } else { + discoveredRangesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public Builder addDiscoveredRanges( + int index, com.google.cloud.numberregistry.v1alpha.DiscoveredRange value) { + if (discoveredRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiscoveredRangesIsMutable(); + discoveredRanges_.add(index, value); + onChanged(); + } else { + discoveredRangesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public Builder addDiscoveredRanges( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder builderForValue) { + if (discoveredRangesBuilder_ == null) { + ensureDiscoveredRangesIsMutable(); + discoveredRanges_.add(builderForValue.build()); + onChanged(); + } else { + discoveredRangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public Builder addDiscoveredRanges( + int index, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder builderForValue) { + if (discoveredRangesBuilder_ == null) { + ensureDiscoveredRangesIsMutable(); + discoveredRanges_.add(index, builderForValue.build()); + onChanged(); + } else { + discoveredRangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public Builder addAllDiscoveredRanges( + java.lang.Iterable + values) { + if (discoveredRangesBuilder_ == null) { + ensureDiscoveredRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, discoveredRanges_); + onChanged(); + } else { + discoveredRangesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public Builder clearDiscoveredRanges() { + if (discoveredRangesBuilder_ == null) { + discoveredRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + discoveredRangesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public Builder removeDiscoveredRanges(int index) { + if (discoveredRangesBuilder_ == null) { + ensureDiscoveredRangesIsMutable(); + discoveredRanges_.remove(index); + onChanged(); + } else { + discoveredRangesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder + getDiscoveredRangesBuilder(int index) { + return internalGetDiscoveredRangesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder + getDiscoveredRangesOrBuilder(int index) { + if (discoveredRangesBuilder_ == null) { + return discoveredRanges_.get(index); + } else { + return discoveredRangesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder> + getDiscoveredRangesOrBuilderList() { + if (discoveredRangesBuilder_ != null) { + return discoveredRangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(discoveredRanges_); + } + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder + addDiscoveredRangesBuilder() { + return internalGetDiscoveredRangesFieldBuilder() + .addBuilder(com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder + addDiscoveredRangesBuilder(int index) { + return internalGetDiscoveredRangesFieldBuilder() + .addBuilder( + index, com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of DiscoveredRanges.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + public java.util.List + getDiscoveredRangesBuilderList() { + return internalGetDiscoveredRangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveredRange, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder> + internalGetDiscoveredRangesFieldBuilder() { + if (discoveredRangesBuilder_ == null) { + discoveredRangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveredRange, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder>( + discoveredRanges_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + discoveredRanges_ = null; + } + return discoveredRangesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse) + private static final com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse(); + } + + public static com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDiscoveredRangesResponse 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.numberregistry.v1alpha.ListDiscoveredRangesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesResponseOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesResponseOrBuilder.java new file mode 100644 index 000000000000..b6a8f23ee4d5 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListDiscoveredRangesResponseOrBuilder.java @@ -0,0 +1,172 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ListDiscoveredRangesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of DiscoveredRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + java.util.List getDiscoveredRangesList(); + + /** + * + * + *
+   * The list of DiscoveredRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + com.google.cloud.numberregistry.v1alpha.DiscoveredRange getDiscoveredRanges(int index); + + /** + * + * + *
+   * The list of DiscoveredRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + int getDiscoveredRangesCount(); + + /** + * + * + *
+   * The list of DiscoveredRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + java.util.List + getDiscoveredRangesOrBuilderList(); + + /** + * + * + *
+   * The list of DiscoveredRanges.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_ranges = 1; + * + */ + com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder getDiscoveredRangesOrBuilder( + int index); + + /** + * + * + *
+   * A token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesRequest.java new file mode 100644 index 000000000000..38768b718f63 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesRequest.java @@ -0,0 +1,1294 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.ListIpamAdminScopes][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListIpamAdminScopes]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest} + */ +@com.google.protobuf.Generated +public final class ListIpamAdminScopesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest) + ListIpamAdminScopesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListIpamAdminScopesRequest"); + } + + // Use ListIpamAdminScopesRequest.newBuilder() to construct. + private ListIpamAdminScopesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListIpamAdminScopesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest.class, + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * 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. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate 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 token identifying a page of results the server should return.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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. Filter expression to filter the results.
+   * 
+ * + * 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. Filter expression to filter the results.
+   * 
+ * + * 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; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + 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.numberregistry.v1alpha.ListIpamAdminScopesRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest other = + (com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest) 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 (!getOrderBy().equals(other.getOrderBy())) 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 = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest 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.numberregistry.v1alpha.ListIpamAdminScopesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest 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.numberregistry.v1alpha.ListIpamAdminScopesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ListIpamAdminScopesRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.ListIpamAdminScopes][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListIpamAdminScopes]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest) + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest.class, + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest build() { + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest result = + new com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest 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_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest + .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(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + 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 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + 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 parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest) + private static final com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIpamAdminScopesRequest 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.numberregistry.v1alpha.ListIpamAdminScopesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesRequestOrBuilder.java new file mode 100644 index 000000000000..732b452801ba --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesRequestOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ListIpamAdminScopesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter expression to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filter expression to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesResponse.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesResponse.java new file mode 100644 index 000000000000..784c7fa2970a --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesResponse.java @@ -0,0 +1,1466 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Response message for the
+ * [CloudNumberRegistry.ListIpamAdminScopes][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListIpamAdminScopes]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse} + */ +@com.google.protobuf.Generated +public final class ListIpamAdminScopesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse) + ListIpamAdminScopesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListIpamAdminScopesResponse"); + } + + // Use ListIpamAdminScopesResponse.newBuilder() to construct. + private ListIpamAdminScopesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListIpamAdminScopesResponse() { + ipamAdminScopes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse.class, + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse.Builder.class); + } + + public static final int IPAM_ADMIN_SCOPES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List ipamAdminScopes_; + + /** + * + * + *
+   * The list of IpamAdminScopes.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + @java.lang.Override + public java.util.List + getIpamAdminScopesList() { + return ipamAdminScopes_; + } + + /** + * + * + *
+   * The list of IpamAdminScopes.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + @java.lang.Override + public java.util.List + getIpamAdminScopesOrBuilderList() { + return ipamAdminScopes_; + } + + /** + * + * + *
+   * The list of IpamAdminScopes.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + @java.lang.Override + public int getIpamAdminScopesCount() { + return ipamAdminScopes_.size(); + } + + /** + * + * + *
+   * The list of IpamAdminScopes.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope getIpamAdminScopes(int index) { + return ipamAdminScopes_.get(index); + } + + /** + * + * + *
+   * The list of IpamAdminScopes.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder + getIpamAdminScopesOrBuilder(int index) { + return ipamAdminScopes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * A token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + 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 < ipamAdminScopes_.size(); i++) { + output.writeMessage(1, ipamAdminScopes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < ipamAdminScopes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, ipamAdminScopes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + 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.numberregistry.v1alpha.ListIpamAdminScopesResponse)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse other = + (com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse) obj; + + if (!getIpamAdminScopesList().equals(other.getIpamAdminScopesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getIpamAdminScopesCount() > 0) { + hash = (37 * hash) + IPAM_ADMIN_SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getIpamAdminScopesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse 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.numberregistry.v1alpha.ListIpamAdminScopesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse 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.numberregistry.v1alpha.ListIpamAdminScopesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ListIpamAdminScopesResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for the
+   * [CloudNumberRegistry.ListIpamAdminScopes][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListIpamAdminScopes]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse) + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse.class, + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (ipamAdminScopesBuilder_ == null) { + ipamAdminScopes_ = java.util.Collections.emptyList(); + } else { + ipamAdminScopes_ = null; + ipamAdminScopesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListIpamAdminScopesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse build() { + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse buildPartial() { + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse result = + new com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse result) { + if (ipamAdminScopesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + ipamAdminScopes_ = java.util.Collections.unmodifiableList(ipamAdminScopes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ipamAdminScopes_ = ipamAdminScopes_; + } else { + result.ipamAdminScopes_ = ipamAdminScopesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse other) { + if (other + == com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse + .getDefaultInstance()) return this; + if (ipamAdminScopesBuilder_ == null) { + if (!other.ipamAdminScopes_.isEmpty()) { + if (ipamAdminScopes_.isEmpty()) { + ipamAdminScopes_ = other.ipamAdminScopes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIpamAdminScopesIsMutable(); + ipamAdminScopes_.addAll(other.ipamAdminScopes_); + } + onChanged(); + } + } else { + if (!other.ipamAdminScopes_.isEmpty()) { + if (ipamAdminScopesBuilder_.isEmpty()) { + ipamAdminScopesBuilder_.dispose(); + ipamAdminScopesBuilder_ = null; + ipamAdminScopes_ = other.ipamAdminScopes_; + bitField0_ = (bitField0_ & ~0x00000001); + ipamAdminScopesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetIpamAdminScopesFieldBuilder() + : null; + } else { + ipamAdminScopesBuilder_.addAllMessages(other.ipamAdminScopes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + 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.numberregistry.v1alpha.IpamAdminScope m = + input.readMessage( + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.parser(), + extensionRegistry); + if (ipamAdminScopesBuilder_ == null) { + ensureIpamAdminScopesIsMutable(); + ipamAdminScopes_.add(m); + } else { + ipamAdminScopesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + 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.util.List + ipamAdminScopes_ = java.util.Collections.emptyList(); + + private void ensureIpamAdminScopesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ipamAdminScopes_ = + new java.util.ArrayList( + ipamAdminScopes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder> + ipamAdminScopesBuilder_; + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public java.util.List + getIpamAdminScopesList() { + if (ipamAdminScopesBuilder_ == null) { + return java.util.Collections.unmodifiableList(ipamAdminScopes_); + } else { + return ipamAdminScopesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public int getIpamAdminScopesCount() { + if (ipamAdminScopesBuilder_ == null) { + return ipamAdminScopes_.size(); + } else { + return ipamAdminScopesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope getIpamAdminScopes(int index) { + if (ipamAdminScopesBuilder_ == null) { + return ipamAdminScopes_.get(index); + } else { + return ipamAdminScopesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public Builder setIpamAdminScopes( + int index, com.google.cloud.numberregistry.v1alpha.IpamAdminScope value) { + if (ipamAdminScopesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpamAdminScopesIsMutable(); + ipamAdminScopes_.set(index, value); + onChanged(); + } else { + ipamAdminScopesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public Builder setIpamAdminScopes( + int index, com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder builderForValue) { + if (ipamAdminScopesBuilder_ == null) { + ensureIpamAdminScopesIsMutable(); + ipamAdminScopes_.set(index, builderForValue.build()); + onChanged(); + } else { + ipamAdminScopesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public Builder addIpamAdminScopes( + com.google.cloud.numberregistry.v1alpha.IpamAdminScope value) { + if (ipamAdminScopesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpamAdminScopesIsMutable(); + ipamAdminScopes_.add(value); + onChanged(); + } else { + ipamAdminScopesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public Builder addIpamAdminScopes( + int index, com.google.cloud.numberregistry.v1alpha.IpamAdminScope value) { + if (ipamAdminScopesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpamAdminScopesIsMutable(); + ipamAdminScopes_.add(index, value); + onChanged(); + } else { + ipamAdminScopesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public Builder addIpamAdminScopes( + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder builderForValue) { + if (ipamAdminScopesBuilder_ == null) { + ensureIpamAdminScopesIsMutable(); + ipamAdminScopes_.add(builderForValue.build()); + onChanged(); + } else { + ipamAdminScopesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public Builder addIpamAdminScopes( + int index, com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder builderForValue) { + if (ipamAdminScopesBuilder_ == null) { + ensureIpamAdminScopesIsMutable(); + ipamAdminScopes_.add(index, builderForValue.build()); + onChanged(); + } else { + ipamAdminScopesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public Builder addAllIpamAdminScopes( + java.lang.Iterable + values) { + if (ipamAdminScopesBuilder_ == null) { + ensureIpamAdminScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ipamAdminScopes_); + onChanged(); + } else { + ipamAdminScopesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public Builder clearIpamAdminScopes() { + if (ipamAdminScopesBuilder_ == null) { + ipamAdminScopes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + ipamAdminScopesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public Builder removeIpamAdminScopes(int index) { + if (ipamAdminScopesBuilder_ == null) { + ensureIpamAdminScopesIsMutable(); + ipamAdminScopes_.remove(index); + onChanged(); + } else { + ipamAdminScopesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder getIpamAdminScopesBuilder( + int index) { + return internalGetIpamAdminScopesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder + getIpamAdminScopesOrBuilder(int index) { + if (ipamAdminScopesBuilder_ == null) { + return ipamAdminScopes_.get(index); + } else { + return ipamAdminScopesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public java.util.List + getIpamAdminScopesOrBuilderList() { + if (ipamAdminScopesBuilder_ != null) { + return ipamAdminScopesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ipamAdminScopes_); + } + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder + addIpamAdminScopesBuilder() { + return internalGetIpamAdminScopesFieldBuilder() + .addBuilder(com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder addIpamAdminScopesBuilder( + int index) { + return internalGetIpamAdminScopesFieldBuilder() + .addBuilder( + index, com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of IpamAdminScopes.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + public java.util.List + getIpamAdminScopesBuilderList() { + return internalGetIpamAdminScopesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder> + internalGetIpamAdminScopesFieldBuilder() { + if (ipamAdminScopesBuilder_ == null) { + ipamAdminScopesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder>( + ipamAdminScopes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + ipamAdminScopes_ = null; + } + return ipamAdminScopesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse) + private static final com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse(); + } + + public static com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIpamAdminScopesResponse 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.numberregistry.v1alpha.ListIpamAdminScopesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesResponseOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesResponseOrBuilder.java new file mode 100644 index 000000000000..6860cc72b73c --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListIpamAdminScopesResponseOrBuilder.java @@ -0,0 +1,172 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ListIpamAdminScopesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of IpamAdminScopes.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + java.util.List getIpamAdminScopesList(); + + /** + * + * + *
+   * The list of IpamAdminScopes.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + com.google.cloud.numberregistry.v1alpha.IpamAdminScope getIpamAdminScopes(int index); + + /** + * + * + *
+   * The list of IpamAdminScopes.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + int getIpamAdminScopesCount(); + + /** + * + * + *
+   * The list of IpamAdminScopes.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + java.util.List + getIpamAdminScopesOrBuilderList(); + + /** + * + * + *
+   * The list of IpamAdminScopes.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scopes = 1; + * + */ + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder getIpamAdminScopesOrBuilder( + int index); + + /** + * + * + *
+   * A token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsRequest.java new file mode 100644 index 000000000000..7eca963dfba2 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsRequest.java @@ -0,0 +1,1460 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.ListRealms][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListRealms]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListRealmsRequest} + */ +@com.google.protobuf.Generated +public final class ListRealmsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ListRealmsRequest) + ListRealmsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListRealmsRequest"); + } + + // Use ListRealmsRequest.newBuilder() to construct. + private ListRealmsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListRealmsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRealmsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRealmsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest.class, + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * 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. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate 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 token identifying a page of results the server should return.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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. Filter expression to filter the results.
+   * 
+ * + * 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. Filter expression to filter the results.
+   * 
+ * + * 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; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 6; + private int view_ = 0; + + /** + * + * + *
+   * Optional. The view of the Realm to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Optional. The view of the Realm to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm.RealmView getView() { + com.google.cloud.numberregistry.v1alpha.Realm.RealmView result = + com.google.cloud.numberregistry.v1alpha.Realm.RealmView.forNumber(view_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.Realm.RealmView.UNRECOGNIZED + : result; + } + + 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + if (view_ + != com.google.cloud.numberregistry.v1alpha.Realm.RealmView.REALM_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + if (view_ + != com.google.cloud.numberregistry.v1alpha.Realm.RealmView.REALM_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, view_); + } + 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.numberregistry.v1alpha.ListRealmsRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest other = + (com.google.cloud.numberregistry.v1alpha.ListRealmsRequest) 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 (!getOrderBy().equals(other.getOrderBy())) return false; + if (view_ != other.view_) 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 = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsRequest 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.numberregistry.v1alpha.ListRealmsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsRequest 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.numberregistry.v1alpha.ListRealmsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ListRealmsRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.ListRealms][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListRealms]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListRealmsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ListRealmsRequest) + com.google.cloud.numberregistry.v1alpha.ListRealmsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRealmsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRealmsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest.class, + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.ListRealmsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRealmsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListRealmsRequest getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ListRealmsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListRealmsRequest build() { + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListRealmsRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.ListRealmsRequest result = + new com.google.cloud.numberregistry.v1alpha.ListRealmsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.ListRealmsRequest 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_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.ListRealmsRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.ListRealmsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.ListRealmsRequest other) { + if (other == com.google.cloud.numberregistry.v1alpha.ListRealmsRequest.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(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int view_ = 0; + + /** + * + * + *
+     * Optional. The view of the Realm to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Optional. The view of the Realm to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the Realm to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm.RealmView getView() { + com.google.cloud.numberregistry.v1alpha.Realm.RealmView result = + com.google.cloud.numberregistry.v1alpha.Realm.RealmView.forNumber(view_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.Realm.RealmView.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The view of the Realm to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.numberregistry.v1alpha.Realm.RealmView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the Realm to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000020); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ListRealmsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ListRealmsRequest) + private static final com.google.cloud.numberregistry.v1alpha.ListRealmsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.ListRealmsRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRealmsRequest 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.numberregistry.v1alpha.ListRealmsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsRequestOrBuilder.java new file mode 100644 index 000000000000..29a0ec0d354a --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsRequestOrBuilder.java @@ -0,0 +1,180 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ListRealmsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ListRealmsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter expression to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filter expression to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. The view of the Realm to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Optional. The view of the Realm to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.numberregistry.v1alpha.Realm.RealmView getView(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsResponse.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsResponse.java new file mode 100644 index 000000000000..dda9d248f2ab --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsResponse.java @@ -0,0 +1,1407 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Response message for the
+ * [CloudNumberRegistry.ListRealms][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListRealms]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListRealmsResponse} + */ +@com.google.protobuf.Generated +public final class ListRealmsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ListRealmsResponse) + ListRealmsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListRealmsResponse"); + } + + // Use ListRealmsResponse.newBuilder() to construct. + private ListRealmsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListRealmsResponse() { + realms_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRealmsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRealmsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse.class, + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse.Builder.class); + } + + public static final int REALMS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List realms_; + + /** + * + * + *
+   * The list of Realms.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + @java.lang.Override + public java.util.List getRealmsList() { + return realms_; + } + + /** + * + * + *
+   * The list of Realms.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + @java.lang.Override + public java.util.List + getRealmsOrBuilderList() { + return realms_; + } + + /** + * + * + *
+   * The list of Realms.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + @java.lang.Override + public int getRealmsCount() { + return realms_.size(); + } + + /** + * + * + *
+   * The list of Realms.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm getRealms(int index) { + return realms_.get(index); + } + + /** + * + * + *
+   * The list of Realms.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RealmOrBuilder getRealmsOrBuilder(int index) { + return realms_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + 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 < realms_.size(); i++) { + output.writeMessage(1, realms_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < realms_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, realms_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + 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.numberregistry.v1alpha.ListRealmsResponse)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse other = + (com.google.cloud.numberregistry.v1alpha.ListRealmsResponse) obj; + + if (!getRealmsList().equals(other.getRealmsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getRealmsCount() > 0) { + hash = (37 * hash) + REALMS_FIELD_NUMBER; + hash = (53 * hash) + getRealmsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsResponse 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.numberregistry.v1alpha.ListRealmsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsResponse 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.numberregistry.v1alpha.ListRealmsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ListRealmsResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for the
+   * [CloudNumberRegistry.ListRealms][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListRealms]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListRealmsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ListRealmsResponse) + com.google.cloud.numberregistry.v1alpha.ListRealmsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRealmsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRealmsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse.class, + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.ListRealmsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (realmsBuilder_ == null) { + realms_ = java.util.Collections.emptyList(); + } else { + realms_ = null; + realmsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRealmsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListRealmsResponse getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ListRealmsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListRealmsResponse build() { + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListRealmsResponse buildPartial() { + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse result = + new com.google.cloud.numberregistry.v1alpha.ListRealmsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.numberregistry.v1alpha.ListRealmsResponse result) { + if (realmsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + realms_ = java.util.Collections.unmodifiableList(realms_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.realms_ = realms_; + } else { + result.realms_ = realmsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.ListRealmsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.ListRealmsResponse) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.ListRealmsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.ListRealmsResponse other) { + if (other == com.google.cloud.numberregistry.v1alpha.ListRealmsResponse.getDefaultInstance()) + return this; + if (realmsBuilder_ == null) { + if (!other.realms_.isEmpty()) { + if (realms_.isEmpty()) { + realms_ = other.realms_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRealmsIsMutable(); + realms_.addAll(other.realms_); + } + onChanged(); + } + } else { + if (!other.realms_.isEmpty()) { + if (realmsBuilder_.isEmpty()) { + realmsBuilder_.dispose(); + realmsBuilder_ = null; + realms_ = other.realms_; + bitField0_ = (bitField0_ & ~0x00000001); + realmsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRealmsFieldBuilder() + : null; + } else { + realmsBuilder_.addAllMessages(other.realms_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + 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.numberregistry.v1alpha.Realm m = + input.readMessage( + com.google.cloud.numberregistry.v1alpha.Realm.parser(), extensionRegistry); + if (realmsBuilder_ == null) { + ensureRealmsIsMutable(); + realms_.add(m); + } else { + realmsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + 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.util.List realms_ = + java.util.Collections.emptyList(); + + private void ensureRealmsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + realms_ = new java.util.ArrayList(realms_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm, + com.google.cloud.numberregistry.v1alpha.Realm.Builder, + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder> + realmsBuilder_; + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public java.util.List getRealmsList() { + if (realmsBuilder_ == null) { + return java.util.Collections.unmodifiableList(realms_); + } else { + return realmsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public int getRealmsCount() { + if (realmsBuilder_ == null) { + return realms_.size(); + } else { + return realmsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public com.google.cloud.numberregistry.v1alpha.Realm getRealms(int index) { + if (realmsBuilder_ == null) { + return realms_.get(index); + } else { + return realmsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public Builder setRealms(int index, com.google.cloud.numberregistry.v1alpha.Realm value) { + if (realmsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRealmsIsMutable(); + realms_.set(index, value); + onChanged(); + } else { + realmsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public Builder setRealms( + int index, com.google.cloud.numberregistry.v1alpha.Realm.Builder builderForValue) { + if (realmsBuilder_ == null) { + ensureRealmsIsMutable(); + realms_.set(index, builderForValue.build()); + onChanged(); + } else { + realmsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public Builder addRealms(com.google.cloud.numberregistry.v1alpha.Realm value) { + if (realmsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRealmsIsMutable(); + realms_.add(value); + onChanged(); + } else { + realmsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public Builder addRealms(int index, com.google.cloud.numberregistry.v1alpha.Realm value) { + if (realmsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRealmsIsMutable(); + realms_.add(index, value); + onChanged(); + } else { + realmsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public Builder addRealms( + com.google.cloud.numberregistry.v1alpha.Realm.Builder builderForValue) { + if (realmsBuilder_ == null) { + ensureRealmsIsMutable(); + realms_.add(builderForValue.build()); + onChanged(); + } else { + realmsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public Builder addRealms( + int index, com.google.cloud.numberregistry.v1alpha.Realm.Builder builderForValue) { + if (realmsBuilder_ == null) { + ensureRealmsIsMutable(); + realms_.add(index, builderForValue.build()); + onChanged(); + } else { + realmsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public Builder addAllRealms( + java.lang.Iterable values) { + if (realmsBuilder_ == null) { + ensureRealmsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, realms_); + onChanged(); + } else { + realmsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public Builder clearRealms() { + if (realmsBuilder_ == null) { + realms_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + realmsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public Builder removeRealms(int index) { + if (realmsBuilder_ == null) { + ensureRealmsIsMutable(); + realms_.remove(index); + onChanged(); + } else { + realmsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public com.google.cloud.numberregistry.v1alpha.Realm.Builder getRealmsBuilder(int index) { + return internalGetRealmsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public com.google.cloud.numberregistry.v1alpha.RealmOrBuilder getRealmsOrBuilder(int index) { + if (realmsBuilder_ == null) { + return realms_.get(index); + } else { + return realmsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public java.util.List + getRealmsOrBuilderList() { + if (realmsBuilder_ != null) { + return realmsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(realms_); + } + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public com.google.cloud.numberregistry.v1alpha.Realm.Builder addRealmsBuilder() { + return internalGetRealmsFieldBuilder() + .addBuilder(com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public com.google.cloud.numberregistry.v1alpha.Realm.Builder addRealmsBuilder(int index) { + return internalGetRealmsFieldBuilder() + .addBuilder(index, com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Realms.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + public java.util.List + getRealmsBuilderList() { + return internalGetRealmsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm, + com.google.cloud.numberregistry.v1alpha.Realm.Builder, + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder> + internalGetRealmsFieldBuilder() { + if (realmsBuilder_ == null) { + realmsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm, + com.google.cloud.numberregistry.v1alpha.Realm.Builder, + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder>( + realms_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + realms_ = null; + } + return realmsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ListRealmsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ListRealmsResponse) + private static final com.google.cloud.numberregistry.v1alpha.ListRealmsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.ListRealmsResponse(); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRealmsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRealmsResponse 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.numberregistry.v1alpha.ListRealmsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsResponseOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsResponseOrBuilder.java new file mode 100644 index 000000000000..7ff03843374c --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRealmsResponseOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ListRealmsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ListRealmsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Realms.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + java.util.List getRealmsList(); + + /** + * + * + *
+   * The list of Realms.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + com.google.cloud.numberregistry.v1alpha.Realm getRealms(int index); + + /** + * + * + *
+   * The list of Realms.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + int getRealmsCount(); + + /** + * + * + *
+   * The list of Realms.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + java.util.List + getRealmsOrBuilderList(); + + /** + * + * + *
+   * The list of Realms.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Realm realms = 1; + */ + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder getRealmsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksRequest.java new file mode 100644 index 000000000000..3d2256662389 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksRequest.java @@ -0,0 +1,1467 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.ListRegistryBooks][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListRegistryBooks]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest} + */ +@com.google.protobuf.Generated +public final class ListRegistryBooksRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest) + ListRegistryBooksRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListRegistryBooksRequest"); + } + + // Use ListRegistryBooksRequest.newBuilder() to construct. + private ListRegistryBooksRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListRegistryBooksRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest.class, + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * 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. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate 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 token identifying a page of results the server should return.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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. Filter expression to filter the results.
+   * 
+ * + * 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. Filter expression to filter the results.
+   * 
+ * + * 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; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 6; + private int view_ = 0; + + /** + * + * + *
+   * Optional. The view of the RegistryBook to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Optional. The view of the RegistryBook to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBookView getView() { + com.google.cloud.numberregistry.v1alpha.RegistryBookView result = + com.google.cloud.numberregistry.v1alpha.RegistryBookView.forNumber(view_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBookView.UNRECOGNIZED + : result; + } + + 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + if (view_ + != com.google.cloud.numberregistry.v1alpha.RegistryBookView.REGISTRY_BOOK_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + if (view_ + != com.google.cloud.numberregistry.v1alpha.RegistryBookView.REGISTRY_BOOK_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, view_); + } + 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.numberregistry.v1alpha.ListRegistryBooksRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest other = + (com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest) 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 (!getOrderBy().equals(other.getOrderBy())) return false; + if (view_ != other.view_) 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 = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest 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.numberregistry.v1alpha.ListRegistryBooksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest 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.numberregistry.v1alpha.ListRegistryBooksRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ListRegistryBooksRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.ListRegistryBooks][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListRegistryBooks]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest) + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest.class, + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest build() { + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest result = + new com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest 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_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest.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(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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 parent resource name, for example `projects/*/locations/*`.
+     * 
+ * + * + * 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate 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. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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. Filter expression to filter the results.
+     * 
+ * + * 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; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int view_ = 0; + + /** + * + * + *
+     * Optional. The view of the RegistryBook to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Optional. The view of the RegistryBook to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the RegistryBook to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBookView getView() { + com.google.cloud.numberregistry.v1alpha.RegistryBookView result = + com.google.cloud.numberregistry.v1alpha.RegistryBookView.forNumber(view_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBookView.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The view of the RegistryBook to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.numberregistry.v1alpha.RegistryBookView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The view of the RegistryBook to retrieve.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000020); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest) + private static final com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRegistryBooksRequest 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.numberregistry.v1alpha.ListRegistryBooksRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksRequestOrBuilder.java new file mode 100644 index 000000000000..989786f78aa5 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksRequestOrBuilder.java @@ -0,0 +1,180 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ListRegistryBooksRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name, for example `projects/*/locations/*`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter expression to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filter expression to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. The view of the RegistryBook to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Optional. The view of the RegistryBook to retrieve.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBookView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.numberregistry.v1alpha.RegistryBookView getView(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksResponse.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksResponse.java new file mode 100644 index 000000000000..b2390a43cdac --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksResponse.java @@ -0,0 +1,1431 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Response message for the
+ * [CloudNumberRegistry.ListRegistryBooks][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListRegistryBooks]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse} + */ +@com.google.protobuf.Generated +public final class ListRegistryBooksResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse) + ListRegistryBooksResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListRegistryBooksResponse"); + } + + // Use ListRegistryBooksResponse.newBuilder() to construct. + private ListRegistryBooksResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListRegistryBooksResponse() { + registryBooks_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse.class, + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse.Builder.class); + } + + public static final int REGISTRY_BOOKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List registryBooks_; + + /** + * + * + *
+   * The list of RegistryBook
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + @java.lang.Override + public java.util.List + getRegistryBooksList() { + return registryBooks_; + } + + /** + * + * + *
+   * The list of RegistryBook
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + @java.lang.Override + public java.util.List + getRegistryBooksOrBuilderList() { + return registryBooks_; + } + + /** + * + * + *
+   * The list of RegistryBook
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + @java.lang.Override + public int getRegistryBooksCount() { + return registryBooks_.size(); + } + + /** + * + * + *
+   * The list of RegistryBook
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBook getRegistryBooks(int index) { + return registryBooks_.get(index); + } + + /** + * + * + *
+   * The list of RegistryBook
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder getRegistryBooksOrBuilder( + int index) { + return registryBooks_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + 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 < registryBooks_.size(); i++) { + output.writeMessage(1, registryBooks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < registryBooks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, registryBooks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + 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.numberregistry.v1alpha.ListRegistryBooksResponse)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse other = + (com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse) obj; + + if (!getRegistryBooksList().equals(other.getRegistryBooksList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getRegistryBooksCount() > 0) { + hash = (37 * hash) + REGISTRY_BOOKS_FIELD_NUMBER; + hash = (53 * hash) + getRegistryBooksList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse 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.numberregistry.v1alpha.ListRegistryBooksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse 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.numberregistry.v1alpha.ListRegistryBooksResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ListRegistryBooksResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for the
+   * [CloudNumberRegistry.ListRegistryBooks][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListRegistryBooks]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse) + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse.class, + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (registryBooksBuilder_ == null) { + registryBooks_ = java.util.Collections.emptyList(); + } else { + registryBooks_ = null; + registryBooksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ListRegistryBooksResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse build() { + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse buildPartial() { + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse result = + new com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse result) { + if (registryBooksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + registryBooks_ = java.util.Collections.unmodifiableList(registryBooks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.registryBooks_ = registryBooks_; + } else { + result.registryBooks_ = registryBooksBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse other) { + if (other + == com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse.getDefaultInstance()) + return this; + if (registryBooksBuilder_ == null) { + if (!other.registryBooks_.isEmpty()) { + if (registryBooks_.isEmpty()) { + registryBooks_ = other.registryBooks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRegistryBooksIsMutable(); + registryBooks_.addAll(other.registryBooks_); + } + onChanged(); + } + } else { + if (!other.registryBooks_.isEmpty()) { + if (registryBooksBuilder_.isEmpty()) { + registryBooksBuilder_.dispose(); + registryBooksBuilder_ = null; + registryBooks_ = other.registryBooks_; + bitField0_ = (bitField0_ & ~0x00000001); + registryBooksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRegistryBooksFieldBuilder() + : null; + } else { + registryBooksBuilder_.addAllMessages(other.registryBooks_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + 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.numberregistry.v1alpha.RegistryBook m = + input.readMessage( + com.google.cloud.numberregistry.v1alpha.RegistryBook.parser(), + extensionRegistry); + if (registryBooksBuilder_ == null) { + ensureRegistryBooksIsMutable(); + registryBooks_.add(m); + } else { + registryBooksBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + 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.util.List registryBooks_ = + java.util.Collections.emptyList(); + + private void ensureRegistryBooksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + registryBooks_ = + new java.util.ArrayList( + registryBooks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RegistryBook, + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder, + com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder> + registryBooksBuilder_; + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public java.util.List + getRegistryBooksList() { + if (registryBooksBuilder_ == null) { + return java.util.Collections.unmodifiableList(registryBooks_); + } else { + return registryBooksBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public int getRegistryBooksCount() { + if (registryBooksBuilder_ == null) { + return registryBooks_.size(); + } else { + return registryBooksBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBook getRegistryBooks(int index) { + if (registryBooksBuilder_ == null) { + return registryBooks_.get(index); + } else { + return registryBooksBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public Builder setRegistryBooks( + int index, com.google.cloud.numberregistry.v1alpha.RegistryBook value) { + if (registryBooksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRegistryBooksIsMutable(); + registryBooks_.set(index, value); + onChanged(); + } else { + registryBooksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public Builder setRegistryBooks( + int index, com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder builderForValue) { + if (registryBooksBuilder_ == null) { + ensureRegistryBooksIsMutable(); + registryBooks_.set(index, builderForValue.build()); + onChanged(); + } else { + registryBooksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public Builder addRegistryBooks(com.google.cloud.numberregistry.v1alpha.RegistryBook value) { + if (registryBooksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRegistryBooksIsMutable(); + registryBooks_.add(value); + onChanged(); + } else { + registryBooksBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public Builder addRegistryBooks( + int index, com.google.cloud.numberregistry.v1alpha.RegistryBook value) { + if (registryBooksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRegistryBooksIsMutable(); + registryBooks_.add(index, value); + onChanged(); + } else { + registryBooksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public Builder addRegistryBooks( + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder builderForValue) { + if (registryBooksBuilder_ == null) { + ensureRegistryBooksIsMutable(); + registryBooks_.add(builderForValue.build()); + onChanged(); + } else { + registryBooksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public Builder addRegistryBooks( + int index, com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder builderForValue) { + if (registryBooksBuilder_ == null) { + ensureRegistryBooksIsMutable(); + registryBooks_.add(index, builderForValue.build()); + onChanged(); + } else { + registryBooksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public Builder addAllRegistryBooks( + java.lang.Iterable values) { + if (registryBooksBuilder_ == null) { + ensureRegistryBooksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, registryBooks_); + onChanged(); + } else { + registryBooksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public Builder clearRegistryBooks() { + if (registryBooksBuilder_ == null) { + registryBooks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + registryBooksBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public Builder removeRegistryBooks(int index) { + if (registryBooksBuilder_ == null) { + ensureRegistryBooksIsMutable(); + registryBooks_.remove(index); + onChanged(); + } else { + registryBooksBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder getRegistryBooksBuilder( + int index) { + return internalGetRegistryBooksFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder getRegistryBooksOrBuilder( + int index) { + if (registryBooksBuilder_ == null) { + return registryBooks_.get(index); + } else { + return registryBooksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public java.util.List + getRegistryBooksOrBuilderList() { + if (registryBooksBuilder_ != null) { + return registryBooksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(registryBooks_); + } + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder addRegistryBooksBuilder() { + return internalGetRegistryBooksFieldBuilder() + .addBuilder(com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder addRegistryBooksBuilder( + int index) { + return internalGetRegistryBooksFieldBuilder() + .addBuilder( + index, com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of RegistryBook
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + public java.util.List + getRegistryBooksBuilderList() { + return internalGetRegistryBooksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RegistryBook, + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder, + com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder> + internalGetRegistryBooksFieldBuilder() { + if (registryBooksBuilder_ == null) { + registryBooksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RegistryBook, + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder, + com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder>( + registryBooks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + registryBooks_ = null; + } + return registryBooksBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse) + private static final com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse(); + } + + public static com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRegistryBooksResponse 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.numberregistry.v1alpha.ListRegistryBooksResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksResponseOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksResponseOrBuilder.java new file mode 100644 index 000000000000..0daa91d5a4fb --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ListRegistryBooksResponseOrBuilder.java @@ -0,0 +1,165 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ListRegistryBooksResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of RegistryBook
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + java.util.List getRegistryBooksList(); + + /** + * + * + *
+   * The list of RegistryBook
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + com.google.cloud.numberregistry.v1alpha.RegistryBook getRegistryBooks(int index); + + /** + * + * + *
+   * The list of RegistryBook
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + int getRegistryBooksCount(); + + /** + * + * + *
+   * The list of RegistryBook
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + java.util.List + getRegistryBooksOrBuilderList(); + + /** + * + * + *
+   * The list of RegistryBook
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.RegistryBook registry_books = 1; + */ + com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder getRegistryBooksOrBuilder( + int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/LocationName.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/LocationName.java new file mode 100644 index 000000000000..9d7bac42c062 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha; + +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 LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + 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 (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/OperationMetadata.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/OperationMetadata.java new file mode 100644 index 000000000000..62d489e92368 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/OperationMetadata.java @@ -0,0 +1,1870 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.OperationMetadata} + */ +@com.google.protobuf.Generated +public final class OperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OperationMetadata"); + } + + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.ServiceProto + .internal_static_google_cloud_numberregistry_v1alpha_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.ServiceProto + .internal_static_google_cloud_numberregistry_v1alpha_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.OperationMetadata.class, + com.google.cloud.numberregistry.v1alpha.OperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + 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(); + verb_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + 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(); + statusMessage_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + 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(); + apiVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, apiVersion_); + } + 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.numberregistry.v1alpha.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.OperationMetadata other = + (com.google.cloud.numberregistry.v1alpha.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) 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 (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.OperationMetadata 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.numberregistry.v1alpha.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.OperationMetadata 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.numberregistry.v1alpha.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.OperationMetadata 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.OperationMetadata) + com.google.cloud.numberregistry.v1alpha.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.ServiceProto + .internal_static_google_cloud_numberregistry_v1alpha_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.ServiceProto + .internal_static_google_cloud_numberregistry_v1alpha_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.OperationMetadata.class, + com.google.cloud.numberregistry.v1alpha.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.ServiceProto + .internal_static_google_cloud_numberregistry_v1alpha_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.OperationMetadata build() { + com.google.cloud.numberregistry.v1alpha.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.OperationMetadata buildPartial() { + com.google.cloud.numberregistry.v1alpha.OperationMetadata result = + new com.google.cloud.numberregistry.v1alpha.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.OperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.OperationMetadata) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.OperationMetadata other) { + if (other == com.google.cloud.numberregistry.v1alpha.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + 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: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + 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 com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.OperationMetadata) + private static final com.google.cloud.numberregistry.v1alpha.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.OperationMetadata(); + } + + public static com.google.cloud.numberregistry.v1alpha.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata 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.numberregistry.v1alpha.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/OperationMetadataOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..709c801744fe --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/OperationMetadataOrBuilder.java @@ -0,0 +1,229 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/Range.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/Range.java new file mode 100644 index 000000000000..9a11d2cfa43d --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/Range.java @@ -0,0 +1,1407 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Represents either a CustomRange or a DiscoveredRange.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.Range} + */ +@com.google.protobuf.Generated +public final class Range extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.Range) + RangeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Range"); + } + + // Use Range.newBuilder() to construct. + private Range(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Range() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Range_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.Range.class, + com.google.cloud.numberregistry.v1alpha.Range.Builder.class); + } + + private int bitField0_; + private int rangeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object range_; + + public enum RangeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CUSTOM_RANGE(1), + DISCOVERED_RANGE(2), + RANGE_NOT_SET(0); + private final int value; + + private RangeCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RangeCase valueOf(int value) { + return forNumber(value); + } + + public static RangeCase forNumber(int value) { + switch (value) { + case 1: + return CUSTOM_RANGE; + case 2: + return DISCOVERED_RANGE; + case 0: + return RANGE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RangeCase getRangeCase() { + return RangeCase.forNumber(rangeCase_); + } + + public static final int CUSTOM_RANGE_FIELD_NUMBER = 1; + + /** + * + * + *
+   * A CustomRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + * + * @return Whether the customRange field is set. + */ + @java.lang.Override + public boolean hasCustomRange() { + return rangeCase_ == 1; + } + + /** + * + * + *
+   * A CustomRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + * + * @return The customRange. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange() { + if (rangeCase_ == 1) { + return (com.google.cloud.numberregistry.v1alpha.CustomRange) range_; + } + return com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance(); + } + + /** + * + * + *
+   * A CustomRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangeOrBuilder() { + if (rangeCase_ == 1) { + return (com.google.cloud.numberregistry.v1alpha.CustomRange) range_; + } + return com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance(); + } + + public static final int DISCOVERED_RANGE_FIELD_NUMBER = 2; + + /** + * + * + *
+   * A DiscoveredRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + * + * @return Whether the discoveredRange field is set. + */ + @java.lang.Override + public boolean hasDiscoveredRange() { + return rangeCase_ == 2; + } + + /** + * + * + *
+   * A DiscoveredRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + * + * @return The discoveredRange. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange getDiscoveredRange() { + if (rangeCase_ == 2) { + return (com.google.cloud.numberregistry.v1alpha.DiscoveredRange) range_; + } + return com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance(); + } + + /** + * + * + *
+   * A DiscoveredRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder + getDiscoveredRangeOrBuilder() { + if (rangeCase_ == 2) { + return (com.google.cloud.numberregistry.v1alpha.DiscoveredRange) range_; + } + return com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance(); + } + + public static final int UTILIZATION_FIELD_NUMBER = 3; + private com.google.cloud.numberregistry.v1alpha.RangeUtilization utilization_; + + /** + * + * + *
+   * The utilization of the Range.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + * + * @return Whether the utilization field is set. + */ + @java.lang.Override + public boolean hasUtilization() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The utilization of the Range.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + * + * @return The utilization. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RangeUtilization getUtilization() { + return utilization_ == null + ? com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance() + : utilization_; + } + + /** + * + * + *
+   * The utilization of the Range.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder + getUtilizationOrBuilder() { + return utilization_ == null + ? com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance() + : utilization_; + } + + 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 (rangeCase_ == 1) { + output.writeMessage(1, (com.google.cloud.numberregistry.v1alpha.CustomRange) range_); + } + if (rangeCase_ == 2) { + output.writeMessage(2, (com.google.cloud.numberregistry.v1alpha.DiscoveredRange) range_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getUtilization()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rangeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.numberregistry.v1alpha.CustomRange) range_); + } + if (rangeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.numberregistry.v1alpha.DiscoveredRange) range_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUtilization()); + } + 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.numberregistry.v1alpha.Range)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.Range other = + (com.google.cloud.numberregistry.v1alpha.Range) obj; + + if (hasUtilization() != other.hasUtilization()) return false; + if (hasUtilization()) { + if (!getUtilization().equals(other.getUtilization())) return false; + } + if (!getRangeCase().equals(other.getRangeCase())) return false; + switch (rangeCase_) { + case 1: + if (!getCustomRange().equals(other.getCustomRange())) return false; + break; + case 2: + if (!getDiscoveredRange().equals(other.getDiscoveredRange())) return false; + break; + case 0: + default: + } + 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 (hasUtilization()) { + hash = (37 * hash) + UTILIZATION_FIELD_NUMBER; + hash = (53 * hash) + getUtilization().hashCode(); + } + switch (rangeCase_) { + case 1: + hash = (37 * hash) + CUSTOM_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getCustomRange().hashCode(); + break; + case 2: + hash = (37 * hash) + DISCOVERED_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveredRange().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.Range parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.Range 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.numberregistry.v1alpha.Range parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.Range 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.numberregistry.v1alpha.Range parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.Range parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.Range parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.Range parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.Range parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.Range parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.Range parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.Range parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.Range 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents either a CustomRange or a DiscoveredRange.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.Range} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.Range) + com.google.cloud.numberregistry.v1alpha.RangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Range_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.Range.class, + com.google.cloud.numberregistry.v1alpha.Range.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.Range.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUtilizationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (customRangeBuilder_ != null) { + customRangeBuilder_.clear(); + } + if (discoveredRangeBuilder_ != null) { + discoveredRangeBuilder_.clear(); + } + utilization_ = null; + if (utilizationBuilder_ != null) { + utilizationBuilder_.dispose(); + utilizationBuilder_ = null; + } + rangeCase_ = 0; + range_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Range_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Range getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.Range.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Range build() { + com.google.cloud.numberregistry.v1alpha.Range result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Range buildPartial() { + com.google.cloud.numberregistry.v1alpha.Range result = + new com.google.cloud.numberregistry.v1alpha.Range(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.Range result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.utilization_ = + utilizationBuilder_ == null ? utilization_ : utilizationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.numberregistry.v1alpha.Range result) { + result.rangeCase_ = rangeCase_; + result.range_ = this.range_; + if (rangeCase_ == 1 && customRangeBuilder_ != null) { + result.range_ = customRangeBuilder_.build(); + } + if (rangeCase_ == 2 && discoveredRangeBuilder_ != null) { + result.range_ = discoveredRangeBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.Range) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.Range) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.Range other) { + if (other == com.google.cloud.numberregistry.v1alpha.Range.getDefaultInstance()) return this; + if (other.hasUtilization()) { + mergeUtilization(other.getUtilization()); + } + switch (other.getRangeCase()) { + case CUSTOM_RANGE: + { + mergeCustomRange(other.getCustomRange()); + break; + } + case DISCOVERED_RANGE: + { + mergeDiscoveredRange(other.getDiscoveredRange()); + break; + } + case RANGE_NOT_SET: + { + break; + } + } + 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: + { + input.readMessage( + internalGetCustomRangeFieldBuilder().getBuilder(), extensionRegistry); + rangeCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDiscoveredRangeFieldBuilder().getBuilder(), extensionRegistry); + rangeCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUtilizationFieldBuilder().getBuilder(), extensionRegistry); + 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 rangeCase_ = 0; + private java.lang.Object range_; + + public RangeCase getRangeCase() { + return RangeCase.forNumber(rangeCase_); + } + + public Builder clearRange() { + rangeCase_ = 0; + range_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder> + customRangeBuilder_; + + /** + * + * + *
+     * A CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + * + * @return Whether the customRange field is set. + */ + @java.lang.Override + public boolean hasCustomRange() { + return rangeCase_ == 1; + } + + /** + * + * + *
+     * A CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + * + * @return The customRange. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange() { + if (customRangeBuilder_ == null) { + if (rangeCase_ == 1) { + return (com.google.cloud.numberregistry.v1alpha.CustomRange) range_; + } + return com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance(); + } else { + if (rangeCase_ == 1) { + return customRangeBuilder_.getMessage(); + } + return com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + public Builder setCustomRange(com.google.cloud.numberregistry.v1alpha.CustomRange value) { + if (customRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + range_ = value; + onChanged(); + } else { + customRangeBuilder_.setMessage(value); + } + rangeCase_ = 1; + return this; + } + + /** + * + * + *
+     * A CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + public Builder setCustomRange( + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder builderForValue) { + if (customRangeBuilder_ == null) { + range_ = builderForValue.build(); + onChanged(); + } else { + customRangeBuilder_.setMessage(builderForValue.build()); + } + rangeCase_ = 1; + return this; + } + + /** + * + * + *
+     * A CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + public Builder mergeCustomRange(com.google.cloud.numberregistry.v1alpha.CustomRange value) { + if (customRangeBuilder_ == null) { + if (rangeCase_ == 1 + && range_ != com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance()) { + range_ = + com.google.cloud.numberregistry.v1alpha.CustomRange.newBuilder( + (com.google.cloud.numberregistry.v1alpha.CustomRange) range_) + .mergeFrom(value) + .buildPartial(); + } else { + range_ = value; + } + onChanged(); + } else { + if (rangeCase_ == 1) { + customRangeBuilder_.mergeFrom(value); + } else { + customRangeBuilder_.setMessage(value); + } + } + rangeCase_ = 1; + return this; + } + + /** + * + * + *
+     * A CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + public Builder clearCustomRange() { + if (customRangeBuilder_ == null) { + if (rangeCase_ == 1) { + rangeCase_ = 0; + range_ = null; + onChanged(); + } + } else { + if (rangeCase_ == 1) { + rangeCase_ = 0; + range_ = null; + } + customRangeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + public com.google.cloud.numberregistry.v1alpha.CustomRange.Builder getCustomRangeBuilder() { + return internalGetCustomRangeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangeOrBuilder() { + if ((rangeCase_ == 1) && (customRangeBuilder_ != null)) { + return customRangeBuilder_.getMessageOrBuilder(); + } else { + if (rangeCase_ == 1) { + return (com.google.cloud.numberregistry.v1alpha.CustomRange) range_; + } + return com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder> + internalGetCustomRangeFieldBuilder() { + if (customRangeBuilder_ == null) { + if (!(rangeCase_ == 1)) { + range_ = com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance(); + } + customRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder>( + (com.google.cloud.numberregistry.v1alpha.CustomRange) range_, + getParentForChildren(), + isClean()); + range_ = null; + } + rangeCase_ = 1; + onChanged(); + return customRangeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveredRange, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder> + discoveredRangeBuilder_; + + /** + * + * + *
+     * A DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + * + * @return Whether the discoveredRange field is set. + */ + @java.lang.Override + public boolean hasDiscoveredRange() { + return rangeCase_ == 2; + } + + /** + * + * + *
+     * A DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + * + * @return The discoveredRange. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange getDiscoveredRange() { + if (discoveredRangeBuilder_ == null) { + if (rangeCase_ == 2) { + return (com.google.cloud.numberregistry.v1alpha.DiscoveredRange) range_; + } + return com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance(); + } else { + if (rangeCase_ == 2) { + return discoveredRangeBuilder_.getMessage(); + } + return com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + */ + public Builder setDiscoveredRange( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange value) { + if (discoveredRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + range_ = value; + onChanged(); + } else { + discoveredRangeBuilder_.setMessage(value); + } + rangeCase_ = 2; + return this; + } + + /** + * + * + *
+     * A DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + */ + public Builder setDiscoveredRange( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder builderForValue) { + if (discoveredRangeBuilder_ == null) { + range_ = builderForValue.build(); + onChanged(); + } else { + discoveredRangeBuilder_.setMessage(builderForValue.build()); + } + rangeCase_ = 2; + return this; + } + + /** + * + * + *
+     * A DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + */ + public Builder mergeDiscoveredRange( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange value) { + if (discoveredRangeBuilder_ == null) { + if (rangeCase_ == 2 + && range_ + != com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance()) { + range_ = + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.newBuilder( + (com.google.cloud.numberregistry.v1alpha.DiscoveredRange) range_) + .mergeFrom(value) + .buildPartial(); + } else { + range_ = value; + } + onChanged(); + } else { + if (rangeCase_ == 2) { + discoveredRangeBuilder_.mergeFrom(value); + } else { + discoveredRangeBuilder_.setMessage(value); + } + } + rangeCase_ = 2; + return this; + } + + /** + * + * + *
+     * A DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + */ + public Builder clearDiscoveredRange() { + if (discoveredRangeBuilder_ == null) { + if (rangeCase_ == 2) { + rangeCase_ = 0; + range_ = null; + onChanged(); + } + } else { + if (rangeCase_ == 2) { + rangeCase_ = 0; + range_ = null; + } + discoveredRangeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder + getDiscoveredRangeBuilder() { + return internalGetDiscoveredRangeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder + getDiscoveredRangeOrBuilder() { + if ((rangeCase_ == 2) && (discoveredRangeBuilder_ != null)) { + return discoveredRangeBuilder_.getMessageOrBuilder(); + } else { + if (rangeCase_ == 2) { + return (com.google.cloud.numberregistry.v1alpha.DiscoveredRange) range_; + } + return com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance(); + } + } + + /** + * + * + *
+     * A DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveredRange, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder> + internalGetDiscoveredRangeFieldBuilder() { + if (discoveredRangeBuilder_ == null) { + if (!(rangeCase_ == 2)) { + range_ = com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance(); + } + discoveredRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveredRange, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder>( + (com.google.cloud.numberregistry.v1alpha.DiscoveredRange) range_, + getParentForChildren(), + isClean()); + range_ = null; + } + rangeCase_ = 2; + onChanged(); + return discoveredRangeBuilder_; + } + + private com.google.cloud.numberregistry.v1alpha.RangeUtilization utilization_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RangeUtilization, + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder, + com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder> + utilizationBuilder_; + + /** + * + * + *
+     * The utilization of the Range.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + * + * @return Whether the utilization field is set. + */ + public boolean hasUtilization() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * The utilization of the Range.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + * + * @return The utilization. + */ + public com.google.cloud.numberregistry.v1alpha.RangeUtilization getUtilization() { + if (utilizationBuilder_ == null) { + return utilization_ == null + ? com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance() + : utilization_; + } else { + return utilizationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The utilization of the Range.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + */ + public Builder setUtilization(com.google.cloud.numberregistry.v1alpha.RangeUtilization value) { + if (utilizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + utilization_ = value; + } else { + utilizationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The utilization of the Range.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + */ + public Builder setUtilization( + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder builderForValue) { + if (utilizationBuilder_ == null) { + utilization_ = builderForValue.build(); + } else { + utilizationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The utilization of the Range.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + */ + public Builder mergeUtilization( + com.google.cloud.numberregistry.v1alpha.RangeUtilization value) { + if (utilizationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && utilization_ != null + && utilization_ + != com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance()) { + getUtilizationBuilder().mergeFrom(value); + } else { + utilization_ = value; + } + } else { + utilizationBuilder_.mergeFrom(value); + } + if (utilization_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The utilization of the Range.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + */ + public Builder clearUtilization() { + bitField0_ = (bitField0_ & ~0x00000004); + utilization_ = null; + if (utilizationBuilder_ != null) { + utilizationBuilder_.dispose(); + utilizationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The utilization of the Range.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + */ + public com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder + getUtilizationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUtilizationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The utilization of the Range.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + */ + public com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder + getUtilizationOrBuilder() { + if (utilizationBuilder_ != null) { + return utilizationBuilder_.getMessageOrBuilder(); + } else { + return utilization_ == null + ? com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance() + : utilization_; + } + } + + /** + * + * + *
+     * The utilization of the Range.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RangeUtilization, + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder, + com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder> + internalGetUtilizationFieldBuilder() { + if (utilizationBuilder_ == null) { + utilizationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RangeUtilization, + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder, + com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder>( + getUtilization(), getParentForChildren(), isClean()); + utilization_ = null; + } + return utilizationBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.Range) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.Range) + private static final com.google.cloud.numberregistry.v1alpha.Range DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.Range(); + } + + public static com.google.cloud.numberregistry.v1alpha.Range getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Range 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.numberregistry.v1alpha.Range getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RangeOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RangeOrBuilder.java new file mode 100644 index 000000000000..03c05e62ce48 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RangeOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface RangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.Range) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A CustomRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + * + * @return Whether the customRange field is set. + */ + boolean hasCustomRange(); + + /** + * + * + *
+   * A CustomRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + * + * @return The customRange. + */ + com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange(); + + /** + * + * + *
+   * A CustomRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangeOrBuilder(); + + /** + * + * + *
+   * A DiscoveredRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + * + * @return Whether the discoveredRange field is set. + */ + boolean hasDiscoveredRange(); + + /** + * + * + *
+   * A DiscoveredRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + * + * @return The discoveredRange. + */ + com.google.cloud.numberregistry.v1alpha.DiscoveredRange getDiscoveredRange(); + + /** + * + * + *
+   * A DiscoveredRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 2; + */ + com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder getDiscoveredRangeOrBuilder(); + + /** + * + * + *
+   * The utilization of the Range.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + * + * @return Whether the utilization field is set. + */ + boolean hasUtilization(); + + /** + * + * + *
+   * The utilization of the Range.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + * + * @return The utilization. + */ + com.google.cloud.numberregistry.v1alpha.RangeUtilization getUtilization(); + + /** + * + * + *
+   * The utilization of the Range.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization utilization = 3; + */ + com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder getUtilizationOrBuilder(); + + com.google.cloud.numberregistry.v1alpha.Range.RangeCase getRangeCase(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RangeUtilization.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RangeUtilization.java new file mode 100644 index 000000000000..80ab36afb3a3 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RangeUtilization.java @@ -0,0 +1,942 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Utilization metrics for an IP Range, including consumed and produced address
+ * counts.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.RangeUtilization} + */ +@com.google.protobuf.Generated +public final class RangeUtilization extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.RangeUtilization) + RangeUtilizationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RangeUtilization"); + } + + // Use RangeUtilization.newBuilder() to construct. + private RangeUtilization(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RangeUtilization() { + totalConsumed_ = ""; + totalProduced_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RangeUtilization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RangeUtilization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.RangeUtilization.class, + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder.class); + } + + private int bitField0_; + public static final int TOTAL_CONSUMED_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object totalConsumed_ = ""; + + /** + * + * + *
+   * Output only. The total number of IP addresses consumed in the Range.
+   * 
+ * + * string total_consumed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The totalConsumed. + */ + @java.lang.Override + public java.lang.String getTotalConsumed() { + java.lang.Object ref = totalConsumed_; + 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(); + totalConsumed_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The total number of IP addresses consumed in the Range.
+   * 
+ * + * string total_consumed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for totalConsumed. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTotalConsumedBytes() { + java.lang.Object ref = totalConsumed_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + totalConsumed_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_PRODUCED_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object totalProduced_ = ""; + + /** + * + * + *
+   * Output only. The total number of IP addresses produced in the Range.
+   * 
+ * + * string total_produced = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The totalProduced. + */ + @java.lang.Override + public java.lang.String getTotalProduced() { + java.lang.Object ref = totalProduced_; + 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(); + totalProduced_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The total number of IP addresses produced in the Range.
+   * 
+ * + * string total_produced = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for totalProduced. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTotalProducedBytes() { + java.lang.Object ref = totalProduced_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + totalProduced_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USAGE_FIELD_NUMBER = 3; + private double usage_ = 0D; + + /** + * + * + *
+   * Output only. The usage of the Range as a percentage. This is marked as
+   * optional so that we have presence tracking and API responses show 0.0
+   * instead of NULL.
+   * 
+ * + * optional double usage = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the usage field is set. + */ + @java.lang.Override + public boolean hasUsage() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The usage of the Range as a percentage. This is marked as
+   * optional so that we have presence tracking and API responses show 0.0
+   * instead of NULL.
+   * 
+ * + * optional double usage = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The usage. + */ + @java.lang.Override + public double getUsage() { + return usage_; + } + + 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.GeneratedMessage.isStringEmpty(totalConsumed_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, totalConsumed_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(totalProduced_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, totalProduced_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeDouble(3, usage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(totalConsumed_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, totalConsumed_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(totalProduced_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, totalProduced_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, usage_); + } + 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.numberregistry.v1alpha.RangeUtilization)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.RangeUtilization other = + (com.google.cloud.numberregistry.v1alpha.RangeUtilization) obj; + + if (!getTotalConsumed().equals(other.getTotalConsumed())) return false; + if (!getTotalProduced().equals(other.getTotalProduced())) return false; + if (hasUsage() != other.hasUsage()) return false; + if (hasUsage()) { + if (java.lang.Double.doubleToLongBits(getUsage()) + != java.lang.Double.doubleToLongBits(other.getUsage())) 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) + TOTAL_CONSUMED_FIELD_NUMBER; + hash = (53 * hash) + getTotalConsumed().hashCode(); + hash = (37 * hash) + TOTAL_PRODUCED_FIELD_NUMBER; + hash = (53 * hash) + getTotalProduced().hashCode(); + if (hasUsage()) { + hash = (37 * hash) + USAGE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getUsage())); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.RangeUtilization parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.RangeUtilization 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.numberregistry.v1alpha.RangeUtilization parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.RangeUtilization 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.numberregistry.v1alpha.RangeUtilization parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.RangeUtilization parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.RangeUtilization parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.RangeUtilization parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.RangeUtilization parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.RangeUtilization parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.RangeUtilization parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.RangeUtilization parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.RangeUtilization 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Utilization metrics for an IP Range, including consumed and produced address
+   * counts.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.RangeUtilization} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.RangeUtilization) + com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RangeUtilization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RangeUtilization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.RangeUtilization.class, + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.RangeUtilization.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + totalConsumed_ = ""; + totalProduced_ = ""; + usage_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RangeUtilization_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RangeUtilization getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RangeUtilization build() { + com.google.cloud.numberregistry.v1alpha.RangeUtilization result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RangeUtilization buildPartial() { + com.google.cloud.numberregistry.v1alpha.RangeUtilization result = + new com.google.cloud.numberregistry.v1alpha.RangeUtilization(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.RangeUtilization result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.totalConsumed_ = totalConsumed_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.totalProduced_ = totalProduced_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.usage_ = usage_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.RangeUtilization) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.RangeUtilization) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.RangeUtilization other) { + if (other == com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance()) + return this; + if (!other.getTotalConsumed().isEmpty()) { + totalConsumed_ = other.totalConsumed_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTotalProduced().isEmpty()) { + totalProduced_ = other.totalProduced_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasUsage()) { + setUsage(other.getUsage()); + } + 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: + { + totalConsumed_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + totalProduced_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 25: + { + usage_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + 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 totalConsumed_ = ""; + + /** + * + * + *
+     * Output only. The total number of IP addresses consumed in the Range.
+     * 
+ * + * string total_consumed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The totalConsumed. + */ + public java.lang.String getTotalConsumed() { + java.lang.Object ref = totalConsumed_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + totalConsumed_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The total number of IP addresses consumed in the Range.
+     * 
+ * + * string total_consumed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for totalConsumed. + */ + public com.google.protobuf.ByteString getTotalConsumedBytes() { + java.lang.Object ref = totalConsumed_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + totalConsumed_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The total number of IP addresses consumed in the Range.
+     * 
+ * + * string total_consumed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The totalConsumed to set. + * @return This builder for chaining. + */ + public Builder setTotalConsumed(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + totalConsumed_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The total number of IP addresses consumed in the Range.
+     * 
+ * + * string total_consumed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTotalConsumed() { + totalConsumed_ = getDefaultInstance().getTotalConsumed(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The total number of IP addresses consumed in the Range.
+     * 
+ * + * string total_consumed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for totalConsumed to set. + * @return This builder for chaining. + */ + public Builder setTotalConsumedBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + totalConsumed_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object totalProduced_ = ""; + + /** + * + * + *
+     * Output only. The total number of IP addresses produced in the Range.
+     * 
+ * + * string total_produced = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The totalProduced. + */ + public java.lang.String getTotalProduced() { + java.lang.Object ref = totalProduced_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + totalProduced_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The total number of IP addresses produced in the Range.
+     * 
+ * + * string total_produced = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for totalProduced. + */ + public com.google.protobuf.ByteString getTotalProducedBytes() { + java.lang.Object ref = totalProduced_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + totalProduced_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The total number of IP addresses produced in the Range.
+     * 
+ * + * string total_produced = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The totalProduced to set. + * @return This builder for chaining. + */ + public Builder setTotalProduced(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + totalProduced_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The total number of IP addresses produced in the Range.
+     * 
+ * + * string total_produced = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTotalProduced() { + totalProduced_ = getDefaultInstance().getTotalProduced(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The total number of IP addresses produced in the Range.
+     * 
+ * + * string total_produced = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for totalProduced to set. + * @return This builder for chaining. + */ + public Builder setTotalProducedBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + totalProduced_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private double usage_; + + /** + * + * + *
+     * Output only. The usage of the Range as a percentage. This is marked as
+     * optional so that we have presence tracking and API responses show 0.0
+     * instead of NULL.
+     * 
+ * + * optional double usage = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the usage field is set. + */ + @java.lang.Override + public boolean hasUsage() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The usage of the Range as a percentage. This is marked as
+     * optional so that we have presence tracking and API responses show 0.0
+     * instead of NULL.
+     * 
+ * + * optional double usage = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The usage. + */ + @java.lang.Override + public double getUsage() { + return usage_; + } + + /** + * + * + *
+     * Output only. The usage of the Range as a percentage. This is marked as
+     * optional so that we have presence tracking and API responses show 0.0
+     * instead of NULL.
+     * 
+ * + * optional double usage = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The usage to set. + * @return This builder for chaining. + */ + public Builder setUsage(double value) { + + usage_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The usage of the Range as a percentage. This is marked as
+     * optional so that we have presence tracking and API responses show 0.0
+     * instead of NULL.
+     * 
+ * + * optional double usage = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUsage() { + bitField0_ = (bitField0_ & ~0x00000004); + usage_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.RangeUtilization) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.RangeUtilization) + private static final com.google.cloud.numberregistry.v1alpha.RangeUtilization DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.RangeUtilization(); + } + + public static com.google.cloud.numberregistry.v1alpha.RangeUtilization getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RangeUtilization 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.numberregistry.v1alpha.RangeUtilization getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RangeUtilizationOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RangeUtilizationOrBuilder.java new file mode 100644 index 000000000000..43776f1e253d --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RangeUtilizationOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface RangeUtilizationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.RangeUtilization) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The total number of IP addresses consumed in the Range.
+   * 
+ * + * string total_consumed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The totalConsumed. + */ + java.lang.String getTotalConsumed(); + + /** + * + * + *
+   * Output only. The total number of IP addresses consumed in the Range.
+   * 
+ * + * string total_consumed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for totalConsumed. + */ + com.google.protobuf.ByteString getTotalConsumedBytes(); + + /** + * + * + *
+   * Output only. The total number of IP addresses produced in the Range.
+   * 
+ * + * string total_produced = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The totalProduced. + */ + java.lang.String getTotalProduced(); + + /** + * + * + *
+   * Output only. The total number of IP addresses produced in the Range.
+   * 
+ * + * string total_produced = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for totalProduced. + */ + com.google.protobuf.ByteString getTotalProducedBytes(); + + /** + * + * + *
+   * Output only. The usage of the Range as a percentage. This is marked as
+   * optional so that we have presence tracking and API responses show 0.0
+   * instead of NULL.
+   * 
+ * + * optional double usage = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the usage field is set. + */ + boolean hasUsage(); + + /** + * + * + *
+   * Output only. The usage of the Range as a percentage. This is marked as
+   * optional so that we have presence tracking and API responses show 0.0
+   * instead of NULL.
+   * 
+ * + * optional double usage = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The usage. + */ + double getUsage(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/Realm.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/Realm.java new file mode 100644 index 000000000000..76d5e093b65e --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/Realm.java @@ -0,0 +1,4145 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * A Realm represents a distinct network domain or security zone.
+ * It groups Ranges that share the same traffic and management characteristics.
+ * All the ranges in a Realm are routable to each other, meaning that they
+ * cannot overlap.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.Realm} + */ +@com.google.protobuf.Generated +public final class Realm extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.Realm) + RealmOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Realm"); + } + + // Use Realm.newBuilder() to construct. + private Realm(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Realm() { + name_ = ""; + trafficType_ = 0; + managementType_ = 0; + registryBook_ = ""; + ipVersion_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Realm_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 8: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Realm_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.Realm.class, + com.google.cloud.numberregistry.v1alpha.Realm.Builder.class); + } + + /** + * + * + *
+   * Traffic type of the Realm.
+   * 
+ * + * Protobuf enum {@code google.cloud.numberregistry.v1alpha.Realm.TrafficType} + */ + public enum TrafficType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified traffic type.
+     * 
+ * + * TRAFFIC_TYPE_UNSPECIFIED = 0; + */ + TRAFFIC_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Unset traffic type.
+     * 
+ * + * UNSET = 1; + */ + UNSET(1), + /** + * + * + *
+     * Internet traffic.
+     * 
+ * + * INTERNET = 2; + */ + INTERNET(2), + /** + * + * + *
+     * Private traffic.
+     * 
+ * + * PRIVATE = 3; + */ + PRIVATE(3), + /** + * + * + *
+     * Linklocal traffic.
+     * 
+ * + * LINKLOCAL = 4; + */ + LINKLOCAL(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TrafficType"); + } + + /** + * + * + *
+     * Unspecified traffic type.
+     * 
+ * + * TRAFFIC_TYPE_UNSPECIFIED = 0; + */ + public static final int TRAFFIC_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Unset traffic type.
+     * 
+ * + * UNSET = 1; + */ + public static final int UNSET_VALUE = 1; + + /** + * + * + *
+     * Internet traffic.
+     * 
+ * + * INTERNET = 2; + */ + public static final int INTERNET_VALUE = 2; + + /** + * + * + *
+     * Private traffic.
+     * 
+ * + * PRIVATE = 3; + */ + public static final int PRIVATE_VALUE = 3; + + /** + * + * + *
+     * Linklocal traffic.
+     * 
+ * + * LINKLOCAL = 4; + */ + public static final int LINKLOCAL_VALUE = 4; + + 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 TrafficType 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 TrafficType forNumber(int value) { + switch (value) { + case 0: + return TRAFFIC_TYPE_UNSPECIFIED; + case 1: + return UNSET; + case 2: + return INTERNET; + case 3: + return PRIVATE; + case 4: + return LINKLOCAL; + 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 TrafficType findValueByNumber(int number) { + return TrafficType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.Realm.getDescriptor().getEnumTypes().get(0); + } + + private static final TrafficType[] VALUES = values(); + + public static TrafficType 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 TrafficType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.numberregistry.v1alpha.Realm.TrafficType) + } + + /** + * + * + *
+   * Management type of the Realm.
+   * 
+ * + * Protobuf enum {@code google.cloud.numberregistry.v1alpha.Realm.ManagementType} + */ + public enum ManagementType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified management type.
+     * 
+ * + * MANAGEMENT_TYPE_UNSPECIFIED = 0; + */ + MANAGEMENT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Managed by Cloud Number Registry.
+     * 
+ * + * CNR = 1; + */ + CNR(1), + /** + * + * + *
+     * Managed by User.
+     * 
+ * + * USER = 2; + */ + USER(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ManagementType"); + } + + /** + * + * + *
+     * Unspecified management type.
+     * 
+ * + * MANAGEMENT_TYPE_UNSPECIFIED = 0; + */ + public static final int MANAGEMENT_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Managed by Cloud Number Registry.
+     * 
+ * + * CNR = 1; + */ + public static final int CNR_VALUE = 1; + + /** + * + * + *
+     * Managed by User.
+     * 
+ * + * USER = 2; + */ + public static final int USER_VALUE = 2; + + 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 ManagementType 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 ManagementType forNumber(int value) { + switch (value) { + case 0: + return MANAGEMENT_TYPE_UNSPECIFIED; + case 1: + return CNR; + case 2: + return USER; + 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 ManagementType findValueByNumber(int number) { + return ManagementType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.Realm.getDescriptor().getEnumTypes().get(1); + } + + private static final ManagementType[] VALUES = values(); + + public static ManagementType 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 ManagementType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.numberregistry.v1alpha.Realm.ManagementType) + } + + /** + * + * + *
+   * Enum for the view of the Realm.
+   * 
+ * + * Protobuf enum {@code google.cloud.numberregistry.v1alpha.Realm.RealmView} + */ + public enum RealmView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified view. Defaults to BASIC.
+     * 
+ * + * REALM_VIEW_UNSPECIFIED = 0; + */ + REALM_VIEW_UNSPECIFIED(0), + /** + * + * + *
+     * Basic view.
+     * 
+ * + * BASIC = 1; + */ + BASIC(1), + /** + * + * + *
+     * Full view. Includes the same data as the BASIC view.
+     * 
+ * + * FULL = 2; + */ + FULL(2), + /** + * + * + *
+     * Aggregate includes data about the child resources of the Realm.
+     * 
+ * + * AGGREGATE = 3; + */ + AGGREGATE(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RealmView"); + } + + /** + * + * + *
+     * Unspecified view. Defaults to BASIC.
+     * 
+ * + * REALM_VIEW_UNSPECIFIED = 0; + */ + public static final int REALM_VIEW_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Basic view.
+     * 
+ * + * BASIC = 1; + */ + public static final int BASIC_VALUE = 1; + + /** + * + * + *
+     * Full view. Includes the same data as the BASIC view.
+     * 
+ * + * FULL = 2; + */ + public static final int FULL_VALUE = 2; + + /** + * + * + *
+     * Aggregate includes data about the child resources of the Realm.
+     * 
+ * + * AGGREGATE = 3; + */ + public static final int AGGREGATE_VALUE = 3; + + 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 RealmView 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 RealmView forNumber(int value) { + switch (value) { + case 0: + return REALM_VIEW_UNSPECIFIED; + case 1: + return BASIC; + case 2: + return FULL; + case 3: + return AGGREGATE; + 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 RealmView findValueByNumber(int number) { + return RealmView.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.Realm.getDescriptor().getEnumTypes().get(2); + } + + private static final RealmView[] VALUES = values(); + + public static RealmView 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 RealmView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.numberregistry.v1alpha.Realm.RealmView) + } + + public interface RealmAggregatedDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. Number of DiscoveredRanges in the Realm.
+     * 
+ * + * int32 discovered_ranges_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The discoveredRangesCount. + */ + int getDiscoveredRangesCount(); + + /** + * + * + *
+     * Output only. Number of CustomRanges in the Realm.
+     * 
+ * + * int32 custom_ranges_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The customRangesCount. + */ + int getCustomRangesCount(); + } + + /** + * + * + *
+   * Aggregated data for the Realm.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData} + */ + public static final class RealmAggregatedData extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData) + RealmAggregatedDataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RealmAggregatedData"); + } + + // Use RealmAggregatedData.newBuilder() to construct. + private RealmAggregatedData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RealmAggregatedData() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Realm_RealmAggregatedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Realm_RealmAggregatedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.class, + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.Builder.class); + } + + public static final int DISCOVERED_RANGES_COUNT_FIELD_NUMBER = 1; + private int discoveredRangesCount_ = 0; + + /** + * + * + *
+     * Output only. Number of DiscoveredRanges in the Realm.
+     * 
+ * + * int32 discovered_ranges_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The discoveredRangesCount. + */ + @java.lang.Override + public int getDiscoveredRangesCount() { + return discoveredRangesCount_; + } + + public static final int CUSTOM_RANGES_COUNT_FIELD_NUMBER = 2; + private int customRangesCount_ = 0; + + /** + * + * + *
+     * Output only. Number of CustomRanges in the Realm.
+     * 
+ * + * int32 custom_ranges_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The customRangesCount. + */ + @java.lang.Override + public int getCustomRangesCount() { + return customRangesCount_; + } + + 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 (discoveredRangesCount_ != 0) { + output.writeInt32(1, discoveredRangesCount_); + } + if (customRangesCount_ != 0) { + output.writeInt32(2, customRangesCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (discoveredRangesCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, discoveredRangesCount_); + } + if (customRangesCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, customRangesCount_); + } + 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.numberregistry.v1alpha.Realm.RealmAggregatedData)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData other = + (com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData) obj; + + if (getDiscoveredRangesCount() != other.getDiscoveredRangesCount()) return false; + if (getCustomRangesCount() != other.getCustomRangesCount()) 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) + DISCOVERED_RANGES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveredRangesCount(); + hash = (37 * hash) + CUSTOM_RANGES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getCustomRangesCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData 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.numberregistry.v1alpha.Realm.RealmAggregatedData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData 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.numberregistry.v1alpha.Realm.RealmAggregatedData parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.Realm.RealmAggregatedData 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Aggregated data for the Realm.
+     * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData) + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Realm_RealmAggregatedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Realm_RealmAggregatedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.class, + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + discoveredRangesCount_ = 0; + customRangesCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Realm_RealmAggregatedData_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData build() { + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData buildPartial() { + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData result = + new com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.discoveredRangesCount_ = discoveredRangesCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.customRangesCount_ = customRangesCount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData other) { + if (other + == com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData + .getDefaultInstance()) return this; + if (other.getDiscoveredRangesCount() != 0) { + setDiscoveredRangesCount(other.getDiscoveredRangesCount()); + } + if (other.getCustomRangesCount() != 0) { + setCustomRangesCount(other.getCustomRangesCount()); + } + 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 8: + { + discoveredRangesCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + customRangesCount_ = input.readInt32(); + 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 int discoveredRangesCount_; + + /** + * + * + *
+       * Output only. Number of DiscoveredRanges in the Realm.
+       * 
+ * + * int32 discovered_ranges_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The discoveredRangesCount. + */ + @java.lang.Override + public int getDiscoveredRangesCount() { + return discoveredRangesCount_; + } + + /** + * + * + *
+       * Output only. Number of DiscoveredRanges in the Realm.
+       * 
+ * + * int32 discovered_ranges_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The discoveredRangesCount to set. + * @return This builder for chaining. + */ + public Builder setDiscoveredRangesCount(int value) { + + discoveredRangesCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Number of DiscoveredRanges in the Realm.
+       * 
+ * + * int32 discovered_ranges_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDiscoveredRangesCount() { + bitField0_ = (bitField0_ & ~0x00000001); + discoveredRangesCount_ = 0; + onChanged(); + return this; + } + + private int customRangesCount_; + + /** + * + * + *
+       * Output only. Number of CustomRanges in the Realm.
+       * 
+ * + * int32 custom_ranges_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The customRangesCount. + */ + @java.lang.Override + public int getCustomRangesCount() { + return customRangesCount_; + } + + /** + * + * + *
+       * Output only. Number of CustomRanges in the Realm.
+       * 
+ * + * int32 custom_ranges_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The customRangesCount to set. + * @return This builder for chaining. + */ + public Builder setCustomRangesCount(int value) { + + customRangesCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Number of CustomRanges in the Realm.
+       * 
+ * + * int32 custom_ranges_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCustomRangesCount() { + bitField0_ = (bitField0_ & ~0x00000002); + customRangesCount_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData) + private static final com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData(); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RealmAggregatedData 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.numberregistry.v1alpha.Realm.RealmAggregatedData + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Identifier. The resource name of the Realm.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the Realm.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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 TRAFFIC_TYPE_FIELD_NUMBER = 2; + private int trafficType_ = 0; + + /** + * + * + *
+   * Required. Traffic type of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.TrafficType traffic_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for trafficType. + */ + @java.lang.Override + public int getTrafficTypeValue() { + return trafficType_; + } + + /** + * + * + *
+   * Required. Traffic type of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.TrafficType traffic_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trafficType. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm.TrafficType getTrafficType() { + com.google.cloud.numberregistry.v1alpha.Realm.TrafficType result = + com.google.cloud.numberregistry.v1alpha.Realm.TrafficType.forNumber(trafficType_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.Realm.TrafficType.UNRECOGNIZED + : result; + } + + public static final int MANAGEMENT_TYPE_FIELD_NUMBER = 3; + private int managementType_ = 0; + + /** + * + * + *
+   * Required. Management type of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.ManagementType management_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for managementType. + */ + @java.lang.Override + public int getManagementTypeValue() { + return managementType_; + } + + /** + * + * + *
+   * Required. Management type of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.ManagementType management_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The managementType. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm.ManagementType getManagementType() { + com.google.cloud.numberregistry.v1alpha.Realm.ManagementType result = + com.google.cloud.numberregistry.v1alpha.Realm.ManagementType.forNumber(managementType_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.Realm.ManagementType.UNRECOGNIZED + : result; + } + + public static final int REGISTRY_BOOK_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object registryBook_ = ""; + + /** + * + * + *
+   * Required. Name of the RegistryBook that claims the Realm.
+   * 
+ * + * + * string registry_book = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The registryBook. + */ + @java.lang.Override + public java.lang.String getRegistryBook() { + java.lang.Object ref = registryBook_; + 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(); + registryBook_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the RegistryBook that claims the Realm.
+   * 
+ * + * + * string registry_book = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for registryBook. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegistryBookBytes() { + java.lang.Object ref = registryBook_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + registryBook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISCOVERY_METADATA_FIELD_NUMBER = 5; + private com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata discoveryMetadata_; + + /** + * + * + *
+   * Output only. Discovery metadata of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the discoveryMetadata field is set. + */ + @java.lang.Override + public boolean hasDiscoveryMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Discovery metadata of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The discoveryMetadata. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata getDiscoveryMetadata() { + return discoveryMetadata_ == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.getDefaultInstance() + : discoveryMetadata_; + } + + /** + * + * + *
+   * Output only. Discovery metadata of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadataOrBuilder + getDiscoveryMetadataOrBuilder() { + return discoveryMetadata_ == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.getDefaultInstance() + : discoveryMetadata_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time at which the Realm was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time at which the Realm was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.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 at which the Realm was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time at which the Realm was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The time at which the Realm was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time at which the Realm was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 8; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Realm_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int IP_VERSION_FIELD_NUMBER = 9; + private int ipVersion_ = 0; + + /** + * + * + *
+   * Optional. IP version of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpVersion ip_version = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for ipVersion. + */ + @java.lang.Override + public int getIpVersionValue() { + return ipVersion_; + } + + /** + * + * + *
+   * Optional. IP version of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpVersion ip_version = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipVersion. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpVersion getIpVersion() { + com.google.cloud.numberregistry.v1alpha.IpVersion result = + com.google.cloud.numberregistry.v1alpha.IpVersion.forNumber(ipVersion_); + return result == null ? com.google.cloud.numberregistry.v1alpha.IpVersion.UNRECOGNIZED : result; + } + + public static final int AGGREGATED_DATA_FIELD_NUMBER = 10; + private com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregatedData_; + + /** + * + * + *
+   * Output only. Aggregated data for the Realm. Populated only when the view is
+   * AGGREGATE.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the aggregatedData field is set. + */ + @java.lang.Override + public boolean hasAggregatedData() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. Aggregated data for the Realm. Populated only when the view is
+   * AGGREGATE.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The aggregatedData. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData getAggregatedData() { + return aggregatedData_ == null + ? com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.getDefaultInstance() + : aggregatedData_; + } + + /** + * + * + *
+   * Output only. Aggregated data for the Realm. Populated only when the view is
+   * AGGREGATE.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedDataOrBuilder + getAggregatedDataOrBuilder() { + return aggregatedData_ == null + ? com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.getDefaultInstance() + : aggregatedData_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (trafficType_ + != com.google.cloud.numberregistry.v1alpha.Realm.TrafficType.TRAFFIC_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, trafficType_); + } + if (managementType_ + != com.google.cloud.numberregistry.v1alpha.Realm.ManagementType.MANAGEMENT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, managementType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registryBook_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, registryBook_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getDiscoveryMetadata()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); + if (ipVersion_ + != com.google.cloud.numberregistry.v1alpha.IpVersion.IP_VERSION_UNSPECIFIED.getNumber()) { + output.writeEnum(9, ipVersion_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getAggregatedData()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (trafficType_ + != com.google.cloud.numberregistry.v1alpha.Realm.TrafficType.TRAFFIC_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, trafficType_); + } + if (managementType_ + != com.google.cloud.numberregistry.v1alpha.Realm.ManagementType.MANAGEMENT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, managementType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(registryBook_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, registryBook_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDiscoveryMetadata()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__); + } + if (ipVersion_ + != com.google.cloud.numberregistry.v1alpha.IpVersion.IP_VERSION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, ipVersion_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getAggregatedData()); + } + 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.numberregistry.v1alpha.Realm)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.Realm other = + (com.google.cloud.numberregistry.v1alpha.Realm) obj; + + if (!getName().equals(other.getName())) return false; + if (trafficType_ != other.trafficType_) return false; + if (managementType_ != other.managementType_) return false; + if (!getRegistryBook().equals(other.getRegistryBook())) return false; + if (hasDiscoveryMetadata() != other.hasDiscoveryMetadata()) return false; + if (hasDiscoveryMetadata()) { + if (!getDiscoveryMetadata().equals(other.getDiscoveryMetadata())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (ipVersion_ != other.ipVersion_) return false; + if (hasAggregatedData() != other.hasAggregatedData()) return false; + if (hasAggregatedData()) { + if (!getAggregatedData().equals(other.getAggregatedData())) 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) + TRAFFIC_TYPE_FIELD_NUMBER; + hash = (53 * hash) + trafficType_; + hash = (37 * hash) + MANAGEMENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + managementType_; + hash = (37 * hash) + REGISTRY_BOOK_FIELD_NUMBER; + hash = (53 * hash) + getRegistryBook().hashCode(); + if (hasDiscoveryMetadata()) { + hash = (37 * hash) + DISCOVERY_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveryMetadata().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + IP_VERSION_FIELD_NUMBER; + hash = (53 * hash) + ipVersion_; + if (hasAggregatedData()) { + hash = (37 * hash) + AGGREGATED_DATA_FIELD_NUMBER; + hash = (53 * hash) + getAggregatedData().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.Realm parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm 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.numberregistry.v1alpha.Realm parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm 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.numberregistry.v1alpha.Realm parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.Realm 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A Realm represents a distinct network domain or security zone.
+   * It groups Ranges that share the same traffic and management characteristics.
+   * All the ranges in a Realm are routable to each other, meaning that they
+   * cannot overlap.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.Realm} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.Realm) + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Realm_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 8: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 8: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Realm_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.Realm.class, + com.google.cloud.numberregistry.v1alpha.Realm.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.Realm.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDiscoveryMetadataFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetAggregatedDataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + trafficType_ = 0; + managementType_ = 0; + registryBook_ = ""; + discoveryMetadata_ = null; + if (discoveryMetadataBuilder_ != null) { + discoveryMetadataBuilder_.dispose(); + discoveryMetadataBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + ipVersion_ = 0; + aggregatedData_ = null; + if (aggregatedDataBuilder_ != null) { + aggregatedDataBuilder_.dispose(); + aggregatedDataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_Realm_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm build() { + com.google.cloud.numberregistry.v1alpha.Realm result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm buildPartial() { + com.google.cloud.numberregistry.v1alpha.Realm result = + new com.google.cloud.numberregistry.v1alpha.Realm(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.Realm result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.trafficType_ = trafficType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.managementType_ = managementType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.registryBook_ = registryBook_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.discoveryMetadata_ = + discoveryMetadataBuilder_ == null + ? discoveryMetadata_ + : discoveryMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.ipVersion_ = ipVersion_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.aggregatedData_ = + aggregatedDataBuilder_ == null ? aggregatedData_ : aggregatedDataBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.Realm) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.Realm) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.Realm other) { + if (other == com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.trafficType_ != 0) { + setTrafficTypeValue(other.getTrafficTypeValue()); + } + if (other.managementType_ != 0) { + setManagementTypeValue(other.getManagementTypeValue()); + } + if (!other.getRegistryBook().isEmpty()) { + registryBook_ = other.registryBook_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasDiscoveryMetadata()) { + mergeDiscoveryMetadata(other.getDiscoveryMetadata()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000080; + if (other.ipVersion_ != 0) { + setIpVersionValue(other.getIpVersionValue()); + } + if (other.hasAggregatedData()) { + mergeAggregatedData(other.getAggregatedData()); + } + 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: + { + trafficType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + managementType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + registryBook_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetDiscoveryMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + ipVersion_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: + { + input.readMessage( + internalGetAggregatedDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + 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. Identifier. The resource name of the Realm.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the Realm.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the Realm.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the Realm.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Identifier. The resource name of the Realm.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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 int trafficType_ = 0; + + /** + * + * + *
+     * Required. Traffic type of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.TrafficType traffic_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for trafficType. + */ + @java.lang.Override + public int getTrafficTypeValue() { + return trafficType_; + } + + /** + * + * + *
+     * Required. Traffic type of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.TrafficType traffic_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for trafficType to set. + * @return This builder for chaining. + */ + public Builder setTrafficTypeValue(int value) { + trafficType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Traffic type of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.TrafficType traffic_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trafficType. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm.TrafficType getTrafficType() { + com.google.cloud.numberregistry.v1alpha.Realm.TrafficType result = + com.google.cloud.numberregistry.v1alpha.Realm.TrafficType.forNumber(trafficType_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.Realm.TrafficType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. Traffic type of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.TrafficType traffic_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The trafficType to set. + * @return This builder for chaining. + */ + public Builder setTrafficType(com.google.cloud.numberregistry.v1alpha.Realm.TrafficType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + trafficType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Traffic type of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.TrafficType traffic_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearTrafficType() { + bitField0_ = (bitField0_ & ~0x00000002); + trafficType_ = 0; + onChanged(); + return this; + } + + private int managementType_ = 0; + + /** + * + * + *
+     * Required. Management type of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.ManagementType management_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for managementType. + */ + @java.lang.Override + public int getManagementTypeValue() { + return managementType_; + } + + /** + * + * + *
+     * Required. Management type of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.ManagementType management_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for managementType to set. + * @return This builder for chaining. + */ + public Builder setManagementTypeValue(int value) { + managementType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Management type of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.ManagementType management_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The managementType. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm.ManagementType getManagementType() { + com.google.cloud.numberregistry.v1alpha.Realm.ManagementType result = + com.google.cloud.numberregistry.v1alpha.Realm.ManagementType.forNumber(managementType_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.Realm.ManagementType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. Management type of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.ManagementType management_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The managementType to set. + * @return This builder for chaining. + */ + public Builder setManagementType( + com.google.cloud.numberregistry.v1alpha.Realm.ManagementType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + managementType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Management type of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.ManagementType management_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearManagementType() { + bitField0_ = (bitField0_ & ~0x00000004); + managementType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object registryBook_ = ""; + + /** + * + * + *
+     * Required. Name of the RegistryBook that claims the Realm.
+     * 
+ * + * + * string registry_book = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The registryBook. + */ + public java.lang.String getRegistryBook() { + java.lang.Object ref = registryBook_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + registryBook_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the RegistryBook that claims the Realm.
+     * 
+ * + * + * string registry_book = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for registryBook. + */ + public com.google.protobuf.ByteString getRegistryBookBytes() { + java.lang.Object ref = registryBook_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + registryBook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the RegistryBook that claims the Realm.
+     * 
+ * + * + * string registry_book = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The registryBook to set. + * @return This builder for chaining. + */ + public Builder setRegistryBook(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + registryBook_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the RegistryBook that claims the Realm.
+     * 
+ * + * + * string registry_book = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRegistryBook() { + registryBook_ = getDefaultInstance().getRegistryBook(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the RegistryBook that claims the Realm.
+     * 
+ * + * + * string registry_book = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for registryBook to set. + * @return This builder for chaining. + */ + public Builder setRegistryBookBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + registryBook_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata discoveryMetadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadataOrBuilder> + discoveryMetadataBuilder_; + + /** + * + * + *
+     * Output only. Discovery metadata of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the discoveryMetadata field is set. + */ + public boolean hasDiscoveryMetadata() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Discovery metadata of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The discoveryMetadata. + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata getDiscoveryMetadata() { + if (discoveryMetadataBuilder_ == null) { + return discoveryMetadata_ == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.getDefaultInstance() + : discoveryMetadata_; + } else { + return discoveryMetadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Discovery metadata of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDiscoveryMetadata( + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata value) { + if (discoveryMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + discoveryMetadata_ = value; + } else { + discoveryMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Discovery metadata of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDiscoveryMetadata( + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.Builder builderForValue) { + if (discoveryMetadataBuilder_ == null) { + discoveryMetadata_ = builderForValue.build(); + } else { + discoveryMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Discovery metadata of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDiscoveryMetadata( + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata value) { + if (discoveryMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && discoveryMetadata_ != null + && discoveryMetadata_ + != com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.getDefaultInstance()) { + getDiscoveryMetadataBuilder().mergeFrom(value); + } else { + discoveryMetadata_ = value; + } + } else { + discoveryMetadataBuilder_.mergeFrom(value); + } + if (discoveryMetadata_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Discovery metadata of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDiscoveryMetadata() { + bitField0_ = (bitField0_ & ~0x00000010); + discoveryMetadata_ = null; + if (discoveryMetadataBuilder_ != null) { + discoveryMetadataBuilder_.dispose(); + discoveryMetadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Discovery metadata of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.Builder + getDiscoveryMetadataBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetDiscoveryMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Discovery metadata of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveryMetadataOrBuilder + getDiscoveryMetadataOrBuilder() { + if (discoveryMetadataBuilder_ != null) { + return discoveryMetadataBuilder_.getMessageOrBuilder(); + } else { + return discoveryMetadata_ == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.getDefaultInstance() + : discoveryMetadata_; + } + } + + /** + * + * + *
+     * Output only. Discovery metadata of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadataOrBuilder> + internalGetDiscoveryMetadataFieldBuilder() { + if (discoveryMetadataBuilder_ == null) { + discoveryMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadataOrBuilder>( + getDiscoveryMetadata(), getParentForChildren(), isClean()); + discoveryMetadata_ = null; + } + return discoveryMetadataBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time at which the Realm was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. The time at which the Realm was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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 at which the Realm was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the Realm was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the Realm was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time at which the Realm was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the Realm was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time at which the Realm was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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 at which the Realm was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time at which the Realm was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The time at which the Realm was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time at which the Realm was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the Realm was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the Realm was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time at which the Realm was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the Realm was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time at which the Realm was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time at which the Realm was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000080; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000080); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000080; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000080; + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000080; + return this; + } + + private int ipVersion_ = 0; + + /** + * + * + *
+     * Optional. IP version of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpVersion ip_version = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for ipVersion. + */ + @java.lang.Override + public int getIpVersionValue() { + return ipVersion_; + } + + /** + * + * + *
+     * Optional. IP version of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpVersion ip_version = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for ipVersion to set. + * @return This builder for chaining. + */ + public Builder setIpVersionValue(int value) { + ipVersion_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP version of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpVersion ip_version = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipVersion. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpVersion getIpVersion() { + com.google.cloud.numberregistry.v1alpha.IpVersion result = + com.google.cloud.numberregistry.v1alpha.IpVersion.forNumber(ipVersion_); + return result == null + ? com.google.cloud.numberregistry.v1alpha.IpVersion.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. IP version of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpVersion ip_version = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The ipVersion to set. + * @return This builder for chaining. + */ + public Builder setIpVersion(com.google.cloud.numberregistry.v1alpha.IpVersion value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + ipVersion_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP version of the Realm.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpVersion ip_version = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIpVersion() { + bitField0_ = (bitField0_ & ~0x00000100); + ipVersion_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregatedData_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData, + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.Builder, + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedDataOrBuilder> + aggregatedDataBuilder_; + + /** + * + * + *
+     * Output only. Aggregated data for the Realm. Populated only when the view is
+     * AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the aggregatedData field is set. + */ + public boolean hasAggregatedData() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Output only. Aggregated data for the Realm. Populated only when the view is
+     * AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The aggregatedData. + */ + public com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData getAggregatedData() { + if (aggregatedDataBuilder_ == null) { + return aggregatedData_ == null + ? com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.getDefaultInstance() + : aggregatedData_; + } else { + return aggregatedDataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Aggregated data for the Realm. Populated only when the view is
+     * AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAggregatedData( + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData value) { + if (aggregatedDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregatedData_ = value; + } else { + aggregatedDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Aggregated data for the Realm. Populated only when the view is
+     * AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAggregatedData( + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.Builder builderForValue) { + if (aggregatedDataBuilder_ == null) { + aggregatedData_ = builderForValue.build(); + } else { + aggregatedDataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Aggregated data for the Realm. Populated only when the view is
+     * AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAggregatedData( + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData value) { + if (aggregatedDataBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && aggregatedData_ != null + && aggregatedData_ + != com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData + .getDefaultInstance()) { + getAggregatedDataBuilder().mergeFrom(value); + } else { + aggregatedData_ = value; + } + } else { + aggregatedDataBuilder_.mergeFrom(value); + } + if (aggregatedData_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Aggregated data for the Realm. Populated only when the view is
+     * AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAggregatedData() { + bitField0_ = (bitField0_ & ~0x00000200); + aggregatedData_ = null; + if (aggregatedDataBuilder_ != null) { + aggregatedDataBuilder_.dispose(); + aggregatedDataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Aggregated data for the Realm. Populated only when the view is
+     * AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.Builder + getAggregatedDataBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetAggregatedDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Aggregated data for the Realm. Populated only when the view is
+     * AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedDataOrBuilder + getAggregatedDataOrBuilder() { + if (aggregatedDataBuilder_ != null) { + return aggregatedDataBuilder_.getMessageOrBuilder(); + } else { + return aggregatedData_ == null + ? com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.getDefaultInstance() + : aggregatedData_; + } + } + + /** + * + * + *
+     * Output only. Aggregated data for the Realm. Populated only when the view is
+     * AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData, + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.Builder, + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedDataOrBuilder> + internalGetAggregatedDataFieldBuilder() { + if (aggregatedDataBuilder_ == null) { + aggregatedDataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData, + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData.Builder, + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedDataOrBuilder>( + getAggregatedData(), getParentForChildren(), isClean()); + aggregatedData_ = null; + } + return aggregatedDataBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.Realm) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.Realm) + private static final com.google.cloud.numberregistry.v1alpha.Realm DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.Realm(); + } + + public static com.google.cloud.numberregistry.v1alpha.Realm getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Realm 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.numberregistry.v1alpha.Realm getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RealmName.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RealmName.java new file mode 100644 index 000000000000..28759940562f --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RealmName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha; + +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 RealmName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_REALM = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/realms/{realm}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String realm; + + @Deprecated + protected RealmName() { + project = null; + location = null; + realm = null; + } + + private RealmName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + realm = Preconditions.checkNotNull(builder.getRealm()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRealm() { + return realm; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RealmName of(String project, String location, String realm) { + return newBuilder().setProject(project).setLocation(location).setRealm(realm).build(); + } + + public static String format(String project, String location, String realm) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRealm(realm) + .build() + .toString(); + } + + public static RealmName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_REALM.validatedMatch( + formattedString, "RealmName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("realm")); + } + + 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 (RealmName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_REALM.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (realm != null) { + fieldMapBuilder.put("realm", realm); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_REALM.instantiate( + "project", project, "location", location, "realm", realm); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + RealmName that = ((RealmName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.realm, that.realm); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(realm); + return h; + } + + /** Builder for projects/{project}/locations/{location}/realms/{realm}. */ + public static class Builder { + private String project; + private String location; + private String realm; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRealm() { + return realm; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRealm(String realm) { + this.realm = realm; + return this; + } + + private Builder(RealmName realmName) { + this.project = realmName.project; + this.location = realmName.location; + this.realm = realmName.realm; + } + + public RealmName build() { + return new RealmName(this); + } + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RealmOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RealmOrBuilder.java new file mode 100644 index 000000000000..916ee4388f65 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RealmOrBuilder.java @@ -0,0 +1,412 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface RealmOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.Realm) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Identifier. The resource name of the Realm.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Identifier. The resource name of the Realm.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Traffic type of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.TrafficType traffic_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for trafficType. + */ + int getTrafficTypeValue(); + + /** + * + * + *
+   * Required. Traffic type of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.TrafficType traffic_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trafficType. + */ + com.google.cloud.numberregistry.v1alpha.Realm.TrafficType getTrafficType(); + + /** + * + * + *
+   * Required. Management type of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.ManagementType management_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for managementType. + */ + int getManagementTypeValue(); + + /** + * + * + *
+   * Required. Management type of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.ManagementType management_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The managementType. + */ + com.google.cloud.numberregistry.v1alpha.Realm.ManagementType getManagementType(); + + /** + * + * + *
+   * Required. Name of the RegistryBook that claims the Realm.
+   * 
+ * + * + * string registry_book = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The registryBook. + */ + java.lang.String getRegistryBook(); + + /** + * + * + *
+   * Required. Name of the RegistryBook that claims the Realm.
+   * 
+ * + * + * string registry_book = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for registryBook. + */ + com.google.protobuf.ByteString getRegistryBookBytes(); + + /** + * + * + *
+   * Output only. Discovery metadata of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the discoveryMetadata field is set. + */ + boolean hasDiscoveryMetadata(); + + /** + * + * + *
+   * Output only. Discovery metadata of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The discoveryMetadata. + */ + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadata getDiscoveryMetadata(); + + /** + * + * + *
+   * Output only. Discovery metadata of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.DiscoveryMetadata discovery_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.numberregistry.v1alpha.DiscoveryMetadataOrBuilder + getDiscoveryMetadataOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which the Realm was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time at which the Realm was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time at which the Realm was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which the Realm was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time at which the Realm was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time at which the Realm was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. IP version of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpVersion ip_version = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for ipVersion. + */ + int getIpVersionValue(); + + /** + * + * + *
+   * Optional. IP version of the Realm.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpVersion ip_version = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipVersion. + */ + com.google.cloud.numberregistry.v1alpha.IpVersion getIpVersion(); + + /** + * + * + *
+   * Output only. Aggregated data for the Realm. Populated only when the view is
+   * AGGREGATE.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the aggregatedData field is set. + */ + boolean hasAggregatedData(); + + /** + * + * + *
+   * Output only. Aggregated data for the Realm. Populated only when the view is
+   * AGGREGATE.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The aggregatedData. + */ + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData getAggregatedData(); + + /** + * + * + *
+   * Output only. Aggregated data for the Realm. Populated only when the view is
+   * AGGREGATE.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedData aggregated_data = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.numberregistry.v1alpha.Realm.RealmAggregatedDataOrBuilder + getAggregatedDataOrBuilder(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBook.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBook.java new file mode 100644 index 000000000000..3a223685183e --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBook.java @@ -0,0 +1,3271 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * A RegistryBook organizes and manages IP address space.
+ * It claims specific scopes (such as projects) and groups related Realms and
+ * Ranges.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.RegistryBook} + */ +@com.google.protobuf.Generated +public final class RegistryBook extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.RegistryBook) + RegistryBookOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RegistryBook"); + } + + // Use RegistryBook.newBuilder() to construct. + private RegistryBook(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RegistryBook() { + name_ = ""; + claimedScopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.RegistryBook.class, + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder.class); + } + + public interface AggregatedDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. Number of scopes unique to the RegistryBook.
+     * 
+ * + * int32 unique_scopes_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueScopesCount. + */ + int getUniqueScopesCount(); + + /** + * + * + *
+     * Output only. Number of discovered Realms in the RegistryBook.
+     * 
+ * + * int32 discovered_realms_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The discoveredRealmsCount. + */ + int getDiscoveredRealmsCount(); + + /** + * + * + *
+     * Output only. Number of DiscoveredRanges in the RegistryBook.
+     * 
+ * + * int32 discovered_ranges_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The discoveredRangesCount. + */ + int getDiscoveredRangesCount(); + + /** + * + * + *
+     * Output only. Number of custom Realms in the RegistryBook.
+     * 
+ * + * int32 custom_realms_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The customRealmsCount. + */ + int getCustomRealmsCount(); + + /** + * + * + *
+     * Output only. Number of CustomRanges in the RegistryBook.
+     * 
+ * + * int32 custom_ranges_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The customRangesCount. + */ + int getCustomRangesCount(); + } + + /** + * + * + *
+   * Aggregated data for the RegistryBook.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData} + */ + public static final class AggregatedData extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData) + AggregatedDataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AggregatedData"); + } + + // Use AggregatedData.newBuilder() to construct. + private AggregatedData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AggregatedData() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_AggregatedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_AggregatedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData.class, + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData.Builder.class); + } + + public static final int UNIQUE_SCOPES_COUNT_FIELD_NUMBER = 1; + private int uniqueScopesCount_ = 0; + + /** + * + * + *
+     * Output only. Number of scopes unique to the RegistryBook.
+     * 
+ * + * int32 unique_scopes_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueScopesCount. + */ + @java.lang.Override + public int getUniqueScopesCount() { + return uniqueScopesCount_; + } + + public static final int DISCOVERED_REALMS_COUNT_FIELD_NUMBER = 2; + private int discoveredRealmsCount_ = 0; + + /** + * + * + *
+     * Output only. Number of discovered Realms in the RegistryBook.
+     * 
+ * + * int32 discovered_realms_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The discoveredRealmsCount. + */ + @java.lang.Override + public int getDiscoveredRealmsCount() { + return discoveredRealmsCount_; + } + + public static final int DISCOVERED_RANGES_COUNT_FIELD_NUMBER = 3; + private int discoveredRangesCount_ = 0; + + /** + * + * + *
+     * Output only. Number of DiscoveredRanges in the RegistryBook.
+     * 
+ * + * int32 discovered_ranges_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The discoveredRangesCount. + */ + @java.lang.Override + public int getDiscoveredRangesCount() { + return discoveredRangesCount_; + } + + public static final int CUSTOM_REALMS_COUNT_FIELD_NUMBER = 4; + private int customRealmsCount_ = 0; + + /** + * + * + *
+     * Output only. Number of custom Realms in the RegistryBook.
+     * 
+ * + * int32 custom_realms_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The customRealmsCount. + */ + @java.lang.Override + public int getCustomRealmsCount() { + return customRealmsCount_; + } + + public static final int CUSTOM_RANGES_COUNT_FIELD_NUMBER = 5; + private int customRangesCount_ = 0; + + /** + * + * + *
+     * Output only. Number of CustomRanges in the RegistryBook.
+     * 
+ * + * int32 custom_ranges_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The customRangesCount. + */ + @java.lang.Override + public int getCustomRangesCount() { + return customRangesCount_; + } + + 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 (uniqueScopesCount_ != 0) { + output.writeInt32(1, uniqueScopesCount_); + } + if (discoveredRealmsCount_ != 0) { + output.writeInt32(2, discoveredRealmsCount_); + } + if (discoveredRangesCount_ != 0) { + output.writeInt32(3, discoveredRangesCount_); + } + if (customRealmsCount_ != 0) { + output.writeInt32(4, customRealmsCount_); + } + if (customRangesCount_ != 0) { + output.writeInt32(5, customRangesCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (uniqueScopesCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, uniqueScopesCount_); + } + if (discoveredRealmsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, discoveredRealmsCount_); + } + if (discoveredRangesCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, discoveredRangesCount_); + } + if (customRealmsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, customRealmsCount_); + } + if (customRangesCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, customRangesCount_); + } + 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.numberregistry.v1alpha.RegistryBook.AggregatedData)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData other = + (com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData) obj; + + if (getUniqueScopesCount() != other.getUniqueScopesCount()) return false; + if (getDiscoveredRealmsCount() != other.getDiscoveredRealmsCount()) return false; + if (getDiscoveredRangesCount() != other.getDiscoveredRangesCount()) return false; + if (getCustomRealmsCount() != other.getCustomRealmsCount()) return false; + if (getCustomRangesCount() != other.getCustomRangesCount()) 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) + UNIQUE_SCOPES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getUniqueScopesCount(); + hash = (37 * hash) + DISCOVERED_REALMS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveredRealmsCount(); + hash = (37 * hash) + DISCOVERED_RANGES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveredRangesCount(); + hash = (37 * hash) + CUSTOM_REALMS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getCustomRealmsCount(); + hash = (37 * hash) + CUSTOM_RANGES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getCustomRangesCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData 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.numberregistry.v1alpha.RegistryBook.AggregatedData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData 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.numberregistry.v1alpha.RegistryBook.AggregatedData parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.RegistryBook.AggregatedData 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Aggregated data for the RegistryBook.
+     * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData) + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_AggregatedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_AggregatedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData.class, + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uniqueScopesCount_ = 0; + discoveredRealmsCount_ = 0; + discoveredRangesCount_ = 0; + customRealmsCount_ = 0; + customRangesCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_AggregatedData_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData build() { + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData buildPartial() { + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData result = + new com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uniqueScopesCount_ = uniqueScopesCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.discoveredRealmsCount_ = discoveredRealmsCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.discoveredRangesCount_ = discoveredRangesCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.customRealmsCount_ = customRealmsCount_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.customRangesCount_ = customRangesCount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData other) { + if (other + == com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData + .getDefaultInstance()) return this; + if (other.getUniqueScopesCount() != 0) { + setUniqueScopesCount(other.getUniqueScopesCount()); + } + if (other.getDiscoveredRealmsCount() != 0) { + setDiscoveredRealmsCount(other.getDiscoveredRealmsCount()); + } + if (other.getDiscoveredRangesCount() != 0) { + setDiscoveredRangesCount(other.getDiscoveredRangesCount()); + } + if (other.getCustomRealmsCount() != 0) { + setCustomRealmsCount(other.getCustomRealmsCount()); + } + if (other.getCustomRangesCount() != 0) { + setCustomRangesCount(other.getCustomRangesCount()); + } + 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 8: + { + uniqueScopesCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + discoveredRealmsCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + discoveredRangesCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + customRealmsCount_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + customRangesCount_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + 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 int uniqueScopesCount_; + + /** + * + * + *
+       * Output only. Number of scopes unique to the RegistryBook.
+       * 
+ * + * int32 unique_scopes_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueScopesCount. + */ + @java.lang.Override + public int getUniqueScopesCount() { + return uniqueScopesCount_; + } + + /** + * + * + *
+       * Output only. Number of scopes unique to the RegistryBook.
+       * 
+ * + * int32 unique_scopes_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uniqueScopesCount to set. + * @return This builder for chaining. + */ + public Builder setUniqueScopesCount(int value) { + + uniqueScopesCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Number of scopes unique to the RegistryBook.
+       * 
+ * + * int32 unique_scopes_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUniqueScopesCount() { + bitField0_ = (bitField0_ & ~0x00000001); + uniqueScopesCount_ = 0; + onChanged(); + return this; + } + + private int discoveredRealmsCount_; + + /** + * + * + *
+       * Output only. Number of discovered Realms in the RegistryBook.
+       * 
+ * + * int32 discovered_realms_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The discoveredRealmsCount. + */ + @java.lang.Override + public int getDiscoveredRealmsCount() { + return discoveredRealmsCount_; + } + + /** + * + * + *
+       * Output only. Number of discovered Realms in the RegistryBook.
+       * 
+ * + * int32 discovered_realms_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The discoveredRealmsCount to set. + * @return This builder for chaining. + */ + public Builder setDiscoveredRealmsCount(int value) { + + discoveredRealmsCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Number of discovered Realms in the RegistryBook.
+       * 
+ * + * int32 discovered_realms_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDiscoveredRealmsCount() { + bitField0_ = (bitField0_ & ~0x00000002); + discoveredRealmsCount_ = 0; + onChanged(); + return this; + } + + private int discoveredRangesCount_; + + /** + * + * + *
+       * Output only. Number of DiscoveredRanges in the RegistryBook.
+       * 
+ * + * int32 discovered_ranges_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The discoveredRangesCount. + */ + @java.lang.Override + public int getDiscoveredRangesCount() { + return discoveredRangesCount_; + } + + /** + * + * + *
+       * Output only. Number of DiscoveredRanges in the RegistryBook.
+       * 
+ * + * int32 discovered_ranges_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The discoveredRangesCount to set. + * @return This builder for chaining. + */ + public Builder setDiscoveredRangesCount(int value) { + + discoveredRangesCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Number of DiscoveredRanges in the RegistryBook.
+       * 
+ * + * int32 discovered_ranges_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDiscoveredRangesCount() { + bitField0_ = (bitField0_ & ~0x00000004); + discoveredRangesCount_ = 0; + onChanged(); + return this; + } + + private int customRealmsCount_; + + /** + * + * + *
+       * Output only. Number of custom Realms in the RegistryBook.
+       * 
+ * + * int32 custom_realms_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The customRealmsCount. + */ + @java.lang.Override + public int getCustomRealmsCount() { + return customRealmsCount_; + } + + /** + * + * + *
+       * Output only. Number of custom Realms in the RegistryBook.
+       * 
+ * + * int32 custom_realms_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The customRealmsCount to set. + * @return This builder for chaining. + */ + public Builder setCustomRealmsCount(int value) { + + customRealmsCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Number of custom Realms in the RegistryBook.
+       * 
+ * + * int32 custom_realms_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCustomRealmsCount() { + bitField0_ = (bitField0_ & ~0x00000008); + customRealmsCount_ = 0; + onChanged(); + return this; + } + + private int customRangesCount_; + + /** + * + * + *
+       * Output only. Number of CustomRanges in the RegistryBook.
+       * 
+ * + * int32 custom_ranges_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The customRangesCount. + */ + @java.lang.Override + public int getCustomRangesCount() { + return customRangesCount_; + } + + /** + * + * + *
+       * Output only. Number of CustomRanges in the RegistryBook.
+       * 
+ * + * int32 custom_ranges_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The customRangesCount to set. + * @return This builder for chaining. + */ + public Builder setCustomRangesCount(int value) { + + customRangesCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Number of CustomRanges in the RegistryBook.
+       * 
+ * + * int32 custom_ranges_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCustomRangesCount() { + bitField0_ = (bitField0_ & ~0x00000010); + customRangesCount_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData) + private static final com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData(); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AggregatedData 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.numberregistry.v1alpha.RegistryBook.AggregatedData + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Identifier. The resource name of the RegistryBook.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the RegistryBook.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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 CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time at which the RegistryBook was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time at which the RegistryBook was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 at which the RegistryBook was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time at which the RegistryBook was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time at which the RegistryBook was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time at which the RegistryBook was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CLAIMED_SCOPES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList claimedScopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+   * project scope is supported. Each scope is in the format of
+   * projects/{project}. Each scope can only be claimed once.
+   * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the claimedScopes. + */ + public com.google.protobuf.ProtocolStringList getClaimedScopesList() { + return claimedScopes_; + } + + /** + * + * + *
+   * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+   * project scope is supported. Each scope is in the format of
+   * projects/{project}. Each scope can only be claimed once.
+   * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of claimedScopes. + */ + public int getClaimedScopesCount() { + return claimedScopes_.size(); + } + + /** + * + * + *
+   * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+   * project scope is supported. Each scope is in the format of
+   * projects/{project}. Each scope can only be claimed once.
+   * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The claimedScopes at the given index. + */ + public java.lang.String getClaimedScopes(int index) { + return claimedScopes_.get(index); + } + + /** + * + * + *
+   * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+   * project scope is supported. Each scope is in the format of
+   * projects/{project}. Each scope can only be claimed once.
+   * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the claimedScopes at the given index. + */ + public com.google.protobuf.ByteString getClaimedScopesBytes(int index) { + return claimedScopes_.getByteString(index); + } + + public static final int IS_DEFAULT_FIELD_NUMBER = 6; + private boolean isDefault_ = false; + + /** + * + * + *
+   * Output only. Whether the RegistryBook is the default one.
+   * 
+ * + * bool is_default = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + + public static final int AGGREGATED_DATA_FIELD_NUMBER = 7; + private com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregatedData_; + + /** + * + * + *
+   * Output only. Aggregated data for the RegistryBook. Populated only when the
+   * view is AGGREGATE.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the aggregatedData field is set. + */ + @java.lang.Override + public boolean hasAggregatedData() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. Aggregated data for the RegistryBook. Populated only when the
+   * view is AGGREGATE.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The aggregatedData. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData getAggregatedData() { + return aggregatedData_ == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData.getDefaultInstance() + : aggregatedData_; + } + + /** + * + * + *
+   * Output only. Aggregated data for the RegistryBook. Populated only when the
+   * view is AGGREGATE.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedDataOrBuilder + getAggregatedDataOrBuilder() { + return aggregatedData_ == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData.getDefaultInstance() + : aggregatedData_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + for (int i = 0; i < claimedScopes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, claimedScopes_.getRaw(i)); + } + if (isDefault_ != false) { + output.writeBool(6, isDefault_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getAggregatedData()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + { + int dataSize = 0; + for (int i = 0; i < claimedScopes_.size(); i++) { + dataSize += computeStringSizeNoTag(claimedScopes_.getRaw(i)); + } + size += dataSize; + size += 1 * getClaimedScopesList().size(); + } + if (isDefault_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, isDefault_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAggregatedData()); + } + 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.numberregistry.v1alpha.RegistryBook)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.RegistryBook other = + (com.google.cloud.numberregistry.v1alpha.RegistryBook) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getClaimedScopesList().equals(other.getClaimedScopesList())) return false; + if (getIsDefault() != other.getIsDefault()) return false; + if (hasAggregatedData() != other.hasAggregatedData()) return false; + if (hasAggregatedData()) { + if (!getAggregatedData().equals(other.getAggregatedData())) 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(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (getClaimedScopesCount() > 0) { + hash = (37 * hash) + CLAIMED_SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getClaimedScopesList().hashCode(); + } + hash = (37 * hash) + IS_DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDefault()); + if (hasAggregatedData()) { + hash = (37 * hash) + AGGREGATED_DATA_FIELD_NUMBER; + hash = (53 * hash) + getAggregatedData().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook 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.numberregistry.v1alpha.RegistryBook parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook 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.numberregistry.v1alpha.RegistryBook parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.RegistryBook 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A RegistryBook organizes and manages IP address space.
+   * It claims specific scopes (such as projects) and groups related Realms and
+   * Ranges.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.RegistryBook} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.RegistryBook) + com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.RegistryBook.class, + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.RegistryBook.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetAggregatedDataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + claimedScopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + isDefault_ = false; + aggregatedData_ = null; + if (aggregatedDataBuilder_ != null) { + aggregatedDataBuilder_.dispose(); + aggregatedDataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_RegistryBook_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBook getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBook build() { + com.google.cloud.numberregistry.v1alpha.RegistryBook result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBook buildPartial() { + com.google.cloud.numberregistry.v1alpha.RegistryBook result = + new com.google.cloud.numberregistry.v1alpha.RegistryBook(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.RegistryBook result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + claimedScopes_.makeImmutable(); + result.claimedScopes_ = claimedScopes_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.isDefault_ = isDefault_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.aggregatedData_ = + aggregatedDataBuilder_ == null ? aggregatedData_ : aggregatedDataBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.RegistryBook) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.RegistryBook) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.RegistryBook other) { + if (other == com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.claimedScopes_.isEmpty()) { + if (claimedScopes_.isEmpty()) { + claimedScopes_ = other.claimedScopes_; + bitField0_ |= 0x00000010; + } else { + ensureClaimedScopesIsMutable(); + claimedScopes_.addAll(other.claimedScopes_); + } + onChanged(); + } + if (other.getIsDefault() != false) { + setIsDefault(other.getIsDefault()); + } + if (other.hasAggregatedData()) { + mergeAggregatedData(other.getAggregatedData()); + } + 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: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureClaimedScopesIsMutable(); + claimedScopes_.add(s); + break; + } // case 42 + case 48: + { + isDefault_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + input.readMessage( + internalGetAggregatedDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + 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. Identifier. The resource name of the RegistryBook.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the RegistryBook.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the RegistryBook.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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. Identifier. The resource name of the RegistryBook.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Identifier. The resource name of the RegistryBook.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @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 com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 at which the RegistryBook was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 at which the RegistryBook was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time at which the RegistryBook was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private com.google.protobuf.LazyStringArrayList claimedScopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureClaimedScopesIsMutable() { + if (!claimedScopes_.isModifiable()) { + claimedScopes_ = new com.google.protobuf.LazyStringArrayList(claimedScopes_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
+     * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+     * project scope is supported. Each scope is in the format of
+     * projects/{project}. Each scope can only be claimed once.
+     * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the claimedScopes. + */ + public com.google.protobuf.ProtocolStringList getClaimedScopesList() { + claimedScopes_.makeImmutable(); + return claimedScopes_; + } + + /** + * + * + *
+     * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+     * project scope is supported. Each scope is in the format of
+     * projects/{project}. Each scope can only be claimed once.
+     * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of claimedScopes. + */ + public int getClaimedScopesCount() { + return claimedScopes_.size(); + } + + /** + * + * + *
+     * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+     * project scope is supported. Each scope is in the format of
+     * projects/{project}. Each scope can only be claimed once.
+     * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The claimedScopes at the given index. + */ + public java.lang.String getClaimedScopes(int index) { + return claimedScopes_.get(index); + } + + /** + * + * + *
+     * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+     * project scope is supported. Each scope is in the format of
+     * projects/{project}. Each scope can only be claimed once.
+     * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the claimedScopes at the given index. + */ + public com.google.protobuf.ByteString getClaimedScopesBytes(int index) { + return claimedScopes_.getByteString(index); + } + + /** + * + * + *
+     * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+     * project scope is supported. Each scope is in the format of
+     * projects/{project}. Each scope can only be claimed once.
+     * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The claimedScopes to set. + * @return This builder for chaining. + */ + public Builder setClaimedScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClaimedScopesIsMutable(); + claimedScopes_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+     * project scope is supported. Each scope is in the format of
+     * projects/{project}. Each scope can only be claimed once.
+     * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The claimedScopes to add. + * @return This builder for chaining. + */ + public Builder addClaimedScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClaimedScopesIsMutable(); + claimedScopes_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+     * project scope is supported. Each scope is in the format of
+     * projects/{project}. Each scope can only be claimed once.
+     * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The claimedScopes to add. + * @return This builder for chaining. + */ + public Builder addAllClaimedScopes(java.lang.Iterable values) { + ensureClaimedScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, claimedScopes_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+     * project scope is supported. Each scope is in the format of
+     * projects/{project}. Each scope can only be claimed once.
+     * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearClaimedScopes() { + claimedScopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+     * project scope is supported. Each scope is in the format of
+     * projects/{project}. Each scope can only be claimed once.
+     * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the claimedScopes to add. + * @return This builder for chaining. + */ + public Builder addClaimedScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureClaimedScopesIsMutable(); + claimedScopes_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean isDefault_; + + /** + * + * + *
+     * Output only. Whether the RegistryBook is the default one.
+     * 
+ * + * bool is_default = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + + /** + * + * + *
+     * Output only. Whether the RegistryBook is the default one.
+     * 
+ * + * bool is_default = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The isDefault to set. + * @return This builder for chaining. + */ + public Builder setIsDefault(boolean value) { + + isDefault_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Whether the RegistryBook is the default one.
+     * 
+ * + * bool is_default = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearIsDefault() { + bitField0_ = (bitField0_ & ~0x00000020); + isDefault_ = false; + onChanged(); + return this; + } + + private com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregatedData_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData, + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData.Builder, + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedDataOrBuilder> + aggregatedDataBuilder_; + + /** + * + * + *
+     * Output only. Aggregated data for the RegistryBook. Populated only when the
+     * view is AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the aggregatedData field is set. + */ + public boolean hasAggregatedData() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. Aggregated data for the RegistryBook. Populated only when the
+     * view is AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The aggregatedData. + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData getAggregatedData() { + if (aggregatedDataBuilder_ == null) { + return aggregatedData_ == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData + .getDefaultInstance() + : aggregatedData_; + } else { + return aggregatedDataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Aggregated data for the RegistryBook. Populated only when the
+     * view is AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAggregatedData( + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData value) { + if (aggregatedDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggregatedData_ = value; + } else { + aggregatedDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Aggregated data for the RegistryBook. Populated only when the
+     * view is AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAggregatedData( + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData.Builder + builderForValue) { + if (aggregatedDataBuilder_ == null) { + aggregatedData_ = builderForValue.build(); + } else { + aggregatedDataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Aggregated data for the RegistryBook. Populated only when the
+     * view is AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAggregatedData( + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData value) { + if (aggregatedDataBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && aggregatedData_ != null + && aggregatedData_ + != com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData + .getDefaultInstance()) { + getAggregatedDataBuilder().mergeFrom(value); + } else { + aggregatedData_ = value; + } + } else { + aggregatedDataBuilder_.mergeFrom(value); + } + if (aggregatedData_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Aggregated data for the RegistryBook. Populated only when the
+     * view is AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAggregatedData() { + bitField0_ = (bitField0_ & ~0x00000040); + aggregatedData_ = null; + if (aggregatedDataBuilder_ != null) { + aggregatedDataBuilder_.dispose(); + aggregatedDataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Aggregated data for the RegistryBook. Populated only when the
+     * view is AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData.Builder + getAggregatedDataBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetAggregatedDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Aggregated data for the RegistryBook. Populated only when the
+     * view is AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedDataOrBuilder + getAggregatedDataOrBuilder() { + if (aggregatedDataBuilder_ != null) { + return aggregatedDataBuilder_.getMessageOrBuilder(); + } else { + return aggregatedData_ == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData + .getDefaultInstance() + : aggregatedData_; + } + } + + /** + * + * + *
+     * Output only. Aggregated data for the RegistryBook. Populated only when the
+     * view is AGGREGATE.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData, + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData.Builder, + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedDataOrBuilder> + internalGetAggregatedDataFieldBuilder() { + if (aggregatedDataBuilder_ == null) { + aggregatedDataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData, + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData.Builder, + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedDataOrBuilder>( + getAggregatedData(), getParentForChildren(), isClean()); + aggregatedData_ = null; + } + return aggregatedDataBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.RegistryBook) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.RegistryBook) + private static final com.google.cloud.numberregistry.v1alpha.RegistryBook DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.RegistryBook(); + } + + public static com.google.cloud.numberregistry.v1alpha.RegistryBook getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RegistryBook 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.numberregistry.v1alpha.RegistryBook getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBookName.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBookName.java new file mode 100644 index 000000000000..69d84446374a --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBookName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha; + +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 RegistryBookName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_REGISTRY_BOOK = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/registryBooks/{registry_book}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String registryBook; + + @Deprecated + protected RegistryBookName() { + project = null; + location = null; + registryBook = null; + } + + private RegistryBookName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + registryBook = Preconditions.checkNotNull(builder.getRegistryBook()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRegistryBook() { + return registryBook; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RegistryBookName of(String project, String location, String registryBook) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRegistryBook(registryBook) + .build(); + } + + public static String format(String project, String location, String registryBook) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRegistryBook(registryBook) + .build() + .toString(); + } + + public static RegistryBookName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_REGISTRY_BOOK.validatedMatch( + formattedString, "RegistryBookName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("registry_book")); + } + + 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 (RegistryBookName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_REGISTRY_BOOK.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (registryBook != null) { + fieldMapBuilder.put("registry_book", registryBook); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_REGISTRY_BOOK.instantiate( + "project", project, "location", location, "registry_book", registryBook); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + RegistryBookName that = ((RegistryBookName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.registryBook, that.registryBook); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(registryBook); + return h; + } + + /** Builder for projects/{project}/locations/{location}/registryBooks/{registry_book}. */ + public static class Builder { + private String project; + private String location; + private String registryBook; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRegistryBook() { + return registryBook; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRegistryBook(String registryBook) { + this.registryBook = registryBook; + return this; + } + + private Builder(RegistryBookName registryBookName) { + this.project = registryBookName.project; + this.location = registryBookName.location; + this.registryBook = registryBookName.registryBook; + } + + public RegistryBookName build() { + return new RegistryBookName(this); + } + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBookOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBookOrBuilder.java new file mode 100644 index 000000000000..a0c34f360cf6 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBookOrBuilder.java @@ -0,0 +1,323 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface RegistryBookOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.RegistryBook) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Identifier. The resource name of the RegistryBook.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Identifier. The resource name of the RegistryBook.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time at which the RegistryBook was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time at which the RegistryBook was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time at which the RegistryBook was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which the RegistryBook was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time at which the RegistryBook was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time at which the RegistryBook was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+   * project scope is supported. Each scope is in the format of
+   * projects/{project}. Each scope can only be claimed once.
+   * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the claimedScopes. + */ + java.util.List getClaimedScopesList(); + + /** + * + * + *
+   * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+   * project scope is supported. Each scope is in the format of
+   * projects/{project}. Each scope can only be claimed once.
+   * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of claimedScopes. + */ + int getClaimedScopesCount(); + + /** + * + * + *
+   * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+   * project scope is supported. Each scope is in the format of
+   * projects/{project}. Each scope can only be claimed once.
+   * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The claimedScopes at the given index. + */ + java.lang.String getClaimedScopes(int index); + + /** + * + * + *
+   * Optional. List of scopes claimed by the RegistryBook. In Preview, Only
+   * project scope is supported. Each scope is in the format of
+   * projects/{project}. Each scope can only be claimed once.
+   * 
+ * + * repeated string claimed_scopes = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the claimedScopes at the given index. + */ + com.google.protobuf.ByteString getClaimedScopesBytes(int index); + + /** + * + * + *
+   * Output only. Whether the RegistryBook is the default one.
+   * 
+ * + * bool is_default = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + boolean getIsDefault(); + + /** + * + * + *
+   * Output only. Aggregated data for the RegistryBook. Populated only when the
+   * view is AGGREGATE.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the aggregatedData field is set. + */ + boolean hasAggregatedData(); + + /** + * + * + *
+   * Output only. Aggregated data for the RegistryBook. Populated only when the
+   * view is AGGREGATE.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The aggregatedData. + */ + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData getAggregatedData(); + + /** + * + * + *
+   * Output only. Aggregated data for the RegistryBook. Populated only when the
+   * view is AGGREGATE.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedData aggregated_data = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.numberregistry.v1alpha.RegistryBook.AggregatedDataOrBuilder + getAggregatedDataOrBuilder(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBookView.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBookView.java new file mode 100644 index 000000000000..7cad82b87b95 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/RegistryBookView.java @@ -0,0 +1,214 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Enum for the view of the RegistryBook.
+ * 
+ * + * Protobuf enum {@code google.cloud.numberregistry.v1alpha.RegistryBookView} + */ +@com.google.protobuf.Generated +public enum RegistryBookView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified view. Defaults to BASIC.
+   * 
+ * + * REGISTRY_BOOK_VIEW_UNSPECIFIED = 0; + */ + REGISTRY_BOOK_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * Basic view.
+   * 
+ * + * BASIC = 1; + */ + BASIC(1), + /** + * + * + *
+   * Full view. Includes the same data as the BASIC view.
+   * 
+ * + * FULL = 2; + */ + FULL(2), + /** + * + * + *
+   * Aggregate includes data about the child resources of the RegistryBook.
+   * 
+ * + * AGGREGATE = 3; + */ + AGGREGATE(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RegistryBookView"); + } + + /** + * + * + *
+   * Unspecified view. Defaults to BASIC.
+   * 
+ * + * REGISTRY_BOOK_VIEW_UNSPECIFIED = 0; + */ + public static final int REGISTRY_BOOK_VIEW_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Basic view.
+   * 
+ * + * BASIC = 1; + */ + public static final int BASIC_VALUE = 1; + + /** + * + * + *
+   * Full view. Includes the same data as the BASIC view.
+   * 
+ * + * FULL = 2; + */ + public static final int FULL_VALUE = 2; + + /** + * + * + *
+   * Aggregate includes data about the child resources of the RegistryBook.
+   * 
+ * + * AGGREGATE = 3; + */ + public static final int AGGREGATE_VALUE = 3; + + 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 RegistryBookView 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 RegistryBookView forNumber(int value) { + switch (value) { + case 0: + return REGISTRY_BOOK_VIEW_UNSPECIFIED; + case 1: + return BASIC; + case 2: + return FULL; + case 3: + return AGGREGATE; + 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 RegistryBookView findValueByNumber(int number) { + return RegistryBookView.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto.getDescriptor().getEnumTypes().get(1); + } + + private static final RegistryBookView[] VALUES = values(); + + public static RegistryBookView 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 RegistryBookView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.numberregistry.v1alpha.RegistryBookView) +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesRequest.java new file mode 100644 index 000000000000..66aa048f2621 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesRequest.java @@ -0,0 +1,2209 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.SearchIpResources][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.SearchIpResources]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest} + */ +@com.google.protobuf.Generated +public final class SearchIpResourcesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest) + SearchIpResourcesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchIpResourcesRequest"); + } + + // Use SearchIpResourcesRequest.newBuilder() to construct. + private SearchIpResourcesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchIpResourcesRequest() { + name_ = ""; + query_ = ""; + orderBy_ = ""; + pageToken_ = ""; + searchResourceTypes_ = emptyIntList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.class, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.Builder.class); + } + + /** + * + * + *
+   * The type of resources to search for.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType} + */ + public enum SearchResourceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified search type.
+     * 
+ * + * SEARCH_RESOURCE_TYPE_UNSPECIFIED = 0; + */ + SEARCH_RESOURCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Search for Ranges.
+     * 
+ * + * RANGES = 1; + */ + RANGES(1), + /** + * + * + *
+     * Search for Realms.
+     * 
+ * + * REALMS = 2; + */ + REALMS(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchResourceType"); + } + + /** + * + * + *
+     * Unspecified search type.
+     * 
+ * + * SEARCH_RESOURCE_TYPE_UNSPECIFIED = 0; + */ + public static final int SEARCH_RESOURCE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Search for Ranges.
+     * 
+ * + * RANGES = 1; + */ + public static final int RANGES_VALUE = 1; + + /** + * + * + *
+     * Search for Realms.
+     * 
+ * + * REALMS = 2; + */ + public static final int REALMS_VALUE = 2; + + 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 SearchResourceType 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 SearchResourceType forNumber(int value) { + switch (value) { + case 0: + return SEARCH_RESOURCE_TYPE_UNSPECIFIED; + case 1: + return RANGES; + case 2: + return REALMS; + 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 SearchResourceType findValueByNumber(int number) { + return SearchResourceType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SearchResourceType[] VALUES = values(); + + public static SearchResourceType 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 SearchResourceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the RegistryBook to search in.
+   * 
+ * + * + * 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 RegistryBook to search in.
+   * 
+ * + * + * 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 QUERY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + + /** + * + * + *
+   * Optional. Search query. This string filters resources in an AIP-160-like
+   * format. It has some limitations. You can only specify top level
+   * conjunctions or attribute level negations. Each restriction can only be
+   * used once except the attribute restriction.
+   *
+   * The available restrictions for Ranges are:
+   * - `realm`: The Realm name to search in.
+   * - `ip_address`: The IP address to search for within Ranges.
+   * - `ip_version`: The IP version to filter by (e.g., "IPV4", "IPV6").
+   * - `parent_range`: The parent Range of the Range to search for.
+   * - `attribute_text`: The attribute text to search for within Ranges.
+   * - `attribute`: The attribute key and value to filter by.
+   *
+   * The available restrictions for Realms are:
+   * - `ip_version`: The IP version to search for.
+   *
+   * Only one of attribute_text or multiple attribute filters can be specified.
+   * Examples:
+   * - `realm=test-realm`
+   * - `realm=test-realm AND ip_address=10.0.0.0`
+   * - `realm=test-realm AND ip_version=IPV6`
+   * - `realm=test-realm AND attribute_text=test`
+   * - `ip_address=10.0.0.0 AND attribute:(key1=value1) AND
+   * attribute:(key2=value2)`
+   * - `attribute_text=test AND
+   * parent_range=projects/123/locations/global/discoveredRanges/test-parent-range`
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + 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(); + query_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Search query. This string filters resources in an AIP-160-like
+   * format. It has some limitations. You can only specify top level
+   * conjunctions or attribute level negations. Each restriction can only be
+   * used once except the attribute restriction.
+   *
+   * The available restrictions for Ranges are:
+   * - `realm`: The Realm name to search in.
+   * - `ip_address`: The IP address to search for within Ranges.
+   * - `ip_version`: The IP version to filter by (e.g., "IPV4", "IPV6").
+   * - `parent_range`: The parent Range of the Range to search for.
+   * - `attribute_text`: The attribute text to search for within Ranges.
+   * - `attribute`: The attribute key and value to filter by.
+   *
+   * The available restrictions for Realms are:
+   * - `ip_version`: The IP version to search for.
+   *
+   * Only one of attribute_text or multiple attribute filters can be specified.
+   * Examples:
+   * - `realm=test-realm`
+   * - `realm=test-realm AND ip_address=10.0.0.0`
+   * - `realm=test-realm AND ip_version=IPV6`
+   * - `realm=test-realm AND attribute_text=test`
+   * - `ip_address=10.0.0.0 AND attribute:(key1=value1) AND
+   * attribute:(key2=value2)`
+   * - `attribute_text=test AND
+   * parent_range=projects/123/locations/global/discoveredRanges/test-parent-range`
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 5 [(.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 token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 5 [(.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 SHOW_UTILIZATION_FIELD_NUMBER = 6; + private boolean showUtilization_ = false; + + /** + * + * + *
+   * Optional. Whether to show the utilization of the Ranges in the response.
+   * 
+ * + * bool show_utilization = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showUtilization. + */ + @java.lang.Override + public boolean getShowUtilization() { + return showUtilization_; + } + + public static final int SEARCH_RESOURCE_TYPES_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList searchResourceTypes_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType> + searchResourceTypes_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest + .SearchResourceType>() { + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest + .SearchResourceType + convert(int from) { + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType + result = + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest + .SearchResourceType.forNumber(from); + return result == null + ? com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest + .SearchResourceType.UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
+   * Optional. The type of resources to search for. If not specified, the server
+   * will return Ranges.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the searchResourceTypes. + */ + @java.lang.Override + public java.util.List< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType> + getSearchResourceTypesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType>( + searchResourceTypes_, searchResourceTypes_converter_); + } + + /** + * + * + *
+   * Optional. The type of resources to search for. If not specified, the server
+   * will return Ranges.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of searchResourceTypes. + */ + @java.lang.Override + public int getSearchResourceTypesCount() { + return searchResourceTypes_.size(); + } + + /** + * + * + *
+   * Optional. The type of resources to search for. If not specified, the server
+   * will return Ranges.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The searchResourceTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType + getSearchResourceTypes(int index) { + return searchResourceTypes_converter_.convert(searchResourceTypes_.getInt(index)); + } + + /** + * + * + *
+   * Optional. The type of resources to search for. If not specified, the server
+   * will return Ranges.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for searchResourceTypes. + */ + @java.lang.Override + public java.util.List getSearchResourceTypesValueList() { + return searchResourceTypes_; + } + + /** + * + * + *
+   * Optional. The type of resources to search for. If not specified, the server
+   * will return Ranges.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of searchResourceTypes at the given index. + */ + @java.lang.Override + public int getSearchResourceTypesValue(int index) { + return searchResourceTypes_.getInt(index); + } + + private int searchResourceTypesMemoizedSerializedSize; + + 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 { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, query_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, orderBy_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, pageToken_); + } + if (showUtilization_ != false) { + output.writeBool(6, showUtilization_); + } + if (getSearchResourceTypesList().size() > 0) { + output.writeUInt32NoTag(58); + output.writeUInt32NoTag(searchResourceTypesMemoizedSerializedSize); + } + for (int i = 0; i < searchResourceTypes_.size(); i++) { + output.writeEnumNoTag(searchResourceTypes_.getInt(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, query_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, orderBy_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, pageToken_); + } + if (showUtilization_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, showUtilization_); + } + { + int dataSize = 0; + for (int i = 0; i < searchResourceTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + searchResourceTypes_.getInt(i)); + } + size += dataSize; + if (!getSearchResourceTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + searchResourceTypesMemoizedSerializedSize = dataSize; + } + 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.numberregistry.v1alpha.SearchIpResourcesRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest other = + (com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getShowUtilization() != other.getShowUtilization()) return false; + if (!searchResourceTypes_.equals(other.searchResourceTypes_)) 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) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().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) + SHOW_UTILIZATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShowUtilization()); + if (getSearchResourceTypesCount() > 0) { + hash = (37 * hash) + SEARCH_RESOURCE_TYPES_FIELD_NUMBER; + hash = (53 * hash) + searchResourceTypes_.hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest 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.numberregistry.v1alpha.SearchIpResourcesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest 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.numberregistry.v1alpha.SearchIpResourcesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.SearchIpResourcesRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.SearchIpResources][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.SearchIpResources]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest) + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.class, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + query_ = ""; + orderBy_ = ""; + pageSize_ = 0; + pageToken_ = ""; + showUtilization_ = false; + searchResourceTypes_ = emptyIntList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest build() { + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest result = + new com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.query_ = query_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.showUtilization_ = showUtilization_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + searchResourceTypes_.makeImmutable(); + result.searchResourceTypes_ = searchResourceTypes_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getShowUtilization() != false) { + setShowUtilization(other.getShowUtilization()); + } + if (!other.searchResourceTypes_.isEmpty()) { + if (searchResourceTypes_.isEmpty()) { + searchResourceTypes_ = other.searchResourceTypes_; + searchResourceTypes_.makeImmutable(); + bitField0_ |= 0x00000040; + } else { + ensureSearchResourceTypesIsMutable(); + searchResourceTypes_.addAll(other.searchResourceTypes_); + } + 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 + case 18: + { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + showUtilization_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + int tmpRaw = input.readEnum(); + ensureSearchResourceTypesIsMutable(); + searchResourceTypes_.addInt(tmpRaw); + break; + } // case 56 + case 58: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureSearchResourceTypesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + searchResourceTypes_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 58 + 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 RegistryBook to search in.
+     * 
+ * + * + * 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 RegistryBook to search in.
+     * 
+ * + * + * 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 RegistryBook to search in.
+     * 
+ * + * + * 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 RegistryBook to search in.
+     * 
+ * + * + * 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 RegistryBook to search in.
+     * 
+ * + * + * 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 java.lang.Object query_ = ""; + + /** + * + * + *
+     * Optional. Search query. This string filters resources in an AIP-160-like
+     * format. It has some limitations. You can only specify top level
+     * conjunctions or attribute level negations. Each restriction can only be
+     * used once except the attribute restriction.
+     *
+     * The available restrictions for Ranges are:
+     * - `realm`: The Realm name to search in.
+     * - `ip_address`: The IP address to search for within Ranges.
+     * - `ip_version`: The IP version to filter by (e.g., "IPV4", "IPV6").
+     * - `parent_range`: The parent Range of the Range to search for.
+     * - `attribute_text`: The attribute text to search for within Ranges.
+     * - `attribute`: The attribute key and value to filter by.
+     *
+     * The available restrictions for Realms are:
+     * - `ip_version`: The IP version to search for.
+     *
+     * Only one of attribute_text or multiple attribute filters can be specified.
+     * Examples:
+     * - `realm=test-realm`
+     * - `realm=test-realm AND ip_address=10.0.0.0`
+     * - `realm=test-realm AND ip_version=IPV6`
+     * - `realm=test-realm AND attribute_text=test`
+     * - `ip_address=10.0.0.0 AND attribute:(key1=value1) AND
+     * attribute:(key2=value2)`
+     * - `attribute_text=test AND
+     * parent_range=projects/123/locations/global/discoveredRanges/test-parent-range`
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Search query. This string filters resources in an AIP-160-like
+     * format. It has some limitations. You can only specify top level
+     * conjunctions or attribute level negations. Each restriction can only be
+     * used once except the attribute restriction.
+     *
+     * The available restrictions for Ranges are:
+     * - `realm`: The Realm name to search in.
+     * - `ip_address`: The IP address to search for within Ranges.
+     * - `ip_version`: The IP version to filter by (e.g., "IPV4", "IPV6").
+     * - `parent_range`: The parent Range of the Range to search for.
+     * - `attribute_text`: The attribute text to search for within Ranges.
+     * - `attribute`: The attribute key and value to filter by.
+     *
+     * The available restrictions for Realms are:
+     * - `ip_version`: The IP version to search for.
+     *
+     * Only one of attribute_text or multiple attribute filters can be specified.
+     * Examples:
+     * - `realm=test-realm`
+     * - `realm=test-realm AND ip_address=10.0.0.0`
+     * - `realm=test-realm AND ip_version=IPV6`
+     * - `realm=test-realm AND attribute_text=test`
+     * - `ip_address=10.0.0.0 AND attribute:(key1=value1) AND
+     * attribute:(key2=value2)`
+     * - `attribute_text=test AND
+     * parent_range=projects/123/locations/global/discoveredRanges/test-parent-range`
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Search query. This string filters resources in an AIP-160-like
+     * format. It has some limitations. You can only specify top level
+     * conjunctions or attribute level negations. Each restriction can only be
+     * used once except the attribute restriction.
+     *
+     * The available restrictions for Ranges are:
+     * - `realm`: The Realm name to search in.
+     * - `ip_address`: The IP address to search for within Ranges.
+     * - `ip_version`: The IP version to filter by (e.g., "IPV4", "IPV6").
+     * - `parent_range`: The parent Range of the Range to search for.
+     * - `attribute_text`: The attribute text to search for within Ranges.
+     * - `attribute`: The attribute key and value to filter by.
+     *
+     * The available restrictions for Realms are:
+     * - `ip_version`: The IP version to search for.
+     *
+     * Only one of attribute_text or multiple attribute filters can be specified.
+     * Examples:
+     * - `realm=test-realm`
+     * - `realm=test-realm AND ip_address=10.0.0.0`
+     * - `realm=test-realm AND ip_version=IPV6`
+     * - `realm=test-realm AND attribute_text=test`
+     * - `ip_address=10.0.0.0 AND attribute:(key1=value1) AND
+     * attribute:(key2=value2)`
+     * - `attribute_text=test AND
+     * parent_range=projects/123/locations/global/discoveredRanges/test-parent-range`
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Search query. This string filters resources in an AIP-160-like
+     * format. It has some limitations. You can only specify top level
+     * conjunctions or attribute level negations. Each restriction can only be
+     * used once except the attribute restriction.
+     *
+     * The available restrictions for Ranges are:
+     * - `realm`: The Realm name to search in.
+     * - `ip_address`: The IP address to search for within Ranges.
+     * - `ip_version`: The IP version to filter by (e.g., "IPV4", "IPV6").
+     * - `parent_range`: The parent Range of the Range to search for.
+     * - `attribute_text`: The attribute text to search for within Ranges.
+     * - `attribute`: The attribute key and value to filter by.
+     *
+     * The available restrictions for Realms are:
+     * - `ip_version`: The IP version to search for.
+     *
+     * Only one of attribute_text or multiple attribute filters can be specified.
+     * Examples:
+     * - `realm=test-realm`
+     * - `realm=test-realm AND ip_address=10.0.0.0`
+     * - `realm=test-realm AND ip_version=IPV6`
+     * - `realm=test-realm AND attribute_text=test`
+     * - `ip_address=10.0.0.0 AND attribute:(key1=value1) AND
+     * attribute:(key2=value2)`
+     * - `attribute_text=test AND
+     * parent_range=projects/123/locations/global/discoveredRanges/test-parent-range`
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Search query. This string filters resources in an AIP-160-like
+     * format. It has some limitations. You can only specify top level
+     * conjunctions or attribute level negations. Each restriction can only be
+     * used once except the attribute restriction.
+     *
+     * The available restrictions for Ranges are:
+     * - `realm`: The Realm name to search in.
+     * - `ip_address`: The IP address to search for within Ranges.
+     * - `ip_version`: The IP version to filter by (e.g., "IPV4", "IPV6").
+     * - `parent_range`: The parent Range of the Range to search for.
+     * - `attribute_text`: The attribute text to search for within Ranges.
+     * - `attribute`: The attribute key and value to filter by.
+     *
+     * The available restrictions for Realms are:
+     * - `ip_version`: The IP version to search for.
+     *
+     * Only one of attribute_text or multiple attribute filters can be specified.
+     * Examples:
+     * - `realm=test-realm`
+     * - `realm=test-realm AND ip_address=10.0.0.0`
+     * - `realm=test-realm AND ip_version=IPV6`
+     * - `realm=test-realm AND attribute_text=test`
+     * - `ip_address=10.0.0.0 AND attribute:(key1=value1) AND
+     * attribute:(key2=value2)`
+     * - `attribute_text=test AND
+     * parent_range=projects/123/locations/global/discoveredRanges/test-parent-range`
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000008); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 5 [(.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 token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 5 [(.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 token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 5 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 5 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean showUtilization_; + + /** + * + * + *
+     * Optional. Whether to show the utilization of the Ranges in the response.
+     * 
+ * + * bool show_utilization = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showUtilization. + */ + @java.lang.Override + public boolean getShowUtilization() { + return showUtilization_; + } + + /** + * + * + *
+     * Optional. Whether to show the utilization of the Ranges in the response.
+     * 
+ * + * bool show_utilization = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The showUtilization to set. + * @return This builder for chaining. + */ + public Builder setShowUtilization(boolean value) { + + showUtilization_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether to show the utilization of the Ranges in the response.
+     * 
+ * + * bool show_utilization = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearShowUtilization() { + bitField0_ = (bitField0_ & ~0x00000020); + showUtilization_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList searchResourceTypes_ = emptyIntList(); + + private void ensureSearchResourceTypesIsMutable() { + if (!searchResourceTypes_.isModifiable()) { + searchResourceTypes_ = makeMutableCopy(searchResourceTypes_); + } + bitField0_ |= 0x00000040; + } + + /** + * + * + *
+     * Optional. The type of resources to search for. If not specified, the server
+     * will return Ranges.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the searchResourceTypes. + */ + public java.util.List< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType> + getSearchResourceTypesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType>( + searchResourceTypes_, searchResourceTypes_converter_); + } + + /** + * + * + *
+     * Optional. The type of resources to search for. If not specified, the server
+     * will return Ranges.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of searchResourceTypes. + */ + public int getSearchResourceTypesCount() { + return searchResourceTypes_.size(); + } + + /** + * + * + *
+     * Optional. The type of resources to search for. If not specified, the server
+     * will return Ranges.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The searchResourceTypes at the given index. + */ + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType + getSearchResourceTypes(int index) { + return searchResourceTypes_converter_.convert(searchResourceTypes_.getInt(index)); + } + + /** + * + * + *
+     * Optional. The type of resources to search for. If not specified, the server
+     * will return Ranges.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The searchResourceTypes to set. + * @return This builder for chaining. + */ + public Builder setSearchResourceTypes( + int index, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchResourceTypesIsMutable(); + searchResourceTypes_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of resources to search for. If not specified, the server
+     * will return Ranges.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The searchResourceTypes to add. + * @return This builder for chaining. + */ + public Builder addSearchResourceTypes( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchResourceTypesIsMutable(); + searchResourceTypes_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of resources to search for. If not specified, the server
+     * will return Ranges.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The searchResourceTypes to add. + * @return This builder for chaining. + */ + public Builder addAllSearchResourceTypes( + java.lang.Iterable< + ? extends + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest + .SearchResourceType> + values) { + ensureSearchResourceTypesIsMutable(); + for (com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType + value : values) { + searchResourceTypes_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of resources to search for. If not specified, the server
+     * will return Ranges.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSearchResourceTypes() { + searchResourceTypes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of resources to search for. If not specified, the server
+     * will return Ranges.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for searchResourceTypes. + */ + public java.util.List getSearchResourceTypesValueList() { + searchResourceTypes_.makeImmutable(); + return searchResourceTypes_; + } + + /** + * + * + *
+     * Optional. The type of resources to search for. If not specified, the server
+     * will return Ranges.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of searchResourceTypes at the given index. + */ + public int getSearchResourceTypesValue(int index) { + return searchResourceTypes_.getInt(index); + } + + /** + * + * + *
+     * Optional. The type of resources to search for. If not specified, the server
+     * will return Ranges.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for searchResourceTypes to set. + * @return This builder for chaining. + */ + public Builder setSearchResourceTypesValue(int index, int value) { + ensureSearchResourceTypesIsMutable(); + searchResourceTypes_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of resources to search for. If not specified, the server
+     * will return Ranges.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for searchResourceTypes to add. + * @return This builder for chaining. + */ + public Builder addSearchResourceTypesValue(int value) { + ensureSearchResourceTypesIsMutable(); + searchResourceTypes_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of resources to search for. If not specified, the server
+     * will return Ranges.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for searchResourceTypes to add. + * @return This builder for chaining. + */ + public Builder addAllSearchResourceTypesValue(java.lang.Iterable values) { + ensureSearchResourceTypesIsMutable(); + for (int value : values) { + searchResourceTypes_.addInt(value); + } + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest) + private static final com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchIpResourcesRequest 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.numberregistry.v1alpha.SearchIpResourcesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesRequestOrBuilder.java new file mode 100644 index 000000000000..8c5cb82d18d7 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesRequestOrBuilder.java @@ -0,0 +1,298 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface SearchIpResourcesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the RegistryBook to search in.
+   * 
+ * + * + * 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 RegistryBook to search in.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Search query. This string filters resources in an AIP-160-like
+   * format. It has some limitations. You can only specify top level
+   * conjunctions or attribute level negations. Each restriction can only be
+   * used once except the attribute restriction.
+   *
+   * The available restrictions for Ranges are:
+   * - `realm`: The Realm name to search in.
+   * - `ip_address`: The IP address to search for within Ranges.
+   * - `ip_version`: The IP version to filter by (e.g., "IPV4", "IPV6").
+   * - `parent_range`: The parent Range of the Range to search for.
+   * - `attribute_text`: The attribute text to search for within Ranges.
+   * - `attribute`: The attribute key and value to filter by.
+   *
+   * The available restrictions for Realms are:
+   * - `ip_version`: The IP version to search for.
+   *
+   * Only one of attribute_text or multiple attribute filters can be specified.
+   * Examples:
+   * - `realm=test-realm`
+   * - `realm=test-realm AND ip_address=10.0.0.0`
+   * - `realm=test-realm AND ip_version=IPV6`
+   * - `realm=test-realm AND attribute_text=test`
+   * - `ip_address=10.0.0.0 AND attribute:(key1=value1) AND
+   * attribute:(key2=value2)`
+   * - `attribute_text=test AND
+   * parent_range=projects/123/locations/global/discoveredRanges/test-parent-range`
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The query. + */ + java.lang.String getQuery(); + + /** + * + * + *
+   * Optional. Search query. This string filters resources in an AIP-160-like
+   * format. It has some limitations. You can only specify top level
+   * conjunctions or attribute level negations. Each restriction can only be
+   * used once except the attribute restriction.
+   *
+   * The available restrictions for Ranges are:
+   * - `realm`: The Realm name to search in.
+   * - `ip_address`: The IP address to search for within Ranges.
+   * - `ip_version`: The IP version to filter by (e.g., "IPV4", "IPV6").
+   * - `parent_range`: The parent Range of the Range to search for.
+   * - `attribute_text`: The attribute text to search for within Ranges.
+   * - `attribute`: The attribute key and value to filter by.
+   *
+   * The available restrictions for Realms are:
+   * - `ip_version`: The IP version to search for.
+   *
+   * Only one of attribute_text or multiple attribute filters can be specified.
+   * Examples:
+   * - `realm=test-realm`
+   * - `realm=test-realm AND ip_address=10.0.0.0`
+   * - `realm=test-realm AND ip_version=IPV6`
+   * - `realm=test-realm AND attribute_text=test`
+   * - `ip_address=10.0.0.0 AND attribute:(key1=value1) AND
+   * attribute:(key2=value2)`
+   * - `attribute_text=test AND
+   * parent_range=projects/123/locations/global/discoveredRanges/test-parent-range`
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Whether to show the utilization of the Ranges in the response.
+   * 
+ * + * bool show_utilization = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The showUtilization. + */ + boolean getShowUtilization(); + + /** + * + * + *
+   * Optional. The type of resources to search for. If not specified, the server
+   * will return Ranges.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the searchResourceTypes. + */ + java.util.List< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType> + getSearchResourceTypesList(); + + /** + * + * + *
+   * Optional. The type of resources to search for. If not specified, the server
+   * will return Ranges.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of searchResourceTypes. + */ + int getSearchResourceTypesCount(); + + /** + * + * + *
+   * Optional. The type of resources to search for. If not specified, the server
+   * will return Ranges.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The searchResourceTypes at the given index. + */ + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType + getSearchResourceTypes(int index); + + /** + * + * + *
+   * Optional. The type of resources to search for. If not specified, the server
+   * will return Ranges.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for searchResourceTypes. + */ + java.util.List getSearchResourceTypesValueList(); + + /** + * + * + *
+   * Optional. The type of resources to search for. If not specified, the server
+   * will return Ranges.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest.SearchResourceType search_resource_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of searchResourceTypes at the given index. + */ + int getSearchResourceTypesValue(int index); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesResponse.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesResponse.java new file mode 100644 index 000000000000..885d6c4cc8e8 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesResponse.java @@ -0,0 +1,3340 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Response message for the
+ * [CloudNumberRegistry.SearchIpResources][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.SearchIpResources]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse} + */ +@com.google.protobuf.Generated +public final class SearchIpResourcesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse) + SearchIpResourcesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchIpResourcesResponse"); + } + + // Use SearchIpResourcesResponse.newBuilder() to construct. + private SearchIpResourcesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchIpResourcesResponse() { + ranges_ = java.util.Collections.emptyList(); + results_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.class, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.Builder.class); + } + + public interface SearchIpResourcesResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A Range matching the search query.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + * + * @return Whether the range field is set. + */ + boolean hasRange(); + + /** + * + * + *
+     * A Range matching the search query.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + * + * @return The range. + */ + com.google.cloud.numberregistry.v1alpha.Range getRange(); + + /** + * + * + *
+     * A Range matching the search query.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + */ + com.google.cloud.numberregistry.v1alpha.RangeOrBuilder getRangeOrBuilder(); + + /** + * + * + *
+     * A Realm matching the search query.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + * + * @return Whether the realm field is set. + */ + boolean hasRealm(); + + /** + * + * + *
+     * A Realm matching the search query.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + * + * @return The realm. + */ + com.google.cloud.numberregistry.v1alpha.Realm getRealm(); + + /** + * + * + *
+     * A Realm matching the search query.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + */ + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder getRealmOrBuilder(); + + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + .ResultCase + getResultCase(); + } + + /** + * + * + *
+   * A result matching the search query, which can be either a Range or a Realm.
+   * 
+ * + * Protobuf type {@code + * google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult} + */ + public static final class SearchIpResourcesResult extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult) + SearchIpResourcesResultOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchIpResourcesResult"); + } + + // Use SearchIpResourcesResult.newBuilder() to construct. + private SearchIpResourcesResult(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchIpResourcesResult() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_SearchIpResourcesResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_SearchIpResourcesResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult.class, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult.Builder.class); + } + + private int resultCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object result_; + + public enum ResultCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RANGE(1), + REALM(2), + RESULT_NOT_SET(0); + private final int value; + + private ResultCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 1: + return RANGE; + case 2: + return REALM; + case 0: + return RESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public static final int RANGE_FIELD_NUMBER = 1; + + /** + * + * + *
+     * A Range matching the search query.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + * + * @return Whether the range field is set. + */ + @java.lang.Override + public boolean hasRange() { + return resultCase_ == 1; + } + + /** + * + * + *
+     * A Range matching the search query.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + * + * @return The range. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Range getRange() { + if (resultCase_ == 1) { + return (com.google.cloud.numberregistry.v1alpha.Range) result_; + } + return com.google.cloud.numberregistry.v1alpha.Range.getDefaultInstance(); + } + + /** + * + * + *
+     * A Range matching the search query.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RangeOrBuilder getRangeOrBuilder() { + if (resultCase_ == 1) { + return (com.google.cloud.numberregistry.v1alpha.Range) result_; + } + return com.google.cloud.numberregistry.v1alpha.Range.getDefaultInstance(); + } + + public static final int REALM_FIELD_NUMBER = 2; + + /** + * + * + *
+     * A Realm matching the search query.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + * + * @return Whether the realm field is set. + */ + @java.lang.Override + public boolean hasRealm() { + return resultCase_ == 2; + } + + /** + * + * + *
+     * A Realm matching the search query.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + * + * @return The realm. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm getRealm() { + if (resultCase_ == 2) { + return (com.google.cloud.numberregistry.v1alpha.Realm) result_; + } + return com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance(); + } + + /** + * + * + *
+     * A Realm matching the search query.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RealmOrBuilder getRealmOrBuilder() { + if (resultCase_ == 2) { + return (com.google.cloud.numberregistry.v1alpha.Realm) result_; + } + return com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance(); + } + + 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 (resultCase_ == 1) { + output.writeMessage(1, (com.google.cloud.numberregistry.v1alpha.Range) result_); + } + if (resultCase_ == 2) { + output.writeMessage(2, (com.google.cloud.numberregistry.v1alpha.Realm) result_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resultCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.numberregistry.v1alpha.Range) result_); + } + if (resultCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.numberregistry.v1alpha.Realm) result_); + } + 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.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + other = + (com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult) + obj; + + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 1: + if (!getRange().equals(other.getRange())) return false; + break; + case 2: + if (!getRealm().equals(other.getRealm())) return false; + break; + case 0: + default: + } + 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(); + switch (resultCase_) { + case 1: + hash = (37 * hash) + RANGE_FIELD_NUMBER; + hash = (53 * hash) + getRange().hashCode(); + break; + case 2: + hash = (37 * hash) + REALM_FIELD_NUMBER; + hash = (53 * hash) + getRealm().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + 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.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + 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.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * A result matching the search query, which can be either a Range or a Realm.
+     * 
+ * + * Protobuf type {@code + * google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult) + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_SearchIpResourcesResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_SearchIpResourcesResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult.class, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rangeBuilder_ != null) { + rangeBuilder_.clear(); + } + if (realmBuilder_ != null) { + realmBuilder_.clear(); + } + resultCase_ = 0; + result_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_SearchIpResourcesResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + build() { + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + buildPartial() { + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + result = + new com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + result) { + result.resultCase_ = resultCase_; + result.result_ = this.result_; + if (resultCase_ == 1 && rangeBuilder_ != null) { + result.result_ = rangeBuilder_.build(); + } + if (resultCase_ == 2 && realmBuilder_ != null) { + result.result_ = realmBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + other) { + if (other + == com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult.getDefaultInstance()) return this; + switch (other.getResultCase()) { + case RANGE: + { + mergeRange(other.getRange()); + break; + } + case REALM: + { + mergeRealm(other.getRealm()); + break; + } + case RESULT_NOT_SET: + { + break; + } + } + 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: + { + input.readMessage(internalGetRangeFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetRealmFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 2; + 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 resultCase_ = 0; + private java.lang.Object result_; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Range, + com.google.cloud.numberregistry.v1alpha.Range.Builder, + com.google.cloud.numberregistry.v1alpha.RangeOrBuilder> + rangeBuilder_; + + /** + * + * + *
+       * A Range matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + * + * @return Whether the range field is set. + */ + @java.lang.Override + public boolean hasRange() { + return resultCase_ == 1; + } + + /** + * + * + *
+       * A Range matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + * + * @return The range. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Range getRange() { + if (rangeBuilder_ == null) { + if (resultCase_ == 1) { + return (com.google.cloud.numberregistry.v1alpha.Range) result_; + } + return com.google.cloud.numberregistry.v1alpha.Range.getDefaultInstance(); + } else { + if (resultCase_ == 1) { + return rangeBuilder_.getMessage(); + } + return com.google.cloud.numberregistry.v1alpha.Range.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A Range matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + */ + public Builder setRange(com.google.cloud.numberregistry.v1alpha.Range value) { + if (rangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + rangeBuilder_.setMessage(value); + } + resultCase_ = 1; + return this; + } + + /** + * + * + *
+       * A Range matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + */ + public Builder setRange( + com.google.cloud.numberregistry.v1alpha.Range.Builder builderForValue) { + if (rangeBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + rangeBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 1; + return this; + } + + /** + * + * + *
+       * A Range matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + */ + public Builder mergeRange(com.google.cloud.numberregistry.v1alpha.Range value) { + if (rangeBuilder_ == null) { + if (resultCase_ == 1 + && result_ != com.google.cloud.numberregistry.v1alpha.Range.getDefaultInstance()) { + result_ = + com.google.cloud.numberregistry.v1alpha.Range.newBuilder( + (com.google.cloud.numberregistry.v1alpha.Range) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 1) { + rangeBuilder_.mergeFrom(value); + } else { + rangeBuilder_.setMessage(value); + } + } + resultCase_ = 1; + return this; + } + + /** + * + * + *
+       * A Range matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + */ + public Builder clearRange() { + if (rangeBuilder_ == null) { + if (resultCase_ == 1) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 1) { + resultCase_ = 0; + result_ = null; + } + rangeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * A Range matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + */ + public com.google.cloud.numberregistry.v1alpha.Range.Builder getRangeBuilder() { + return internalGetRangeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * A Range matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RangeOrBuilder getRangeOrBuilder() { + if ((resultCase_ == 1) && (rangeBuilder_ != null)) { + return rangeBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 1) { + return (com.google.cloud.numberregistry.v1alpha.Range) result_; + } + return com.google.cloud.numberregistry.v1alpha.Range.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A Range matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Range range = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Range, + com.google.cloud.numberregistry.v1alpha.Range.Builder, + com.google.cloud.numberregistry.v1alpha.RangeOrBuilder> + internalGetRangeFieldBuilder() { + if (rangeBuilder_ == null) { + if (!(resultCase_ == 1)) { + result_ = com.google.cloud.numberregistry.v1alpha.Range.getDefaultInstance(); + } + rangeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Range, + com.google.cloud.numberregistry.v1alpha.Range.Builder, + com.google.cloud.numberregistry.v1alpha.RangeOrBuilder>( + (com.google.cloud.numberregistry.v1alpha.Range) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 1; + onChanged(); + return rangeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm, + com.google.cloud.numberregistry.v1alpha.Realm.Builder, + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder> + realmBuilder_; + + /** + * + * + *
+       * A Realm matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + * + * @return Whether the realm field is set. + */ + @java.lang.Override + public boolean hasRealm() { + return resultCase_ == 2; + } + + /** + * + * + *
+       * A Realm matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + * + * @return The realm. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm getRealm() { + if (realmBuilder_ == null) { + if (resultCase_ == 2) { + return (com.google.cloud.numberregistry.v1alpha.Realm) result_; + } + return com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance(); + } else { + if (resultCase_ == 2) { + return realmBuilder_.getMessage(); + } + return com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A Realm matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + */ + public Builder setRealm(com.google.cloud.numberregistry.v1alpha.Realm value) { + if (realmBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + realmBuilder_.setMessage(value); + } + resultCase_ = 2; + return this; + } + + /** + * + * + *
+       * A Realm matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + */ + public Builder setRealm( + com.google.cloud.numberregistry.v1alpha.Realm.Builder builderForValue) { + if (realmBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + realmBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 2; + return this; + } + + /** + * + * + *
+       * A Realm matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + */ + public Builder mergeRealm(com.google.cloud.numberregistry.v1alpha.Realm value) { + if (realmBuilder_ == null) { + if (resultCase_ == 2 + && result_ != com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance()) { + result_ = + com.google.cloud.numberregistry.v1alpha.Realm.newBuilder( + (com.google.cloud.numberregistry.v1alpha.Realm) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 2) { + realmBuilder_.mergeFrom(value); + } else { + realmBuilder_.setMessage(value); + } + } + resultCase_ = 2; + return this; + } + + /** + * + * + *
+       * A Realm matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + */ + public Builder clearRealm() { + if (realmBuilder_ == null) { + if (resultCase_ == 2) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 2) { + resultCase_ = 0; + result_ = null; + } + realmBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * A Realm matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + */ + public com.google.cloud.numberregistry.v1alpha.Realm.Builder getRealmBuilder() { + return internalGetRealmFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * A Realm matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RealmOrBuilder getRealmOrBuilder() { + if ((resultCase_ == 2) && (realmBuilder_ != null)) { + return realmBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 2) { + return (com.google.cloud.numberregistry.v1alpha.Realm) result_; + } + return com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance(); + } + } + + /** + * + * + *
+       * A Realm matching the search query.
+       * 
+ * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm, + com.google.cloud.numberregistry.v1alpha.Realm.Builder, + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder> + internalGetRealmFieldBuilder() { + if (realmBuilder_ == null) { + if (!(resultCase_ == 2)) { + result_ = com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance(); + } + realmBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm, + com.google.cloud.numberregistry.v1alpha.Realm.Builder, + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder>( + (com.google.cloud.numberregistry.v1alpha.Realm) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 2; + onChanged(); + return realmBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult) + private static final com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult(); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchIpResourcesResult 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.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int RANGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List ranges_; + + /** + * + * + *
+   * Deprecated: Use results field instead.
+   * The list of Ranges matching the search query.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.List getRangesList() { + return ranges_; + } + + /** + * + * + *
+   * Deprecated: Use results field instead.
+   * The list of Ranges matching the search query.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.List + getRangesOrBuilderList() { + return ranges_; + } + + /** + * + * + *
+   * Deprecated: Use results field instead.
+   * The list of Ranges matching the search query.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public int getRangesCount() { + return ranges_.size(); + } + + /** + * + * + *
+   * Deprecated: Use results field instead.
+   * The list of Ranges matching the search query.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.numberregistry.v1alpha.Range getRanges(int index) { + return ranges_.get(index); + } + + /** + * + * + *
+   * Deprecated: Use results field instead.
+   * The list of Ranges matching the search query.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.numberregistry.v1alpha.RangeOrBuilder getRangesOrBuilder(int index) { + return ranges_.get(index); + } + + public static final int RESULTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult> + results_; + + /** + * + * + *
+   * The list of results matching the search query.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult> + getResultsList() { + return results_; + } + + /** + * + * + *
+   * The list of results matching the search query.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResultOrBuilder> + getResultsOrBuilderList() { + return results_; + } + + /** + * + * + *
+   * The list of results matching the search query.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + + /** + * + * + *
+   * The list of results matching the search query.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + getResults(int index) { + return results_.get(index); + } + + /** + * + * + *
+   * The list of results matching the search query.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResultOrBuilder + getResultsOrBuilder(int index) { + return results_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + 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 < ranges_.size(); i++) { + output.writeMessage(1, ranges_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, unreachable_.getRaw(i)); + } + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(4, results_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < ranges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, ranges_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, results_.get(i)); + } + 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.numberregistry.v1alpha.SearchIpResourcesResponse)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse other = + (com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse) obj; + + if (!getRangesList().equals(other.getRangesList())) return false; + if (!getResultsList().equals(other.getResultsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getRangesCount() > 0) { + hash = (37 * hash) + RANGES_FIELD_NUMBER; + hash = (53 * hash) + getRangesList().hashCode(); + } + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse 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.numberregistry.v1alpha.SearchIpResourcesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse 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.numberregistry.v1alpha.SearchIpResourcesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.SearchIpResourcesResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for the
+   * [CloudNumberRegistry.SearchIpResources][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.SearchIpResources]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse) + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.class, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rangesBuilder_ == null) { + ranges_ = java.util.Collections.emptyList(); + } else { + ranges_ = null; + rangesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + } else { + results_ = null; + resultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_SearchIpResourcesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse build() { + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse buildPartial() { + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse result = + new com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse result) { + if (rangesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + ranges_ = java.util.Collections.unmodifiableList(ranges_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ranges_ = ranges_; + } else { + result.ranges_ = rangesBuilder_.build(); + } + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse other) { + if (other + == com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.getDefaultInstance()) + return this; + if (rangesBuilder_ == null) { + if (!other.ranges_.isEmpty()) { + if (ranges_.isEmpty()) { + ranges_ = other.ranges_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRangesIsMutable(); + ranges_.addAll(other.ranges_); + } + onChanged(); + } + } else { + if (!other.ranges_.isEmpty()) { + if (rangesBuilder_.isEmpty()) { + rangesBuilder_.dispose(); + rangesBuilder_ = null; + ranges_ = other.ranges_; + bitField0_ = (bitField0_ & ~0x00000001); + rangesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRangesFieldBuilder() + : null; + } else { + rangesBuilder_.addAllMessages(other.ranges_); + } + } + } + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000002); + resultsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetResultsFieldBuilder() + : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000008; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + 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.numberregistry.v1alpha.Range m = + input.readMessage( + com.google.cloud.numberregistry.v1alpha.Range.parser(), extensionRegistry); + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.add(m); + } else { + rangesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + case 34: + { + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult + m = + input.readMessage( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult.parser(), + extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + 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.util.List ranges_ = + java.util.Collections.emptyList(); + + private void ensureRangesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ranges_ = new java.util.ArrayList(ranges_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Range, + com.google.cloud.numberregistry.v1alpha.Range.Builder, + com.google.cloud.numberregistry.v1alpha.RangeOrBuilder> + rangesBuilder_; + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public java.util.List getRangesList() { + if (rangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(ranges_); + } else { + return rangesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public int getRangesCount() { + if (rangesBuilder_ == null) { + return ranges_.size(); + } else { + return rangesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.numberregistry.v1alpha.Range getRanges(int index) { + if (rangesBuilder_ == null) { + return ranges_.get(index); + } else { + return rangesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setRanges(int index, com.google.cloud.numberregistry.v1alpha.Range value) { + if (rangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangesIsMutable(); + ranges_.set(index, value); + onChanged(); + } else { + rangesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setRanges( + int index, com.google.cloud.numberregistry.v1alpha.Range.Builder builderForValue) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.set(index, builderForValue.build()); + onChanged(); + } else { + rangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addRanges(com.google.cloud.numberregistry.v1alpha.Range value) { + if (rangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangesIsMutable(); + ranges_.add(value); + onChanged(); + } else { + rangesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addRanges(int index, com.google.cloud.numberregistry.v1alpha.Range value) { + if (rangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangesIsMutable(); + ranges_.add(index, value); + onChanged(); + } else { + rangesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addRanges( + com.google.cloud.numberregistry.v1alpha.Range.Builder builderForValue) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.add(builderForValue.build()); + onChanged(); + } else { + rangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addRanges( + int index, com.google.cloud.numberregistry.v1alpha.Range.Builder builderForValue) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.add(index, builderForValue.build()); + onChanged(); + } else { + rangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addAllRanges( + java.lang.Iterable values) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ranges_); + onChanged(); + } else { + rangesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearRanges() { + if (rangesBuilder_ == null) { + ranges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rangesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder removeRanges(int index) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.remove(index); + onChanged(); + } else { + rangesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.numberregistry.v1alpha.Range.Builder getRangesBuilder(int index) { + return internalGetRangesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.numberregistry.v1alpha.RangeOrBuilder getRangesOrBuilder(int index) { + if (rangesBuilder_ == null) { + return ranges_.get(index); + } else { + return rangesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public java.util.List + getRangesOrBuilderList() { + if (rangesBuilder_ != null) { + return rangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ranges_); + } + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.numberregistry.v1alpha.Range.Builder addRangesBuilder() { + return internalGetRangesFieldBuilder() + .addBuilder(com.google.cloud.numberregistry.v1alpha.Range.getDefaultInstance()); + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.numberregistry.v1alpha.Range.Builder addRangesBuilder(int index) { + return internalGetRangesFieldBuilder() + .addBuilder(index, com.google.cloud.numberregistry.v1alpha.Range.getDefaultInstance()); + } + + /** + * + * + *
+     * Deprecated: Use results field instead.
+     * The list of Ranges matching the search query.
+     * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public java.util.List + getRangesBuilderList() { + return internalGetRangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Range, + com.google.cloud.numberregistry.v1alpha.Range.Builder, + com.google.cloud.numberregistry.v1alpha.RangeOrBuilder> + internalGetRangesFieldBuilder() { + if (rangesBuilder_ == null) { + rangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Range, + com.google.cloud.numberregistry.v1alpha.Range.Builder, + com.google.cloud.numberregistry.v1alpha.RangeOrBuilder>( + ranges_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + ranges_ = null; + } + return rangesBuilder_; + } + + private java.util.List< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult> + results_ = java.util.Collections.emptyList(); + + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + results_ = + new java.util.ArrayList< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult>(results_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult.Builder, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResultOrBuilder> + resultsBuilder_; + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public java.util.List< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult> + getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public Builder setResults( + int index, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public Builder setResults( + int index, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + .Builder + builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public Builder addResults( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public Builder addResults( + int index, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public Builder addResults( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + .Builder + builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public Builder addResults( + int index, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + .Builder + builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public Builder addAllResults( + java.lang.Iterable< + ? extends + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult> + values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + .Builder + getResultsBuilder(int index) { + return internalGetResultsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResultOrBuilder + getResultsOrBuilder(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResultOrBuilder> + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + .Builder + addResultsBuilder() { + return internalGetResultsFieldBuilder() + .addBuilder( + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + .Builder + addResultsBuilder(int index) { + return internalGetResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of results matching the search query.
+     * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + public java.util.List< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult.Builder> + getResultsBuilderList() { + return internalGetResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult.Builder, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResultOrBuilder> + internalGetResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResult.Builder, + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResultOrBuilder>( + results_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse) + private static final com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse(); + } + + public static com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchIpResourcesResponse 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.numberregistry.v1alpha.SearchIpResourcesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesResponseOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesResponseOrBuilder.java new file mode 100644 index 000000000000..8f2927ecfb5b --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/SearchIpResourcesResponseOrBuilder.java @@ -0,0 +1,252 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface SearchIpResourcesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Deprecated: Use results field instead.
+   * The list of Ranges matching the search query.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + java.util.List getRangesList(); + + /** + * + * + *
+   * Deprecated: Use results field instead.
+   * The list of Ranges matching the search query.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.numberregistry.v1alpha.Range getRanges(int index); + + /** + * + * + *
+   * Deprecated: Use results field instead.
+   * The list of Ranges matching the search query.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + int getRangesCount(); + + /** + * + * + *
+   * Deprecated: Use results field instead.
+   * The list of Ranges matching the search query.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + java.util.List + getRangesOrBuilderList(); + + /** + * + * + *
+   * Deprecated: Use results field instead.
+   * The list of Ranges matching the search query.
+   * 
+ * + * repeated .google.cloud.numberregistry.v1alpha.Range ranges = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.numberregistry.v1alpha.RangeOrBuilder getRangesOrBuilder(int index); + + /** + * + * + *
+   * The list of results matching the search query.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + java.util.List< + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult> + getResultsList(); + + /** + * + * + *
+   * The list of results matching the search query.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult + getResults(int index); + + /** + * + * + *
+   * The list of results matching the search query.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + int getResultsCount(); + + /** + * + * + *
+   * The list of results matching the search query.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse + .SearchIpResourcesResultOrBuilder> + getResultsOrBuilderList(); + + /** + * + * + *
+   * The list of results matching the search query.
+   * 
+ * + * + * repeated .google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResult results = 4; + * + */ + com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse.SearchIpResourcesResultOrBuilder + getResultsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ServiceProto.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ServiceProto.java new file mode 100644 index 000000000000..2ebb21786ae7 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ServiceProto.java @@ -0,0 +1,267 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public final class ServiceProto extends com.google.protobuf.GeneratedFile { + private ServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ServiceProto"); + } + + 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_numberregistry_v1alpha_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_numberregistry_v1alpha_OperationMetadata_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" + + "1google/cloud/numberregistry/v1alpha/service.proto\022#google.cloud.numberregistry" + + ".v1alpha\032\034google/api/annotations.proto\032\027" + + "google/api/client.proto\032\037google/api/fiel" + + "d_behavior.proto\032.google/cloud/numberregistry/v1alpha/core.proto\032#google/longrun" + + "ning/operations.proto\032\033google/protobuf/e" + + "mpty.proto\032\037google/protobuf/timestamp.proto\"\200\002\n" + + "\021OperationMetadata\0224\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\023\n" + + "\006target\030\003 \001(\tB\003\340A\003\022\021\n" + + "\004verb\030\004 \001(\tB\003\340A\003\022\033\n" + + "\016status_message\030\005 \001(\tB\003\340A\003\022#\n" + + "\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n" + + "\013api_version\030\007 \001(\tB\003\340A\0032\3439\n" + + "\023CloudNumberRegistry\022\343\001\n" + + "\023ListIpamAdminScopes\022?.google.cloud.numberregistry.v1alpha.ListIpamAdm" + + "inScopesRequest\032@.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRespons" + + "e\"I\332A\006parent\202\323\344\223\002:\0228/v1alpha/{parent=projects/*/locations/*}/ipamAdminScopes\022\320\001\n" + + "\021GetIpamAdminScope\022=.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeReques" + + "t\0323.google.cloud.numberregistry.v1alpha." + + "IpamAdminScope\"G\332A\004name\202\323\344\223\002:\0228/v1alpha/" + + "{name=projects/*/locations/*/ipamAdminScopes/*}\022\243\002\n" + + " CheckAvailabilityIpamAdminScopes\022L.google.cloud.numberregistry.v1alp" + + "ha.CheckAvailabilityIpamAdminScopesRequest\032M.google.cloud.numberregistry.v1alpha" + + ".CheckAvailabilityIpamAdminScopesResponse\"b\332A\r" + + "parent,scopes\202\323\344\223\002L\022J/v1alpha/{par" + + "ent=projects/*/locations/*}/ipamAdminScopes:checkAvailability\022\240\002\n" + + "\024CreateIpamAdminScope\022@.google.cloud.numberregistry.v1a" + + "lpha.CreateIpamAdminScopeRequest\032\035.google.longrunning.Operation\"\246\001\312A#\n" + + "\016IpamAdminScope\022\021OperationMetadata\332A+parent,ipam_a" + + "dmin_scope,ipam_admin_scope_id\202\323\344\223\002L\"8/v" + + "1alpha/{parent=projects/*/locations/*}/ipamAdminScopes:\020ipam_admin_scope\022\242\002\n" + + "\024UpdateIpamAdminScope\022@.google.cloud.numberr" + + "egistry.v1alpha.UpdateIpamAdminScopeRequ" + + "est\032\035.google.longrunning.Operation\"\250\001\312A#\n" + + "\016IpamAdminScope\022\021OperationMetadata\332A\034ip" + + "am_admin_scope,update_mask\202\323\344\223\002]2I/v1alp" + + "ha/{ipam_admin_scope.name=projects/*/loc" + + "ations/*/ipamAdminScopes/*}:\020ipam_admin_scope\022\355\001\n" + + "\024DeleteIpamAdminScope\022@.google.cloud.numberregistry.v1alpha.DeleteIpamA" + + "dminScopeRequest\032\035.google.longrunning.Operation\"t\312A*\n" + + "\025google.protobuf.Empty\022\021Ope" + + "rationMetadata\332A\004name\202\323\344\223\002:*8/v1alpha/{n" + + "ame=projects/*/locations/*/ipamAdminScopes/*}\022\363\001\n" + + "\025DisableIpamAdminScope\022A.google.cloud.numberregistry.v1alpha.DisableIpa" + + "mAdminScopeRequest\032\035.google.longrunning.Operation\"x\312A#\n" + + "\016IpamAdminScope\022\021Operatio" + + "nMetadata\332A\004name\202\323\344\223\002E\"@/v1alpha/{name=p" + + "rojects/*/locations/*/ipamAdminScopes/*}:disable:\001*\022\363\001\n" + + "\025CleanupIpamAdminScope\022A.google.cloud.numberregistry.v1alpha.Clea" + + "nupIpamAdminScopeRequest\032\035.google.longrunning.Operation\"x\312A#\n" + + "\016IpamAdminScope\022\021Op" + + "erationMetadata\332A\004name\202\323\344\223\002E\"@/v1alpha/{" + + "name=projects/*/locations/*/ipamAdminScopes/*}:cleanup:\001*\022\333\001\n" + + "\021ListRegistryBooks\022=.google.cloud.numberregistry.v1alpha.Li" + + "stRegistryBooksRequest\032>.google.cloud.numberregistry.v1alpha.ListRegistryBooksRe" + + "sponse\"G\332A\006parent\202\323\344\223\0028\0226/v1alpha/{paren" + + "t=projects/*/locations/*}/registryBooks\022\310\001\n" + + "\017GetRegistryBook\022;.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest" + + "\0321.google.cloud.numberregistry.v1alpha.R" + + "egistryBook\"E\332A\004name\202\323\344\223\0028\0226/v1alpha/{na" + + "me=projects/*/locations/*/registryBooks/*}\022\356\001\n" + + "\021SearchIpResources\022=.google.cloud.numberregistry.v1alpha.SearchIpResources" + + "Request\032>.google.cloud.numberregistry.v1" + + "alpha.SearchIpResourcesResponse\"Z\332A\004name" + + "\202\323\344\223\002M\"H/v1alpha/{name=projects/*/locati" + + "ons/*/registryBooks/*}:searchIpResources:\001*\022\217\002\n" + + "\022CreateRegistryBook\022>.google.cloud.numberregistry.v1alpha.CreateRegistryB" + + "ookRequest\032\035.google.longrunning.Operation\"\231\001\312A!\n" + + "\014RegistryBook\022\021OperationMetadata\332A%parent,registry_book,registry_book_id" + + "\202\323\344\223\002G\"6/v1alpha/{parent=projects/*/locations/*}/registryBooks:\r" + + "registry_book\022\221\002\n" + + "\022UpdateRegistryBook\022>.google.cloud.numberregistry.v1alpha.UpdateRegistryBookReq" + + "uest\032\035.google.longrunning.Operation\"\233\001\312A!\n" + + "\014RegistryBook\022\021OperationMetadata\332A\031reg" + + "istry_book,update_mask\202\323\344\223\002U2D/v1alpha/{" + + "registry_book.name=projects/*/locations/*/registryBooks/*}:\r" + + "registry_book\022\347\001\n" + + "\022DeleteRegistryBook\022>.google.cloud.numberre" + + "gistry.v1alpha.DeleteRegistryBookRequest\032\035.google.longrunning.Operation\"r\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadata\332A" + + "\004name\202\323\344\223\0028*6/v1alpha/{name=projects/*/locations/*/registryBooks/*}\022\277\001\n\n" + + "ListRealms\0226.google.cloud.numberregistry.v1alpha" + + ".ListRealmsRequest\0327.google.cloud.number" + + "registry.v1alpha.ListRealmsResponse\"@\332A\006" + + "parent\202\323\344\223\0021\022//v1alpha/{parent=projects/*/locations/*}/realms\022\254\001\n" + + "\010GetRealm\0224.google.cloud.numberregistry.v1alpha.GetReal" + + "mRequest\032*.google.cloud.numberregistry.v" + + "1alpha.Realm\">\332A\004name\202\323\344\223\0021\022//v1alpha/{name=projects/*/locations/*/realms/*}\022\332\001\n" + + "\013CreateRealm\0227.google.cloud.numberregist" + + "ry.v1alpha.CreateRealmRequest\032\035.google.longrunning.Operation\"s\312A\032\n" + + "\005Realm\022\021OperationMetadata\332A\025parent,realm,realm_id\202\323\344\223\002" + + "8\"//v1alpha/{parent=projects/*/locations/*}/realms:\005realm\022\334\001\n" + + "\013UpdateRealm\0227.google.cloud.numberregistry.v1alpha.UpdateRe" + + "almRequest\032\035.google.longrunning.Operation\"u\312A\032\n" + + "\005Realm\022\021OperationMetadata\332A\021realm" + + ",update_mask\202\323\344\223\002>25/v1alpha/{realm.name" + + "=projects/*/locations/*/realms/*}:\005realm\022\322\001\n" + + "\013DeleteRealm\0227.google.cloud.numberre" + + "gistry.v1alpha.DeleteRealmRequest\032\035.google.longrunning.Operation\"k\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadata\332A\004name\202\323" + + "\344\223\0021*//v1alpha/{name=projects/*/locations/*/realms/*}\022\347\001\n" + + "\024ListDiscoveredRanges\022@.google.cloud.numberregistry.v1alpha.Lis" + + "tDiscoveredRangesRequest\032A.google.cloud.numberregistry.v1alpha.ListDiscoveredRan" + + "gesResponse\"J\332A\006parent\202\323\344\223\002;\0229/v1alpha/{" + + "parent=projects/*/locations/*}/discoveredRanges\022\324\001\n" + + "\022GetDiscoveredRange\022>.google.cloud.numberregistry.v1alpha.GetDiscover" + + "edRangeRequest\0324.google.cloud.numberregi" + + "stry.v1alpha.DiscoveredRange\"H\332A\004name\202\323\344" + + "\223\002;\0229/v1alpha/{name=projects/*/locations/*/discoveredRanges/*}\022\252\002\n" + + "\037FindDiscoveredRangeFreeIpRanges\022K.google.cloud.number" + + "registry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest\032L.google.cloud.numberreg" + + "istry.v1alpha.FindDiscoveredRangeFreeIpR" + + "angesResponse\"l\332A\027name,cidr_prefix_lengt" + + "h\202\323\344\223\002L\022J/v1alpha/{name=projects/*/locat" + + "ions/*/discoveredRanges/*}:findFreeIpRanges\022\327\001\n" + + "\020ListCustomRanges\022<.google.cloud.numberregistry.v1alpha.ListCustomRangesR" + + "equest\032=.google.cloud.numberregistry.v1a" + + "lpha.ListCustomRangesResponse\"F\332A\006parent" + + "\202\323\344\223\0027\0225/v1alpha/{parent=projects/*/locations/*}/customRanges\022\304\001\n" + + "\016GetCustomRange\022:.google.cloud.numberregistry.v1alpha.G" + + "etCustomRangeRequest\0320.google.cloud.numb" + + "erregistry.v1alpha.CustomRange\"D\332A\004name\202" + + "\323\344\223\0027\0225/v1alpha/{name=projects/*/locations/*/customRanges/*}\022\203\002\n" + + "\032ShowCustomRangeUtilization\022F.google.cloud.numberregistr" + + "y.v1alpha.ShowCustomRangeUtilizationRequest\032G.google.cloud.numberregistry.v1alph" + + "a.ShowCustomRangeUtilizationResponse\"T\332A" + + "\004name\202\323\344\223\002G\022E/v1alpha/{name=projects/*/l" + + "ocations/*/customRanges/*}:showUtilization\022\223\002\n" + + "\036ShowDiscoveredRangeUtilization\022J.google.cloud.numberregistry.v1alpha.Show" + + "DiscoveredRangeUtilizationRequest\032K.google.cloud.numberregistry.v1alpha.ShowDisc" + + "overedRangeUtilizationResponse\"X\332A\004name\202" + + "\323\344\223\002K\022I/v1alpha/{name=projects/*/locatio" + + "ns/*/discoveredRanges/*}:showUtilization\022\232\002\n" + + "\033FindCustomRangeFreeIpRanges\022G.google.cloud.numberregistry.v1alpha.FindCusto" + + "mRangeFreeIpRangesRequest\032H.google.cloud.numberregistry.v1alpha.FindCustomRangeF" + + "reeIpRangesResponse\"h\332A\027name,cidr_prefix" + + "_length\202\323\344\223\002H\022F/v1alpha/{name=projects/*" + + "/locations/*/customRanges/*}:findFreeIpRanges\022\210\002\n" + + "\021CreateCustomRange\022=.google.cloud.numberregistry.v1alpha.CreateCustomRa" + + "ngeRequest\032\035.google.longrunning.Operation\"\224\001\312A \n" + + "\013CustomRange\022\021OperationMetadata\332" + + "A#parent,custom_range,custom_range_id\202\323\344" + + "\223\002E\"5/v1alpha/{parent=projects/*/locations/*}/customRanges:\014custom_range\022\212\002\n" + + "\021UpdateCustomRange\022=.google.cloud.numberregi" + + "stry.v1alpha.UpdateCustomRangeRequest\032\035.google.longrunning.Operation\"\226\001\312A" + + " \n" + + "\013CustomRange\022\021OperationMetadata\332A\030custom_rang" + + "e,update_mask\202\323\344\223\002R2B/v1alpha/{custom_ra" + + "nge.name=projects/*/locations/*/customRanges/*}:\014custom_range\022\344\001\n" + + "\021DeleteCustomRange\022=.google.cloud.numberregistry.v1alph" + + "a.DeleteCustomRangeRequest\032\035.google.longrunning.Operation\"q\312A*\n" + + "\025google.protobuf." + + "Empty\022\021OperationMetadata\332A\004name\202\323\344\223\0027*5/" + + "v1alpha/{name=projects/*/locations/*/cus" + + "tomRanges/*}\032V\312A\"cloudnumberregistry.goo" + + "gleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\376\001\n" + + "\'com.google.cloud.numberregistry.v1alphaB\014ServiceProtoP\001" + + "ZNcloud.google.com/go/numberregistry/apiv1main/numberregistrypb;numberregistrypb" + + "\252\002#Google.Cloud.NumberRegistry.V1Alpha\312\002" + + "#Google\\Cloud\\NumberRegistry\\V1alpha\352\002&G" + + "oogle::Cloud::NumberRegistry::V1alphab\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.cloud.numberregistry.v1alpha.CoreProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_numberregistry_v1alpha_OperationMetadata_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_numberregistry_v1alpha_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_numberregistry_v1alpha_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.numberregistry.v1alpha.CoreProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + 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.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationRequest.java new file mode 100644 index 000000000000..3c70d914d344 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationRequest.java @@ -0,0 +1,634 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.ShowCustomRangeUtilization][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ShowCustomRangeUtilization]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest} + */ +@com.google.protobuf.Generated +public final class ShowCustomRangeUtilizationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest) + ShowCustomRangeUtilizationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ShowCustomRangeUtilizationRequest"); + } + + // Use ShowCustomRangeUtilizationRequest.newBuilder() to construct. + private ShowCustomRangeUtilizationRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ShowCustomRangeUtilizationRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest.class, + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the CustomRange.
+   * 
+ * + * + * 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 CustomRange.
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest other = + (com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest) 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.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest 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.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest 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.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.ShowCustomRangeUtilization][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ShowCustomRangeUtilization]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest) + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest.class, + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest build() { + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest + buildPartial() { + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest result = + new com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest + .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. The resource name of the CustomRange.
+     * 
+ * + * + * 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 CustomRange.
+     * 
+ * + * + * 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 CustomRange.
+     * 
+ * + * + * 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 CustomRange.
+     * 
+ * + * + * 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 CustomRange.
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest) + private static final com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ShowCustomRangeUtilizationRequest 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.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationRequestOrBuilder.java new file mode 100644 index 000000000000..36ab3286bf61 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ShowCustomRangeUtilizationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the CustomRange.
+   * 
+ * + * + * 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 CustomRange.
+   * 
+ * + * + * 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-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationResponse.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationResponse.java new file mode 100644 index 000000000000..4914ada14d60 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationResponse.java @@ -0,0 +1,1019 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Response message for the
+ * [CloudNumberRegistry.ShowCustomRangeUtilization][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ShowCustomRangeUtilization]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse} + */ +@com.google.protobuf.Generated +public final class ShowCustomRangeUtilizationResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse) + ShowCustomRangeUtilizationResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ShowCustomRangeUtilizationResponse"); + } + + // Use ShowCustomRangeUtilizationResponse.newBuilder() to construct. + private ShowCustomRangeUtilizationResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ShowCustomRangeUtilizationResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse.class, + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse.Builder + .class); + } + + private int bitField0_; + public static final int CUSTOM_RANGE_FIELD_NUMBER = 1; + private com.google.cloud.numberregistry.v1alpha.CustomRange customRange_; + + /** + * + * + *
+   * The CustomRange resource.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + * + * @return Whether the customRange field is set. + */ + @java.lang.Override + public boolean hasCustomRange() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The CustomRange resource.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + * + * @return The customRange. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange() { + return customRange_ == null + ? com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance() + : customRange_; + } + + /** + * + * + *
+   * The CustomRange resource.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangeOrBuilder() { + return customRange_ == null + ? com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance() + : customRange_; + } + + public static final int RANGE_UTILIZATION_FIELD_NUMBER = 2; + private com.google.cloud.numberregistry.v1alpha.RangeUtilization rangeUtilization_; + + /** + * + * + *
+   * The utilization details of the CustomRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + * + * @return Whether the rangeUtilization field is set. + */ + @java.lang.Override + public boolean hasRangeUtilization() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * The utilization details of the CustomRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + * + * @return The rangeUtilization. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RangeUtilization getRangeUtilization() { + return rangeUtilization_ == null + ? com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance() + : rangeUtilization_; + } + + /** + * + * + *
+   * The utilization details of the CustomRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder + getRangeUtilizationOrBuilder() { + return rangeUtilization_ == null + ? com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance() + : rangeUtilization_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCustomRange()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getRangeUtilization()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCustomRange()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRangeUtilization()); + } + 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.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse other = + (com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse) obj; + + if (hasCustomRange() != other.hasCustomRange()) return false; + if (hasCustomRange()) { + if (!getCustomRange().equals(other.getCustomRange())) return false; + } + if (hasRangeUtilization() != other.hasRangeUtilization()) return false; + if (hasRangeUtilization()) { + if (!getRangeUtilization().equals(other.getRangeUtilization())) 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 (hasCustomRange()) { + hash = (37 * hash) + CUSTOM_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getCustomRange().hashCode(); + } + if (hasRangeUtilization()) { + hash = (37 * hash) + RANGE_UTILIZATION_FIELD_NUMBER; + hash = (53 * hash) + getRangeUtilization().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + 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.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + 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.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for the
+   * [CloudNumberRegistry.ShowCustomRangeUtilization][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ShowCustomRangeUtilization]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse) + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse.class, + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCustomRangeFieldBuilder(); + internalGetRangeUtilizationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + customRange_ = null; + if (customRangeBuilder_ != null) { + customRangeBuilder_.dispose(); + customRangeBuilder_ = null; + } + rangeUtilization_ = null; + if (rangeUtilizationBuilder_ != null) { + rangeUtilizationBuilder_.dispose(); + rangeUtilizationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowCustomRangeUtilizationResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse build() { + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + buildPartial() { + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse result = + new com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.customRange_ = + customRangeBuilder_ == null ? customRange_ : customRangeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rangeUtilization_ = + rangeUtilizationBuilder_ == null ? rangeUtilization_ : rangeUtilizationBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse other) { + if (other + == com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + .getDefaultInstance()) return this; + if (other.hasCustomRange()) { + mergeCustomRange(other.getCustomRange()); + } + if (other.hasRangeUtilization()) { + mergeRangeUtilization(other.getRangeUtilization()); + } + 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: + { + input.readMessage( + internalGetCustomRangeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetRangeUtilizationFieldBuilder().getBuilder(), extensionRegistry); + 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 com.google.cloud.numberregistry.v1alpha.CustomRange customRange_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder> + customRangeBuilder_; + + /** + * + * + *
+     * The CustomRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + * + * @return Whether the customRange field is set. + */ + public boolean hasCustomRange() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The CustomRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + * + * @return The customRange. + */ + public com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange() { + if (customRangeBuilder_ == null) { + return customRange_ == null + ? com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance() + : customRange_; + } else { + return customRangeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The CustomRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + public Builder setCustomRange(com.google.cloud.numberregistry.v1alpha.CustomRange value) { + if (customRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customRange_ = value; + } else { + customRangeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The CustomRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + public Builder setCustomRange( + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder builderForValue) { + if (customRangeBuilder_ == null) { + customRange_ = builderForValue.build(); + } else { + customRangeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The CustomRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + public Builder mergeCustomRange(com.google.cloud.numberregistry.v1alpha.CustomRange value) { + if (customRangeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && customRange_ != null + && customRange_ + != com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance()) { + getCustomRangeBuilder().mergeFrom(value); + } else { + customRange_ = value; + } + } else { + customRangeBuilder_.mergeFrom(value); + } + if (customRange_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The CustomRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + public Builder clearCustomRange() { + bitField0_ = (bitField0_ & ~0x00000001); + customRange_ = null; + if (customRangeBuilder_ != null) { + customRangeBuilder_.dispose(); + customRangeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The CustomRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + public com.google.cloud.numberregistry.v1alpha.CustomRange.Builder getCustomRangeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCustomRangeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The CustomRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + public com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangeOrBuilder() { + if (customRangeBuilder_ != null) { + return customRangeBuilder_.getMessageOrBuilder(); + } else { + return customRange_ == null + ? com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance() + : customRange_; + } + } + + /** + * + * + *
+     * The CustomRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder> + internalGetCustomRangeFieldBuilder() { + if (customRangeBuilder_ == null) { + customRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder>( + getCustomRange(), getParentForChildren(), isClean()); + customRange_ = null; + } + return customRangeBuilder_; + } + + private com.google.cloud.numberregistry.v1alpha.RangeUtilization rangeUtilization_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RangeUtilization, + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder, + com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder> + rangeUtilizationBuilder_; + + /** + * + * + *
+     * The utilization details of the CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + * + * @return Whether the rangeUtilization field is set. + */ + public boolean hasRangeUtilization() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * The utilization details of the CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + * + * @return The rangeUtilization. + */ + public com.google.cloud.numberregistry.v1alpha.RangeUtilization getRangeUtilization() { + if (rangeUtilizationBuilder_ == null) { + return rangeUtilization_ == null + ? com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance() + : rangeUtilization_; + } else { + return rangeUtilizationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The utilization details of the CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + public Builder setRangeUtilization( + com.google.cloud.numberregistry.v1alpha.RangeUtilization value) { + if (rangeUtilizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rangeUtilization_ = value; + } else { + rangeUtilizationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The utilization details of the CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + public Builder setRangeUtilization( + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder builderForValue) { + if (rangeUtilizationBuilder_ == null) { + rangeUtilization_ = builderForValue.build(); + } else { + rangeUtilizationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The utilization details of the CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + public Builder mergeRangeUtilization( + com.google.cloud.numberregistry.v1alpha.RangeUtilization value) { + if (rangeUtilizationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && rangeUtilization_ != null + && rangeUtilization_ + != com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance()) { + getRangeUtilizationBuilder().mergeFrom(value); + } else { + rangeUtilization_ = value; + } + } else { + rangeUtilizationBuilder_.mergeFrom(value); + } + if (rangeUtilization_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The utilization details of the CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + public Builder clearRangeUtilization() { + bitField0_ = (bitField0_ & ~0x00000002); + rangeUtilization_ = null; + if (rangeUtilizationBuilder_ != null) { + rangeUtilizationBuilder_.dispose(); + rangeUtilizationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The utilization details of the CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + public com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder + getRangeUtilizationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetRangeUtilizationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The utilization details of the CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + public com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder + getRangeUtilizationOrBuilder() { + if (rangeUtilizationBuilder_ != null) { + return rangeUtilizationBuilder_.getMessageOrBuilder(); + } else { + return rangeUtilization_ == null + ? com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance() + : rangeUtilization_; + } + } + + /** + * + * + *
+     * The utilization details of the CustomRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RangeUtilization, + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder, + com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder> + internalGetRangeUtilizationFieldBuilder() { + if (rangeUtilizationBuilder_ == null) { + rangeUtilizationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RangeUtilization, + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder, + com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder>( + getRangeUtilization(), getParentForChildren(), isClean()); + rangeUtilization_ = null; + } + return rangeUtilizationBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse) + private static final com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse(); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ShowCustomRangeUtilizationResponse 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.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationResponseOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationResponseOrBuilder.java new file mode 100644 index 000000000000..321935dbdf00 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowCustomRangeUtilizationResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ShowCustomRangeUtilizationResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The CustomRange resource.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + * + * @return Whether the customRange field is set. + */ + boolean hasCustomRange(); + + /** + * + * + *
+   * The CustomRange resource.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + * + * @return The customRange. + */ + com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange(); + + /** + * + * + *
+   * The CustomRange resource.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 1; + */ + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangeOrBuilder(); + + /** + * + * + *
+   * The utilization details of the CustomRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + * + * @return Whether the rangeUtilization field is set. + */ + boolean hasRangeUtilization(); + + /** + * + * + *
+   * The utilization details of the CustomRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + * + * @return The rangeUtilization. + */ + com.google.cloud.numberregistry.v1alpha.RangeUtilization getRangeUtilization(); + + /** + * + * + *
+   * The utilization details of the CustomRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder getRangeUtilizationOrBuilder(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationRequest.java new file mode 100644 index 000000000000..9f067c1457df --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationRequest.java @@ -0,0 +1,641 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.ShowDiscoveredRangeUtilization][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ShowDiscoveredRangeUtilization]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest} + */ +@com.google.protobuf.Generated +public final class ShowDiscoveredRangeUtilizationRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest) + ShowDiscoveredRangeUtilizationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ShowDiscoveredRangeUtilizationRequest"); + } + + // Use ShowDiscoveredRangeUtilizationRequest.newBuilder() to construct. + private ShowDiscoveredRangeUtilizationRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ShowDiscoveredRangeUtilizationRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest.class, + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the DiscoveredRange.
+   * 
+ * + * + * 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 DiscoveredRange.
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest other = + (com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest) 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.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + 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.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + 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.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.ShowDiscoveredRangeUtilization][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ShowDiscoveredRangeUtilization]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest) + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest.class, + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest build() { + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + buildPartial() { + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest result = + new com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + .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. The resource name of the DiscoveredRange.
+     * 
+ * + * + * 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 DiscoveredRange.
+     * 
+ * + * + * 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 DiscoveredRange.
+     * 
+ * + * + * 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 DiscoveredRange.
+     * 
+ * + * + * 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 DiscoveredRange.
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest) + private static final com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ShowDiscoveredRangeUtilizationRequest 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.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationRequestOrBuilder.java new file mode 100644 index 000000000000..c185644db4ab --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ShowDiscoveredRangeUtilizationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the DiscoveredRange.
+   * 
+ * + * + * 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 DiscoveredRange.
+   * 
+ * + * + * 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-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationResponse.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationResponse.java new file mode 100644 index 000000000000..f10a35ab9d51 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationResponse.java @@ -0,0 +1,1029 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Response message for the
+ * [CloudNumberRegistry.ShowDiscoveredRangeUtilization][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ShowDiscoveredRangeUtilization]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse} + */ +@com.google.protobuf.Generated +public final class ShowDiscoveredRangeUtilizationResponse + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse) + ShowDiscoveredRangeUtilizationResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ShowDiscoveredRangeUtilizationResponse"); + } + + // Use ShowDiscoveredRangeUtilizationResponse.newBuilder() to construct. + private ShowDiscoveredRangeUtilizationResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ShowDiscoveredRangeUtilizationResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse.class, + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse.Builder + .class); + } + + private int bitField0_; + public static final int DISCOVERED_RANGE_FIELD_NUMBER = 1; + private com.google.cloud.numberregistry.v1alpha.DiscoveredRange discoveredRange_; + + /** + * + * + *
+   * The DiscoveredRange resource.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + * + * @return Whether the discoveredRange field is set. + */ + @java.lang.Override + public boolean hasDiscoveredRange() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The DiscoveredRange resource.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + * + * @return The discoveredRange. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange getDiscoveredRange() { + return discoveredRange_ == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance() + : discoveredRange_; + } + + /** + * + * + *
+   * The DiscoveredRange resource.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder + getDiscoveredRangeOrBuilder() { + return discoveredRange_ == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance() + : discoveredRange_; + } + + public static final int RANGE_UTILIZATION_FIELD_NUMBER = 2; + private com.google.cloud.numberregistry.v1alpha.RangeUtilization rangeUtilization_; + + /** + * + * + *
+   * The utilization details of the DiscoveredRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + * + * @return Whether the rangeUtilization field is set. + */ + @java.lang.Override + public boolean hasRangeUtilization() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * The utilization details of the DiscoveredRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + * + * @return The rangeUtilization. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RangeUtilization getRangeUtilization() { + return rangeUtilization_ == null + ? com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance() + : rangeUtilization_; + } + + /** + * + * + *
+   * The utilization details of the DiscoveredRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder + getRangeUtilizationOrBuilder() { + return rangeUtilization_ == null + ? com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance() + : rangeUtilization_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getDiscoveredRange()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getRangeUtilization()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDiscoveredRange()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRangeUtilization()); + } + 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.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse other = + (com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse) obj; + + if (hasDiscoveredRange() != other.hasDiscoveredRange()) return false; + if (hasDiscoveredRange()) { + if (!getDiscoveredRange().equals(other.getDiscoveredRange())) return false; + } + if (hasRangeUtilization() != other.hasRangeUtilization()) return false; + if (hasRangeUtilization()) { + if (!getRangeUtilization().equals(other.getRangeUtilization())) 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 (hasDiscoveredRange()) { + hash = (37 * hash) + DISCOVERED_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveredRange().hashCode(); + } + if (hasRangeUtilization()) { + hash = (37 * hash) + RANGE_UTILIZATION_FIELD_NUMBER; + hash = (53 * hash) + getRangeUtilization().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + 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.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + 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.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for the
+   * [CloudNumberRegistry.ShowDiscoveredRangeUtilization][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ShowDiscoveredRangeUtilization]
+   * method.
+   * 
+ * + * Protobuf type {@code + * google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse) + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse.class, + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDiscoveredRangeFieldBuilder(); + internalGetRangeUtilizationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + discoveredRange_ = null; + if (discoveredRangeBuilder_ != null) { + discoveredRangeBuilder_.dispose(); + discoveredRangeBuilder_ = null; + } + rangeUtilization_ = null; + if (rangeUtilizationBuilder_ != null) { + rangeUtilizationBuilder_.dispose(); + rangeUtilizationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_ShowDiscoveredRangeUtilizationResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse build() { + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + buildPartial() { + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse result = + new com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.discoveredRange_ = + discoveredRangeBuilder_ == null ? discoveredRange_ : discoveredRangeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rangeUtilization_ = + rangeUtilizationBuilder_ == null ? rangeUtilization_ : rangeUtilizationBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse other) { + if (other + == com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + .getDefaultInstance()) return this; + if (other.hasDiscoveredRange()) { + mergeDiscoveredRange(other.getDiscoveredRange()); + } + if (other.hasRangeUtilization()) { + mergeRangeUtilization(other.getRangeUtilization()); + } + 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: + { + input.readMessage( + internalGetDiscoveredRangeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetRangeUtilizationFieldBuilder().getBuilder(), extensionRegistry); + 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 com.google.cloud.numberregistry.v1alpha.DiscoveredRange discoveredRange_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveredRange, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder> + discoveredRangeBuilder_; + + /** + * + * + *
+     * The DiscoveredRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + * + * @return Whether the discoveredRange field is set. + */ + public boolean hasDiscoveredRange() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The DiscoveredRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + * + * @return The discoveredRange. + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange getDiscoveredRange() { + if (discoveredRangeBuilder_ == null) { + return discoveredRange_ == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance() + : discoveredRange_; + } else { + return discoveredRangeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The DiscoveredRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + */ + public Builder setDiscoveredRange( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange value) { + if (discoveredRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + discoveredRange_ = value; + } else { + discoveredRangeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The DiscoveredRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + */ + public Builder setDiscoveredRange( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder builderForValue) { + if (discoveredRangeBuilder_ == null) { + discoveredRange_ = builderForValue.build(); + } else { + discoveredRangeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The DiscoveredRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + */ + public Builder mergeDiscoveredRange( + com.google.cloud.numberregistry.v1alpha.DiscoveredRange value) { + if (discoveredRangeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && discoveredRange_ != null + && discoveredRange_ + != com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance()) { + getDiscoveredRangeBuilder().mergeFrom(value); + } else { + discoveredRange_ = value; + } + } else { + discoveredRangeBuilder_.mergeFrom(value); + } + if (discoveredRange_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The DiscoveredRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + */ + public Builder clearDiscoveredRange() { + bitField0_ = (bitField0_ & ~0x00000001); + discoveredRange_ = null; + if (discoveredRangeBuilder_ != null) { + discoveredRangeBuilder_.dispose(); + discoveredRangeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The DiscoveredRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder + getDiscoveredRangeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDiscoveredRangeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The DiscoveredRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + */ + public com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder + getDiscoveredRangeOrBuilder() { + if (discoveredRangeBuilder_ != null) { + return discoveredRangeBuilder_.getMessageOrBuilder(); + } else { + return discoveredRange_ == null + ? com.google.cloud.numberregistry.v1alpha.DiscoveredRange.getDefaultInstance() + : discoveredRange_; + } + } + + /** + * + * + *
+     * The DiscoveredRange resource.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveredRange, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder> + internalGetDiscoveredRangeFieldBuilder() { + if (discoveredRangeBuilder_ == null) { + discoveredRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.DiscoveredRange, + com.google.cloud.numberregistry.v1alpha.DiscoveredRange.Builder, + com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder>( + getDiscoveredRange(), getParentForChildren(), isClean()); + discoveredRange_ = null; + } + return discoveredRangeBuilder_; + } + + private com.google.cloud.numberregistry.v1alpha.RangeUtilization rangeUtilization_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RangeUtilization, + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder, + com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder> + rangeUtilizationBuilder_; + + /** + * + * + *
+     * The utilization details of the DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + * + * @return Whether the rangeUtilization field is set. + */ + public boolean hasRangeUtilization() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * The utilization details of the DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + * + * @return The rangeUtilization. + */ + public com.google.cloud.numberregistry.v1alpha.RangeUtilization getRangeUtilization() { + if (rangeUtilizationBuilder_ == null) { + return rangeUtilization_ == null + ? com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance() + : rangeUtilization_; + } else { + return rangeUtilizationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The utilization details of the DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + public Builder setRangeUtilization( + com.google.cloud.numberregistry.v1alpha.RangeUtilization value) { + if (rangeUtilizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rangeUtilization_ = value; + } else { + rangeUtilizationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The utilization details of the DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + public Builder setRangeUtilization( + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder builderForValue) { + if (rangeUtilizationBuilder_ == null) { + rangeUtilization_ = builderForValue.build(); + } else { + rangeUtilizationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The utilization details of the DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + public Builder mergeRangeUtilization( + com.google.cloud.numberregistry.v1alpha.RangeUtilization value) { + if (rangeUtilizationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && rangeUtilization_ != null + && rangeUtilization_ + != com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance()) { + getRangeUtilizationBuilder().mergeFrom(value); + } else { + rangeUtilization_ = value; + } + } else { + rangeUtilizationBuilder_.mergeFrom(value); + } + if (rangeUtilization_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The utilization details of the DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + public Builder clearRangeUtilization() { + bitField0_ = (bitField0_ & ~0x00000002); + rangeUtilization_ = null; + if (rangeUtilizationBuilder_ != null) { + rangeUtilizationBuilder_.dispose(); + rangeUtilizationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The utilization details of the DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + public com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder + getRangeUtilizationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetRangeUtilizationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The utilization details of the DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + public com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder + getRangeUtilizationOrBuilder() { + if (rangeUtilizationBuilder_ != null) { + return rangeUtilizationBuilder_.getMessageOrBuilder(); + } else { + return rangeUtilization_ == null + ? com.google.cloud.numberregistry.v1alpha.RangeUtilization.getDefaultInstance() + : rangeUtilization_; + } + } + + /** + * + * + *
+     * The utilization details of the DiscoveredRange.
+     * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RangeUtilization, + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder, + com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder> + internalGetRangeUtilizationFieldBuilder() { + if (rangeUtilizationBuilder_ == null) { + rangeUtilizationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RangeUtilization, + com.google.cloud.numberregistry.v1alpha.RangeUtilization.Builder, + com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder>( + getRangeUtilization(), getParentForChildren(), isClean()); + rangeUtilization_ = null; + } + return rangeUtilizationBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse) + private static final com.google.cloud.numberregistry.v1alpha + .ShowDiscoveredRangeUtilizationResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse(); + } + + public static com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ShowDiscoveredRangeUtilizationResponse 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.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationResponseOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationResponseOrBuilder.java new file mode 100644 index 000000000000..4a3f00ee91b6 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/ShowDiscoveredRangeUtilizationResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface ShowDiscoveredRangeUtilizationResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The DiscoveredRange resource.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + * + * @return Whether the discoveredRange field is set. + */ + boolean hasDiscoveredRange(); + + /** + * + * + *
+   * The DiscoveredRange resource.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + * + * @return The discoveredRange. + */ + com.google.cloud.numberregistry.v1alpha.DiscoveredRange getDiscoveredRange(); + + /** + * + * + *
+   * The DiscoveredRange resource.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.DiscoveredRange discovered_range = 1; + */ + com.google.cloud.numberregistry.v1alpha.DiscoveredRangeOrBuilder getDiscoveredRangeOrBuilder(); + + /** + * + * + *
+   * The utilization details of the DiscoveredRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + * + * @return Whether the rangeUtilization field is set. + */ + boolean hasRangeUtilization(); + + /** + * + * + *
+   * The utilization details of the DiscoveredRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + * + * @return The rangeUtilization. + */ + com.google.cloud.numberregistry.v1alpha.RangeUtilization getRangeUtilization(); + + /** + * + * + *
+   * The utilization details of the DiscoveredRange.
+   * 
+ * + * .google.cloud.numberregistry.v1alpha.RangeUtilization range_utilization = 2; + */ + com.google.cloud.numberregistry.v1alpha.RangeUtilizationOrBuilder getRangeUtilizationOrBuilder(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateCustomRangeRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateCustomRangeRequest.java new file mode 100644 index 000000000000..8650f6961491 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateCustomRangeRequest.java @@ -0,0 +1,1362 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.UpdateCustomRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.UpdateCustomRange]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest} + */ +@com.google.protobuf.Generated +public final class UpdateCustomRangeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest) + UpdateCustomRangeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateCustomRangeRequest"); + } + + // Use UpdateCustomRangeRequest.newBuilder() to construct. + private UpdateCustomRangeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateCustomRangeRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateCustomRangeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateCustomRangeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest.class, + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * CustomRange resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * CustomRange resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * CustomRange resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int CUSTOM_RANGE_FIELD_NUMBER = 2; + private com.google.cloud.numberregistry.v1alpha.CustomRange customRange_; + + /** + * + * + *
+   * Required. The CustomRange resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customRange field is set. + */ + @java.lang.Override + public boolean hasCustomRange() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The CustomRange resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customRange. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange() { + return customRange_ == null + ? com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance() + : customRange_; + } + + /** + * + * + *
+   * Required. The CustomRange resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangeOrBuilder() { + return customRange_ == null + ? com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance() + : customRange_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCustomRange()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCustomRange()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + 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.numberregistry.v1alpha.UpdateCustomRangeRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest other = + (com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasCustomRange() != other.hasCustomRange()) return false; + if (hasCustomRange()) { + if (!getCustomRange().equals(other.getCustomRange())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasCustomRange()) { + hash = (37 * hash) + CUSTOM_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getCustomRange().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest 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.numberregistry.v1alpha.UpdateCustomRangeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest 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.numberregistry.v1alpha.UpdateCustomRangeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.UpdateCustomRangeRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.UpdateCustomRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.UpdateCustomRange]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest) + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateCustomRangeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateCustomRangeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest.class, + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetCustomRangeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + customRange_ = null; + if (customRangeBuilder_ != null) { + customRangeBuilder_.dispose(); + customRangeBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateCustomRangeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest build() { + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest result = + new com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.customRange_ = + customRangeBuilder_ == null ? customRange_ : customRangeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasCustomRange()) { + mergeCustomRange(other.getCustomRange()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCustomRangeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * CustomRange resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * CustomRange resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * CustomRange resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * CustomRange resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * CustomRange resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * CustomRange resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * CustomRange resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * CustomRange resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * CustomRange resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.numberregistry.v1alpha.CustomRange customRange_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder> + customRangeBuilder_; + + /** + * + * + *
+     * Required. The CustomRange resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customRange field is set. + */ + public boolean hasCustomRange() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The CustomRange resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customRange. + */ + public com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange() { + if (customRangeBuilder_ == null) { + return customRange_ == null + ? com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance() + : customRange_; + } else { + return customRangeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The CustomRange resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomRange(com.google.cloud.numberregistry.v1alpha.CustomRange value) { + if (customRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customRange_ = value; + } else { + customRangeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The CustomRange resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomRange( + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder builderForValue) { + if (customRangeBuilder_ == null) { + customRange_ = builderForValue.build(); + } else { + customRangeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The CustomRange resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCustomRange(com.google.cloud.numberregistry.v1alpha.CustomRange value) { + if (customRangeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && customRange_ != null + && customRange_ + != com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance()) { + getCustomRangeBuilder().mergeFrom(value); + } else { + customRange_ = value; + } + } else { + customRangeBuilder_.mergeFrom(value); + } + if (customRange_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The CustomRange resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCustomRange() { + bitField0_ = (bitField0_ & ~0x00000002); + customRange_ = null; + if (customRangeBuilder_ != null) { + customRangeBuilder_.dispose(); + customRangeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The CustomRange resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.CustomRange.Builder getCustomRangeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCustomRangeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The CustomRange resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangeOrBuilder() { + if (customRangeBuilder_ != null) { + return customRangeBuilder_.getMessageOrBuilder(); + } else { + return customRange_ == null + ? com.google.cloud.numberregistry.v1alpha.CustomRange.getDefaultInstance() + : customRange_; + } + } + + /** + * + * + *
+     * Required. The CustomRange resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder> + internalGetCustomRangeFieldBuilder() { + if (customRangeBuilder_ == null) { + customRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.CustomRange, + com.google.cloud.numberregistry.v1alpha.CustomRange.Builder, + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder>( + getCustomRange(), getParentForChildren(), isClean()); + customRange_ = null; + } + return customRangeBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest) + private static final com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCustomRangeRequest 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.numberregistry.v1alpha.UpdateCustomRangeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateCustomRangeRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateCustomRangeRequestOrBuilder.java new file mode 100644 index 000000000000..18b6d541ed2c --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateCustomRangeRequestOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface UpdateCustomRangeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * CustomRange resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * CustomRange resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * CustomRange resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The CustomRange resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customRange field is set. + */ + boolean hasCustomRange(); + + /** + * + * + *
+   * Required. The CustomRange resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customRange. + */ + com.google.cloud.numberregistry.v1alpha.CustomRange getCustomRange(); + + /** + * + * + *
+   * Required. The CustomRange resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.CustomRange custom_range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.numberregistry.v1alpha.CustomRangeOrBuilder getCustomRangeOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateIpamAdminScopeRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateIpamAdminScopeRequest.java new file mode 100644 index 000000000000..973d3eed4290 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateIpamAdminScopeRequest.java @@ -0,0 +1,1370 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.UpdateIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.UpdateIpamAdminScope]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest} + */ +@com.google.protobuf.Generated +public final class UpdateIpamAdminScopeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest) + UpdateIpamAdminScopeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateIpamAdminScopeRequest"); + } + + // Use UpdateIpamAdminScopeRequest.newBuilder() to construct. + private UpdateIpamAdminScopeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateIpamAdminScopeRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateIpamAdminScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest.class, + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * IpamAdminScope resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * IpamAdminScope resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * IpamAdminScope resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int IPAM_ADMIN_SCOPE_FIELD_NUMBER = 2; + private com.google.cloud.numberregistry.v1alpha.IpamAdminScope ipamAdminScope_; + + /** + * + * + *
+   * Required. The IpamAdminScope resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ipamAdminScope field is set. + */ + @java.lang.Override + public boolean hasIpamAdminScope() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The IpamAdminScope resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ipamAdminScope. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope getIpamAdminScope() { + return ipamAdminScope_ == null + ? com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance() + : ipamAdminScope_; + } + + /** + * + * + *
+   * Required. The IpamAdminScope resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder + getIpamAdminScopeOrBuilder() { + return ipamAdminScope_ == null + ? com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance() + : ipamAdminScope_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getIpamAdminScope()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getIpamAdminScope()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + 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.numberregistry.v1alpha.UpdateIpamAdminScopeRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest other = + (com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasIpamAdminScope() != other.hasIpamAdminScope()) return false; + if (hasIpamAdminScope()) { + if (!getIpamAdminScope().equals(other.getIpamAdminScope())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasIpamAdminScope()) { + hash = (37 * hash) + IPAM_ADMIN_SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getIpamAdminScope().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest 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.numberregistry.v1alpha.UpdateIpamAdminScopeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest 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.numberregistry.v1alpha.UpdateIpamAdminScopeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.UpdateIpamAdminScopeRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.UpdateIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.UpdateIpamAdminScope]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest) + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateIpamAdminScopeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest.class, + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetIpamAdminScopeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + ipamAdminScope_ = null; + if (ipamAdminScopeBuilder_ != null) { + ipamAdminScopeBuilder_.dispose(); + ipamAdminScopeBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateIpamAdminScopeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest build() { + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest result = + new com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ipamAdminScope_ = + ipamAdminScopeBuilder_ == null ? ipamAdminScope_ : ipamAdminScopeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest) { + return mergeFrom( + (com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest + .getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasIpamAdminScope()) { + mergeIpamAdminScope(other.getIpamAdminScope()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetIpamAdminScopeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * IpamAdminScope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * IpamAdminScope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * IpamAdminScope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * IpamAdminScope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * IpamAdminScope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * IpamAdminScope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * IpamAdminScope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * IpamAdminScope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * IpamAdminScope resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.numberregistry.v1alpha.IpamAdminScope ipamAdminScope_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder> + ipamAdminScopeBuilder_; + + /** + * + * + *
+     * Required. The IpamAdminScope resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ipamAdminScope field is set. + */ + public boolean hasIpamAdminScope() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ipamAdminScope. + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope getIpamAdminScope() { + if (ipamAdminScopeBuilder_ == null) { + return ipamAdminScope_ == null + ? com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance() + : ipamAdminScope_; + } else { + return ipamAdminScopeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIpamAdminScope(com.google.cloud.numberregistry.v1alpha.IpamAdminScope value) { + if (ipamAdminScopeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ipamAdminScope_ = value; + } else { + ipamAdminScopeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder builderForValue) { + if (ipamAdminScopeBuilder_ == null) { + ipamAdminScope_ = builderForValue.build(); + } else { + ipamAdminScopeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeIpamAdminScope( + com.google.cloud.numberregistry.v1alpha.IpamAdminScope value) { + if (ipamAdminScopeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && ipamAdminScope_ != null + && ipamAdminScope_ + != com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance()) { + getIpamAdminScopeBuilder().mergeFrom(value); + } else { + ipamAdminScope_ = value; + } + } else { + ipamAdminScopeBuilder_.mergeFrom(value); + } + if (ipamAdminScope_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearIpamAdminScope() { + bitField0_ = (bitField0_ & ~0x00000002); + ipamAdminScope_ = null; + if (ipamAdminScopeBuilder_ != null) { + ipamAdminScopeBuilder_.dispose(); + ipamAdminScopeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder + getIpamAdminScopeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetIpamAdminScopeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder + getIpamAdminScopeOrBuilder() { + if (ipamAdminScopeBuilder_ != null) { + return ipamAdminScopeBuilder_.getMessageOrBuilder(); + } else { + return ipamAdminScope_ == null + ? com.google.cloud.numberregistry.v1alpha.IpamAdminScope.getDefaultInstance() + : ipamAdminScope_; + } + } + + /** + * + * + *
+     * Required. The IpamAdminScope resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder> + internalGetIpamAdminScopeFieldBuilder() { + if (ipamAdminScopeBuilder_ == null) { + ipamAdminScopeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.IpamAdminScope, + com.google.cloud.numberregistry.v1alpha.IpamAdminScope.Builder, + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder>( + getIpamAdminScope(), getParentForChildren(), isClean()); + ipamAdminScope_ = null; + } + return ipamAdminScopeBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest) + private static final com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateIpamAdminScopeRequest 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.numberregistry.v1alpha.UpdateIpamAdminScopeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateIpamAdminScopeRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateIpamAdminScopeRequestOrBuilder.java new file mode 100644 index 000000000000..9b1c618076c4 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateIpamAdminScopeRequestOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface UpdateIpamAdminScopeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * IpamAdminScope resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * IpamAdminScope resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * IpamAdminScope resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The IpamAdminScope resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the ipamAdminScope field is set. + */ + boolean hasIpamAdminScope(); + + /** + * + * + *
+   * Required. The IpamAdminScope resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The ipamAdminScope. + */ + com.google.cloud.numberregistry.v1alpha.IpamAdminScope getIpamAdminScope(); + + /** + * + * + *
+   * Required. The IpamAdminScope resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.IpamAdminScope ipam_admin_scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.numberregistry.v1alpha.IpamAdminScopeOrBuilder getIpamAdminScopeOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRealmRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRealmRequest.java new file mode 100644 index 000000000000..51c83d204959 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRealmRequest.java @@ -0,0 +1,1252 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.UpdateRealm][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.UpdateRealm]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.UpdateRealmRequest} + */ +@com.google.protobuf.Generated +public final class UpdateRealmRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.UpdateRealmRequest) + UpdateRealmRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateRealmRequest"); + } + + // Use UpdateRealmRequest.newBuilder() to construct. + private UpdateRealmRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateRealmRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateRealmRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateRealmRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest.class, + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Realm resource by the update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Realm resource by the update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Realm resource by the update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int REALM_FIELD_NUMBER = 2; + private com.google.cloud.numberregistry.v1alpha.Realm realm_; + + /** + * + * + *
+   * Required. The Realm resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the realm field is set. + */ + @java.lang.Override + public boolean hasRealm() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The Realm resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The realm. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.Realm getRealm() { + return realm_ == null + ? com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance() + : realm_; + } + + /** + * + * + *
+   * Required. The Realm resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RealmOrBuilder getRealmOrBuilder() { + return realm_ == null + ? com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance() + : realm_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getRealm()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRealm()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + 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.numberregistry.v1alpha.UpdateRealmRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest other = + (com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasRealm() != other.hasRealm()) return false; + if (hasRealm()) { + if (!getRealm().equals(other.getRealm())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasRealm()) { + hash = (37 * hash) + REALM_FIELD_NUMBER; + hash = (53 * hash) + getRealm().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest 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.numberregistry.v1alpha.UpdateRealmRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest 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.numberregistry.v1alpha.UpdateRealmRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.UpdateRealmRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.UpdateRealm][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.UpdateRealm]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.UpdateRealmRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.UpdateRealmRequest) + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateRealmRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateRealmRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest.class, + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest.Builder.class); + } + + // Construct using com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetRealmFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + realm_ = null; + if (realmBuilder_ != null) { + realmBuilder_.dispose(); + realmBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateRealmRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest build() { + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest result = + new com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.realm_ = realmBuilder_ == null ? realm_ : realmBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest other) { + if (other == com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasRealm()) { + mergeRealm(other.getRealm()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetRealmFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Realm resource by the update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Realm resource by the update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Realm resource by the update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Realm resource by the update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Realm resource by the update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Realm resource by the update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Realm resource by the update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Realm resource by the update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Realm resource by the update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.numberregistry.v1alpha.Realm realm_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm, + com.google.cloud.numberregistry.v1alpha.Realm.Builder, + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder> + realmBuilder_; + + /** + * + * + *
+     * Required. The Realm resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the realm field is set. + */ + public boolean hasRealm() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The Realm resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The realm. + */ + public com.google.cloud.numberregistry.v1alpha.Realm getRealm() { + if (realmBuilder_ == null) { + return realm_ == null + ? com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance() + : realm_; + } else { + return realmBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The Realm resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRealm(com.google.cloud.numberregistry.v1alpha.Realm value) { + if (realmBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + realm_ = value; + } else { + realmBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Realm resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRealm(com.google.cloud.numberregistry.v1alpha.Realm.Builder builderForValue) { + if (realmBuilder_ == null) { + realm_ = builderForValue.build(); + } else { + realmBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Realm resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRealm(com.google.cloud.numberregistry.v1alpha.Realm value) { + if (realmBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && realm_ != null + && realm_ != com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance()) { + getRealmBuilder().mergeFrom(value); + } else { + realm_ = value; + } + } else { + realmBuilder_.mergeFrom(value); + } + if (realm_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The Realm resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRealm() { + bitField0_ = (bitField0_ & ~0x00000002); + realm_ = null; + if (realmBuilder_ != null) { + realmBuilder_.dispose(); + realmBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Realm resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.Realm.Builder getRealmBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetRealmFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The Realm resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.RealmOrBuilder getRealmOrBuilder() { + if (realmBuilder_ != null) { + return realmBuilder_.getMessageOrBuilder(); + } else { + return realm_ == null + ? com.google.cloud.numberregistry.v1alpha.Realm.getDefaultInstance() + : realm_; + } + } + + /** + * + * + *
+     * Required. The Realm resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm, + com.google.cloud.numberregistry.v1alpha.Realm.Builder, + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder> + internalGetRealmFieldBuilder() { + if (realmBuilder_ == null) { + realmBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.Realm, + com.google.cloud.numberregistry.v1alpha.Realm.Builder, + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder>( + getRealm(), getParentForChildren(), isClean()); + realm_ = null; + } + return realmBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.UpdateRealmRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.UpdateRealmRequest) + private static final com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateRealmRequest 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.numberregistry.v1alpha.UpdateRealmRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRealmRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRealmRequestOrBuilder.java new file mode 100644 index 000000000000..d4844af00403 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRealmRequestOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface UpdateRealmRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.UpdateRealmRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Realm resource by the update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Realm resource by the update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Realm resource by the update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The Realm resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the realm field is set. + */ + boolean hasRealm(); + + /** + * + * + *
+   * Required. The Realm resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The realm. + */ + com.google.cloud.numberregistry.v1alpha.Realm getRealm(); + + /** + * + * + *
+   * Required. The Realm resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.Realm realm = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.numberregistry.v1alpha.RealmOrBuilder getRealmOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRegistryBookRequest.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRegistryBookRequest.java new file mode 100644 index 000000000000..404feff3d5e7 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRegistryBookRequest.java @@ -0,0 +1,1365 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +/** + * + * + *
+ * Request message for the
+ * [CloudNumberRegistry.UpdateRegistryBook][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.UpdateRegistryBook]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest} + */ +@com.google.protobuf.Generated +public final class UpdateRegistryBookRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest) + UpdateRegistryBookRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateRegistryBookRequest"); + } + + // Use UpdateRegistryBookRequest.newBuilder() to construct. + private UpdateRegistryBookRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateRegistryBookRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateRegistryBookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateRegistryBookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest.class, + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * RegistryBook resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * RegistryBook resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * RegistryBook resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int REGISTRY_BOOK_FIELD_NUMBER = 2; + private com.google.cloud.numberregistry.v1alpha.RegistryBook registryBook_; + + /** + * + * + *
+   * Required. The RegistryBook resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the registryBook field is set. + */ + @java.lang.Override + public boolean hasRegistryBook() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The RegistryBook resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The registryBook. + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBook getRegistryBook() { + return registryBook_ == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance() + : registryBook_; + } + + /** + * + * + *
+   * Required. The RegistryBook resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder getRegistryBookOrBuilder() { + return registryBook_ == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance() + : registryBook_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getRegistryBook()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRegistryBook()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + 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.numberregistry.v1alpha.UpdateRegistryBookRequest)) { + return super.equals(obj); + } + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest other = + (com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasRegistryBook() != other.hasRegistryBook()) return false; + if (hasRegistryBook()) { + if (!getRegistryBook().equals(other.getRegistryBook())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasRegistryBook()) { + hash = (37 * hash) + REGISTRY_BOOK_FIELD_NUMBER; + hash = (53 * hash) + getRegistryBook().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest 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.numberregistry.v1alpha.UpdateRegistryBookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest 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.numberregistry.v1alpha.UpdateRegistryBookRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.numberregistry.v1alpha.UpdateRegistryBookRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the
+   * [CloudNumberRegistry.UpdateRegistryBook][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.UpdateRegistryBook]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest) + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateRegistryBookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateRegistryBookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest.class, + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest.Builder.class); + } + + // Construct using + // com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetRegistryBookFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + registryBook_ = null; + if (registryBookBuilder_ != null) { + registryBookBuilder_.dispose(); + registryBookBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.numberregistry.v1alpha.CoreProto + .internal_static_google_cloud_numberregistry_v1alpha_UpdateRegistryBookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest + getDefaultInstanceForType() { + return com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest build() { + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest buildPartial() { + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest result = + new com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.registryBook_ = + registryBookBuilder_ == null ? registryBook_ : registryBookBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest) { + return mergeFrom((com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest other) { + if (other + == com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasRegistryBook()) { + mergeRegistryBook(other.getRegistryBook()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetRegistryBookFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * RegistryBook resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * RegistryBook resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * RegistryBook resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * RegistryBook resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * RegistryBook resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * RegistryBook resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * RegistryBook resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * RegistryBook resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * RegistryBook resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.numberregistry.v1alpha.RegistryBook registryBook_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RegistryBook, + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder, + com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder> + registryBookBuilder_; + + /** + * + * + *
+     * Required. The RegistryBook resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the registryBook field is set. + */ + public boolean hasRegistryBook() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The RegistryBook resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The registryBook. + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBook getRegistryBook() { + if (registryBookBuilder_ == null) { + return registryBook_ == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance() + : registryBook_; + } else { + return registryBookBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The RegistryBook resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRegistryBook(com.google.cloud.numberregistry.v1alpha.RegistryBook value) { + if (registryBookBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + registryBook_ = value; + } else { + registryBookBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The RegistryBook resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRegistryBook( + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder builderForValue) { + if (registryBookBuilder_ == null) { + registryBook_ = builderForValue.build(); + } else { + registryBookBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The RegistryBook resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRegistryBook(com.google.cloud.numberregistry.v1alpha.RegistryBook value) { + if (registryBookBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && registryBook_ != null + && registryBook_ + != com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance()) { + getRegistryBookBuilder().mergeFrom(value); + } else { + registryBook_ = value; + } + } else { + registryBookBuilder_.mergeFrom(value); + } + if (registryBook_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The RegistryBook resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRegistryBook() { + bitField0_ = (bitField0_ & ~0x00000002); + registryBook_ = null; + if (registryBookBuilder_ != null) { + registryBookBuilder_.dispose(); + registryBookBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The RegistryBook resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder getRegistryBookBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetRegistryBookFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The RegistryBook resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder + getRegistryBookOrBuilder() { + if (registryBookBuilder_ != null) { + return registryBookBuilder_.getMessageOrBuilder(); + } else { + return registryBook_ == null + ? com.google.cloud.numberregistry.v1alpha.RegistryBook.getDefaultInstance() + : registryBook_; + } + } + + /** + * + * + *
+     * Required. The RegistryBook resource to update.
+     * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RegistryBook, + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder, + com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder> + internalGetRegistryBookFieldBuilder() { + if (registryBookBuilder_ == null) { + registryBookBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.numberregistry.v1alpha.RegistryBook, + com.google.cloud.numberregistry.v1alpha.RegistryBook.Builder, + com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder>( + getRegistryBook(), getParentForChildren(), isClean()); + registryBook_ = null; + } + return registryBookBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest) + private static final com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest(); + } + + public static com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateRegistryBookRequest 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.numberregistry.v1alpha.UpdateRegistryBookRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRegistryBookRequestOrBuilder.java b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRegistryBookRequestOrBuilder.java new file mode 100644 index 000000000000..e0e2ffc6b733 --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/java/com/google/cloud/numberregistry/v1alpha/UpdateRegistryBookRequestOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/numberregistry/v1alpha/core.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.numberregistry.v1alpha; + +@com.google.protobuf.Generated +public interface UpdateRegistryBookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * RegistryBook resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * RegistryBook resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * RegistryBook resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The RegistryBook resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the registryBook field is set. + */ + boolean hasRegistryBook(); + + /** + * + * + *
+   * Required. The RegistryBook resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The registryBook. + */ + com.google.cloud.numberregistry.v1alpha.RegistryBook getRegistryBook(); + + /** + * + * + *
+   * Required. The RegistryBook resource to update.
+   * 
+ * + * + * .google.cloud.numberregistry.v1alpha.RegistryBook registry_book = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.numberregistry.v1alpha.RegistryBookOrBuilder getRegistryBookOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/proto/google/cloud/numberregistry/v1alpha/core.proto b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/proto/google/cloud/numberregistry/v1alpha/core.proto new file mode 100644 index 000000000000..48e4e1eb2b6d --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/proto/google/cloud/numberregistry/v1alpha/core.proto @@ -0,0 +1,1590 @@ +// Copyright 2026 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.numberregistry.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NumberRegistry.V1Alpha"; +option go_package = "cloud.google.com/go/numberregistry/apiv1main/numberregistrypb;numberregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "CoreProto"; +option java_package = "com.google.cloud.numberregistry.v1alpha"; +option php_namespace = "Google\\Cloud\\NumberRegistry\\V1alpha"; +option ruby_package = "Google::Cloud::NumberRegistry::V1alpha"; + +// IP version of the Realm. +enum IpVersion { + // Unspecified IP version. + IP_VERSION_UNSPECIFIED = 0; + + // IPv4 IP version. + IPV4 = 1; + + // IPv6 IP version. + IPV6 = 2; +} + +// Enum for the view of the RegistryBook. +enum RegistryBookView { + // Unspecified view. Defaults to BASIC. + REGISTRY_BOOK_VIEW_UNSPECIFIED = 0; + + // Basic view. + BASIC = 1; + + // Full view. Includes the same data as the BASIC view. + FULL = 2; + + // Aggregate includes data about the child resources of the RegistryBook. + AGGREGATE = 3; +} + +// An IpamAdminScope defines the administrative boundary for IP address +// discovery and management. It configures which platforms and organizational +// scopes are enabled for IP tracking. +message IpamAdminScope { + option (google.api.resource) = { + type: "cloudnumberregistry.googleapis.com/IpamAdminScope" + pattern: "projects/{project}/locations/{location}/ipamAdminScopes/{ipam_admin_scope}" + plural: "ipamAdminScopes" + singular: "ipamAdminScope" + }; + + // Enum for add-on platforms. + enum AddOnPlatform { + option allow_alias = true; + + // Unspecified add-on platform. + ADD_ON_PLATFORM_UNSPECIFIED = 0; + + // Google Compute Engine. + COMPUTE_ENGINE = 1; + + // Deprecated: Use COMPUTE_ENGINE instead. + GCE = 1 [deprecated = true]; + } + + // Enum for IpamAdminScope discovery pipeline state. + enum DiscoveryPipelineState { + // Unspecified state. + DISCOVERY_PIPELINE_STATE_UNSPECIFIED = 0; + + // Internal failure. + INTERNAL_FAILURE = 1; + + // Failure. + FAILED = 2; + + // Setup in progress. + SETUP_IN_PROGRESS = 3; + + // Ready for use. + READY_FOR_USE = 4; + + // Deleting in progress. + DELETING_IN_PROGRESS = 5; + + // Updating. + UPDATING = 6; + + // Recovering. + RECOVERING = 7; + + // Disabled. + DISABLED = 8; + + // Deleting completed. + DELETION_COMPLETED = 9; + + // Cleanup in progress. + CLEANUP_IN_PROGRESS = 11; + + // Ready for deletion. + READY_FOR_DELETION = 12; + } + + // Required. Identifier. The resource name of the IpamAdminScope. + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. Add-on platforms that are enabled for this IpamAdminScope. Cloud + // Number Registry only discovers the IP addresses from the enabled platforms. + repeated AddOnPlatform enabled_addon_platforms = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Administrative scopes enabled for IP address discovery and + // management. For example, "organizations/1234567890". Minimum of 1 scope is + // required. In preview, only one organization scope is allowed. + repeated string scopes = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. State of resource discovery pipeline. + DiscoveryPipelineState state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the IpamAdminScope was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the IpamAdminScope was last updated. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for the +// [CloudNumberRegistry.ListIpamAdminScopes][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListIpamAdminScopes] +// method. +message ListIpamAdminScopesRequest { + // Required. The parent resource name, for example `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudnumberregistry.googleapis.com/IpamAdminScope" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter expression to filter the results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for the +// [CloudNumberRegistry.ListIpamAdminScopes][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListIpamAdminScopes] +// method. +message ListIpamAdminScopesResponse { + // The list of IpamAdminScopes. + repeated IpamAdminScope ipam_admin_scopes = 1; + + // A token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for the +// [CloudNumberRegistry.GetIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetIpamAdminScope] +// method. +message GetIpamAdminScopeRequest { + // Required. The resource name of the IpamAdminScope to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/IpamAdminScope" + } + ]; +} + +// Request message for the +// [CloudNumberRegistry.CheckAvailabilityIpamAdminScopes][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CheckAvailabilityIpamAdminScopes] +// method. +message CheckAvailabilityIpamAdminScopesRequest { + // Required. The parent resource name, for example `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudnumberregistry.googleapis.com/IpamAdminScope" + } + ]; + + // Required. The administrative scopes to check for availability. + repeated string scopes = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for the +// [CloudNumberRegistry.CheckAvailabilityIpamAdminScopes][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CheckAvailabilityIpamAdminScopes] +// method. +message CheckAvailabilityIpamAdminScopesResponse { + // The details of the requested scopes. + repeated IpamAdminScopeAvailability scope_availabilities = 1; +} + +// Availability details for a specific IpamAdminScope. +message IpamAdminScopeAvailability { + // Enum for the availability of a given scope. + enum Availability { + // Unspecified availability. + AVAILABILITY_UNSPECIFIED = 0; + + // The scope is available. + AVAILABLE = 1; + + // The scope is not available. + UNAVAILABLE = 2; + } + + // The scope of the IpamAdminScope. + string scope = 1; + + // The admin project of the IpamAdminScope if it exists. + int64 admin_project = 2; + + // The availability of the scope. + Availability availability = 3; +} + +// Request message for the +// [CloudNumberRegistry.CreateIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CreateIpamAdminScope] +// method. +message CreateIpamAdminScopeRequest { + // Required. The parent resource name where the IpamAdminScope will be + // created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudnumberregistry.googleapis.com/IpamAdminScope" + } + ]; + + // Required. The ID to use for the IpamAdminScope, which will become the final + // segment of the resource name. + string ipam_admin_scope_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The IpamAdminScope resource to create. + IpamAdminScope ipam_admin_scope = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for the +// [CloudNumberRegistry.DisableIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DisableIpamAdminScope] +// method. +message DisableIpamAdminScopeRequest { + // Required. The resource name of the IpamAdminScope to disable. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/IpamAdminScope" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for the +// [CloudNumberRegistry.CleanupIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CleanupIpamAdminScope] +// method. +message CleanupIpamAdminScopeRequest { + // Required. The resource name of the IpamAdminScope to clean up. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/IpamAdminScope" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for the +// [CloudNumberRegistry.UpdateIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.UpdateIpamAdminScope] +// method. +message UpdateIpamAdminScopeRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // IpamAdminScope resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The IpamAdminScope resource to update. + IpamAdminScope ipam_admin_scope = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for the +// [CloudNumberRegistry.DeleteIpamAdminScope][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DeleteIpamAdminScope] +// method. +message DeleteIpamAdminScopeRequest { + // Required. The resource name of the IpamAdminScope to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/IpamAdminScope" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set to true, all associated resources will be deleted. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A RegistryBook organizes and manages IP address space. +// It claims specific scopes (such as projects) and groups related Realms and +// Ranges. +message RegistryBook { + option (google.api.resource) = { + type: "cloudnumberregistry.googleapis.com/RegistryBook" + pattern: "projects/{project}/locations/{location}/registryBooks/{registry_book}" + plural: "registryBooks" + singular: "registryBook" + }; + + // Aggregated data for the RegistryBook. + message AggregatedData { + // Output only. Number of scopes unique to the RegistryBook. + int32 unique_scopes_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of discovered Realms in the RegistryBook. + int32 discovered_realms_count = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of DiscoveredRanges in the RegistryBook. + int32 discovered_ranges_count = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of custom Realms in the RegistryBook. + int32 custom_realms_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of CustomRanges in the RegistryBook. + int32 custom_ranges_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Required. Identifier. The resource name of the RegistryBook. + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. The time at which the RegistryBook was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the RegistryBook was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of scopes claimed by the RegistryBook. In Preview, Only + // project scope is supported. Each scope is in the format of + // projects/{project}. Each scope can only be claimed once. + repeated string claimed_scopes = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Whether the RegistryBook is the default one. + bool is_default = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Aggregated data for the RegistryBook. Populated only when the + // view is AGGREGATE. + AggregatedData aggregated_data = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for the +// [CloudNumberRegistry.ListRegistryBooks][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListRegistryBooks] +// method. +message ListRegistryBooksRequest { + // Required. The parent resource name, for example `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudnumberregistry.googleapis.com/RegistryBook" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter expression to filter the results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The view of the RegistryBook to retrieve. + RegistryBookView view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for the +// [CloudNumberRegistry.ListRegistryBooks][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListRegistryBooks] +// method. +message ListRegistryBooksResponse { + // The list of RegistryBook + repeated RegistryBook registry_books = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for the +// [CloudNumberRegistry.GetRegistryBook][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetRegistryBook] +// method. +message GetRegistryBookRequest { + // Required. The resource name of the RegistryBook to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/RegistryBook" + } + ]; + + // Optional. The view of the RegistryBook to retrieve. + RegistryBookView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for the +// [CloudNumberRegistry.SearchIpResources][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.SearchIpResources] +// method. +message SearchIpResourcesRequest { + // The type of resources to search for. + enum SearchResourceType { + // Unspecified search type. + SEARCH_RESOURCE_TYPE_UNSPECIFIED = 0; + + // Search for Ranges. + RANGES = 1; + + // Search for Realms. + REALMS = 2; + } + + // Required. The resource name of the RegistryBook to search in. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/RegistryBook" + } + ]; + + // Optional. Search query. This string filters resources in an AIP-160-like + // format. It has some limitations. You can only specify top level + // conjunctions or attribute level negations. Each restriction can only be + // used once except the attribute restriction. + // + // The available restrictions for Ranges are: + // - `realm`: The Realm name to search in. + // - `ip_address`: The IP address to search for within Ranges. + // - `ip_version`: The IP version to filter by (e.g., "IPV4", "IPV6"). + // - `parent_range`: The parent Range of the Range to search for. + // - `attribute_text`: The attribute text to search for within Ranges. + // - `attribute`: The attribute key and value to filter by. + // + // The available restrictions for Realms are: + // - `ip_version`: The IP version to search for. + // + // Only one of attribute_text or multiple attribute filters can be specified. + // Examples: + // - `realm=test-realm` + // - `realm=test-realm AND ip_address=10.0.0.0` + // - `realm=test-realm AND ip_version=IPV6` + // - `realm=test-realm AND attribute_text=test` + // - `ip_address=10.0.0.0 AND attribute:(key1=value1) AND + // attribute:(key2=value2)` + // - `attribute_text=test AND + // parent_range=projects/123/locations/global/discoveredRanges/test-parent-range` + string query = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to show the utilization of the Ranges in the response. + bool show_utilization = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of resources to search for. If not specified, the server + // will return Ranges. + repeated SearchResourceType search_resource_types = 7 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents either a CustomRange or a DiscoveredRange. +message Range { + // The Range. + oneof range { + // A CustomRange. + CustomRange custom_range = 1; + + // A DiscoveredRange. + DiscoveredRange discovered_range = 2; + } + + // The utilization of the Range. + RangeUtilization utilization = 3; +} + +// Response message for the +// [CloudNumberRegistry.SearchIpResources][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.SearchIpResources] +// method. +message SearchIpResourcesResponse { + // A result matching the search query, which can be either a Range or a Realm. + message SearchIpResourcesResult { + // Either a Range or a Realm matching the search query. + oneof result { + // A Range matching the search query. + Range range = 1; + + // A Realm matching the search query. + Realm realm = 2; + } + } + + // Deprecated: Use results field instead. + // The list of Ranges matching the search query. + repeated Range ranges = 1 [deprecated = true]; + + // The list of results matching the search query. + repeated SearchIpResourcesResult results = 4; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for the +// [CloudNumberRegistry.CreateRegistryBook][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CreateRegistryBook] +// method. +message CreateRegistryBookRequest { + // Required. The parent resource name where the RegistryBook will be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudnumberregistry.googleapis.com/RegistryBook" + } + ]; + + // Required. The ID to use for the RegistryBook, which will become the final + // segment of the resource name. + string registry_book_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The RegistryBook resource to create. + RegistryBook registry_book = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for the +// [CloudNumberRegistry.UpdateRegistryBook][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.UpdateRegistryBook] +// method. +message UpdateRegistryBookRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // RegistryBook resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The RegistryBook resource to update. + RegistryBook registry_book = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for the +// [CloudNumberRegistry.DeleteRegistryBook][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DeleteRegistryBook] +// method. +message DeleteRegistryBookRequest { + // Required. The resource name of the RegistryBook to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/RegistryBook" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set to true, all associated resources will be deleted. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A Realm represents a distinct network domain or security zone. +// It groups Ranges that share the same traffic and management characteristics. +// All the ranges in a Realm are routable to each other, meaning that they +// cannot overlap. +message Realm { + option (google.api.resource) = { + type: "cloudnumberregistry.googleapis.com/Realm" + pattern: "projects/{project}/locations/{location}/realms/{realm}" + plural: "realms" + singular: "realm" + }; + + // Aggregated data for the Realm. + message RealmAggregatedData { + // Output only. Number of DiscoveredRanges in the Realm. + int32 discovered_ranges_count = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of CustomRanges in the Realm. + int32 custom_ranges_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Traffic type of the Realm. + enum TrafficType { + // Unspecified traffic type. + TRAFFIC_TYPE_UNSPECIFIED = 0; + + // Unset traffic type. + UNSET = 1; + + // Internet traffic. + INTERNET = 2; + + // Private traffic. + PRIVATE = 3; + + // Linklocal traffic. + LINKLOCAL = 4; + } + + // Management type of the Realm. + enum ManagementType { + // Unspecified management type. + MANAGEMENT_TYPE_UNSPECIFIED = 0; + + // Managed by Cloud Number Registry. + CNR = 1; + + // Managed by User. + USER = 2; + } + + // Enum for the view of the Realm. + enum RealmView { + // Unspecified view. Defaults to BASIC. + REALM_VIEW_UNSPECIFIED = 0; + + // Basic view. + BASIC = 1; + + // Full view. Includes the same data as the BASIC view. + FULL = 2; + + // Aggregate includes data about the child resources of the Realm. + AGGREGATE = 3; + } + + // Required. Identifier. The resource name of the Realm. + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. Traffic type of the Realm. + TrafficType traffic_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Management type of the Realm. + ManagementType management_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the RegistryBook that claims the Realm. + string registry_book = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/RegistryBook" + } + ]; + + // Output only. Discovery metadata of the Realm. + DiscoveryMetadata discovery_metadata = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the Realm was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the Realm was last updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels. + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. IP version of the Realm. + IpVersion ip_version = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Aggregated data for the Realm. Populated only when the view is + // AGGREGATE. + RealmAggregatedData aggregated_data = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Metadata about a discovered resource, tracking event times, state, and source +// information. +message DiscoveryMetadata { + // The state of the resource. + enum ResourceState { + // Unspecified state. + RESOURCE_STATE_UNSPECIFIED = 0; + + // The resource is in an invalid state. + INVALID = 1; + + // The resource exists in the backing store (is not tombstoned or + // completely missing) and there were no failures reading out the resource + // level metadata. + EXISTS = 2; + + // Resource does not exist or has been deleted or soft-deleted. + DOES_NOT_EXIST = 3; + + // There was an error reading out the resource level metadata. + ERROR = 4; + } + + // Output only. The time when the event happened. + google.protobuf.Timestamp event_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the resource was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the resource was last modified. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The state of the resource. + ResourceState state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the discovered resource, should be + // API-agnostic. Example: "projects/{project_number}/networks/{network_id}". + string resource = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource uri of the discovered resource. + string resource_uri = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The canonical google.aip.dev/122 name of the source resource. + string source_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A single source resource can be the source of multiple CNR + // resources. This sub_id is used to distinguish between the different CNR + // resources derived from the same upstream resource. For example, a single + // subnetwork can be the source of multiple Ranges, one for each protocol. In + // this case, the sub_id could be "private-ipv4" or "private-ipv6". + string source_sub_id = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for the +// [CloudNumberRegistry.ListRealms][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListRealms] +// method. +message ListRealmsRequest { + // Required. The parent resource name, for example `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudnumberregistry.googleapis.com/Realm" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter expression to filter the results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The view of the Realm to retrieve. + Realm.RealmView view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for the +// [CloudNumberRegistry.ListRealms][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListRealms] +// method. +message ListRealmsResponse { + // The list of Realms. + repeated Realm realms = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for the +// [CloudNumberRegistry.GetRealm][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetRealm] +// method. +message GetRealmRequest { + // Required. The resource name of the Realm to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/Realm" + } + ]; + + // Optional. The view of the Realm to retrieve. + Realm.RealmView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for the +// [CloudNumberRegistry.CreateRealm][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CreateRealm] +// method. +message CreateRealmRequest { + // Required. The parent resource name where the Realm will be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudnumberregistry.googleapis.com/Realm" + } + ]; + + // Required. The ID to use for the Realm, which will become the final segment + // of the resource name. + string realm_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Realm resource to create. + Realm realm = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for the +// [CloudNumberRegistry.UpdateRealm][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.UpdateRealm] +// method. +message UpdateRealmRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // Realm resource by the update. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The Realm resource to update. + Realm realm = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for the +// [CloudNumberRegistry.DeleteRealm][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DeleteRealm] +// method. +message DeleteRealmRequest { + // Required. The resource name of the Realm to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/Realm" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set to true, all associated resources will be deleted. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A DiscoveredRange represents an IP address range automatically detected by +// the discovery pipeline. +message DiscoveredRange { + option (google.api.resource) = { + type: "cloudnumberregistry.googleapis.com/DiscoveredRange" + pattern: "projects/{project}/locations/{location}/discoveredRanges/{discovered_range}" + plural: "discoveredRanges" + singular: "discoveredRange" + }; + + // The IP CIDR range of the DiscoveredRange. + oneof ip_cidr_range { + // Optional. The IPv4 CIDR range of the DiscoveredRange. + string ipv4_cidr_range = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IPv6 CIDR range of the DiscoveredRange. + string ipv6_cidr_range = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Identifier. The resource name of the DiscoveredRange, in the + // format + // `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`. + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = REQUIRED + ]; + + // Optional. The Realm of the DiscoveredRange. + string realm = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/Realm" + } + ]; + + // Optional. The resource name of the parent DiscoveredRange, in the format + // `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`. + string parent_range = 6 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/DiscoveredRange" + } + ]; + + // Output only. The RegistryBook of the DiscoveredRange. + string registry_book = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the DiscoveredRange. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Owner metadata for this DiscoveredRange. + // A unique set of metadata is associated with each DiscoveredRange. + // If an IP range is shared by multiple resources (e.g., an Address resource + // and an Instance resource, or multiple ForwardingRules),separate + // DiscoveredRanges are created, each with a distinct owner. This ensures each + // DiscoveredRange has its own unique set of attributes, labels, create time + // and update time. + DiscoveryMetadata discovery_metadata = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The attributes of the DiscoveredRange. + repeated Attribute attributes = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time at which the DiscoveredRange was created. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the DiscoveredRange was last updated. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels. + map labels = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. If true, allows child DiscoveredRanges of this DiscoveredRange + // to overlap with each other. + bool child_cidr_overlap_allowed = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for the +// [CloudNumberRegistry.ListDiscoveredRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListDiscoveredRanges] +// method. +message ListDiscoveredRangesRequest { + // Required. The parent resource name, for example `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudnumberregistry.googleapis.com/DiscoveredRange" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter expression to filter the results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for the +// [CloudNumberRegistry.ListDiscoveredRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListDiscoveredRanges] +// method. +message ListDiscoveredRangesResponse { + // The list of DiscoveredRanges. + repeated DiscoveredRange discovered_ranges = 1; + + // A token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for the +// [CloudNumberRegistry.GetDiscoveredRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetDiscoveredRange] +// method. +message GetDiscoveredRangeRequest { + // Required. The resource name of the DiscoveredRange to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/DiscoveredRange" + } + ]; +} + +// Request message for the +// [CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges] +// method. +message FindDiscoveredRangeFreeIpRangesRequest { + // Required. The resource name of the DiscoveredRange to search within. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/DiscoveredRange" + } + ]; + + // Required. The prefix length of the free IP ranges to find. + int32 cidr_prefix_length = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The number of free IP ranges to find. + int32 range_count = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Response message for the +// [CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges] +// method. +message FindDiscoveredRangeFreeIpRangesResponse { + // Output only. The free IP CIDR ranges found. + repeated string free_ip_cidr_ranges = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A CustomRange represents a user-defined IP address range. +message CustomRange { + option (google.api.resource) = { + type: "cloudnumberregistry.googleapis.com/CustomRange" + pattern: "projects/{project}/locations/{location}/customRanges/{custom_range}" + plural: "customRanges" + singular: "customRange" + }; + + // The IP CIDR range of the CustomRange. + oneof ip_cidr_range { + // Optional. The IPv4 CIDR range of the CustomRange. + string ipv4_cidr_range = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IPv6 CIDR range of the CustomRange. + string ipv6_cidr_range = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Identifier. The resource name of the CustomRange, in the format + // `projects/{project}/locations/{location}/customRanges/{custom_range}`. + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = REQUIRED + ]; + + // Optional. The resource name of the Realm associated with the CustomRange, + // in the format `projects/{project}/locations/{location}/realms/{realm}`. The + // Realm must be in the same project as the CustomRange. This field must not + // be set if the `parent_range` field is set, as the Realm will be inherited + // from the parent CustomRange. + string realm = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/Realm" + } + ]; + + // Optional. The resource name of the parent CustomRange, in the format + // `projects/{project}/locations/{location}/customRanges/{custom_range}`. + // If specified, the parent CustomRange must be in the same RegistryBook. + // This field is mutually exclusive with the `realm` field, as the Realm is + // inherited from the parent CustomRange. + string parent_range = 6 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/CustomRange" + } + ]; + + // Output only. The RegistryBook of the CustomRange. This field is inherited + // from the Realm or parent CustomRange depending on which one is specified. + string registry_book = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The attributes of the CustomRange. + repeated Attribute attributes = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The description of the CustomRange. + string description = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined labels. + map labels = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// A key-value pair representing a custom attribute associated with a resource. +message Attribute { + // Required. The key of the attribute. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The value of the attribute. + string value = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for the +// [CloudNumberRegistry.ListCustomRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListCustomRanges] +// method. +message ListCustomRangesRequest { + // Required. The parent resource name, for example `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudnumberregistry.googleapis.com/CustomRange" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter expression to filter the results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for the +// [CloudNumberRegistry.ListCustomRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ListCustomRanges] +// method. +message ListCustomRangesResponse { + // The list of CustomRanges. + repeated CustomRange custom_ranges = 1; + + // A token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for the +// [CloudNumberRegistry.GetCustomRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.GetCustomRange] +// method. +message GetCustomRangeRequest { + // Required. The resource name of the CustomRange to retrieve. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/CustomRange" + } + ]; +} + +// Request message for the +// [CloudNumberRegistry.ShowCustomRangeUtilization][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ShowCustomRangeUtilization] +// method. +message ShowCustomRangeUtilizationRequest { + // Required. The resource name of the CustomRange. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/CustomRange" + } + ]; +} + +// Response message for the +// [CloudNumberRegistry.ShowCustomRangeUtilization][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ShowCustomRangeUtilization] +// method. +message ShowCustomRangeUtilizationResponse { + // The CustomRange resource. + CustomRange custom_range = 1; + + // The utilization details of the CustomRange. + RangeUtilization range_utilization = 2; +} + +// Request message for the +// [CloudNumberRegistry.ShowDiscoveredRangeUtilization][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ShowDiscoveredRangeUtilization] +// method. +message ShowDiscoveredRangeUtilizationRequest { + // Required. The resource name of the DiscoveredRange. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/DiscoveredRange" + } + ]; +} + +// Response message for the +// [CloudNumberRegistry.ShowDiscoveredRangeUtilization][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.ShowDiscoveredRangeUtilization] +// method. +message ShowDiscoveredRangeUtilizationResponse { + // The DiscoveredRange resource. + DiscoveredRange discovered_range = 1; + + // The utilization details of the DiscoveredRange. + RangeUtilization range_utilization = 2; +} + +// Utilization metrics for an IP Range, including consumed and produced address +// counts. +message RangeUtilization { + // Output only. The total number of IP addresses consumed in the Range. + string total_consumed = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of IP addresses produced in the Range. + string total_produced = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The usage of the Range as a percentage. This is marked as + // optional so that we have presence tracking and API responses show 0.0 + // instead of NULL. + optional double usage = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for the +// [CloudNumberRegistry.CreateCustomRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.CreateCustomRange] +// method. +message CreateCustomRangeRequest { + // Required. The parent resource name where the CustomRange will be created. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudnumberregistry.googleapis.com/CustomRange" + } + ]; + + // Required. The ID to use for the CustomRange, which will become the final + // segment of the resource name. + string custom_range_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The CustomRange resource to create. + CustomRange custom_range = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for the +// [CloudNumberRegistry.UpdateCustomRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.UpdateCustomRange] +// method. +message UpdateCustomRangeRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // CustomRange resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The CustomRange resource to update. + CustomRange custom_range = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for the +// [CloudNumberRegistry.DeleteCustomRange][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.DeleteCustomRange] +// method. +message DeleteCustomRangeRequest { + // Required. The resource name of the CustomRange to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/CustomRange" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set to true, all associated resources will be deleted. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for the +// [CloudNumberRegistry.FindCustomRangeFreeIpRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.FindCustomRangeFreeIpRanges] +// method. +message FindCustomRangeFreeIpRangesRequest { + // Required. The resource name of the CustomRange to search within. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudnumberregistry.googleapis.com/CustomRange" + } + ]; + + // Required. The prefix length of the free IP ranges to find. + int32 cidr_prefix_length = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The number of free IP ranges to find. + int32 range_count = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Response message for the +// [CloudNumberRegistry.FindCustomRangeFreeIpRanges][google.cloud.numberregistry.v1alpha.CloudNumberRegistry.FindCustomRangeFreeIpRanges] +// method. +message FindCustomRangeFreeIpRangesResponse { + // Output only. The free IP CIDR ranges found. + repeated string free_ip_cidr_ranges = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/proto/google/cloud/numberregistry/v1alpha/service.proto b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/proto/google/cloud/numberregistry/v1alpha/service.proto new file mode 100644 index 000000000000..8f84c18e014b --- /dev/null +++ b/java-numberregistry/proto-google-cloud-numberregistry-v1alpha/src/main/proto/google/cloud/numberregistry/v1alpha/service.proto @@ -0,0 +1,404 @@ +// Copyright 2026 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.numberregistry.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/numberregistry/v1alpha/core.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NumberRegistry.V1Alpha"; +option go_package = "cloud.google.com/go/numberregistry/apiv1main/numberregistrypb;numberregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.numberregistry.v1alpha"; +option php_namespace = "Google\\Cloud\\NumberRegistry\\V1alpha"; +option ruby_package = "Google::Cloud::NumberRegistry::V1alpha"; + +// The Cloud Number Registry service manages IP address space visibility and +// tracking. It enables the discovery, organization, and monitoring of IP +// address ranges across different cloud infrastructure platforms. +service CloudNumberRegistry { + option (google.api.default_host) = "cloudnumberregistry.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists IpamAdminScopes in a given project and location. + rpc ListIpamAdminScopes(ListIpamAdminScopesRequest) + returns (ListIpamAdminScopesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/ipamAdminScopes" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single IpamAdminScope. + rpc GetIpamAdminScope(GetIpamAdminScopeRequest) returns (IpamAdminScope) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/ipamAdminScopes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Checks the availability of IpamAdminScopes in a given project and + // location. + rpc CheckAvailabilityIpamAdminScopes(CheckAvailabilityIpamAdminScopesRequest) + returns (CheckAvailabilityIpamAdminScopesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/ipamAdminScopes:checkAvailability" + }; + option (google.api.method_signature) = "parent,scopes"; + } + + // Creates a new IpamAdminScope in a given project and location. + rpc CreateIpamAdminScope(CreateIpamAdminScopeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/ipamAdminScopes" + body: "ipam_admin_scope" + }; + option (google.api.method_signature) = + "parent,ipam_admin_scope,ipam_admin_scope_id"; + option (google.longrunning.operation_info) = { + response_type: "IpamAdminScope" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single IpamAdminScope. + rpc UpdateIpamAdminScope(UpdateIpamAdminScopeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{ipam_admin_scope.name=projects/*/locations/*/ipamAdminScopes/*}" + body: "ipam_admin_scope" + }; + option (google.api.method_signature) = "ipam_admin_scope,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "IpamAdminScope" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single IpamAdminScope. + rpc DeleteIpamAdminScope(DeleteIpamAdminScopeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/ipamAdminScopes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Disables a single IpamAdminScope. + rpc DisableIpamAdminScope(DisableIpamAdminScopeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{name=projects/*/locations/*/ipamAdminScopes/*}:disable" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "IpamAdminScope" + metadata_type: "OperationMetadata" + }; + } + + // Cleans up a single IpamAdminScope. + rpc CleanupIpamAdminScope(CleanupIpamAdminScopeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{name=projects/*/locations/*/ipamAdminScopes/*}:cleanup" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "IpamAdminScope" + metadata_type: "OperationMetadata" + }; + } + + // Lists RegistryBooks in a given project and location. + rpc ListRegistryBooks(ListRegistryBooksRequest) + returns (ListRegistryBooksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/registryBooks" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single RegistryBook. + rpc GetRegistryBook(GetRegistryBookRequest) returns (RegistryBook) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/registryBooks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Searches IP resources in a given RegistryBook. + rpc SearchIpResources(SearchIpResourcesRequest) + returns (SearchIpResourcesResponse) { + option (google.api.http) = { + post: "/v1alpha/{name=projects/*/locations/*/registryBooks/*}:searchIpResources" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new RegistryBook in a given project and location. + rpc CreateRegistryBook(CreateRegistryBookRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/registryBooks" + body: "registry_book" + }; + option (google.api.method_signature) = + "parent,registry_book,registry_book_id"; + option (google.longrunning.operation_info) = { + response_type: "RegistryBook" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single RegistryBook. + rpc UpdateRegistryBook(UpdateRegistryBookRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{registry_book.name=projects/*/locations/*/registryBooks/*}" + body: "registry_book" + }; + option (google.api.method_signature) = "registry_book,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "RegistryBook" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single RegistryBook. + rpc DeleteRegistryBook(DeleteRegistryBookRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/registryBooks/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Realms in a given project and location. + rpc ListRealms(ListRealmsRequest) returns (ListRealmsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/realms" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Realm. + rpc GetRealm(GetRealmRequest) returns (Realm) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/realms/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Realm in a given project and location. + rpc CreateRealm(CreateRealmRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/realms" + body: "realm" + }; + option (google.api.method_signature) = "parent,realm,realm_id"; + option (google.longrunning.operation_info) = { + response_type: "Realm" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Realm. + rpc UpdateRealm(UpdateRealmRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{realm.name=projects/*/locations/*/realms/*}" + body: "realm" + }; + option (google.api.method_signature) = "realm,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Realm" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Realm. + rpc DeleteRealm(DeleteRealmRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/realms/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists DiscoveredRanges in a given project and location. + rpc ListDiscoveredRanges(ListDiscoveredRangesRequest) + returns (ListDiscoveredRangesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/discoveredRanges" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single DiscoveredRange. + rpc GetDiscoveredRange(GetDiscoveredRangeRequest) returns (DiscoveredRange) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/discoveredRanges/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Finds free IP ranges in a single DiscoveredRange. + rpc FindDiscoveredRangeFreeIpRanges(FindDiscoveredRangeFreeIpRangesRequest) + returns (FindDiscoveredRangeFreeIpRangesResponse) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/discoveredRanges/*}:findFreeIpRanges" + }; + option (google.api.method_signature) = "name,cidr_prefix_length"; + } + + // Lists CustomRanges in a given project and location. + rpc ListCustomRanges(ListCustomRangesRequest) + returns (ListCustomRangesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/customRanges" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single CustomRange. + rpc GetCustomRange(GetCustomRangeRequest) returns (CustomRange) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/customRanges/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the details of a single CustomRange and its utilization. + rpc ShowCustomRangeUtilization(ShowCustomRangeUtilizationRequest) + returns (ShowCustomRangeUtilizationResponse) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/customRanges/*}:showUtilization" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the details of a single DiscoveredRange and its utilization. + rpc ShowDiscoveredRangeUtilization(ShowDiscoveredRangeUtilizationRequest) + returns (ShowDiscoveredRangeUtilizationResponse) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/discoveredRanges/*}:showUtilization" + }; + option (google.api.method_signature) = "name"; + } + + // Finds free IP ranges in a single CustomRange. + rpc FindCustomRangeFreeIpRanges(FindCustomRangeFreeIpRangesRequest) + returns (FindCustomRangeFreeIpRangesResponse) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/customRanges/*}:findFreeIpRanges" + }; + option (google.api.method_signature) = "name,cidr_prefix_length"; + } + + // Creates a new CustomRange in a given project and location. + rpc CreateCustomRange(CreateCustomRangeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/customRanges" + body: "custom_range" + }; + option (google.api.method_signature) = + "parent,custom_range,custom_range_id"; + option (google.longrunning.operation_info) = { + response_type: "CustomRange" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single CustomRange. + rpc UpdateCustomRange(UpdateCustomRangeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{custom_range.name=projects/*/locations/*/customRanges/*}" + body: "custom_range" + }; + option (google.api.method_signature) = "custom_range,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "CustomRange" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single CustomRange. + rpc DeleteCustomRange(DeleteCustomRangeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/customRanges/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been cancelled successfully + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/AsyncCheckAvailabilityIpamAdminScopes.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/AsyncCheckAvailabilityIpamAdminScopes.java new file mode 100644 index 000000000000..e23c2b4b9e58 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/AsyncCheckAvailabilityIpamAdminScopes.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CheckAvailabilityIpamAdminScopes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest; +import com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import java.util.ArrayList; + +public class AsyncCheckAvailabilityIpamAdminScopes { + + public static void main(String[] args) throws Exception { + asyncCheckAvailabilityIpamAdminScopes(); + } + + public static void asyncCheckAvailabilityIpamAdminScopes() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CheckAvailabilityIpamAdminScopesRequest request = + CheckAvailabilityIpamAdminScopesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllScopes(new ArrayList()) + .build(); + ApiFuture future = + cloudNumberRegistryClient.checkAvailabilityIpamAdminScopesCallable().futureCall(request); + // Do something. + CheckAvailabilityIpamAdminScopesResponse response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CheckAvailabilityIpamAdminScopes_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/SyncCheckAvailabilityIpamAdminScopes.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/SyncCheckAvailabilityIpamAdminScopes.java new file mode 100644 index 000000000000..4d5416d3c36b --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/SyncCheckAvailabilityIpamAdminScopes.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CheckAvailabilityIpamAdminScopes_sync] +import com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesRequest; +import com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import java.util.ArrayList; + +public class SyncCheckAvailabilityIpamAdminScopes { + + public static void main(String[] args) throws Exception { + syncCheckAvailabilityIpamAdminScopes(); + } + + public static void syncCheckAvailabilityIpamAdminScopes() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CheckAvailabilityIpamAdminScopesRequest request = + CheckAvailabilityIpamAdminScopesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .addAllScopes(new ArrayList()) + .build(); + CheckAvailabilityIpamAdminScopesResponse response = + cloudNumberRegistryClient.checkAvailabilityIpamAdminScopes(request); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CheckAvailabilityIpamAdminScopes_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/SyncCheckAvailabilityIpamAdminScopesLocationnameListstring.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/SyncCheckAvailabilityIpamAdminScopesLocationnameListstring.java new file mode 100644 index 000000000000..bfb64aa5833f --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/SyncCheckAvailabilityIpamAdminScopesLocationnameListstring.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CheckAvailabilityIpamAdminScopes_LocationnameListstring_sync] +import com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import java.util.ArrayList; +import java.util.List; + +public class SyncCheckAvailabilityIpamAdminScopesLocationnameListstring { + + public static void main(String[] args) throws Exception { + syncCheckAvailabilityIpamAdminScopesLocationnameListstring(); + } + + public static void syncCheckAvailabilityIpamAdminScopesLocationnameListstring() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List scopes = new ArrayList<>(); + CheckAvailabilityIpamAdminScopesResponse response = + cloudNumberRegistryClient.checkAvailabilityIpamAdminScopes(parent, scopes); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CheckAvailabilityIpamAdminScopes_LocationnameListstring_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/SyncCheckAvailabilityIpamAdminScopesStringListstring.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/SyncCheckAvailabilityIpamAdminScopesStringListstring.java new file mode 100644 index 000000000000..21a6947ce576 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/checkavailabilityipamadminscopes/SyncCheckAvailabilityIpamAdminScopesStringListstring.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CheckAvailabilityIpamAdminScopes_StringListstring_sync] +import com.google.cloud.numberregistry.v1alpha.CheckAvailabilityIpamAdminScopesResponse; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import java.util.ArrayList; +import java.util.List; + +public class SyncCheckAvailabilityIpamAdminScopesStringListstring { + + public static void main(String[] args) throws Exception { + syncCheckAvailabilityIpamAdminScopesStringListstring(); + } + + public static void syncCheckAvailabilityIpamAdminScopesStringListstring() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + List scopes = new ArrayList<>(); + CheckAvailabilityIpamAdminScopesResponse response = + cloudNumberRegistryClient.checkAvailabilityIpamAdminScopes(parent, scopes); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CheckAvailabilityIpamAdminScopes_StringListstring_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/AsyncCleanupIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/AsyncCleanupIpamAdminScope.java new file mode 100644 index 000000000000..538d7973814e --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/AsyncCleanupIpamAdminScope.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CleanupIpamAdminScope_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; +import com.google.longrunning.Operation; + +public class AsyncCleanupIpamAdminScope { + + public static void main(String[] args) throws Exception { + asyncCleanupIpamAdminScope(); + } + + public static void asyncCleanupIpamAdminScope() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CleanupIpamAdminScopeRequest request = + CleanupIpamAdminScopeRequest.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudNumberRegistryClient.cleanupIpamAdminScopeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CleanupIpamAdminScope_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/AsyncCleanupIpamAdminScopeLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/AsyncCleanupIpamAdminScopeLRO.java new file mode 100644 index 000000000000..7ba69f580d62 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/AsyncCleanupIpamAdminScopeLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CleanupIpamAdminScope_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; + +public class AsyncCleanupIpamAdminScopeLRO { + + public static void main(String[] args) throws Exception { + asyncCleanupIpamAdminScopeLRO(); + } + + public static void asyncCleanupIpamAdminScopeLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CleanupIpamAdminScopeRequest request = + CleanupIpamAdminScopeRequest.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudNumberRegistryClient.cleanupIpamAdminScopeOperationCallable().futureCall(request); + // Do something. + IpamAdminScope response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CleanupIpamAdminScope_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/SyncCleanupIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/SyncCleanupIpamAdminScope.java new file mode 100644 index 000000000000..fa221a4ab45c --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/SyncCleanupIpamAdminScope.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CleanupIpamAdminScope_sync] +import com.google.cloud.numberregistry.v1alpha.CleanupIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; + +public class SyncCleanupIpamAdminScope { + + public static void main(String[] args) throws Exception { + syncCleanupIpamAdminScope(); + } + + public static void syncCleanupIpamAdminScope() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CleanupIpamAdminScopeRequest request = + CleanupIpamAdminScopeRequest.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .setRequestId("requestId693933066") + .build(); + IpamAdminScope response = cloudNumberRegistryClient.cleanupIpamAdminScopeAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CleanupIpamAdminScope_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/SyncCleanupIpamAdminScopeIpamadminscopename.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/SyncCleanupIpamAdminScopeIpamadminscopename.java new file mode 100644 index 000000000000..a6a6f754a7e7 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/SyncCleanupIpamAdminScopeIpamadminscopename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CleanupIpamAdminScope_Ipamadminscopename_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; + +public class SyncCleanupIpamAdminScopeIpamadminscopename { + + public static void main(String[] args) throws Exception { + syncCleanupIpamAdminScopeIpamadminscopename(); + } + + public static void syncCleanupIpamAdminScopeIpamadminscopename() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + IpamAdminScope response = cloudNumberRegistryClient.cleanupIpamAdminScopeAsync(name).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CleanupIpamAdminScope_Ipamadminscopename_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/SyncCleanupIpamAdminScopeString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/SyncCleanupIpamAdminScopeString.java new file mode 100644 index 000000000000..d5e9739e46da --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/cleanupipamadminscope/SyncCleanupIpamAdminScopeString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CleanupIpamAdminScope_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; + +public class SyncCleanupIpamAdminScopeString { + + public static void main(String[] args) throws Exception { + syncCleanupIpamAdminScopeString(); + } + + public static void syncCleanupIpamAdminScopeString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString(); + IpamAdminScope response = cloudNumberRegistryClient.cleanupIpamAdminScopeAsync(name).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CleanupIpamAdminScope_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/create/SyncCreateSetCredentialsProvider.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..45cf074eb8c3 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistrySettings; +import com.google.cloud.numberregistry.v1alpha.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 + CloudNumberRegistrySettings cloudNumberRegistrySettings = + CloudNumberRegistrySettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + CloudNumberRegistryClient cloudNumberRegistryClient = + CloudNumberRegistryClient.create(cloudNumberRegistrySettings); + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_Create_SetCredentialsProvider_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/create/SyncCreateSetEndpoint.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..0d85c8dcb9ac --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_Create_SetEndpoint_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistrySettings; +import com.google.cloud.numberregistry.v1alpha.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 + CloudNumberRegistrySettings cloudNumberRegistrySettings = + CloudNumberRegistrySettings.newBuilder().setEndpoint(myEndpoint).build(); + CloudNumberRegistryClient cloudNumberRegistryClient = + CloudNumberRegistryClient.create(cloudNumberRegistrySettings); + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_Create_SetEndpoint_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/create/SyncCreateUseHttpJsonTransport.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..0bdae13197c9 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_Create_UseHttpJsonTransport_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistrySettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + CloudNumberRegistrySettings cloudNumberRegistrySettings = + CloudNumberRegistrySettings.newHttpJsonBuilder().build(); + CloudNumberRegistryClient cloudNumberRegistryClient = + CloudNumberRegistryClient.create(cloudNumberRegistrySettings); + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_Create_UseHttpJsonTransport_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/AsyncCreateCustomRange.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/AsyncCreateCustomRange.java new file mode 100644 index 000000000000..d10ae0633b6f --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/AsyncCreateCustomRange.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateCustomRange_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateCustomRange { + + public static void main(String[] args) throws Exception { + asyncCreateCustomRange(); + } + + public static void asyncCreateCustomRange() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CreateCustomRangeRequest request = + CreateCustomRangeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setCustomRangeId("customRangeId1995399815") + .setCustomRange(CustomRange.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudNumberRegistryClient.createCustomRangeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateCustomRange_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/AsyncCreateCustomRangeLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/AsyncCreateCustomRangeLRO.java new file mode 100644 index 000000000000..d0e16be7d256 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/AsyncCreateCustomRangeLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateCustomRange_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; + +public class AsyncCreateCustomRangeLRO { + + public static void main(String[] args) throws Exception { + asyncCreateCustomRangeLRO(); + } + + public static void asyncCreateCustomRangeLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CreateCustomRangeRequest request = + CreateCustomRangeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setCustomRangeId("customRangeId1995399815") + .setCustomRange(CustomRange.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudNumberRegistryClient.createCustomRangeOperationCallable().futureCall(request); + // Do something. + CustomRange response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateCustomRange_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/SyncCreateCustomRange.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/SyncCreateCustomRange.java new file mode 100644 index 000000000000..23b6016bb7e3 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/SyncCreateCustomRange.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateCustomRange_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CreateCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncCreateCustomRange { + + public static void main(String[] args) throws Exception { + syncCreateCustomRange(); + } + + public static void syncCreateCustomRange() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CreateCustomRangeRequest request = + CreateCustomRangeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setCustomRangeId("customRangeId1995399815") + .setCustomRange(CustomRange.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + CustomRange response = cloudNumberRegistryClient.createCustomRangeAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateCustomRange_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/SyncCreateCustomRangeLocationnameCustomrangeString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/SyncCreateCustomRangeLocationnameCustomrangeString.java new file mode 100644 index 000000000000..a4d9d18dd331 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/SyncCreateCustomRangeLocationnameCustomrangeString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateCustomRange_LocationnameCustomrangeString_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncCreateCustomRangeLocationnameCustomrangeString { + + public static void main(String[] args) throws Exception { + syncCreateCustomRangeLocationnameCustomrangeString(); + } + + public static void syncCreateCustomRangeLocationnameCustomrangeString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + CustomRange customRange = CustomRange.newBuilder().build(); + String customRangeId = "customRangeId1995399815"; + CustomRange response = + cloudNumberRegistryClient + .createCustomRangeAsync(parent, customRange, customRangeId) + .get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateCustomRange_LocationnameCustomrangeString_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/SyncCreateCustomRangeStringCustomrangeString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/SyncCreateCustomRangeStringCustomrangeString.java new file mode 100644 index 000000000000..38108626030b --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createcustomrange/SyncCreateCustomRangeStringCustomrangeString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateCustomRange_StringCustomrangeString_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncCreateCustomRangeStringCustomrangeString { + + public static void main(String[] args) throws Exception { + syncCreateCustomRangeStringCustomrangeString(); + } + + public static void syncCreateCustomRangeStringCustomrangeString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + CustomRange customRange = CustomRange.newBuilder().build(); + String customRangeId = "customRangeId1995399815"; + CustomRange response = + cloudNumberRegistryClient + .createCustomRangeAsync(parent, customRange, customRangeId) + .get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateCustomRange_StringCustomrangeString_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/AsyncCreateIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/AsyncCreateIpamAdminScope.java new file mode 100644 index 000000000000..5b663c0d681f --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/AsyncCreateIpamAdminScope.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateIpamAdminScope_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateIpamAdminScope { + + public static void main(String[] args) throws Exception { + asyncCreateIpamAdminScope(); + } + + public static void asyncCreateIpamAdminScope() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CreateIpamAdminScopeRequest request = + CreateIpamAdminScopeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setIpamAdminScopeId("ipamAdminScopeId1628703603") + .setIpamAdminScope(IpamAdminScope.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudNumberRegistryClient.createIpamAdminScopeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateIpamAdminScope_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/AsyncCreateIpamAdminScopeLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/AsyncCreateIpamAdminScopeLRO.java new file mode 100644 index 000000000000..18966f342b79 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/AsyncCreateIpamAdminScopeLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateIpamAdminScope_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; + +public class AsyncCreateIpamAdminScopeLRO { + + public static void main(String[] args) throws Exception { + asyncCreateIpamAdminScopeLRO(); + } + + public static void asyncCreateIpamAdminScopeLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CreateIpamAdminScopeRequest request = + CreateIpamAdminScopeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setIpamAdminScopeId("ipamAdminScopeId1628703603") + .setIpamAdminScope(IpamAdminScope.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudNumberRegistryClient.createIpamAdminScopeOperationCallable().futureCall(request); + // Do something. + IpamAdminScope response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateIpamAdminScope_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/SyncCreateIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/SyncCreateIpamAdminScope.java new file mode 100644 index 000000000000..4647d9ba1c19 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/SyncCreateIpamAdminScope.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateIpamAdminScope_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CreateIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncCreateIpamAdminScope { + + public static void main(String[] args) throws Exception { + syncCreateIpamAdminScope(); + } + + public static void syncCreateIpamAdminScope() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CreateIpamAdminScopeRequest request = + CreateIpamAdminScopeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setIpamAdminScopeId("ipamAdminScopeId1628703603") + .setIpamAdminScope(IpamAdminScope.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + IpamAdminScope response = cloudNumberRegistryClient.createIpamAdminScopeAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateIpamAdminScope_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/SyncCreateIpamAdminScopeLocationnameIpamadminscopeString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/SyncCreateIpamAdminScopeLocationnameIpamadminscopeString.java new file mode 100644 index 000000000000..09699c0161ee --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/SyncCreateIpamAdminScopeLocationnameIpamadminscopeString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateIpamAdminScope_LocationnameIpamadminscopeString_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncCreateIpamAdminScopeLocationnameIpamadminscopeString { + + public static void main(String[] args) throws Exception { + syncCreateIpamAdminScopeLocationnameIpamadminscopeString(); + } + + public static void syncCreateIpamAdminScopeLocationnameIpamadminscopeString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build(); + String ipamAdminScopeId = "ipamAdminScopeId1628703603"; + IpamAdminScope response = + cloudNumberRegistryClient + .createIpamAdminScopeAsync(parent, ipamAdminScope, ipamAdminScopeId) + .get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateIpamAdminScope_LocationnameIpamadminscopeString_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/SyncCreateIpamAdminScopeStringIpamadminscopeString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/SyncCreateIpamAdminScopeStringIpamadminscopeString.java new file mode 100644 index 000000000000..64223ee2f073 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createipamadminscope/SyncCreateIpamAdminScopeStringIpamadminscopeString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateIpamAdminScope_StringIpamadminscopeString_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncCreateIpamAdminScopeStringIpamadminscopeString { + + public static void main(String[] args) throws Exception { + syncCreateIpamAdminScopeStringIpamadminscopeString(); + } + + public static void syncCreateIpamAdminScopeStringIpamadminscopeString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build(); + String ipamAdminScopeId = "ipamAdminScopeId1628703603"; + IpamAdminScope response = + cloudNumberRegistryClient + .createIpamAdminScopeAsync(parent, ipamAdminScope, ipamAdminScopeId) + .get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateIpamAdminScope_StringIpamadminscopeString_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/AsyncCreateRealm.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/AsyncCreateRealm.java new file mode 100644 index 000000000000..00d374f9fad2 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/AsyncCreateRealm.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRealm_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CreateRealmRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.longrunning.Operation; + +public class AsyncCreateRealm { + + public static void main(String[] args) throws Exception { + asyncCreateRealm(); + } + + public static void asyncCreateRealm() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CreateRealmRequest request = + CreateRealmRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setRealmId("realmId1080654858") + .setRealm(Realm.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudNumberRegistryClient.createRealmCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRealm_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/AsyncCreateRealmLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/AsyncCreateRealmLRO.java new file mode 100644 index 000000000000..56c2041da41f --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/AsyncCreateRealmLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRealm_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CreateRealmRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.cloud.numberregistry.v1alpha.Realm; + +public class AsyncCreateRealmLRO { + + public static void main(String[] args) throws Exception { + asyncCreateRealmLRO(); + } + + public static void asyncCreateRealmLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CreateRealmRequest request = + CreateRealmRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setRealmId("realmId1080654858") + .setRealm(Realm.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudNumberRegistryClient.createRealmOperationCallable().futureCall(request); + // Do something. + Realm response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRealm_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/SyncCreateRealm.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/SyncCreateRealm.java new file mode 100644 index 000000000000..f49dea3439a1 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/SyncCreateRealm.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRealm_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CreateRealmRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.Realm; + +public class SyncCreateRealm { + + public static void main(String[] args) throws Exception { + syncCreateRealm(); + } + + public static void syncCreateRealm() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CreateRealmRequest request = + CreateRealmRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setRealmId("realmId1080654858") + .setRealm(Realm.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Realm response = cloudNumberRegistryClient.createRealmAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRealm_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/SyncCreateRealmLocationnameRealmString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/SyncCreateRealmLocationnameRealmString.java new file mode 100644 index 000000000000..79b175372e8b --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/SyncCreateRealmLocationnameRealmString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRealm_LocationnameRealmString_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.Realm; + +public class SyncCreateRealmLocationnameRealmString { + + public static void main(String[] args) throws Exception { + syncCreateRealmLocationnameRealmString(); + } + + public static void syncCreateRealmLocationnameRealmString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Realm realm = Realm.newBuilder().build(); + String realmId = "realmId1080654858"; + Realm response = cloudNumberRegistryClient.createRealmAsync(parent, realm, realmId).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRealm_LocationnameRealmString_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/SyncCreateRealmStringRealmString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/SyncCreateRealmStringRealmString.java new file mode 100644 index 000000000000..ef82da1c5f1b --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createrealm/SyncCreateRealmStringRealmString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRealm_StringRealmString_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.Realm; + +public class SyncCreateRealmStringRealmString { + + public static void main(String[] args) throws Exception { + syncCreateRealmStringRealmString(); + } + + public static void syncCreateRealmStringRealmString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Realm realm = Realm.newBuilder().build(); + String realmId = "realmId1080654858"; + Realm response = cloudNumberRegistryClient.createRealmAsync(parent, realm, realmId).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRealm_StringRealmString_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/AsyncCreateRegistryBook.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/AsyncCreateRegistryBook.java new file mode 100644 index 000000000000..b7ca02c9d711 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/AsyncCreateRegistryBook.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRegistryBook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.longrunning.Operation; + +public class AsyncCreateRegistryBook { + + public static void main(String[] args) throws Exception { + asyncCreateRegistryBook(); + } + + public static void asyncCreateRegistryBook() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CreateRegistryBookRequest request = + CreateRegistryBookRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setRegistryBookId("registryBookId2126801025") + .setRegistryBook(RegistryBook.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudNumberRegistryClient.createRegistryBookCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRegistryBook_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/AsyncCreateRegistryBookLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/AsyncCreateRegistryBookLRO.java new file mode 100644 index 000000000000..b51daccbd18a --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/AsyncCreateRegistryBookLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRegistryBook_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; + +public class AsyncCreateRegistryBookLRO { + + public static void main(String[] args) throws Exception { + asyncCreateRegistryBookLRO(); + } + + public static void asyncCreateRegistryBookLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CreateRegistryBookRequest request = + CreateRegistryBookRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setRegistryBookId("registryBookId2126801025") + .setRegistryBook(RegistryBook.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudNumberRegistryClient.createRegistryBookOperationCallable().futureCall(request); + // Do something. + RegistryBook response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRegistryBook_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/SyncCreateRegistryBook.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/SyncCreateRegistryBook.java new file mode 100644 index 000000000000..1361b39c0461 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/SyncCreateRegistryBook.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRegistryBook_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CreateRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; + +public class SyncCreateRegistryBook { + + public static void main(String[] args) throws Exception { + syncCreateRegistryBook(); + } + + public static void syncCreateRegistryBook() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CreateRegistryBookRequest request = + CreateRegistryBookRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setRegistryBookId("registryBookId2126801025") + .setRegistryBook(RegistryBook.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + RegistryBook response = cloudNumberRegistryClient.createRegistryBookAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRegistryBook_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/SyncCreateRegistryBookLocationnameRegistrybookString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/SyncCreateRegistryBookLocationnameRegistrybookString.java new file mode 100644 index 000000000000..a11cbfdaf062 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/SyncCreateRegistryBookLocationnameRegistrybookString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRegistryBook_LocationnameRegistrybookString_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; + +public class SyncCreateRegistryBookLocationnameRegistrybookString { + + public static void main(String[] args) throws Exception { + syncCreateRegistryBookLocationnameRegistrybookString(); + } + + public static void syncCreateRegistryBookLocationnameRegistrybookString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RegistryBook registryBook = RegistryBook.newBuilder().build(); + String registryBookId = "registryBookId2126801025"; + RegistryBook response = + cloudNumberRegistryClient + .createRegistryBookAsync(parent, registryBook, registryBookId) + .get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRegistryBook_LocationnameRegistrybookString_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/SyncCreateRegistryBookStringRegistrybookString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/SyncCreateRegistryBookStringRegistrybookString.java new file mode 100644 index 000000000000..542a6031fd28 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/createregistrybook/SyncCreateRegistryBookStringRegistrybookString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRegistryBook_StringRegistrybookString_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; + +public class SyncCreateRegistryBookStringRegistrybookString { + + public static void main(String[] args) throws Exception { + syncCreateRegistryBookStringRegistrybookString(); + } + + public static void syncCreateRegistryBookStringRegistrybookString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + RegistryBook registryBook = RegistryBook.newBuilder().build(); + String registryBookId = "registryBookId2126801025"; + RegistryBook response = + cloudNumberRegistryClient + .createRegistryBookAsync(parent, registryBook, registryBookId) + .get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_CreateRegistryBook_StringRegistrybookString_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/AsyncDeleteCustomRange.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/AsyncDeleteCustomRange.java new file mode 100644 index 000000000000..72c178b2b6fd --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/AsyncDeleteCustomRange.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteCustomRange_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteCustomRange { + + public static void main(String[] args) throws Exception { + asyncDeleteCustomRange(); + } + + public static void asyncDeleteCustomRange() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DeleteCustomRangeRequest request = + DeleteCustomRangeRequest.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + ApiFuture future = + cloudNumberRegistryClient.deleteCustomRangeCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteCustomRange_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/AsyncDeleteCustomRangeLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/AsyncDeleteCustomRangeLRO.java new file mode 100644 index 000000000000..827de53506f5 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/AsyncDeleteCustomRangeLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteCustomRange_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteCustomRangeLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteCustomRangeLRO(); + } + + public static void asyncDeleteCustomRangeLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DeleteCustomRangeRequest request = + DeleteCustomRangeRequest.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + OperationFuture future = + cloudNumberRegistryClient.deleteCustomRangeOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteCustomRange_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/SyncDeleteCustomRange.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/SyncDeleteCustomRange.java new file mode 100644 index 000000000000..796ba522296f --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/SyncDeleteCustomRange.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteCustomRange_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.cloud.numberregistry.v1alpha.DeleteCustomRangeRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteCustomRange { + + public static void main(String[] args) throws Exception { + syncDeleteCustomRange(); + } + + public static void syncDeleteCustomRange() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DeleteCustomRangeRequest request = + DeleteCustomRangeRequest.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + cloudNumberRegistryClient.deleteCustomRangeAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteCustomRange_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/SyncDeleteCustomRangeCustomrangename.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/SyncDeleteCustomRangeCustomrangename.java new file mode 100644 index 000000000000..b4ea78ea39a3 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/SyncDeleteCustomRangeCustomrangename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteCustomRange_Customrangename_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.protobuf.Empty; + +public class SyncDeleteCustomRangeCustomrangename { + + public static void main(String[] args) throws Exception { + syncDeleteCustomRangeCustomrangename(); + } + + public static void syncDeleteCustomRangeCustomrangename() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + cloudNumberRegistryClient.deleteCustomRangeAsync(name).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteCustomRange_Customrangename_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/SyncDeleteCustomRangeString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/SyncDeleteCustomRangeString.java new file mode 100644 index 000000000000..317ca4091464 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deletecustomrange/SyncDeleteCustomRangeString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteCustomRange_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.protobuf.Empty; + +public class SyncDeleteCustomRangeString { + + public static void main(String[] args) throws Exception { + syncDeleteCustomRangeString(); + } + + public static void syncDeleteCustomRangeString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString(); + cloudNumberRegistryClient.deleteCustomRangeAsync(name).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteCustomRange_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/AsyncDeleteIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/AsyncDeleteIpamAdminScope.java new file mode 100644 index 000000000000..e22ac03ab841 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/AsyncDeleteIpamAdminScope.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteIpamAdminScope_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; +import com.google.longrunning.Operation; + +public class AsyncDeleteIpamAdminScope { + + public static void main(String[] args) throws Exception { + asyncDeleteIpamAdminScope(); + } + + public static void asyncDeleteIpamAdminScope() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DeleteIpamAdminScopeRequest request = + DeleteIpamAdminScopeRequest.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + ApiFuture future = + cloudNumberRegistryClient.deleteIpamAdminScopeCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteIpamAdminScope_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/AsyncDeleteIpamAdminScopeLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/AsyncDeleteIpamAdminScopeLRO.java new file mode 100644 index 000000000000..8afaffe33b4a --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/AsyncDeleteIpamAdminScopeLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteIpamAdminScope_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteIpamAdminScopeLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteIpamAdminScopeLRO(); + } + + public static void asyncDeleteIpamAdminScopeLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DeleteIpamAdminScopeRequest request = + DeleteIpamAdminScopeRequest.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + OperationFuture future = + cloudNumberRegistryClient.deleteIpamAdminScopeOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteIpamAdminScope_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/SyncDeleteIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/SyncDeleteIpamAdminScope.java new file mode 100644 index 000000000000..9dbdb5404355 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/SyncDeleteIpamAdminScope.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteIpamAdminScope_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DeleteIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; +import com.google.protobuf.Empty; + +public class SyncDeleteIpamAdminScope { + + public static void main(String[] args) throws Exception { + syncDeleteIpamAdminScope(); + } + + public static void syncDeleteIpamAdminScope() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DeleteIpamAdminScopeRequest request = + DeleteIpamAdminScopeRequest.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + cloudNumberRegistryClient.deleteIpamAdminScopeAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteIpamAdminScope_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/SyncDeleteIpamAdminScopeIpamadminscopename.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/SyncDeleteIpamAdminScopeIpamadminscopename.java new file mode 100644 index 000000000000..7c108b149bd5 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/SyncDeleteIpamAdminScopeIpamadminscopename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteIpamAdminScope_Ipamadminscopename_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; +import com.google.protobuf.Empty; + +public class SyncDeleteIpamAdminScopeIpamadminscopename { + + public static void main(String[] args) throws Exception { + syncDeleteIpamAdminScopeIpamadminscopename(); + } + + public static void syncDeleteIpamAdminScopeIpamadminscopename() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + cloudNumberRegistryClient.deleteIpamAdminScopeAsync(name).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteIpamAdminScope_Ipamadminscopename_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/SyncDeleteIpamAdminScopeString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/SyncDeleteIpamAdminScopeString.java new file mode 100644 index 000000000000..a8555cc7a245 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteipamadminscope/SyncDeleteIpamAdminScopeString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteIpamAdminScope_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; +import com.google.protobuf.Empty; + +public class SyncDeleteIpamAdminScopeString { + + public static void main(String[] args) throws Exception { + syncDeleteIpamAdminScopeString(); + } + + public static void syncDeleteIpamAdminScopeString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString(); + cloudNumberRegistryClient.deleteIpamAdminScopeAsync(name).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteIpamAdminScope_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/AsyncDeleteRealm.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/AsyncDeleteRealm.java new file mode 100644 index 000000000000..9d77849af974 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/AsyncDeleteRealm.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRealm_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest; +import com.google.cloud.numberregistry.v1alpha.RealmName; +import com.google.longrunning.Operation; + +public class AsyncDeleteRealm { + + public static void main(String[] args) throws Exception { + asyncDeleteRealm(); + } + + public static void asyncDeleteRealm() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DeleteRealmRequest request = + DeleteRealmRequest.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + ApiFuture future = + cloudNumberRegistryClient.deleteRealmCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRealm_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/AsyncDeleteRealmLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/AsyncDeleteRealmLRO.java new file mode 100644 index 000000000000..8d00d9c5ed1b --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/AsyncDeleteRealmLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRealm_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.cloud.numberregistry.v1alpha.RealmName; +import com.google.protobuf.Empty; + +public class AsyncDeleteRealmLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteRealmLRO(); + } + + public static void asyncDeleteRealmLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DeleteRealmRequest request = + DeleteRealmRequest.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + OperationFuture future = + cloudNumberRegistryClient.deleteRealmOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRealm_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/SyncDeleteRealm.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/SyncDeleteRealm.java new file mode 100644 index 000000000000..4af9aa4bc15b --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/SyncDeleteRealm.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRealm_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DeleteRealmRequest; +import com.google.cloud.numberregistry.v1alpha.RealmName; +import com.google.protobuf.Empty; + +public class SyncDeleteRealm { + + public static void main(String[] args) throws Exception { + syncDeleteRealm(); + } + + public static void syncDeleteRealm() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DeleteRealmRequest request = + DeleteRealmRequest.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + cloudNumberRegistryClient.deleteRealmAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRealm_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/SyncDeleteRealmRealmname.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/SyncDeleteRealmRealmname.java new file mode 100644 index 000000000000..c0f1101b5841 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/SyncDeleteRealmRealmname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRealm_Realmname_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.RealmName; +import com.google.protobuf.Empty; + +public class SyncDeleteRealmRealmname { + + public static void main(String[] args) throws Exception { + syncDeleteRealmRealmname(); + } + + public static void syncDeleteRealmRealmname() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]"); + cloudNumberRegistryClient.deleteRealmAsync(name).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRealm_Realmname_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/SyncDeleteRealmString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/SyncDeleteRealmString.java new file mode 100644 index 000000000000..0bf5f00453f9 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleterealm/SyncDeleteRealmString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRealm_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.RealmName; +import com.google.protobuf.Empty; + +public class SyncDeleteRealmString { + + public static void main(String[] args) throws Exception { + syncDeleteRealmString(); + } + + public static void syncDeleteRealmString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString(); + cloudNumberRegistryClient.deleteRealmAsync(name).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRealm_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/AsyncDeleteRegistryBook.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/AsyncDeleteRegistryBook.java new file mode 100644 index 000000000000..df33a6b6ceaf --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/AsyncDeleteRegistryBook.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRegistryBook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; +import com.google.longrunning.Operation; + +public class AsyncDeleteRegistryBook { + + public static void main(String[] args) throws Exception { + asyncDeleteRegistryBook(); + } + + public static void asyncDeleteRegistryBook() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DeleteRegistryBookRequest request = + DeleteRegistryBookRequest.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + ApiFuture future = + cloudNumberRegistryClient.deleteRegistryBookCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRegistryBook_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/AsyncDeleteRegistryBookLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/AsyncDeleteRegistryBookLRO.java new file mode 100644 index 000000000000..bf730c418179 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/AsyncDeleteRegistryBookLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRegistryBook_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; +import com.google.protobuf.Empty; + +public class AsyncDeleteRegistryBookLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteRegistryBookLRO(); + } + + public static void asyncDeleteRegistryBookLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DeleteRegistryBookRequest request = + DeleteRegistryBookRequest.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + OperationFuture future = + cloudNumberRegistryClient.deleteRegistryBookOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRegistryBook_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/SyncDeleteRegistryBook.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/SyncDeleteRegistryBook.java new file mode 100644 index 000000000000..df551bf9af41 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/SyncDeleteRegistryBook.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRegistryBook_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DeleteRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; +import com.google.protobuf.Empty; + +public class SyncDeleteRegistryBook { + + public static void main(String[] args) throws Exception { + syncDeleteRegistryBook(); + } + + public static void syncDeleteRegistryBook() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DeleteRegistryBookRequest request = + DeleteRegistryBookRequest.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + cloudNumberRegistryClient.deleteRegistryBookAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRegistryBook_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/SyncDeleteRegistryBookRegistrybookname.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/SyncDeleteRegistryBookRegistrybookname.java new file mode 100644 index 000000000000..3d2b220f7b1d --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/SyncDeleteRegistryBookRegistrybookname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRegistryBook_Registrybookname_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; +import com.google.protobuf.Empty; + +public class SyncDeleteRegistryBookRegistrybookname { + + public static void main(String[] args) throws Exception { + syncDeleteRegistryBookRegistrybookname(); + } + + public static void syncDeleteRegistryBookRegistrybookname() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + cloudNumberRegistryClient.deleteRegistryBookAsync(name).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRegistryBook_Registrybookname_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/SyncDeleteRegistryBookString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/SyncDeleteRegistryBookString.java new file mode 100644 index 000000000000..9cb137ac05c2 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/deleteregistrybook/SyncDeleteRegistryBookString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRegistryBook_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; +import com.google.protobuf.Empty; + +public class SyncDeleteRegistryBookString { + + public static void main(String[] args) throws Exception { + syncDeleteRegistryBookString(); + } + + public static void syncDeleteRegistryBookString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString(); + cloudNumberRegistryClient.deleteRegistryBookAsync(name).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DeleteRegistryBook_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/AsyncDisableIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/AsyncDisableIpamAdminScope.java new file mode 100644 index 000000000000..9186309a9da7 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/AsyncDisableIpamAdminScope.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DisableIpamAdminScope_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; +import com.google.longrunning.Operation; + +public class AsyncDisableIpamAdminScope { + + public static void main(String[] args) throws Exception { + asyncDisableIpamAdminScope(); + } + + public static void asyncDisableIpamAdminScope() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DisableIpamAdminScopeRequest request = + DisableIpamAdminScopeRequest.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudNumberRegistryClient.disableIpamAdminScopeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DisableIpamAdminScope_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/AsyncDisableIpamAdminScopeLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/AsyncDisableIpamAdminScopeLRO.java new file mode 100644 index 000000000000..a50790c02839 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/AsyncDisableIpamAdminScopeLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DisableIpamAdminScope_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; + +public class AsyncDisableIpamAdminScopeLRO { + + public static void main(String[] args) throws Exception { + asyncDisableIpamAdminScopeLRO(); + } + + public static void asyncDisableIpamAdminScopeLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DisableIpamAdminScopeRequest request = + DisableIpamAdminScopeRequest.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudNumberRegistryClient.disableIpamAdminScopeOperationCallable().futureCall(request); + // Do something. + IpamAdminScope response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DisableIpamAdminScope_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/SyncDisableIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/SyncDisableIpamAdminScope.java new file mode 100644 index 000000000000..ebd067ed48b0 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/SyncDisableIpamAdminScope.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DisableIpamAdminScope_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DisableIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; + +public class SyncDisableIpamAdminScope { + + public static void main(String[] args) throws Exception { + syncDisableIpamAdminScope(); + } + + public static void syncDisableIpamAdminScope() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DisableIpamAdminScopeRequest request = + DisableIpamAdminScopeRequest.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .setRequestId("requestId693933066") + .build(); + IpamAdminScope response = cloudNumberRegistryClient.disableIpamAdminScopeAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DisableIpamAdminScope_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/SyncDisableIpamAdminScopeIpamadminscopename.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/SyncDisableIpamAdminScopeIpamadminscopename.java new file mode 100644 index 000000000000..e46b838ccb68 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/SyncDisableIpamAdminScopeIpamadminscopename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DisableIpamAdminScope_Ipamadminscopename_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; + +public class SyncDisableIpamAdminScopeIpamadminscopename { + + public static void main(String[] args) throws Exception { + syncDisableIpamAdminScopeIpamadminscopename(); + } + + public static void syncDisableIpamAdminScopeIpamadminscopename() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + IpamAdminScope response = cloudNumberRegistryClient.disableIpamAdminScopeAsync(name).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DisableIpamAdminScope_Ipamadminscopename_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/SyncDisableIpamAdminScopeString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/SyncDisableIpamAdminScopeString.java new file mode 100644 index 000000000000..d0b4e78c1940 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/disableipamadminscope/SyncDisableIpamAdminScopeString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DisableIpamAdminScope_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; + +public class SyncDisableIpamAdminScopeString { + + public static void main(String[] args) throws Exception { + syncDisableIpamAdminScopeString(); + } + + public static void syncDisableIpamAdminScopeString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString(); + IpamAdminScope response = cloudNumberRegistryClient.disableIpamAdminScopeAsync(name).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_DisableIpamAdminScope_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/AsyncFindCustomRangeFreeIpRanges.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/AsyncFindCustomRangeFreeIpRanges.java new file mode 100644 index 000000000000..17595a702851 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/AsyncFindCustomRangeFreeIpRanges.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindCustomRangeFreeIpRanges_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse; + +public class AsyncFindCustomRangeFreeIpRanges { + + public static void main(String[] args) throws Exception { + asyncFindCustomRangeFreeIpRanges(); + } + + public static void asyncFindCustomRangeFreeIpRanges() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + FindCustomRangeFreeIpRangesRequest request = + FindCustomRangeFreeIpRangesRequest.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setCidrPrefixLength(-954389592) + .setRangeCount(-448443507) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudNumberRegistryClient.findCustomRangeFreeIpRangesCallable().futureCall(request); + // Do something. + FindCustomRangeFreeIpRangesResponse response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindCustomRangeFreeIpRanges_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/SyncFindCustomRangeFreeIpRanges.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/SyncFindCustomRangeFreeIpRanges.java new file mode 100644 index 000000000000..037fce63ac10 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/SyncFindCustomRangeFreeIpRanges.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindCustomRangeFreeIpRanges_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesRequest; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse; + +public class SyncFindCustomRangeFreeIpRanges { + + public static void main(String[] args) throws Exception { + syncFindCustomRangeFreeIpRanges(); + } + + public static void syncFindCustomRangeFreeIpRanges() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + FindCustomRangeFreeIpRangesRequest request = + FindCustomRangeFreeIpRangesRequest.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .setCidrPrefixLength(-954389592) + .setRangeCount(-448443507) + .setRequestId("requestId693933066") + .build(); + FindCustomRangeFreeIpRangesResponse response = + cloudNumberRegistryClient.findCustomRangeFreeIpRanges(request); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindCustomRangeFreeIpRanges_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/SyncFindCustomRangeFreeIpRangesCustomrangenameInt.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/SyncFindCustomRangeFreeIpRangesCustomrangenameInt.java new file mode 100644 index 000000000000..3ce0a11827dc --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/SyncFindCustomRangeFreeIpRangesCustomrangenameInt.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindCustomRangeFreeIpRanges_CustomrangenameInt_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse; + +public class SyncFindCustomRangeFreeIpRangesCustomrangenameInt { + + public static void main(String[] args) throws Exception { + syncFindCustomRangeFreeIpRangesCustomrangenameInt(); + } + + public static void syncFindCustomRangeFreeIpRangesCustomrangenameInt() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + int cidrPrefixLength = -954389592; + FindCustomRangeFreeIpRangesResponse response = + cloudNumberRegistryClient.findCustomRangeFreeIpRanges(name, cidrPrefixLength); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindCustomRangeFreeIpRanges_CustomrangenameInt_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/SyncFindCustomRangeFreeIpRangesStringInt.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/SyncFindCustomRangeFreeIpRangesStringInt.java new file mode 100644 index 000000000000..d093eccbac06 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/findcustomrangefreeipranges/SyncFindCustomRangeFreeIpRangesStringInt.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindCustomRangeFreeIpRanges_StringInt_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.cloud.numberregistry.v1alpha.FindCustomRangeFreeIpRangesResponse; + +public class SyncFindCustomRangeFreeIpRangesStringInt { + + public static void main(String[] args) throws Exception { + syncFindCustomRangeFreeIpRangesStringInt(); + } + + public static void syncFindCustomRangeFreeIpRangesStringInt() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString(); + int cidrPrefixLength = -954389592; + FindCustomRangeFreeIpRangesResponse response = + cloudNumberRegistryClient.findCustomRangeFreeIpRanges(name, cidrPrefixLength); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindCustomRangeFreeIpRanges_StringInt_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/AsyncFindDiscoveredRangeFreeIpRanges.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/AsyncFindDiscoveredRangeFreeIpRanges.java new file mode 100644 index 000000000000..5df222fd0faf --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/AsyncFindDiscoveredRangeFreeIpRanges.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindDiscoveredRangeFreeIpRanges_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRangeName; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse; + +public class AsyncFindDiscoveredRangeFreeIpRanges { + + public static void main(String[] args) throws Exception { + asyncFindDiscoveredRangeFreeIpRanges(); + } + + public static void asyncFindDiscoveredRangeFreeIpRanges() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + FindDiscoveredRangeFreeIpRangesRequest request = + FindDiscoveredRangeFreeIpRangesRequest.newBuilder() + .setName( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]") + .toString()) + .setCidrPrefixLength(-954389592) + .setRangeCount(-448443507) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudNumberRegistryClient.findDiscoveredRangeFreeIpRangesCallable().futureCall(request); + // Do something. + FindDiscoveredRangeFreeIpRangesResponse response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindDiscoveredRangeFreeIpRanges_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/SyncFindDiscoveredRangeFreeIpRanges.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/SyncFindDiscoveredRangeFreeIpRanges.java new file mode 100644 index 000000000000..f92c4e280258 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/SyncFindDiscoveredRangeFreeIpRanges.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindDiscoveredRangeFreeIpRanges_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRangeName; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesRequest; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse; + +public class SyncFindDiscoveredRangeFreeIpRanges { + + public static void main(String[] args) throws Exception { + syncFindDiscoveredRangeFreeIpRanges(); + } + + public static void syncFindDiscoveredRangeFreeIpRanges() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + FindDiscoveredRangeFreeIpRangesRequest request = + FindDiscoveredRangeFreeIpRangesRequest.newBuilder() + .setName( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]") + .toString()) + .setCidrPrefixLength(-954389592) + .setRangeCount(-448443507) + .setRequestId("requestId693933066") + .build(); + FindDiscoveredRangeFreeIpRangesResponse response = + cloudNumberRegistryClient.findDiscoveredRangeFreeIpRanges(request); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindDiscoveredRangeFreeIpRanges_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/SyncFindDiscoveredRangeFreeIpRangesDiscoveredrangenameInt.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/SyncFindDiscoveredRangeFreeIpRangesDiscoveredrangenameInt.java new file mode 100644 index 000000000000..e9259798f532 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/SyncFindDiscoveredRangeFreeIpRangesDiscoveredrangenameInt.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindDiscoveredRangeFreeIpRanges_DiscoveredrangenameInt_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRangeName; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse; + +public class SyncFindDiscoveredRangeFreeIpRangesDiscoveredrangenameInt { + + public static void main(String[] args) throws Exception { + syncFindDiscoveredRangeFreeIpRangesDiscoveredrangenameInt(); + } + + public static void syncFindDiscoveredRangeFreeIpRangesDiscoveredrangenameInt() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + int cidrPrefixLength = -954389592; + FindDiscoveredRangeFreeIpRangesResponse response = + cloudNumberRegistryClient.findDiscoveredRangeFreeIpRanges(name, cidrPrefixLength); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindDiscoveredRangeFreeIpRanges_DiscoveredrangenameInt_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/SyncFindDiscoveredRangeFreeIpRangesStringInt.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/SyncFindDiscoveredRangeFreeIpRangesStringInt.java new file mode 100644 index 000000000000..028b4df50732 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/finddiscoveredrangefreeipranges/SyncFindDiscoveredRangeFreeIpRangesStringInt.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindDiscoveredRangeFreeIpRanges_StringInt_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRangeName; +import com.google.cloud.numberregistry.v1alpha.FindDiscoveredRangeFreeIpRangesResponse; + +public class SyncFindDiscoveredRangeFreeIpRangesStringInt { + + public static void main(String[] args) throws Exception { + syncFindDiscoveredRangeFreeIpRangesStringInt(); + } + + public static void syncFindDiscoveredRangeFreeIpRangesStringInt() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString(); + int cidrPrefixLength = -954389592; + FindDiscoveredRangeFreeIpRangesResponse response = + cloudNumberRegistryClient.findDiscoveredRangeFreeIpRanges(name, cidrPrefixLength); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_FindDiscoveredRangeFreeIpRanges_StringInt_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/AsyncGetCustomRange.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/AsyncGetCustomRange.java new file mode 100644 index 000000000000..6198edd8fb76 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/AsyncGetCustomRange.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetCustomRange_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest; + +public class AsyncGetCustomRange { + + public static void main(String[] args) throws Exception { + asyncGetCustomRange(); + } + + public static void asyncGetCustomRange() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + GetCustomRangeRequest request = + GetCustomRangeRequest.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .build(); + ApiFuture future = + cloudNumberRegistryClient.getCustomRangeCallable().futureCall(request); + // Do something. + CustomRange response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetCustomRange_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/SyncGetCustomRange.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/SyncGetCustomRange.java new file mode 100644 index 000000000000..36c06781e1af --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/SyncGetCustomRange.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetCustomRange_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.cloud.numberregistry.v1alpha.GetCustomRangeRequest; + +public class SyncGetCustomRange { + + public static void main(String[] args) throws Exception { + syncGetCustomRange(); + } + + public static void syncGetCustomRange() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + GetCustomRangeRequest request = + GetCustomRangeRequest.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .build(); + CustomRange response = cloudNumberRegistryClient.getCustomRange(request); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetCustomRange_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/SyncGetCustomRangeCustomrangename.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/SyncGetCustomRangeCustomrangename.java new file mode 100644 index 000000000000..322a3d8efb9a --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/SyncGetCustomRangeCustomrangename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetCustomRange_Customrangename_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; + +public class SyncGetCustomRangeCustomrangename { + + public static void main(String[] args) throws Exception { + syncGetCustomRangeCustomrangename(); + } + + public static void syncGetCustomRangeCustomrangename() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + CustomRange response = cloudNumberRegistryClient.getCustomRange(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetCustomRange_Customrangename_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/SyncGetCustomRangeString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/SyncGetCustomRangeString.java new file mode 100644 index 000000000000..c92839330939 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getcustomrange/SyncGetCustomRangeString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetCustomRange_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; + +public class SyncGetCustomRangeString { + + public static void main(String[] args) throws Exception { + syncGetCustomRangeString(); + } + + public static void syncGetCustomRangeString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString(); + CustomRange response = cloudNumberRegistryClient.getCustomRange(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetCustomRange_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/AsyncGetDiscoveredRange.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/AsyncGetDiscoveredRange.java new file mode 100644 index 000000000000..194042ed5f68 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/AsyncGetDiscoveredRange.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetDiscoveredRange_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRange; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRangeName; +import com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest; + +public class AsyncGetDiscoveredRange { + + public static void main(String[] args) throws Exception { + asyncGetDiscoveredRange(); + } + + public static void asyncGetDiscoveredRange() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + GetDiscoveredRangeRequest request = + GetDiscoveredRangeRequest.newBuilder() + .setName( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]") + .toString()) + .build(); + ApiFuture future = + cloudNumberRegistryClient.getDiscoveredRangeCallable().futureCall(request); + // Do something. + DiscoveredRange response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetDiscoveredRange_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/SyncGetDiscoveredRange.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/SyncGetDiscoveredRange.java new file mode 100644 index 000000000000..855d7183b563 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/SyncGetDiscoveredRange.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetDiscoveredRange_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRange; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRangeName; +import com.google.cloud.numberregistry.v1alpha.GetDiscoveredRangeRequest; + +public class SyncGetDiscoveredRange { + + public static void main(String[] args) throws Exception { + syncGetDiscoveredRange(); + } + + public static void syncGetDiscoveredRange() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + GetDiscoveredRangeRequest request = + GetDiscoveredRangeRequest.newBuilder() + .setName( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]") + .toString()) + .build(); + DiscoveredRange response = cloudNumberRegistryClient.getDiscoveredRange(request); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetDiscoveredRange_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/SyncGetDiscoveredRangeDiscoveredrangename.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/SyncGetDiscoveredRangeDiscoveredrangename.java new file mode 100644 index 000000000000..3ffaafa66413 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/SyncGetDiscoveredRangeDiscoveredrangename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetDiscoveredRange_Discoveredrangename_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRange; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRangeName; + +public class SyncGetDiscoveredRangeDiscoveredrangename { + + public static void main(String[] args) throws Exception { + syncGetDiscoveredRangeDiscoveredrangename(); + } + + public static void syncGetDiscoveredRangeDiscoveredrangename() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + DiscoveredRange response = cloudNumberRegistryClient.getDiscoveredRange(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetDiscoveredRange_Discoveredrangename_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/SyncGetDiscoveredRangeString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/SyncGetDiscoveredRangeString.java new file mode 100644 index 000000000000..0da0f999e258 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getdiscoveredrange/SyncGetDiscoveredRangeString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetDiscoveredRange_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRange; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRangeName; + +public class SyncGetDiscoveredRangeString { + + public static void main(String[] args) throws Exception { + syncGetDiscoveredRangeString(); + } + + public static void syncGetDiscoveredRangeString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString(); + DiscoveredRange response = cloudNumberRegistryClient.getDiscoveredRange(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetDiscoveredRange_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/AsyncGetIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/AsyncGetIpamAdminScope.java new file mode 100644 index 000000000000..86bdca30ea45 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/AsyncGetIpamAdminScope.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetIpamAdminScope_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; + +public class AsyncGetIpamAdminScope { + + public static void main(String[] args) throws Exception { + asyncGetIpamAdminScope(); + } + + public static void asyncGetIpamAdminScope() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + GetIpamAdminScopeRequest request = + GetIpamAdminScopeRequest.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .build(); + ApiFuture future = + cloudNumberRegistryClient.getIpamAdminScopeCallable().futureCall(request); + // Do something. + IpamAdminScope response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetIpamAdminScope_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/SyncGetIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/SyncGetIpamAdminScope.java new file mode 100644 index 000000000000..8b4fa111a9b6 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/SyncGetIpamAdminScope.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetIpamAdminScope_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.GetIpamAdminScopeRequest; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; + +public class SyncGetIpamAdminScope { + + public static void main(String[] args) throws Exception { + syncGetIpamAdminScope(); + } + + public static void syncGetIpamAdminScope() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + GetIpamAdminScopeRequest request = + GetIpamAdminScopeRequest.newBuilder() + .setName( + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString()) + .build(); + IpamAdminScope response = cloudNumberRegistryClient.getIpamAdminScope(request); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetIpamAdminScope_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/SyncGetIpamAdminScopeIpamadminscopename.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/SyncGetIpamAdminScopeIpamadminscopename.java new file mode 100644 index 000000000000..ae62f148a6ee --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/SyncGetIpamAdminScopeIpamadminscopename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetIpamAdminScope_Ipamadminscopename_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; + +public class SyncGetIpamAdminScopeIpamadminscopename { + + public static void main(String[] args) throws Exception { + syncGetIpamAdminScopeIpamadminscopename(); + } + + public static void syncGetIpamAdminScopeIpamadminscopename() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + IpamAdminScopeName name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]"); + IpamAdminScope response = cloudNumberRegistryClient.getIpamAdminScope(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetIpamAdminScope_Ipamadminscopename_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/SyncGetIpamAdminScopeString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/SyncGetIpamAdminScopeString.java new file mode 100644 index 000000000000..790d2f200bf3 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getipamadminscope/SyncGetIpamAdminScopeString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetIpamAdminScope_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScopeName; + +public class SyncGetIpamAdminScopeString { + + public static void main(String[] args) throws Exception { + syncGetIpamAdminScopeString(); + } + + public static void syncGetIpamAdminScopeString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = + IpamAdminScopeName.of("[PROJECT]", "[LOCATION]", "[IPAM_ADMIN_SCOPE]").toString(); + IpamAdminScope response = cloudNumberRegistryClient.getIpamAdminScope(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetIpamAdminScope_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/AsyncGetRealm.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/AsyncGetRealm.java new file mode 100644 index 000000000000..e4a1543567ac --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/AsyncGetRealm.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRealm_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.GetRealmRequest; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.cloud.numberregistry.v1alpha.RealmName; + +public class AsyncGetRealm { + + public static void main(String[] args) throws Exception { + asyncGetRealm(); + } + + public static void asyncGetRealm() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + GetRealmRequest request = + GetRealmRequest.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .build(); + ApiFuture future = cloudNumberRegistryClient.getRealmCallable().futureCall(request); + // Do something. + Realm response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRealm_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/SyncGetRealm.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/SyncGetRealm.java new file mode 100644 index 000000000000..95a8ad3539cd --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/SyncGetRealm.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRealm_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.GetRealmRequest; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.cloud.numberregistry.v1alpha.RealmName; + +public class SyncGetRealm { + + public static void main(String[] args) throws Exception { + syncGetRealm(); + } + + public static void syncGetRealm() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + GetRealmRequest request = + GetRealmRequest.newBuilder() + .setName(RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString()) + .build(); + Realm response = cloudNumberRegistryClient.getRealm(request); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRealm_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/SyncGetRealmRealmname.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/SyncGetRealmRealmname.java new file mode 100644 index 000000000000..765d25870849 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/SyncGetRealmRealmname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRealm_Realmname_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.cloud.numberregistry.v1alpha.RealmName; + +public class SyncGetRealmRealmname { + + public static void main(String[] args) throws Exception { + syncGetRealmRealmname(); + } + + public static void syncGetRealmRealmname() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + RealmName name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]"); + Realm response = cloudNumberRegistryClient.getRealm(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRealm_Realmname_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/SyncGetRealmString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/SyncGetRealmString.java new file mode 100644 index 000000000000..d02f6c2108b6 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getrealm/SyncGetRealmString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRealm_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.cloud.numberregistry.v1alpha.RealmName; + +public class SyncGetRealmString { + + public static void main(String[] args) throws Exception { + syncGetRealmString(); + } + + public static void syncGetRealmString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = RealmName.of("[PROJECT]", "[LOCATION]", "[REALM]").toString(); + Realm response = cloudNumberRegistryClient.getRealm(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRealm_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/AsyncGetRegistryBook.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/AsyncGetRegistryBook.java new file mode 100644 index 000000000000..88c86fd68248 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/AsyncGetRegistryBook.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRegistryBook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; +import com.google.cloud.numberregistry.v1alpha.RegistryBookView; + +public class AsyncGetRegistryBook { + + public static void main(String[] args) throws Exception { + asyncGetRegistryBook(); + } + + public static void asyncGetRegistryBook() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + GetRegistryBookRequest request = + GetRegistryBookRequest.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setView(RegistryBookView.forNumber(0)) + .build(); + ApiFuture future = + cloudNumberRegistryClient.getRegistryBookCallable().futureCall(request); + // Do something. + RegistryBook response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRegistryBook_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/SyncGetRegistryBook.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/SyncGetRegistryBook.java new file mode 100644 index 000000000000..2b52700ca91e --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/SyncGetRegistryBook.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRegistryBook_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.GetRegistryBookRequest; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; +import com.google.cloud.numberregistry.v1alpha.RegistryBookView; + +public class SyncGetRegistryBook { + + public static void main(String[] args) throws Exception { + syncGetRegistryBook(); + } + + public static void syncGetRegistryBook() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + GetRegistryBookRequest request = + GetRegistryBookRequest.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setView(RegistryBookView.forNumber(0)) + .build(); + RegistryBook response = cloudNumberRegistryClient.getRegistryBook(request); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRegistryBook_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/SyncGetRegistryBookRegistrybookname.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/SyncGetRegistryBookRegistrybookname.java new file mode 100644 index 000000000000..607d929baa87 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/SyncGetRegistryBookRegistrybookname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRegistryBook_Registrybookname_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; + +public class SyncGetRegistryBookRegistrybookname { + + public static void main(String[] args) throws Exception { + syncGetRegistryBookRegistrybookname(); + } + + public static void syncGetRegistryBookRegistrybookname() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + RegistryBook response = cloudNumberRegistryClient.getRegistryBook(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRegistryBook_Registrybookname_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/SyncGetRegistryBookString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/SyncGetRegistryBookString.java new file mode 100644 index 000000000000..ac4d8b13aaed --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/getregistrybook/SyncGetRegistryBookString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRegistryBook_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; + +public class SyncGetRegistryBookString { + + public static void main(String[] args) throws Exception { + syncGetRegistryBookString(); + } + + public static void syncGetRegistryBookString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString(); + RegistryBook response = cloudNumberRegistryClient.getRegistryBook(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_GetRegistryBook_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/AsyncListCustomRanges.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/AsyncListCustomRanges.java new file mode 100644 index 000000000000..9b3dd330b616 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/AsyncListCustomRanges.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListCustomRanges_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class AsyncListCustomRanges { + + public static void main(String[] args) throws Exception { + asyncListCustomRanges(); + } + + public static void asyncListCustomRanges() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListCustomRangesRequest request = + ListCustomRangesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + cloudNumberRegistryClient.listCustomRangesPagedCallable().futureCall(request); + // Do something. + for (CustomRange element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListCustomRanges_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/AsyncListCustomRangesPaged.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/AsyncListCustomRangesPaged.java new file mode 100644 index 000000000000..9448390e4900 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/AsyncListCustomRangesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListCustomRanges_Paged_async] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest; +import com.google.cloud.numberregistry.v1alpha.ListCustomRangesResponse; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.common.base.Strings; + +public class AsyncListCustomRangesPaged { + + public static void main(String[] args) throws Exception { + asyncListCustomRangesPaged(); + } + + public static void asyncListCustomRangesPaged() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListCustomRangesRequest request = + ListCustomRangesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListCustomRangesResponse response = + cloudNumberRegistryClient.listCustomRangesCallable().call(request); + for (CustomRange element : response.getCustomRangesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListCustomRanges_Paged_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/SyncListCustomRanges.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/SyncListCustomRanges.java new file mode 100644 index 000000000000..10b03eb0d445 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/SyncListCustomRanges.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListCustomRanges_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.ListCustomRangesRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncListCustomRanges { + + public static void main(String[] args) throws Exception { + syncListCustomRanges(); + } + + public static void syncListCustomRanges() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListCustomRangesRequest request = + ListCustomRangesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (CustomRange element : cloudNumberRegistryClient.listCustomRanges(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListCustomRanges_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/SyncListCustomRangesLocationname.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/SyncListCustomRangesLocationname.java new file mode 100644 index 000000000000..f24aa13bc186 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/SyncListCustomRangesLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListCustomRanges_Locationname_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncListCustomRangesLocationname { + + public static void main(String[] args) throws Exception { + syncListCustomRangesLocationname(); + } + + public static void syncListCustomRangesLocationname() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (CustomRange element : cloudNumberRegistryClient.listCustomRanges(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListCustomRanges_Locationname_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/SyncListCustomRangesString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/SyncListCustomRangesString.java new file mode 100644 index 000000000000..31b6d892e049 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listcustomranges/SyncListCustomRangesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListCustomRanges_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncListCustomRangesString { + + public static void main(String[] args) throws Exception { + syncListCustomRangesString(); + } + + public static void syncListCustomRangesString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (CustomRange element : cloudNumberRegistryClient.listCustomRanges(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListCustomRanges_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/AsyncListDiscoveredRanges.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/AsyncListDiscoveredRanges.java new file mode 100644 index 000000000000..9e4dbebebc65 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/AsyncListDiscoveredRanges.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListDiscoveredRanges_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRange; +import com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class AsyncListDiscoveredRanges { + + public static void main(String[] args) throws Exception { + asyncListDiscoveredRanges(); + } + + public static void asyncListDiscoveredRanges() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListDiscoveredRangesRequest request = + ListDiscoveredRangesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + cloudNumberRegistryClient.listDiscoveredRangesPagedCallable().futureCall(request); + // Do something. + for (DiscoveredRange element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListDiscoveredRanges_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/AsyncListDiscoveredRangesPaged.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/AsyncListDiscoveredRangesPaged.java new file mode 100644 index 000000000000..4ff2aebd1711 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/AsyncListDiscoveredRangesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListDiscoveredRanges_Paged_async] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRange; +import com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest; +import com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesResponse; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.common.base.Strings; + +public class AsyncListDiscoveredRangesPaged { + + public static void main(String[] args) throws Exception { + asyncListDiscoveredRangesPaged(); + } + + public static void asyncListDiscoveredRangesPaged() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListDiscoveredRangesRequest request = + ListDiscoveredRangesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListDiscoveredRangesResponse response = + cloudNumberRegistryClient.listDiscoveredRangesCallable().call(request); + for (DiscoveredRange element : response.getDiscoveredRangesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListDiscoveredRanges_Paged_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/SyncListDiscoveredRanges.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/SyncListDiscoveredRanges.java new file mode 100644 index 000000000000..b601515cc85d --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/SyncListDiscoveredRanges.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListDiscoveredRanges_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRange; +import com.google.cloud.numberregistry.v1alpha.ListDiscoveredRangesRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncListDiscoveredRanges { + + public static void main(String[] args) throws Exception { + syncListDiscoveredRanges(); + } + + public static void syncListDiscoveredRanges() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListDiscoveredRangesRequest request = + ListDiscoveredRangesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (DiscoveredRange element : + cloudNumberRegistryClient.listDiscoveredRanges(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListDiscoveredRanges_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/SyncListDiscoveredRangesLocationname.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/SyncListDiscoveredRangesLocationname.java new file mode 100644 index 000000000000..2b16c4c59ef4 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/SyncListDiscoveredRangesLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListDiscoveredRanges_Locationname_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRange; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncListDiscoveredRangesLocationname { + + public static void main(String[] args) throws Exception { + syncListDiscoveredRangesLocationname(); + } + + public static void syncListDiscoveredRangesLocationname() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (DiscoveredRange element : + cloudNumberRegistryClient.listDiscoveredRanges(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListDiscoveredRanges_Locationname_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/SyncListDiscoveredRangesString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/SyncListDiscoveredRangesString.java new file mode 100644 index 000000000000..252acf12426d --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listdiscoveredranges/SyncListDiscoveredRangesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListDiscoveredRanges_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRange; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncListDiscoveredRangesString { + + public static void main(String[] args) throws Exception { + syncListDiscoveredRangesString(); + } + + public static void syncListDiscoveredRangesString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (DiscoveredRange element : + cloudNumberRegistryClient.listDiscoveredRanges(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListDiscoveredRanges_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/AsyncListIpamAdminScopes.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/AsyncListIpamAdminScopes.java new file mode 100644 index 000000000000..b21142bdb558 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/AsyncListIpamAdminScopes.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListIpamAdminScopes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class AsyncListIpamAdminScopes { + + public static void main(String[] args) throws Exception { + asyncListIpamAdminScopes(); + } + + public static void asyncListIpamAdminScopes() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListIpamAdminScopesRequest request = + ListIpamAdminScopesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + cloudNumberRegistryClient.listIpamAdminScopesPagedCallable().futureCall(request); + // Do something. + for (IpamAdminScope element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListIpamAdminScopes_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/AsyncListIpamAdminScopesPaged.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/AsyncListIpamAdminScopesPaged.java new file mode 100644 index 000000000000..0295517e7092 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/AsyncListIpamAdminScopesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListIpamAdminScopes_Paged_async] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest; +import com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesResponse; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.common.base.Strings; + +public class AsyncListIpamAdminScopesPaged { + + public static void main(String[] args) throws Exception { + asyncListIpamAdminScopesPaged(); + } + + public static void asyncListIpamAdminScopesPaged() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListIpamAdminScopesRequest request = + ListIpamAdminScopesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListIpamAdminScopesResponse response = + cloudNumberRegistryClient.listIpamAdminScopesCallable().call(request); + for (IpamAdminScope element : response.getIpamAdminScopesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListIpamAdminScopes_Paged_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/SyncListIpamAdminScopes.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/SyncListIpamAdminScopes.java new file mode 100644 index 000000000000..62920466187e --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/SyncListIpamAdminScopes.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListIpamAdminScopes_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.ListIpamAdminScopesRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncListIpamAdminScopes { + + public static void main(String[] args) throws Exception { + syncListIpamAdminScopes(); + } + + public static void syncListIpamAdminScopes() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListIpamAdminScopesRequest request = + ListIpamAdminScopesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (IpamAdminScope element : + cloudNumberRegistryClient.listIpamAdminScopes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListIpamAdminScopes_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/SyncListIpamAdminScopesLocationname.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/SyncListIpamAdminScopesLocationname.java new file mode 100644 index 000000000000..1b6281c00904 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/SyncListIpamAdminScopesLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListIpamAdminScopes_Locationname_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncListIpamAdminScopesLocationname { + + public static void main(String[] args) throws Exception { + syncListIpamAdminScopesLocationname(); + } + + public static void syncListIpamAdminScopesLocationname() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (IpamAdminScope element : + cloudNumberRegistryClient.listIpamAdminScopes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListIpamAdminScopes_Locationname_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/SyncListIpamAdminScopesString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/SyncListIpamAdminScopesString.java new file mode 100644 index 000000000000..4a4e18d0c422 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listipamadminscopes/SyncListIpamAdminScopesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListIpamAdminScopes_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.LocationName; + +public class SyncListIpamAdminScopesString { + + public static void main(String[] args) throws Exception { + syncListIpamAdminScopesString(); + } + + public static void syncListIpamAdminScopesString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (IpamAdminScope element : + cloudNumberRegistryClient.listIpamAdminScopes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListIpamAdminScopes_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/AsyncListRealms.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/AsyncListRealms.java new file mode 100644 index 000000000000..429fed05c957 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/AsyncListRealms.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRealms_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.ListRealmsRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.Realm; + +public class AsyncListRealms { + + public static void main(String[] args) throws Exception { + asyncListRealms(); + } + + public static void asyncListRealms() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListRealmsRequest request = + ListRealmsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + cloudNumberRegistryClient.listRealmsPagedCallable().futureCall(request); + // Do something. + for (Realm element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRealms_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/AsyncListRealmsPaged.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/AsyncListRealmsPaged.java new file mode 100644 index 000000000000..889645ca8492 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/AsyncListRealmsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRealms_Paged_async] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.ListRealmsRequest; +import com.google.cloud.numberregistry.v1alpha.ListRealmsResponse; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.common.base.Strings; + +public class AsyncListRealmsPaged { + + public static void main(String[] args) throws Exception { + asyncListRealmsPaged(); + } + + public static void asyncListRealmsPaged() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListRealmsRequest request = + ListRealmsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListRealmsResponse response = cloudNumberRegistryClient.listRealmsCallable().call(request); + for (Realm element : response.getRealmsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRealms_Paged_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/SyncListRealms.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/SyncListRealms.java new file mode 100644 index 000000000000..73f32534e807 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/SyncListRealms.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRealms_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.ListRealmsRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.Realm; + +public class SyncListRealms { + + public static void main(String[] args) throws Exception { + syncListRealms(); + } + + public static void syncListRealms() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListRealmsRequest request = + ListRealmsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Realm element : cloudNumberRegistryClient.listRealms(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRealms_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/SyncListRealmsLocationname.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/SyncListRealmsLocationname.java new file mode 100644 index 000000000000..8e00419c8a73 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/SyncListRealmsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRealms_Locationname_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.Realm; + +public class SyncListRealmsLocationname { + + public static void main(String[] args) throws Exception { + syncListRealmsLocationname(); + } + + public static void syncListRealmsLocationname() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Realm element : cloudNumberRegistryClient.listRealms(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRealms_Locationname_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/SyncListRealmsString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/SyncListRealmsString.java new file mode 100644 index 000000000000..477340640a79 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listrealms/SyncListRealmsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRealms_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.Realm; + +public class SyncListRealmsString { + + public static void main(String[] args) throws Exception { + syncListRealmsString(); + } + + public static void syncListRealmsString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Realm element : cloudNumberRegistryClient.listRealms(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRealms_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/AsyncListRegistryBooks.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/AsyncListRegistryBooks.java new file mode 100644 index 000000000000..022907bd413a --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/AsyncListRegistryBooks.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRegistryBooks_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.RegistryBookView; + +public class AsyncListRegistryBooks { + + public static void main(String[] args) throws Exception { + asyncListRegistryBooks(); + } + + public static void asyncListRegistryBooks() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListRegistryBooksRequest request = + ListRegistryBooksRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(RegistryBookView.forNumber(0)) + .build(); + ApiFuture future = + cloudNumberRegistryClient.listRegistryBooksPagedCallable().futureCall(request); + // Do something. + for (RegistryBook element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRegistryBooks_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/AsyncListRegistryBooksPaged.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/AsyncListRegistryBooksPaged.java new file mode 100644 index 000000000000..d6d9b74a7ae3 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/AsyncListRegistryBooksPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRegistryBooks_Paged_async] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest; +import com.google.cloud.numberregistry.v1alpha.ListRegistryBooksResponse; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.RegistryBookView; +import com.google.common.base.Strings; + +public class AsyncListRegistryBooksPaged { + + public static void main(String[] args) throws Exception { + asyncListRegistryBooksPaged(); + } + + public static void asyncListRegistryBooksPaged() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListRegistryBooksRequest request = + ListRegistryBooksRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(RegistryBookView.forNumber(0)) + .build(); + while (true) { + ListRegistryBooksResponse response = + cloudNumberRegistryClient.listRegistryBooksCallable().call(request); + for (RegistryBook element : response.getRegistryBooksList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRegistryBooks_Paged_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/SyncListRegistryBooks.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/SyncListRegistryBooks.java new file mode 100644 index 000000000000..5ee88003f97e --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/SyncListRegistryBooks.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRegistryBooks_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.ListRegistryBooksRequest; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.RegistryBookView; + +public class SyncListRegistryBooks { + + public static void main(String[] args) throws Exception { + syncListRegistryBooks(); + } + + public static void syncListRegistryBooks() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ListRegistryBooksRequest request = + ListRegistryBooksRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(RegistryBookView.forNumber(0)) + .build(); + for (RegistryBook element : + cloudNumberRegistryClient.listRegistryBooks(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRegistryBooks_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/SyncListRegistryBooksLocationname.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/SyncListRegistryBooksLocationname.java new file mode 100644 index 000000000000..9e32ee8f027a --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/SyncListRegistryBooksLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRegistryBooks_Locationname_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; + +public class SyncListRegistryBooksLocationname { + + public static void main(String[] args) throws Exception { + syncListRegistryBooksLocationname(); + } + + public static void syncListRegistryBooksLocationname() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (RegistryBook element : + cloudNumberRegistryClient.listRegistryBooks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRegistryBooks_Locationname_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/SyncListRegistryBooksString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/SyncListRegistryBooksString.java new file mode 100644 index 000000000000..6615302d5074 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/listregistrybooks/SyncListRegistryBooksString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRegistryBooks_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.LocationName; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; + +public class SyncListRegistryBooksString { + + public static void main(String[] args) throws Exception { + syncListRegistryBooksString(); + } + + public static void syncListRegistryBooksString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (RegistryBook element : + cloudNumberRegistryClient.listRegistryBooks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ListRegistryBooks_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/AsyncSearchIpResources.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/AsyncSearchIpResources.java new file mode 100644 index 000000000000..8144fc5311f3 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/AsyncSearchIpResources.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_SearchIpResources_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.Range; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; +import com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest; +import java.util.ArrayList; + +public class AsyncSearchIpResources { + + public static void main(String[] args) throws Exception { + asyncSearchIpResources(); + } + + public static void asyncSearchIpResources() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + SearchIpResourcesRequest request = + SearchIpResourcesRequest.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setQuery("query107944136") + .setOrderBy("orderBy-1207110587") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowUtilization(true) + .addAllSearchResourceTypes( + new ArrayList()) + .build(); + ApiFuture future = + cloudNumberRegistryClient.searchIpResourcesPagedCallable().futureCall(request); + // Do something. + for (Range element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_SearchIpResources_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/AsyncSearchIpResourcesPaged.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/AsyncSearchIpResourcesPaged.java new file mode 100644 index 000000000000..c01ec8544921 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/AsyncSearchIpResourcesPaged.java @@ -0,0 +1,68 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_SearchIpResources_Paged_async] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.Range; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; +import com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest; +import com.google.cloud.numberregistry.v1alpha.SearchIpResourcesResponse; +import com.google.common.base.Strings; +import java.util.ArrayList; + +public class AsyncSearchIpResourcesPaged { + + public static void main(String[] args) throws Exception { + asyncSearchIpResourcesPaged(); + } + + public static void asyncSearchIpResourcesPaged() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + SearchIpResourcesRequest request = + SearchIpResourcesRequest.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setQuery("query107944136") + .setOrderBy("orderBy-1207110587") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowUtilization(true) + .addAllSearchResourceTypes( + new ArrayList()) + .build(); + while (true) { + SearchIpResourcesResponse response = + cloudNumberRegistryClient.searchIpResourcesCallable().call(request); + for (Range element : response.getRangesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_SearchIpResources_Paged_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/SyncSearchIpResources.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/SyncSearchIpResources.java new file mode 100644 index 000000000000..486549ac2185 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/SyncSearchIpResources.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_SearchIpResources_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.Range; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; +import com.google.cloud.numberregistry.v1alpha.SearchIpResourcesRequest; +import java.util.ArrayList; + +public class SyncSearchIpResources { + + public static void main(String[] args) throws Exception { + syncSearchIpResources(); + } + + public static void syncSearchIpResources() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + SearchIpResourcesRequest request = + SearchIpResourcesRequest.newBuilder() + .setName(RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString()) + .setQuery("query107944136") + .setOrderBy("orderBy-1207110587") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowUtilization(true) + .addAllSearchResourceTypes( + new ArrayList()) + .build(); + for (Range element : cloudNumberRegistryClient.searchIpResources(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_SearchIpResources_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/SyncSearchIpResourcesRegistrybookname.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/SyncSearchIpResourcesRegistrybookname.java new file mode 100644 index 000000000000..97a0a4a91d07 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/SyncSearchIpResourcesRegistrybookname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_SearchIpResources_Registrybookname_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.Range; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; + +public class SyncSearchIpResourcesRegistrybookname { + + public static void main(String[] args) throws Exception { + syncSearchIpResourcesRegistrybookname(); + } + + public static void syncSearchIpResourcesRegistrybookname() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + RegistryBookName name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]"); + for (Range element : cloudNumberRegistryClient.searchIpResources(name).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_SearchIpResources_Registrybookname_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/SyncSearchIpResourcesString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/SyncSearchIpResourcesString.java new file mode 100644 index 000000000000..5cce97bbea6f --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/searchipresources/SyncSearchIpResourcesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_SearchIpResources_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.Range; +import com.google.cloud.numberregistry.v1alpha.RegistryBookName; + +public class SyncSearchIpResourcesString { + + public static void main(String[] args) throws Exception { + syncSearchIpResourcesString(); + } + + public static void syncSearchIpResourcesString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = RegistryBookName.of("[PROJECT]", "[LOCATION]", "[REGISTRY_BOOK]").toString(); + for (Range element : cloudNumberRegistryClient.searchIpResources(name).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_SearchIpResources_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/AsyncShowCustomRangeUtilization.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/AsyncShowCustomRangeUtilization.java new file mode 100644 index 000000000000..9f802b5622cc --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/AsyncShowCustomRangeUtilization.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowCustomRangeUtilization_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse; + +public class AsyncShowCustomRangeUtilization { + + public static void main(String[] args) throws Exception { + asyncShowCustomRangeUtilization(); + } + + public static void asyncShowCustomRangeUtilization() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ShowCustomRangeUtilizationRequest request = + ShowCustomRangeUtilizationRequest.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .build(); + ApiFuture future = + cloudNumberRegistryClient.showCustomRangeUtilizationCallable().futureCall(request); + // Do something. + ShowCustomRangeUtilizationResponse response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowCustomRangeUtilization_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/SyncShowCustomRangeUtilization.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/SyncShowCustomRangeUtilization.java new file mode 100644 index 000000000000..991f9b3403ea --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/SyncShowCustomRangeUtilization.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowCustomRangeUtilization_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationRequest; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse; + +public class SyncShowCustomRangeUtilization { + + public static void main(String[] args) throws Exception { + syncShowCustomRangeUtilization(); + } + + public static void syncShowCustomRangeUtilization() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ShowCustomRangeUtilizationRequest request = + ShowCustomRangeUtilizationRequest.newBuilder() + .setName(CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString()) + .build(); + ShowCustomRangeUtilizationResponse response = + cloudNumberRegistryClient.showCustomRangeUtilization(request); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowCustomRangeUtilization_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/SyncShowCustomRangeUtilizationCustomrangename.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/SyncShowCustomRangeUtilizationCustomrangename.java new file mode 100644 index 000000000000..3a0157fadc19 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/SyncShowCustomRangeUtilizationCustomrangename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowCustomRangeUtilization_Customrangename_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse; + +public class SyncShowCustomRangeUtilizationCustomrangename { + + public static void main(String[] args) throws Exception { + syncShowCustomRangeUtilizationCustomrangename(); + } + + public static void syncShowCustomRangeUtilizationCustomrangename() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CustomRangeName name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]"); + ShowCustomRangeUtilizationResponse response = + cloudNumberRegistryClient.showCustomRangeUtilization(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowCustomRangeUtilization_Customrangename_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/SyncShowCustomRangeUtilizationString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/SyncShowCustomRangeUtilizationString.java new file mode 100644 index 000000000000..25c4e0b210ae --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showcustomrangeutilization/SyncShowCustomRangeUtilizationString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowCustomRangeUtilization_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRangeName; +import com.google.cloud.numberregistry.v1alpha.ShowCustomRangeUtilizationResponse; + +public class SyncShowCustomRangeUtilizationString { + + public static void main(String[] args) throws Exception { + syncShowCustomRangeUtilizationString(); + } + + public static void syncShowCustomRangeUtilizationString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = CustomRangeName.of("[PROJECT]", "[LOCATION]", "[CUSTOM_RANGE]").toString(); + ShowCustomRangeUtilizationResponse response = + cloudNumberRegistryClient.showCustomRangeUtilization(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowCustomRangeUtilization_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/AsyncShowDiscoveredRangeUtilization.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/AsyncShowDiscoveredRangeUtilization.java new file mode 100644 index 000000000000..a81cd8730a36 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/AsyncShowDiscoveredRangeUtilization.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowDiscoveredRangeUtilization_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRangeName; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse; + +public class AsyncShowDiscoveredRangeUtilization { + + public static void main(String[] args) throws Exception { + asyncShowDiscoveredRangeUtilization(); + } + + public static void asyncShowDiscoveredRangeUtilization() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ShowDiscoveredRangeUtilizationRequest request = + ShowDiscoveredRangeUtilizationRequest.newBuilder() + .setName( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]") + .toString()) + .build(); + ApiFuture future = + cloudNumberRegistryClient.showDiscoveredRangeUtilizationCallable().futureCall(request); + // Do something. + ShowDiscoveredRangeUtilizationResponse response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowDiscoveredRangeUtilization_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/SyncShowDiscoveredRangeUtilization.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/SyncShowDiscoveredRangeUtilization.java new file mode 100644 index 000000000000..a82d25b9c569 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/SyncShowDiscoveredRangeUtilization.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowDiscoveredRangeUtilization_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRangeName; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationRequest; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse; + +public class SyncShowDiscoveredRangeUtilization { + + public static void main(String[] args) throws Exception { + syncShowDiscoveredRangeUtilization(); + } + + public static void syncShowDiscoveredRangeUtilization() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + ShowDiscoveredRangeUtilizationRequest request = + ShowDiscoveredRangeUtilizationRequest.newBuilder() + .setName( + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]") + .toString()) + .build(); + ShowDiscoveredRangeUtilizationResponse response = + cloudNumberRegistryClient.showDiscoveredRangeUtilization(request); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowDiscoveredRangeUtilization_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/SyncShowDiscoveredRangeUtilizationDiscoveredrangename.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/SyncShowDiscoveredRangeUtilizationDiscoveredrangename.java new file mode 100644 index 000000000000..18a2362604dc --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/SyncShowDiscoveredRangeUtilizationDiscoveredrangename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowDiscoveredRangeUtilization_Discoveredrangename_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRangeName; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse; + +public class SyncShowDiscoveredRangeUtilizationDiscoveredrangename { + + public static void main(String[] args) throws Exception { + syncShowDiscoveredRangeUtilizationDiscoveredrangename(); + } + + public static void syncShowDiscoveredRangeUtilizationDiscoveredrangename() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + DiscoveredRangeName name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]"); + ShowDiscoveredRangeUtilizationResponse response = + cloudNumberRegistryClient.showDiscoveredRangeUtilization(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowDiscoveredRangeUtilization_Discoveredrangename_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/SyncShowDiscoveredRangeUtilizationString.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/SyncShowDiscoveredRangeUtilizationString.java new file mode 100644 index 000000000000..f05386b532e8 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/showdiscoveredrangeutilization/SyncShowDiscoveredRangeUtilizationString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowDiscoveredRangeUtilization_String_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.DiscoveredRangeName; +import com.google.cloud.numberregistry.v1alpha.ShowDiscoveredRangeUtilizationResponse; + +public class SyncShowDiscoveredRangeUtilizationString { + + public static void main(String[] args) throws Exception { + syncShowDiscoveredRangeUtilizationString(); + } + + public static void syncShowDiscoveredRangeUtilizationString() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + String name = + DiscoveredRangeName.of("[PROJECT]", "[LOCATION]", "[DISCOVERED_RANGE]").toString(); + ShowDiscoveredRangeUtilizationResponse response = + cloudNumberRegistryClient.showDiscoveredRangeUtilization(name); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_ShowDiscoveredRangeUtilization_String_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/AsyncUpdateCustomRange.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/AsyncUpdateCustomRange.java new file mode 100644 index 000000000000..edd1794e496e --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/AsyncUpdateCustomRange.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateCustomRange_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateCustomRange { + + public static void main(String[] args) throws Exception { + asyncUpdateCustomRange(); + } + + public static void asyncUpdateCustomRange() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + UpdateCustomRangeRequest request = + UpdateCustomRangeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setCustomRange(CustomRange.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudNumberRegistryClient.updateCustomRangeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateCustomRange_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/AsyncUpdateCustomRangeLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/AsyncUpdateCustomRangeLRO.java new file mode 100644 index 000000000000..d89943750fbe --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/AsyncUpdateCustomRangeLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateCustomRange_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateCustomRangeLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateCustomRangeLRO(); + } + + public static void asyncUpdateCustomRangeLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + UpdateCustomRangeRequest request = + UpdateCustomRangeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setCustomRange(CustomRange.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudNumberRegistryClient.updateCustomRangeOperationCallable().futureCall(request); + // Do something. + CustomRange response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateCustomRange_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/SyncUpdateCustomRange.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/SyncUpdateCustomRange.java new file mode 100644 index 000000000000..46caafeab47d --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/SyncUpdateCustomRange.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateCustomRange_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.cloud.numberregistry.v1alpha.UpdateCustomRangeRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateCustomRange { + + public static void main(String[] args) throws Exception { + syncUpdateCustomRange(); + } + + public static void syncUpdateCustomRange() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + UpdateCustomRangeRequest request = + UpdateCustomRangeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setCustomRange(CustomRange.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + CustomRange response = cloudNumberRegistryClient.updateCustomRangeAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateCustomRange_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/SyncUpdateCustomRangeCustomrangeFieldmask.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/SyncUpdateCustomRangeCustomrangeFieldmask.java new file mode 100644 index 000000000000..aecb3c187d1a --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updatecustomrange/SyncUpdateCustomRangeCustomrangeFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateCustomRange_CustomrangeFieldmask_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.CustomRange; +import com.google.protobuf.FieldMask; + +public class SyncUpdateCustomRangeCustomrangeFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateCustomRangeCustomrangeFieldmask(); + } + + public static void syncUpdateCustomRangeCustomrangeFieldmask() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + CustomRange customRange = CustomRange.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + CustomRange response = + cloudNumberRegistryClient.updateCustomRangeAsync(customRange, updateMask).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateCustomRange_CustomrangeFieldmask_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/AsyncUpdateIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/AsyncUpdateIpamAdminScope.java new file mode 100644 index 000000000000..d5db84074b64 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/AsyncUpdateIpamAdminScope.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateIpamAdminScope_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateIpamAdminScope { + + public static void main(String[] args) throws Exception { + asyncUpdateIpamAdminScope(); + } + + public static void asyncUpdateIpamAdminScope() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + UpdateIpamAdminScopeRequest request = + UpdateIpamAdminScopeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setIpamAdminScope(IpamAdminScope.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudNumberRegistryClient.updateIpamAdminScopeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateIpamAdminScope_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/AsyncUpdateIpamAdminScopeLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/AsyncUpdateIpamAdminScopeLRO.java new file mode 100644 index 000000000000..d43d0554b973 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/AsyncUpdateIpamAdminScopeLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateIpamAdminScope_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateIpamAdminScopeLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateIpamAdminScopeLRO(); + } + + public static void asyncUpdateIpamAdminScopeLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + UpdateIpamAdminScopeRequest request = + UpdateIpamAdminScopeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setIpamAdminScope(IpamAdminScope.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudNumberRegistryClient.updateIpamAdminScopeOperationCallable().futureCall(request); + // Do something. + IpamAdminScope response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateIpamAdminScope_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/SyncUpdateIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/SyncUpdateIpamAdminScope.java new file mode 100644 index 000000000000..d26732867c4b --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/SyncUpdateIpamAdminScope.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateIpamAdminScope_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.cloud.numberregistry.v1alpha.UpdateIpamAdminScopeRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateIpamAdminScope { + + public static void main(String[] args) throws Exception { + syncUpdateIpamAdminScope(); + } + + public static void syncUpdateIpamAdminScope() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + UpdateIpamAdminScopeRequest request = + UpdateIpamAdminScopeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setIpamAdminScope(IpamAdminScope.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + IpamAdminScope response = cloudNumberRegistryClient.updateIpamAdminScopeAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateIpamAdminScope_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/SyncUpdateIpamAdminScopeIpamadminscopeFieldmask.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/SyncUpdateIpamAdminScopeIpamadminscopeFieldmask.java new file mode 100644 index 000000000000..03d0c39d9aaf --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateipamadminscope/SyncUpdateIpamAdminScopeIpamadminscopeFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateIpamAdminScope_IpamadminscopeFieldmask_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.IpamAdminScope; +import com.google.protobuf.FieldMask; + +public class SyncUpdateIpamAdminScopeIpamadminscopeFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateIpamAdminScopeIpamadminscopeFieldmask(); + } + + public static void syncUpdateIpamAdminScopeIpamadminscopeFieldmask() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + IpamAdminScope ipamAdminScope = IpamAdminScope.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + IpamAdminScope response = + cloudNumberRegistryClient.updateIpamAdminScopeAsync(ipamAdminScope, updateMask).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateIpamAdminScope_IpamadminscopeFieldmask_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/AsyncUpdateRealm.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/AsyncUpdateRealm.java new file mode 100644 index 000000000000..d1058289a338 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/AsyncUpdateRealm.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRealm_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateRealm { + + public static void main(String[] args) throws Exception { + asyncUpdateRealm(); + } + + public static void asyncUpdateRealm() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + UpdateRealmRequest request = + UpdateRealmRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setRealm(Realm.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudNumberRegistryClient.updateRealmCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRealm_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/AsyncUpdateRealmLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/AsyncUpdateRealmLRO.java new file mode 100644 index 000000000000..041d82048d08 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/AsyncUpdateRealmLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRealm_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateRealmLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateRealmLRO(); + } + + public static void asyncUpdateRealmLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + UpdateRealmRequest request = + UpdateRealmRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setRealm(Realm.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudNumberRegistryClient.updateRealmOperationCallable().futureCall(request); + // Do something. + Realm response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRealm_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/SyncUpdateRealm.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/SyncUpdateRealm.java new file mode 100644 index 000000000000..c0ae5f5cdf56 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/SyncUpdateRealm.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRealm_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.cloud.numberregistry.v1alpha.UpdateRealmRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateRealm { + + public static void main(String[] args) throws Exception { + syncUpdateRealm(); + } + + public static void syncUpdateRealm() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + UpdateRealmRequest request = + UpdateRealmRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setRealm(Realm.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Realm response = cloudNumberRegistryClient.updateRealmAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRealm_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/SyncUpdateRealmRealmFieldmask.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/SyncUpdateRealmRealmFieldmask.java new file mode 100644 index 000000000000..58a072e0b9f9 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updaterealm/SyncUpdateRealmRealmFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRealm_RealmFieldmask_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.Realm; +import com.google.protobuf.FieldMask; + +public class SyncUpdateRealmRealmFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateRealmRealmFieldmask(); + } + + public static void syncUpdateRealmRealmFieldmask() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + Realm realm = Realm.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Realm response = cloudNumberRegistryClient.updateRealmAsync(realm, updateMask).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRealm_RealmFieldmask_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/AsyncUpdateRegistryBook.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/AsyncUpdateRegistryBook.java new file mode 100644 index 000000000000..e7eacec606ed --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/AsyncUpdateRegistryBook.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRegistryBook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateRegistryBook { + + public static void main(String[] args) throws Exception { + asyncUpdateRegistryBook(); + } + + public static void asyncUpdateRegistryBook() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + UpdateRegistryBookRequest request = + UpdateRegistryBookRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setRegistryBook(RegistryBook.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + cloudNumberRegistryClient.updateRegistryBookCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRegistryBook_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/AsyncUpdateRegistryBookLRO.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/AsyncUpdateRegistryBookLRO.java new file mode 100644 index 000000000000..da6db6432c97 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/AsyncUpdateRegistryBookLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRegistryBook_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.OperationMetadata; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateRegistryBookLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateRegistryBookLRO(); + } + + public static void asyncUpdateRegistryBookLRO() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + UpdateRegistryBookRequest request = + UpdateRegistryBookRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setRegistryBook(RegistryBook.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + cloudNumberRegistryClient.updateRegistryBookOperationCallable().futureCall(request); + // Do something. + RegistryBook response = future.get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRegistryBook_LRO_async] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/SyncUpdateRegistryBook.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/SyncUpdateRegistryBook.java new file mode 100644 index 000000000000..e3725b1eba19 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/SyncUpdateRegistryBook.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRegistryBook_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.cloud.numberregistry.v1alpha.UpdateRegistryBookRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateRegistryBook { + + public static void main(String[] args) throws Exception { + syncUpdateRegistryBook(); + } + + public static void syncUpdateRegistryBook() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + UpdateRegistryBookRequest request = + UpdateRegistryBookRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setRegistryBook(RegistryBook.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + RegistryBook response = cloudNumberRegistryClient.updateRegistryBookAsync(request).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRegistryBook_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/SyncUpdateRegistryBookRegistrybookFieldmask.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/SyncUpdateRegistryBookRegistrybookFieldmask.java new file mode 100644 index 000000000000..bb81ecbf4510 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistry/updateregistrybook/SyncUpdateRegistryBookRegistrybookFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRegistryBook_RegistrybookFieldmask_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistryClient; +import com.google.cloud.numberregistry.v1alpha.RegistryBook; +import com.google.protobuf.FieldMask; + +public class SyncUpdateRegistryBookRegistrybookFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateRegistryBookRegistrybookFieldmask(); + } + + public static void syncUpdateRegistryBookRegistrybookFieldmask() 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 (CloudNumberRegistryClient cloudNumberRegistryClient = CloudNumberRegistryClient.create()) { + RegistryBook registryBook = RegistryBook.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + RegistryBook response = + cloudNumberRegistryClient.updateRegistryBookAsync(registryBook, updateMask).get(); + } + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistry_UpdateRegistryBook_RegistrybookFieldmask_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistrysettings/createipamadminscope/SyncCreateIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistrysettings/createipamadminscope/SyncCreateIpamAdminScope.java new file mode 100644 index 000000000000..39cc6a63ce55 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistrysettings/createipamadminscope/SyncCreateIpamAdminScope.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistrySettings_CreateIpamAdminScope_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistrySettings; +import java.time.Duration; + +public class SyncCreateIpamAdminScope { + + public static void main(String[] args) throws Exception { + syncCreateIpamAdminScope(); + } + + public static void syncCreateIpamAdminScope() 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 + CloudNumberRegistrySettings.Builder cloudNumberRegistrySettingsBuilder = + CloudNumberRegistrySettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + cloudNumberRegistrySettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistrySettings_CreateIpamAdminScope_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistrysettings/getipamadminscope/SyncGetIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistrysettings/getipamadminscope/SyncGetIpamAdminScope.java new file mode 100644 index 000000000000..799423e36315 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/cloudnumberregistrysettings/getipamadminscope/SyncGetIpamAdminScope.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistrySettings_GetIpamAdminScope_sync] +import com.google.cloud.numberregistry.v1alpha.CloudNumberRegistrySettings; +import java.time.Duration; + +public class SyncGetIpamAdminScope { + + public static void main(String[] args) throws Exception { + syncGetIpamAdminScope(); + } + + public static void syncGetIpamAdminScope() 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 + CloudNumberRegistrySettings.Builder cloudNumberRegistrySettingsBuilder = + CloudNumberRegistrySettings.newBuilder(); + cloudNumberRegistrySettingsBuilder + .getIpamAdminScopeSettings() + .setRetrySettings( + cloudNumberRegistrySettingsBuilder + .getIpamAdminScopeSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + CloudNumberRegistrySettings cloudNumberRegistrySettings = + cloudNumberRegistrySettingsBuilder.build(); + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistrySettings_GetIpamAdminScope_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/stub/cloudnumberregistrystubsettings/createipamadminscope/SyncCreateIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/stub/cloudnumberregistrystubsettings/createipamadminscope/SyncCreateIpamAdminScope.java new file mode 100644 index 000000000000..764cd2a2ec88 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/stub/cloudnumberregistrystubsettings/createipamadminscope/SyncCreateIpamAdminScope.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.stub.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistryStubSettings_CreateIpamAdminScope_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.numberregistry.v1alpha.stub.CloudNumberRegistryStubSettings; +import java.time.Duration; + +public class SyncCreateIpamAdminScope { + + public static void main(String[] args) throws Exception { + syncCreateIpamAdminScope(); + } + + public static void syncCreateIpamAdminScope() 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 + CloudNumberRegistryStubSettings.Builder cloudNumberRegistrySettingsBuilder = + CloudNumberRegistryStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + cloudNumberRegistrySettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistryStubSettings_CreateIpamAdminScope_sync] diff --git a/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/stub/cloudnumberregistrystubsettings/getipamadminscope/SyncGetIpamAdminScope.java b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/stub/cloudnumberregistrystubsettings/getipamadminscope/SyncGetIpamAdminScope.java new file mode 100644 index 000000000000..f23059e21b45 --- /dev/null +++ b/java-numberregistry/samples/snippets/generated/com/google/cloud/numberregistry/v1alpha/stub/cloudnumberregistrystubsettings/getipamadminscope/SyncGetIpamAdminScope.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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.numberregistry.v1alpha.stub.samples; + +// [START cloudnumberregistry_v1alpha_generated_CloudNumberRegistryStubSettings_GetIpamAdminScope_sync] +import com.google.cloud.numberregistry.v1alpha.stub.CloudNumberRegistryStubSettings; +import java.time.Duration; + +public class SyncGetIpamAdminScope { + + public static void main(String[] args) throws Exception { + syncGetIpamAdminScope(); + } + + public static void syncGetIpamAdminScope() 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 + CloudNumberRegistryStubSettings.Builder cloudNumberRegistrySettingsBuilder = + CloudNumberRegistryStubSettings.newBuilder(); + cloudNumberRegistrySettingsBuilder + .getIpamAdminScopeSettings() + .setRetrySettings( + cloudNumberRegistrySettingsBuilder + .getIpamAdminScopeSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + CloudNumberRegistryStubSettings cloudNumberRegistrySettings = + cloudNumberRegistrySettingsBuilder.build(); + } +} +// [END cloudnumberregistry_v1alpha_generated_CloudNumberRegistryStubSettings_GetIpamAdminScope_sync] diff --git a/pom.xml b/pom.xml index a1613b4e05a7..55786c831381 100644 --- a/pom.xml +++ b/pom.xml @@ -179,6 +179,7 @@ java-networkservices java-notebooks java-notification + java-numberregistry java-optimization java-oracledatabase java-orchestration-airflow diff --git a/versions.txt b/versions.txt index 639b83859b81..b6c5605e35e0 100644 --- a/versions.txt +++ b/versions.txt @@ -1053,3 +1053,8 @@ grpc-google-cloud-firestore-v1:3.42.0:3.42.1-SNAPSHOT proto-google-cloud-firestore-admin-v1:3.42.0:3.42.1-SNAPSHOT proto-google-cloud-firestore-v1:3.42.0:3.42.1-SNAPSHOT proto-google-cloud-firestore-bundle-v1:3.42.0:3.42.1-SNAPSHOT +proto-google-cloud-numberregistry-v1alpha:0.0.0:0.1.0-SNAPSHOT +grpc-google-cloud-numberregistry-v1alpha:0.0.0:0.1.0-SNAPSHOT +google-cloud-numberregistry:0.0.0:0.1.0-SNAPSHOT +google-cloud-numberregistry-bom:0.0.0:0.1.0-SNAPSHOT +google-cloud-numberregistry-parent:0.0.0:0.1.0-SNAPSHOT