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(). + * + *
| Method | + *Description | + *Method 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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteIpamAdminScope |
+ * Deletes a single IpamAdminScope. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DisableIpamAdminScope |
+ * Disables a single IpamAdminScope. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CleanupIpamAdminScope |
+ * Cleans up a single IpamAdminScope. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteRegistryBook |
+ * Deletes a single RegistryBook. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteRealm |
+ * Deletes a single Realm. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
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. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteCustomRange |
+ * Deletes a single CustomRange. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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, ListSample 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, ListSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationFutureSample 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 OperationCallableSample 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 UnaryCallableThe default instance has everything set to sensible defaults: + * + *
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 ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * 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{@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.
+ *
+ *