diff --git a/generation_config.yaml b/generation_config.yaml index 42fbb66285e0..694d88870751 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,4 +1,4 @@ -googleapis_commitish: 260e3f5d5dcf9692c77d14b01b47c16ef01837e9 +googleapis_commitish: 89c3153888201c9e80bc5ec78d6ffca0debe6b52 libraries_bom_version: 26.80.0 is_monorepo: true libraries: diff --git a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketsClient.java b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketsClient.java index 3abe75a74abd..729d5eba9538 100644 --- a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketsClient.java +++ b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketsClient.java @@ -31,6 +31,7 @@ import com.google.common.util.concurrent.MoreExecutors; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -84,6 +85,26 @@ * * *
AggregatedList
Retrieves the list of all BackendBucket resources, regional and global, available to the specified project. + *
To prevent failure, it is recommended that you set the `returnPartialSuccess` parameter to `true`.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *aggregatedList(AggregatedListBackendBucketsRequest request) + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *aggregatedList(String project) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *aggregatedListPagedCallable() + *
aggregatedListCallable() + *
Delete
Deletes the specified BackendBucket resource.
ListUsable
Retrieves a list of all usable backend buckets in the specified project.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *listUsable(ListUsableBackendBucketsRequest request) + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *listUsable(String project) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *listUsablePagedCallable() + *
listUsableCallable() + *
Patch
Updates the specified BackendBucket resource with the data included in the request. This method supportsPATCH semantics and uses theJSON merge patch format and processing rules.
To prevent failure, it is recommended that you set the `returnPartialSuccess` parameter to + * `true`. + * + *
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 (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) {
+ * String project = "project-309310695";
+ * for (Map.Entry element :
+ * backendBucketsClient.aggregatedList(project).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param project Name of the project scoping this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AggregatedListPagedResponse aggregatedList(String project) {
+ AggregatedListBackendBucketsRequest request =
+ AggregatedListBackendBucketsRequest.newBuilder().setProject(project).build();
+ return aggregatedList(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the list of all BackendBucket resources, regional and global, available to the
+ * specified project.
+ *
+ * To prevent failure, it is recommended that you set the `returnPartialSuccess` parameter to + * `true`. + * + *
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 (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) {
+ * AggregatedListBackendBucketsRequest request =
+ * AggregatedListBackendBucketsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setIncludeAllScopes(true)
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .setServiceProjectNumber(-1293855239)
+ * .build();
+ * for (Map.Entry element :
+ * backendBucketsClient.aggregatedList(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 AggregatedListPagedResponse aggregatedList(
+ AggregatedListBackendBucketsRequest request) {
+ return aggregatedListPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the list of all BackendBucket resources, regional and global, available to the
+ * specified project.
+ *
+ * To prevent failure, it is recommended that you set the `returnPartialSuccess` parameter to + * `true`. + * + *
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 (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) {
+ * AggregatedListBackendBucketsRequest request =
+ * AggregatedListBackendBucketsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setIncludeAllScopes(true)
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .setServiceProjectNumber(-1293855239)
+ * .build();
+ * ApiFuture> future =
+ * backendBucketsClient.aggregatedListPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Map.Entry element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableTo prevent failure, it is recommended that you set the `returnPartialSuccess` parameter to + * `true`. + * + *
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 (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) {
+ * AggregatedListBackendBucketsRequest request =
+ * AggregatedListBackendBucketsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setIncludeAllScopes(true)
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .setServiceProjectNumber(-1293855239)
+ * .build();
+ * while (true) {
+ * BackendBucketAggregatedList response =
+ * backendBucketsClient.aggregatedListCallable().call(request);
+ * for (Map.Entry element : response.getItemsList()) {
+ * // 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 (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) {
+ * String project = "project-309310695";
+ * for (BackendBucket element : backendBucketsClient.listUsable(project).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListUsablePagedResponse listUsable(String project) {
+ ListUsableBackendBucketsRequest request =
+ ListUsableBackendBucketsRequest.newBuilder().setProject(project).build();
+ return listUsable(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a list of all usable backend buckets in the specified project.
+ *
+ * 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 (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) {
+ * ListUsableBackendBucketsRequest request =
+ * ListUsableBackendBucketsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * for (BackendBucket element : backendBucketsClient.listUsable(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 ListUsablePagedResponse listUsable(ListUsableBackendBucketsRequest request) {
+ return listUsablePagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a list of all usable backend buckets in the specified project.
+ *
+ * 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 (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) {
+ * ListUsableBackendBucketsRequest request =
+ * ListUsableBackendBucketsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * ApiFuture future =
+ * backendBucketsClient.listUsablePagedCallable().futureCall(request);
+ * // Do something.
+ * for (BackendBucket 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 (BackendBucketsClient backendBucketsClient = BackendBucketsClient.create()) {
+ * ListUsableBackendBucketsRequest request =
+ * ListUsableBackendBucketsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * while (true) {
+ * BackendBucketListUsable response = backendBucketsClient.listUsableCallable().call(request);
+ * for (BackendBucket element : response.getItemsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableUpdateKmsKey
Rotates the customer-managed encryption key to the latest version for the specified persistent disk.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *updateKmsKeyAsync(UpdateKmsKeyDiskRequest request) + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
+ *updateKmsKeyAsync(String project, String zone, String disk, DiskUpdateKmsKeyRequest diskUpdateKmsKeyRequestResource) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *updateKmsKeyOperationCallable() + *
updateKmsKeyCallable() + *
See the individual methods for example code.
@@ -3067,6 +3086,151 @@ public final UnaryCallable Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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:
+ *
+ * Note: close() needs to be called on the InstantSnapshotGroupsClient object to clean up
+ * resources such as threads. In the example above, try-with-resources is used, which automatically
+ * calls close().
+ *
+ * Delete deletes a Zonal InstantSnapshotGroup resource Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteAsync(DeleteInstantSnapshotGroupRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. deleteAsync(String project, String zone, String instantSnapshotGroup)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteOperationCallable()
+ * deleteCallable()
+ * Get returns the specified InstantSnapshotGroup resource in the specified zone. Request object method variants only take one parameter, a request object, which must be constructed before the call. get(GetInstantSnapshotGroupRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. get(String project, String zone, String instantSnapshotGroup)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCallable()
+ * GetIamPolicy Gets the access control policy for a resource. May be empty if no such policy or resource exists. Request object method variants only take one parameter, a request object, which must be constructed before the call. getIamPolicy(GetIamPolicyInstantSnapshotGroupRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getIamPolicy(String project, String zone, String resource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getIamPolicyCallable()
+ * Insert inserts a Zonal InstantSnapshotGroup resource Request object method variants only take one parameter, a request object, which must be constructed before the call. insertAsync(InsertInstantSnapshotGroupRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. insertAsync(String project, String zone, InstantSnapshotGroup instantSnapshotGroupResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. insertOperationCallable()
+ * insertCallable()
+ * List retrieves the list of InstantSnapshotGroup resources contained within the specified zone. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(ListInstantSnapshotGroupsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. list(String project, String zone)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listPagedCallable()
+ * listCallable()
+ * SetIamPolicy Sets the access control policy on the specified resource. Replaces any existing policy. Request object method variants only take one parameter, a request object, which must be constructed before the call. setIamPolicy(SetIamPolicyInstantSnapshotGroupRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. setIamPolicy(String project, String zone, String resource, ZoneSetPolicyRequest zoneSetPolicyRequestResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. setIamPolicyCallable()
+ * TestIamPermissions Returns permissions that a caller has on the specified resource. Request object method variants only take one parameter, a request object, which must be constructed before the call. testIamPermissions(TestIamPermissionsInstantSnapshotGroupRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. testIamPermissions(String project, String zone, String resource, TestPermissionsRequest testPermissionsRequestResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. testIamPermissionsCallable()
+ * 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 InstantSnapshotGroupsSettings
+ * to create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class InstantSnapshotGroupsClient implements BackgroundResource {
+ private final InstantSnapshotGroupsSettings settings;
+ private final InstantSnapshotGroupsStub stub;
+
+ /** Constructs an instance of InstantSnapshotGroupsClient with default settings. */
+ public static final InstantSnapshotGroupsClient create() throws IOException {
+ return create(InstantSnapshotGroupsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of InstantSnapshotGroupsClient, 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 InstantSnapshotGroupsClient create(InstantSnapshotGroupsSettings settings)
+ throws IOException {
+ return new InstantSnapshotGroupsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of InstantSnapshotGroupsClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(InstantSnapshotGroupsSettings).
+ */
+ public static final InstantSnapshotGroupsClient create(InstantSnapshotGroupsStub stub) {
+ return new InstantSnapshotGroupsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of InstantSnapshotGroupsClient, 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 InstantSnapshotGroupsClient(InstantSnapshotGroupsSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((InstantSnapshotGroupsStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected InstantSnapshotGroupsClient(InstantSnapshotGroupsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final InstantSnapshotGroupsSettings getSettings() {
+ return settings;
+ }
+
+ public InstantSnapshotGroupsStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * deletes a Zonal InstantSnapshotGroup resource
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The 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 get:
+ *
+ * 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 delete:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the RegionBackendBucketsClient object to clean up
+ * resources such as threads. In the example above, try-with-resources is used, which automatically
+ * calls close().
+ *
+ * Delete Deletes the specified regional BackendBucket resource. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteAsync(DeleteRegionBackendBucketRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. deleteAsync(String project, String region, String backendBucket)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteOperationCallable()
+ * deleteCallable()
+ * Get Returns the specified regional BackendBucket resource. Request object method variants only take one parameter, a request object, which must be constructed before the call. get(GetRegionBackendBucketRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. get(String project, String region, String backendBucket)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCallable()
+ * GetIamPolicy Gets the access control policy for a resource. May be empty if no such policy or resource exists. Request object method variants only take one parameter, a request object, which must be constructed before the call. getIamPolicy(GetIamPolicyRegionBackendBucketRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getIamPolicy(String project, String region, String resource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getIamPolicyCallable()
+ * Insert Creates a RegionBackendBucket in the specified project in the given scope using the parameters that are included in the request. Request object method variants only take one parameter, a request object, which must be constructed before the call. insertAsync(InsertRegionBackendBucketRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. insertAsync(String project, String region, BackendBucket backendBucketResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. insertOperationCallable()
+ * insertCallable()
+ * List Retrieves the list of BackendBucket resources available to the specified project in the given region. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(ListRegionBackendBucketsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. list(String project, String region)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listPagedCallable()
+ * listCallable()
+ * ListUsable Retrieves a list of all usable backend buckets in the specified project in the given region. Request object method variants only take one parameter, a request object, which must be constructed before the call. listUsable(ListUsableRegionBackendBucketsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listUsable(String project, String region)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listUsablePagedCallable()
+ * listUsableCallable()
+ * Patch Updates the specified BackendBucket resource with the data included in the request. This method supportsPATCH semantics and uses theJSON merge patch format and processing rules. Request object method variants only take one parameter, a request object, which must be constructed before the call. patchAsync(PatchRegionBackendBucketRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. patchAsync(String project, String region, String backendBucket, BackendBucket backendBucketResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. patchOperationCallable()
+ * patchCallable()
+ * SetIamPolicy Sets the access control policy on the specified resource. Replaces any existing policy. Request object method variants only take one parameter, a request object, which must be constructed before the call. setIamPolicy(SetIamPolicyRegionBackendBucketRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. setIamPolicy(String project, String region, String resource, RegionSetPolicyRequest regionSetPolicyRequestResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. setIamPolicyCallable()
+ * TestIamPermissions Returns permissions that a caller has on the specified resource. Request object method variants only take one parameter, a request object, which must be constructed before the call. testIamPermissions(TestIamPermissionsRegionBackendBucketRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. testIamPermissions(String project, String region, String resource, TestPermissionsRequest testPermissionsRequestResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. testIamPermissionsCallable()
+ * 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 RegionBackendBucketsSettings
+ * to create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class RegionBackendBucketsClient implements BackgroundResource {
+ private final RegionBackendBucketsSettings settings;
+ private final RegionBackendBucketsStub stub;
+
+ /** Constructs an instance of RegionBackendBucketsClient with default settings. */
+ public static final RegionBackendBucketsClient create() throws IOException {
+ return create(RegionBackendBucketsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of RegionBackendBucketsClient, 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 RegionBackendBucketsClient create(RegionBackendBucketsSettings settings)
+ throws IOException {
+ return new RegionBackendBucketsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of RegionBackendBucketsClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(RegionBackendBucketsSettings).
+ */
+ public static final RegionBackendBucketsClient create(RegionBackendBucketsStub stub) {
+ return new RegionBackendBucketsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of RegionBackendBucketsClient, 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 RegionBackendBucketsClient(RegionBackendBucketsSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((RegionBackendBucketsStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected RegionBackendBucketsClient(RegionBackendBucketsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final RegionBackendBucketsSettings getSettings() {
+ return settings;
+ }
+
+ public RegionBackendBucketsStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the specified regional BackendBucket resource.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The 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 get:
+ *
+ * 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 delete:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction GetHealth Gets the most recent health check results for this regional CompositeHealthCheck. Request object method variants only take one parameter, a request object, which must be constructed before the call. getHealth(GetHealthRegionCompositeHealthCheckRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getHealth(String project, String region, String compositeHealthCheck)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getHealthCallable()
+ * Insert Create a CompositeHealthCheck in the specified project in the given region using the parameters that are included in the request. Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * UpdateKmsKey Rotates the customer-managed encryption key to the latest version for the specified persistent disk. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateKmsKeyAsync(UpdateKmsKeyRegionDiskRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. updateKmsKeyAsync(String project, String region, String disk, RegionDiskUpdateKmsKeyRequest regionDiskUpdateKmsKeyRequestResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateKmsKeyOperationCallable()
+ * updateKmsKeyCallable()
+ * See the individual methods for example code.
@@ -2739,6 +2758,156 @@ public final UnaryCallable Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * GetHealth Gets the most recent health check results for this regional HealthSource. Request object method variants only take one parameter, a request object, which must be constructed before the call. getHealth(GetHealthRegionHealthSourceRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getHealth(String project, String region, String healthSource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getHealthCallable()
+ * Insert Create a HealthSource in the specified project in the given region using the parameters that are included in the request. Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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:
+ *
+ * Note: close() needs to be called on the RegionInstanceGroupManagerResizeRequestsClient object
+ * to clean up resources such as threads. In the example above, try-with-resources is used, which
+ * automatically calls close().
+ *
+ * Cancel Cancels the specified resize request. Cancelled resize request no longer waits for the resources to be provisioned. Cancel is only possible for requests that are in accepted state. Request object method variants only take one parameter, a request object, which must be constructed before the call. cancelAsync(CancelRegionInstanceGroupManagerResizeRequestRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. cancelAsync(String project, String region, String instanceGroupManager, String resizeRequest)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. cancelOperationCallable()
+ * cancelCallable()
+ * Delete Deletes the specified, inactive resize request. Requests that are still active cannot be deleted. Deleting request does not delete instances that were provisioned previously. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteAsync(DeleteRegionInstanceGroupManagerResizeRequestRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. deleteAsync(String project, String region, String instanceGroupManager, String resizeRequest)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteOperationCallable()
+ * deleteCallable()
+ * Get Returns all of the details about the specified resize request. Request object method variants only take one parameter, a request object, which must be constructed before the call. get(GetRegionInstanceGroupManagerResizeRequestRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. get(String project, String region, String instanceGroupManager, String resizeRequest)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCallable()
+ * Insert Creates a new Resize Request that starts provisioning VMs immediately or queues VM creation. Request object method variants only take one parameter, a request object, which must be constructed before the call. insertAsync(InsertRegionInstanceGroupManagerResizeRequestRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. insertAsync(String project, String region, String instanceGroupManager, InstanceGroupManagerResizeRequest instanceGroupManagerResizeRequestResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. insertOperationCallable()
+ * insertCallable()
+ * List Retrieves a list of Resize Requests that are contained in the managed instance group. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(ListRegionInstanceGroupManagerResizeRequestsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. list(String project, String region, String instanceGroupManager)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listPagedCallable()
+ * listCallable()
+ * 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
+ * RegionInstanceGroupManagerResizeRequestsSettings to create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class RegionInstanceGroupManagerResizeRequestsClient implements BackgroundResource {
+ private final RegionInstanceGroupManagerResizeRequestsSettings settings;
+ private final RegionInstanceGroupManagerResizeRequestsStub stub;
+
+ /**
+ * Constructs an instance of RegionInstanceGroupManagerResizeRequestsClient with default settings.
+ */
+ public static final RegionInstanceGroupManagerResizeRequestsClient create() throws IOException {
+ return create(RegionInstanceGroupManagerResizeRequestsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of RegionInstanceGroupManagerResizeRequestsClient, 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 RegionInstanceGroupManagerResizeRequestsClient create(
+ RegionInstanceGroupManagerResizeRequestsSettings settings) throws IOException {
+ return new RegionInstanceGroupManagerResizeRequestsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of RegionInstanceGroupManagerResizeRequestsClient, using the given stub
+ * for making calls. This is for advanced usage - prefer using
+ * create(RegionInstanceGroupManagerResizeRequestsSettings).
+ */
+ public static final RegionInstanceGroupManagerResizeRequestsClient create(
+ RegionInstanceGroupManagerResizeRequestsStub stub) {
+ return new RegionInstanceGroupManagerResizeRequestsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of RegionInstanceGroupManagerResizeRequestsClient, 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 RegionInstanceGroupManagerResizeRequestsClient(
+ RegionInstanceGroupManagerResizeRequestsSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub =
+ ((RegionInstanceGroupManagerResizeRequestsStubSettings) settings.getStubSettings())
+ .createStub();
+ }
+
+ protected RegionInstanceGroupManagerResizeRequestsClient(
+ RegionInstanceGroupManagerResizeRequestsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final RegionInstanceGroupManagerResizeRequestsSettings getSettings() {
+ return settings;
+ }
+
+ public RegionInstanceGroupManagerResizeRequestsStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels the specified resize request. Cancelled resize request no longer waits for the
+ * resources to be provisioned. Cancel is only possible for requests that are in accepted state.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The 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 get:
+ *
+ * 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 cancel:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the RegionInstantSnapshotGroupsClient object to clean up
+ * resources such as threads. In the example above, try-with-resources is used, which automatically
+ * calls close().
+ *
+ * Delete deletes a Regional InstantSnapshotGroup resource Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteAsync(DeleteRegionInstantSnapshotGroupRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. deleteAsync(String project, String region, String instantSnapshotGroup)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteOperationCallable()
+ * deleteCallable()
+ * Get returns the specified InstantSnapshotGroup resource in the specified region. Request object method variants only take one parameter, a request object, which must be constructed before the call. get(GetRegionInstantSnapshotGroupRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. get(String project, String region, String instantSnapshotGroup)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCallable()
+ * GetIamPolicy Gets the access control policy for a resource. May be empty if no such policy or resource exists. Request object method variants only take one parameter, a request object, which must be constructed before the call. getIamPolicy(GetIamPolicyRegionInstantSnapshotGroupRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getIamPolicy(String project, String region, String resource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getIamPolicyCallable()
+ * Insert creates a Regional InstantSnapshotGroup resource Request object method variants only take one parameter, a request object, which must be constructed before the call. insertAsync(InsertRegionInstantSnapshotGroupRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. insertAsync(String project, String region, InstantSnapshotGroup instantSnapshotGroupResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. insertOperationCallable()
+ * insertCallable()
+ * List retrieves the list of InstantSnapshotGroup resources contained within the specified region. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(ListRegionInstantSnapshotGroupsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. list(String project, String region)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listPagedCallable()
+ * listCallable()
+ * SetIamPolicy Sets the access control policy on the specified resource. Replaces any existing policy. Request object method variants only take one parameter, a request object, which must be constructed before the call. setIamPolicy(SetIamPolicyRegionInstantSnapshotGroupRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. setIamPolicy(String project, String region, String resource, RegionSetPolicyRequest regionSetPolicyRequestResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. setIamPolicyCallable()
+ * TestIamPermissions Returns permissions that a caller has on the specified resource. Request object method variants only take one parameter, a request object, which must be constructed before the call. testIamPermissions(TestIamPermissionsRegionInstantSnapshotGroupRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. testIamPermissions(String project, String region, String resource, TestPermissionsRequest testPermissionsRequestResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. testIamPermissionsCallable()
+ * 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
+ * RegionInstantSnapshotGroupsSettings to create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class RegionInstantSnapshotGroupsClient implements BackgroundResource {
+ private final RegionInstantSnapshotGroupsSettings settings;
+ private final RegionInstantSnapshotGroupsStub stub;
+
+ /** Constructs an instance of RegionInstantSnapshotGroupsClient with default settings. */
+ public static final RegionInstantSnapshotGroupsClient create() throws IOException {
+ return create(RegionInstantSnapshotGroupsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of RegionInstantSnapshotGroupsClient, 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 RegionInstantSnapshotGroupsClient create(
+ RegionInstantSnapshotGroupsSettings settings) throws IOException {
+ return new RegionInstantSnapshotGroupsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of RegionInstantSnapshotGroupsClient, using the given stub for making
+ * calls. This is for advanced usage - prefer using create(RegionInstantSnapshotGroupsSettings).
+ */
+ public static final RegionInstantSnapshotGroupsClient create(
+ RegionInstantSnapshotGroupsStub stub) {
+ return new RegionInstantSnapshotGroupsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of RegionInstantSnapshotGroupsClient, 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 RegionInstantSnapshotGroupsClient(RegionInstantSnapshotGroupsSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub = ((RegionInstantSnapshotGroupsStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected RegionInstantSnapshotGroupsClient(RegionInstantSnapshotGroupsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final RegionInstantSnapshotGroupsSettings getSettings() {
+ return settings;
+ }
+
+ public RegionInstantSnapshotGroupsStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * deletes a Regional InstantSnapshotGroup resource
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The 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 get:
+ *
+ * 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 delete:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the RegionSnapshotSettingsClient object to clean up
+ * resources such as threads. In the example above, try-with-resources is used, which automatically
+ * calls close().
+ *
+ * Get Get region snapshot settings. Request object method variants only take one parameter, a request object, which must be constructed before the call. get(GetRegionSnapshotSettingRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. get(String project, String region)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCallable()
+ * Patch Patch region snapshot settings. Request object method variants only take one parameter, a request object, which must be constructed before the call. patchAsync(PatchRegionSnapshotSettingRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. patchAsync(String project, String region, SnapshotSettings snapshotSettingsResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. patchOperationCallable()
+ * patchCallable()
+ * 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 RegionSnapshotSettingsSettings
+ * to create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class RegionSnapshotSettingsClient implements BackgroundResource {
+ private final RegionSnapshotSettingsSettings settings;
+ private final RegionSnapshotSettingsStub stub;
+
+ /** Constructs an instance of RegionSnapshotSettingsClient with default settings. */
+ public static final RegionSnapshotSettingsClient create() throws IOException {
+ return create(RegionSnapshotSettingsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of RegionSnapshotSettingsClient, 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 RegionSnapshotSettingsClient create(RegionSnapshotSettingsSettings settings)
+ throws IOException {
+ return new RegionSnapshotSettingsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of RegionSnapshotSettingsClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(RegionSnapshotSettingsSettings).
+ */
+ public static final RegionSnapshotSettingsClient create(RegionSnapshotSettingsStub stub) {
+ return new RegionSnapshotSettingsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of RegionSnapshotSettingsClient, 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 RegionSnapshotSettingsClient(RegionSnapshotSettingsSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub = ((RegionSnapshotSettingsStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected RegionSnapshotSettingsClient(RegionSnapshotSettingsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final RegionSnapshotSettingsSettings getSettings() {
+ return settings;
+ }
+
+ public RegionSnapshotSettingsStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get region snapshot settings.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The 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 get:
+ *
+ * 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 patch:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the RegionSnapshotsClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * Delete Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.
+ * For more information, seeDeleting snapshots. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteAsync(DeleteRegionSnapshotRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. deleteAsync(String project, String region, String snapshot)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteOperationCallable()
+ * deleteCallable()
+ * Get Returns the specified Snapshot resource. Request object method variants only take one parameter, a request object, which must be constructed before the call. get(GetRegionSnapshotRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. get(String project, String region, String snapshot)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCallable()
+ * GetIamPolicy Gets the access control policy for a resource. May be empty if no such policy or resource exists. Request object method variants only take one parameter, a request object, which must be constructed before the call. getIamPolicy(GetIamPolicyRegionSnapshotRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getIamPolicy(String project, String region, String resource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getIamPolicyCallable()
+ * Insert Creates a snapshot in the specified region using the data included in the request. Request object method variants only take one parameter, a request object, which must be constructed before the call. insertAsync(InsertRegionSnapshotRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. insertAsync(String project, String region, Snapshot snapshotResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. insertOperationCallable()
+ * insertCallable()
+ * List Retrieves the list of Snapshot resources contained within the specified region. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(ListRegionSnapshotsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. list(String project, String region)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listPagedCallable()
+ * listCallable()
+ * SetIamPolicy Sets the access control policy on the specified resource. Replaces any existing policy. Request object method variants only take one parameter, a request object, which must be constructed before the call. setIamPolicy(SetIamPolicyRegionSnapshotRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. setIamPolicy(String project, String region, String resource, RegionSetPolicyRequest regionSetPolicyRequestResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. setIamPolicyCallable()
+ * SetLabels Sets the labels on a regional snapshot. To learn more about labels, read the Labeling Resources documentation. Request object method variants only take one parameter, a request object, which must be constructed before the call. setLabelsAsync(SetLabelsRegionSnapshotRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. setLabelsAsync(String project, String region, String resource, RegionSetLabelsRequest regionSetLabelsRequestResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. setLabelsOperationCallable()
+ * setLabelsCallable()
+ * TestIamPermissions Returns permissions that a caller has on the specified resource. Request object method variants only take one parameter, a request object, which must be constructed before the call. testIamPermissions(TestIamPermissionsRegionSnapshotRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. testIamPermissions(String project, String region, String resource, TestPermissionsRequest testPermissionsRequestResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. testIamPermissionsCallable()
+ * UpdateKmsKey Rotates the customer-managed encryption key to the latest version for the specified snapshot. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateKmsKeyAsync(UpdateKmsKeyRegionSnapshotRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. updateKmsKeyAsync(String project, String region, String snapshot, RegionSnapshotUpdateKmsKeyRequest regionSnapshotUpdateKmsKeyRequestResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateKmsKeyOperationCallable()
+ * updateKmsKeyCallable()
+ * 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 RegionSnapshotsSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class RegionSnapshotsClient implements BackgroundResource {
+ private final RegionSnapshotsSettings settings;
+ private final RegionSnapshotsStub stub;
+
+ /** Constructs an instance of RegionSnapshotsClient with default settings. */
+ public static final RegionSnapshotsClient create() throws IOException {
+ return create(RegionSnapshotsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of RegionSnapshotsClient, 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 RegionSnapshotsClient create(RegionSnapshotsSettings settings)
+ throws IOException {
+ return new RegionSnapshotsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of RegionSnapshotsClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(RegionSnapshotsSettings).
+ */
+ public static final RegionSnapshotsClient create(RegionSnapshotsStub stub) {
+ return new RegionSnapshotsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of RegionSnapshotsClient, 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 RegionSnapshotsClient(RegionSnapshotsSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((RegionSnapshotsStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected RegionSnapshotsClient(RegionSnapshotsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final RegionSnapshotsSettings getSettings() {
+ return settings;
+ }
+
+ public RegionSnapshotsStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not
+ * necessarily delete all the data on that snapshot. If any data on the snapshot that is marked
+ * for deletion is needed for subsequent snapshots, the data will be moved to the next
+ * corresponding snapshot.
+ *
+ * For more information, seeDeleting snapshots.
+ *
+ * Sample code:
+ *
+ * For more information, seeDeleting snapshots.
+ *
+ * Sample code:
+ *
+ * For more information, seeDeleting snapshots.
+ *
+ * Sample code:
+ *
+ * For more information, seeDeleting snapshots.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DisksClient disksClient = DisksClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * String disk = "disk3083677";
+ * DiskUpdateKmsKeyRequest diskUpdateKmsKeyRequestResource =
+ * DiskUpdateKmsKeyRequest.newBuilder().build();
+ * Operation response =
+ * disksClient.updateKmsKeyAsync(project, zone, disk, diskUpdateKmsKeyRequestResource).get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param zone The name of the zone for this request.
+ * @param disk Name of the Disk resource, should conform to RFC1035.
+ * @param diskUpdateKmsKeyRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DisksClient disksClient = DisksClient.create()) {
+ * UpdateKmsKeyDiskRequest request =
+ * UpdateKmsKeyDiskRequest.newBuilder()
+ * .setDisk("disk3083677")
+ * .setDiskUpdateKmsKeyRequestResource(DiskUpdateKmsKeyRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRequestId("requestId693933066")
+ * .setZone("zone3744684")
+ * .build();
+ * Operation response = disksClient.updateKmsKeyAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DisksClient disksClient = DisksClient.create()) {
+ * UpdateKmsKeyDiskRequest request =
+ * UpdateKmsKeyDiskRequest.newBuilder()
+ * .setDisk("disk3083677")
+ * .setDiskUpdateKmsKeyRequestResource(DiskUpdateKmsKeyRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRequestId("requestId693933066")
+ * .setZone("zone3744684")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DisksClient disksClient = DisksClient.create()) {
+ * UpdateKmsKeyDiskRequest request =
+ * UpdateKmsKeyDiskRequest.newBuilder()
+ * .setDisk("disk3083677")
+ * .setDiskUpdateKmsKeyRequestResource(DiskUpdateKmsKeyRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRequestId("requestId693933066")
+ * .setZone("zone3744684")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * String instantSnapshotGroup = "instantSnapshotGroup500796090";
+ * InstantSnapshotGroup response =
+ * instantSnapshotGroupsClient.get(project, zone, instantSnapshotGroup);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * InstantSnapshotGroupsSettings instantSnapshotGroupsSettings =
+ * InstantSnapshotGroupsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create(instantSnapshotGroupsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * InstantSnapshotGroupsSettings instantSnapshotGroupsSettings =
+ * InstantSnapshotGroupsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create(instantSnapshotGroupsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * String instantSnapshotGroup = "instantSnapshotGroup500796090";
+ * Operation response =
+ * instantSnapshotGroupsClient.deleteAsync(project, zone, instantSnapshotGroup).get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param zone The name of the zone for this request.
+ * @param instantSnapshotGroup Name of the InstantSnapshot resource to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * DeleteInstantSnapshotGroupRequest request =
+ * DeleteInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroup("instantSnapshotGroup500796090")
+ * .setProject("project-309310695")
+ * .setRequestId("requestId693933066")
+ * .setZone("zone3744684")
+ * .build();
+ * Operation response = instantSnapshotGroupsClient.deleteAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * DeleteInstantSnapshotGroupRequest request =
+ * DeleteInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroup("instantSnapshotGroup500796090")
+ * .setProject("project-309310695")
+ * .setRequestId("requestId693933066")
+ * .setZone("zone3744684")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * DeleteInstantSnapshotGroupRequest request =
+ * DeleteInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroup("instantSnapshotGroup500796090")
+ * .setProject("project-309310695")
+ * .setRequestId("requestId693933066")
+ * .setZone("zone3744684")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * String instantSnapshotGroup = "instantSnapshotGroup500796090";
+ * InstantSnapshotGroup response =
+ * instantSnapshotGroupsClient.get(project, zone, instantSnapshotGroup);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param zone The name of the zone for this request.
+ * @param instantSnapshotGroup Name of the InstantSnapshotGroup resource to return.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final InstantSnapshotGroup get(String project, String zone, String instantSnapshotGroup) {
+ GetInstantSnapshotGroupRequest request =
+ GetInstantSnapshotGroupRequest.newBuilder()
+ .setProject(project)
+ .setZone(zone)
+ .setInstantSnapshotGroup(instantSnapshotGroup)
+ .build();
+ return get(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * returns the specified InstantSnapshotGroup resource in the specified zone.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * GetInstantSnapshotGroupRequest request =
+ * GetInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroup("instantSnapshotGroup500796090")
+ * .setProject("project-309310695")
+ * .setZone("zone3744684")
+ * .build();
+ * InstantSnapshotGroup response = instantSnapshotGroupsClient.get(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 InstantSnapshotGroup get(GetInstantSnapshotGroupRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * returns the specified InstantSnapshotGroup resource in the specified zone.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * GetInstantSnapshotGroupRequest request =
+ * GetInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroup("instantSnapshotGroup500796090")
+ * .setProject("project-309310695")
+ * .setZone("zone3744684")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * String resource = "resource-341064690";
+ * Policy response = instantSnapshotGroupsClient.getIamPolicy(project, zone, resource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param zone The name of the zone for this request.
+ * @param resource Name or id of the resource for this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(String project, String zone, String resource) {
+ GetIamPolicyInstantSnapshotGroupRequest request =
+ GetIamPolicyInstantSnapshotGroupRequest.newBuilder()
+ .setProject(project)
+ .setZone(zone)
+ .setResource(resource)
+ .build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
+ * exists.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * GetIamPolicyInstantSnapshotGroupRequest request =
+ * GetIamPolicyInstantSnapshotGroupRequest.newBuilder()
+ * .setOptionsRequestedPolicyVersion(-574521795)
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .setZone("zone3744684")
+ * .build();
+ * Policy response = instantSnapshotGroupsClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyInstantSnapshotGroupRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
+ * exists.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * GetIamPolicyInstantSnapshotGroupRequest request =
+ * GetIamPolicyInstantSnapshotGroupRequest.newBuilder()
+ * .setOptionsRequestedPolicyVersion(-574521795)
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .setZone("zone3744684")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * InstantSnapshotGroup instantSnapshotGroupResource = InstantSnapshotGroup.newBuilder().build();
+ * Operation response =
+ * instantSnapshotGroupsClient
+ * .insertAsync(project, zone, instantSnapshotGroupResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param zone Name of the zone for this request.
+ * @param instantSnapshotGroupResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * InsertInstantSnapshotGroupRequest request =
+ * InsertInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroupResource(InstantSnapshotGroup.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRequestId("requestId693933066")
+ * .setSourceConsistencyGroup("sourceConsistencyGroup-2056893054")
+ * .setZone("zone3744684")
+ * .build();
+ * Operation response = instantSnapshotGroupsClient.insertAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * InsertInstantSnapshotGroupRequest request =
+ * InsertInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroupResource(InstantSnapshotGroup.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRequestId("requestId693933066")
+ * .setSourceConsistencyGroup("sourceConsistencyGroup-2056893054")
+ * .setZone("zone3744684")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * InsertInstantSnapshotGroupRequest request =
+ * InsertInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroupResource(InstantSnapshotGroup.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRequestId("requestId693933066")
+ * .setSourceConsistencyGroup("sourceConsistencyGroup-2056893054")
+ * .setZone("zone3744684")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * for (InstantSnapshotGroup element :
+ * instantSnapshotGroupsClient.list(project, zone).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param zone The name of the zone for this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPagedResponse list(String project, String zone) {
+ ListInstantSnapshotGroupsRequest request =
+ ListInstantSnapshotGroupsRequest.newBuilder().setProject(project).setZone(zone).build();
+ return list(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * retrieves the list of InstantSnapshotGroup resources contained within the specified zone.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * ListInstantSnapshotGroupsRequest request =
+ * ListInstantSnapshotGroupsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .setZone("zone3744684")
+ * .build();
+ * for (InstantSnapshotGroup element : instantSnapshotGroupsClient.list(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 ListPagedResponse list(ListInstantSnapshotGroupsRequest request) {
+ return listPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * retrieves the list of InstantSnapshotGroup resources contained within the specified zone.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * ListInstantSnapshotGroupsRequest request =
+ * ListInstantSnapshotGroupsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .setZone("zone3744684")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * ListInstantSnapshotGroupsRequest request =
+ * ListInstantSnapshotGroupsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .setZone("zone3744684")
+ * .build();
+ * while (true) {
+ * ListInstantSnapshotGroups response =
+ * instantSnapshotGroupsClient.listCallable().call(request);
+ * for (InstantSnapshotGroup element : response.getItemsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final 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 (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * String resource = "resource-341064690";
+ * ZoneSetPolicyRequest zoneSetPolicyRequestResource = ZoneSetPolicyRequest.newBuilder().build();
+ * Policy response =
+ * instantSnapshotGroupsClient.setIamPolicy(
+ * project, zone, resource, zoneSetPolicyRequestResource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param zone The name of the zone for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param zoneSetPolicyRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(
+ String project,
+ String zone,
+ String resource,
+ ZoneSetPolicyRequest zoneSetPolicyRequestResource) {
+ SetIamPolicyInstantSnapshotGroupRequest request =
+ SetIamPolicyInstantSnapshotGroupRequest.newBuilder()
+ .setProject(project)
+ .setZone(zone)
+ .setResource(resource)
+ .setZoneSetPolicyRequestResource(zoneSetPolicyRequestResource)
+ .build();
+ return setIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * SetIamPolicyInstantSnapshotGroupRequest request =
+ * SetIamPolicyInstantSnapshotGroupRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .setZone("zone3744684")
+ * .setZoneSetPolicyRequestResource(ZoneSetPolicyRequest.newBuilder().build())
+ * .build();
+ * Policy response = instantSnapshotGroupsClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyInstantSnapshotGroupRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * SetIamPolicyInstantSnapshotGroupRequest request =
+ * SetIamPolicyInstantSnapshotGroupRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .setZone("zone3744684")
+ * .setZoneSetPolicyRequestResource(ZoneSetPolicyRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * String resource = "resource-341064690";
+ * TestPermissionsRequest testPermissionsRequestResource =
+ * TestPermissionsRequest.newBuilder().build();
+ * TestPermissionsResponse response =
+ * instantSnapshotGroupsClient.testIamPermissions(
+ * project, zone, resource, testPermissionsRequestResource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param zone The name of the zone for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param testPermissionsRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TestPermissionsResponse testIamPermissions(
+ String project,
+ String zone,
+ String resource,
+ TestPermissionsRequest testPermissionsRequestResource) {
+ TestIamPermissionsInstantSnapshotGroupRequest request =
+ TestIamPermissionsInstantSnapshotGroupRequest.newBuilder()
+ .setProject(project)
+ .setZone(zone)
+ .setResource(resource)
+ .setTestPermissionsRequestResource(testPermissionsRequestResource)
+ .build();
+ return testIamPermissions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * TestIamPermissionsInstantSnapshotGroupRequest request =
+ * TestIamPermissionsInstantSnapshotGroupRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
+ * .setZone("zone3744684")
+ * .build();
+ * TestPermissionsResponse response = instantSnapshotGroupsClient.testIamPermissions(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 TestPermissionsResponse testIamPermissions(
+ TestIamPermissionsInstantSnapshotGroupRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InstantSnapshotGroupsClient instantSnapshotGroupsClient =
+ * InstantSnapshotGroupsClient.create()) {
+ * TestIamPermissionsInstantSnapshotGroupRequest request =
+ * TestIamPermissionsInstantSnapshotGroupRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
+ * .setZone("zone3744684")
+ * .build();
+ * ApiFuture
+ */
+ public final 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
+ * InstantSnapshotGroupsSettings.Builder instantSnapshotGroupsSettingsBuilder =
+ * InstantSnapshotGroupsSettings.newBuilder();
+ * instantSnapshotGroupsSettingsBuilder
+ * .getSettings()
+ * .setRetrySettings(
+ * instantSnapshotGroupsSettingsBuilder
+ * .getSettings()
+ * .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());
+ * InstantSnapshotGroupsSettings instantSnapshotGroupsSettings =
+ * instantSnapshotGroupsSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * InstantSnapshotGroupsSettings.Builder instantSnapshotGroupsSettingsBuilder =
+ * InstantSnapshotGroupsSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * instantSnapshotGroupsSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class InstantSnapshotGroupsSettings extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String backendBucket = "backendBucket713751966";
+ * BackendBucket response = regionBackendBucketsClient.get(project, region, backendBucket);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionBackendBucketsSettings regionBackendBucketsSettings =
+ * RegionBackendBucketsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create(regionBackendBucketsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionBackendBucketsSettings regionBackendBucketsSettings =
+ * RegionBackendBucketsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create(regionBackendBucketsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String backendBucket = "backendBucket713751966";
+ * Operation response =
+ * regionBackendBucketsClient.deleteAsync(project, region, backendBucket).get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request.
+ * @param backendBucket Name of the BackendBucket resource to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * DeleteRegionBackendBucketRequest request =
+ * DeleteRegionBackendBucketRequest.newBuilder()
+ * .setBackendBucket("backendBucket713751966")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Operation response = regionBackendBucketsClient.deleteAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * DeleteRegionBackendBucketRequest request =
+ * DeleteRegionBackendBucketRequest.newBuilder()
+ * .setBackendBucket("backendBucket713751966")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * DeleteRegionBackendBucketRequest request =
+ * DeleteRegionBackendBucketRequest.newBuilder()
+ * .setBackendBucket("backendBucket713751966")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String backendBucket = "backendBucket713751966";
+ * BackendBucket response = regionBackendBucketsClient.get(project, region, backendBucket);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request.
+ * @param backendBucket Name of the BackendBucket resource to return.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final BackendBucket get(String project, String region, String backendBucket) {
+ GetRegionBackendBucketRequest request =
+ GetRegionBackendBucketRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setBackendBucket(backendBucket)
+ .build();
+ return get(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the specified regional BackendBucket resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * GetRegionBackendBucketRequest request =
+ * GetRegionBackendBucketRequest.newBuilder()
+ * .setBackendBucket("backendBucket713751966")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .build();
+ * BackendBucket response = regionBackendBucketsClient.get(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 BackendBucket get(GetRegionBackendBucketRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the specified regional BackendBucket resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * GetRegionBackendBucketRequest request =
+ * GetRegionBackendBucketRequest.newBuilder()
+ * .setBackendBucket("backendBucket713751966")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * Policy response = regionBackendBucketsClient.getIamPolicy(project, region, resource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(String project, String region, String resource) {
+ GetIamPolicyRegionBackendBucketRequest request =
+ GetIamPolicyRegionBackendBucketRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setResource(resource)
+ .build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
+ * exists.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * GetIamPolicyRegionBackendBucketRequest request =
+ * GetIamPolicyRegionBackendBucketRequest.newBuilder()
+ * .setOptionsRequestedPolicyVersion(-574521795)
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .build();
+ * Policy response = regionBackendBucketsClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRegionBackendBucketRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
+ * exists.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * GetIamPolicyRegionBackendBucketRequest request =
+ * GetIamPolicyRegionBackendBucketRequest.newBuilder()
+ * .setOptionsRequestedPolicyVersion(-574521795)
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * BackendBucket backendBucketResource = BackendBucket.newBuilder().build();
+ * Operation response =
+ * regionBackendBucketsClient.insertAsync(project, region, backendBucketResource).get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region of this request.
+ * @param backendBucketResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * InsertRegionBackendBucketRequest request =
+ * InsertRegionBackendBucketRequest.newBuilder()
+ * .setBackendBucketResource(BackendBucket.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Operation response = regionBackendBucketsClient.insertAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * InsertRegionBackendBucketRequest request =
+ * InsertRegionBackendBucketRequest.newBuilder()
+ * .setBackendBucketResource(BackendBucket.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * InsertRegionBackendBucketRequest request =
+ * InsertRegionBackendBucketRequest.newBuilder()
+ * .setBackendBucketResource(BackendBucket.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * for (BackendBucket element : regionBackendBucketsClient.list(project, region).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region of this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPagedResponse list(String project, String region) {
+ ListRegionBackendBucketsRequest request =
+ ListRegionBackendBucketsRequest.newBuilder().setProject(project).setRegion(region).build();
+ return list(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the list of BackendBucket resources available to the specified project in the given
+ * region.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * ListRegionBackendBucketsRequest request =
+ * ListRegionBackendBucketsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * for (BackendBucket element : regionBackendBucketsClient.list(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 ListPagedResponse list(ListRegionBackendBucketsRequest request) {
+ return listPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the list of BackendBucket resources available to the specified project in the given
+ * region.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * ListRegionBackendBucketsRequest request =
+ * ListRegionBackendBucketsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * ListRegionBackendBucketsRequest request =
+ * ListRegionBackendBucketsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * while (true) {
+ * BackendBucketList response = regionBackendBucketsClient.listCallable().call(request);
+ * for (BackendBucket element : response.getItemsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final 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 (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * for (BackendBucket element :
+ * regionBackendBucketsClient.listUsable(project, region).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request. It must be a string that meets the
+ * requirements in RFC1035.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListUsablePagedResponse listUsable(String project, String region) {
+ ListUsableRegionBackendBucketsRequest request =
+ ListUsableRegionBackendBucketsRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .build();
+ return listUsable(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a list of all usable backend buckets in the specified project in the given region.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * ListUsableRegionBackendBucketsRequest request =
+ * ListUsableRegionBackendBucketsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * for (BackendBucket element : regionBackendBucketsClient.listUsable(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 ListUsablePagedResponse listUsable(ListUsableRegionBackendBucketsRequest request) {
+ return listUsablePagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a list of all usable backend buckets in the specified project in the given region.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * ListUsableRegionBackendBucketsRequest request =
+ * ListUsableRegionBackendBucketsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * ListUsableRegionBackendBucketsRequest request =
+ * ListUsableRegionBackendBucketsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * while (true) {
+ * BackendBucketListUsable response =
+ * regionBackendBucketsClient.listUsableCallable().call(request);
+ * for (BackendBucket element : response.getItemsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final 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 (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String backendBucket = "backendBucket713751966";
+ * BackendBucket backendBucketResource = BackendBucket.newBuilder().build();
+ * Operation response =
+ * regionBackendBucketsClient
+ * .patchAsync(project, region, backendBucket, backendBucketResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request.
+ * @param backendBucket Name of the BackendBucket resource to patch.
+ * @param backendBucketResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * PatchRegionBackendBucketRequest request =
+ * PatchRegionBackendBucketRequest.newBuilder()
+ * .setBackendBucket("backendBucket713751966")
+ * .setBackendBucketResource(BackendBucket.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Operation response = regionBackendBucketsClient.patchAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * PatchRegionBackendBucketRequest request =
+ * PatchRegionBackendBucketRequest.newBuilder()
+ * .setBackendBucket("backendBucket713751966")
+ * .setBackendBucketResource(BackendBucket.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * PatchRegionBackendBucketRequest request =
+ * PatchRegionBackendBucketRequest.newBuilder()
+ * .setBackendBucket("backendBucket713751966")
+ * .setBackendBucketResource(BackendBucket.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * RegionSetPolicyRequest regionSetPolicyRequestResource =
+ * RegionSetPolicyRequest.newBuilder().build();
+ * Policy response =
+ * regionBackendBucketsClient.setIamPolicy(
+ * project, region, resource, regionSetPolicyRequestResource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param regionSetPolicyRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(
+ String project,
+ String region,
+ String resource,
+ RegionSetPolicyRequest regionSetPolicyRequestResource) {
+ SetIamPolicyRegionBackendBucketRequest request =
+ SetIamPolicyRegionBackendBucketRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setResource(resource)
+ .setRegionSetPolicyRequestResource(regionSetPolicyRequestResource)
+ .build();
+ return setIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * SetIamPolicyRegionBackendBucketRequest request =
+ * SetIamPolicyRegionBackendBucketRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build())
+ * .setResource("resource-341064690")
+ * .build();
+ * Policy response = regionBackendBucketsClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRegionBackendBucketRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * SetIamPolicyRegionBackendBucketRequest request =
+ * SetIamPolicyRegionBackendBucketRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build())
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * TestPermissionsRequest testPermissionsRequestResource =
+ * TestPermissionsRequest.newBuilder().build();
+ * TestPermissionsResponse response =
+ * regionBackendBucketsClient.testIamPermissions(
+ * project, region, resource, testPermissionsRequestResource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param testPermissionsRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TestPermissionsResponse testIamPermissions(
+ String project,
+ String region,
+ String resource,
+ TestPermissionsRequest testPermissionsRequestResource) {
+ TestIamPermissionsRegionBackendBucketRequest request =
+ TestIamPermissionsRegionBackendBucketRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setResource(resource)
+ .setTestPermissionsRequestResource(testPermissionsRequestResource)
+ .build();
+ return testIamPermissions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * TestIamPermissionsRegionBackendBucketRequest request =
+ * TestIamPermissionsRegionBackendBucketRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
+ * .build();
+ * TestPermissionsResponse response = regionBackendBucketsClient.testIamPermissions(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 TestPermissionsResponse testIamPermissions(
+ TestIamPermissionsRegionBackendBucketRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendBucketsClient regionBackendBucketsClient =
+ * RegionBackendBucketsClient.create()) {
+ * TestIamPermissionsRegionBackendBucketRequest request =
+ * TestIamPermissionsRegionBackendBucketRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final 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
+ * RegionBackendBucketsSettings.Builder regionBackendBucketsSettingsBuilder =
+ * RegionBackendBucketsSettings.newBuilder();
+ * regionBackendBucketsSettingsBuilder
+ * .getSettings()
+ * .setRetrySettings(
+ * regionBackendBucketsSettingsBuilder
+ * .getSettings()
+ * .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());
+ * RegionBackendBucketsSettings regionBackendBucketsSettings =
+ * regionBackendBucketsSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionBackendBucketsSettings.Builder regionBackendBucketsSettingsBuilder =
+ * RegionBackendBucketsSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * regionBackendBucketsSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class RegionBackendBucketsSettings extends ClientSettings
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
+ *
*
*
@@ -710,6 +728,108 @@ public final CompositeHealthCheck get(GetRegionCompositeHealthCheckRequest reque
return stub.getCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the most recent health check results for this regional CompositeHealthCheck.
+ *
+ *
* {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
+ * RegionCompositeHealthChecksClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String compositeHealthCheck = "compositeHealthCheck-1727645947";
+ * CompositeHealthCheckHealth response =
+ * regionCompositeHealthChecksClient.getHealth(project, region, compositeHealthCheck);
+ * }
+ * }
+ *
+ * @param project Name of the project scoping this request.
+ * @param region Name of the region scoping this request.
+ * @param compositeHealthCheck Name of the CompositeHealthCheck resource to get health for.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final CompositeHealthCheckHealth getHealth(
+ String project, String region, String compositeHealthCheck) {
+ GetHealthRegionCompositeHealthCheckRequest request =
+ GetHealthRegionCompositeHealthCheckRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setCompositeHealthCheck(compositeHealthCheck)
+ .build();
+ return getHealth(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the most recent health check results for this regional CompositeHealthCheck.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
+ * RegionCompositeHealthChecksClient.create()) {
+ * GetHealthRegionCompositeHealthCheckRequest request =
+ * GetHealthRegionCompositeHealthCheckRequest.newBuilder()
+ * .setCompositeHealthCheck("compositeHealthCheck-1727645947")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .build();
+ * CompositeHealthCheckHealth response = regionCompositeHealthChecksClient.getHealth(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 CompositeHealthCheckHealth getHealth(
+ GetHealthRegionCompositeHealthCheckRequest request) {
+ return getHealthCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the most recent health check results for this regional CompositeHealthCheck.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
+ * RegionCompositeHealthChecksClient.create()) {
+ * GetHealthRegionCompositeHealthCheckRequest request =
+ * GetHealthRegionCompositeHealthCheckRequest.newBuilder()
+ * .setCompositeHealthCheck("compositeHealthCheck-1727645947")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionDisksClient regionDisksClient = RegionDisksClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String disk = "disk3083677";
+ * RegionDiskUpdateKmsKeyRequest regionDiskUpdateKmsKeyRequestResource =
+ * RegionDiskUpdateKmsKeyRequest.newBuilder().build();
+ * Operation response =
+ * regionDisksClient
+ * .updateKmsKeyAsync(project, region, disk, regionDiskUpdateKmsKeyRequestResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param disk Name of the Disk resource, should conform to RFC1035.
+ * @param regionDiskUpdateKmsKeyRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) {
+ * UpdateKmsKeyRegionDiskRequest request =
+ * UpdateKmsKeyRegionDiskRequest.newBuilder()
+ * .setDisk("disk3083677")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionDiskUpdateKmsKeyRequestResource(
+ * RegionDiskUpdateKmsKeyRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Operation response = regionDisksClient.updateKmsKeyAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) {
+ * UpdateKmsKeyRegionDiskRequest request =
+ * UpdateKmsKeyRegionDiskRequest.newBuilder()
+ * .setDisk("disk3083677")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionDiskUpdateKmsKeyRequestResource(
+ * RegionDiskUpdateKmsKeyRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionDisksClient regionDisksClient = RegionDisksClient.create()) {
+ * UpdateKmsKeyRegionDiskRequest request =
+ * UpdateKmsKeyRegionDiskRequest.newBuilder()
+ * .setDisk("disk3083677")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionDiskUpdateKmsKeyRequestResource(
+ * RegionDiskUpdateKmsKeyRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
*
*
@@ -685,6 +703,103 @@ public final 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 (RegionHealthSourcesClient regionHealthSourcesClient = RegionHealthSourcesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String healthSource = "healthSource513679767";
+ * HealthSourceHealth response =
+ * regionHealthSourcesClient.getHealth(project, region, healthSource);
+ * }
+ * }
+ *
+ * @param project Name of the project scoping this request.
+ * @param region Name of the region scoping this request.
+ * @param healthSource Name of the HealthSource resource to get health for.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final HealthSourceHealth getHealth(String project, String region, String healthSource) {
+ GetHealthRegionHealthSourceRequest request =
+ GetHealthRegionHealthSourceRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setHealthSource(healthSource)
+ .build();
+ return getHealth(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the most recent health check results for this regional HealthSource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionHealthSourcesClient regionHealthSourcesClient = RegionHealthSourcesClient.create()) {
+ * GetHealthRegionHealthSourceRequest request =
+ * GetHealthRegionHealthSourceRequest.newBuilder()
+ * .setHealthSource("healthSource513679767")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .build();
+ * HealthSourceHealth response = regionHealthSourcesClient.getHealth(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 HealthSourceHealth getHealth(GetHealthRegionHealthSourceRequest request) {
+ return getHealthCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the most recent health check results for this regional HealthSource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionHealthSourcesClient regionHealthSourcesClient = RegionHealthSourcesClient.create()) {
+ * GetHealthRegionHealthSourceRequest request =
+ * GetHealthRegionHealthSourceRequest.newBuilder()
+ * .setHealthSource("healthSource513679767")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String instanceGroupManager = "instanceGroupManager-388242077";
+ * String resizeRequest = "resizeRequest-1656358085";
+ * InstanceGroupManagerResizeRequest response =
+ * regionInstanceGroupManagerResizeRequestsClient.get(
+ * project, region, instanceGroupManager, resizeRequest);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionInstanceGroupManagerResizeRequestsSettings
+ * regionInstanceGroupManagerResizeRequestsSettings =
+ * RegionInstanceGroupManagerResizeRequestsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * RegionInstanceGroupManagerResizeRequestsClient regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create(
+ * regionInstanceGroupManagerResizeRequestsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionInstanceGroupManagerResizeRequestsSettings
+ * regionInstanceGroupManagerResizeRequestsSettings =
+ * RegionInstanceGroupManagerResizeRequestsSettings.newBuilder()
+ * .setEndpoint(myEndpoint)
+ * .build();
+ * RegionInstanceGroupManagerResizeRequestsClient regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create(
+ * regionInstanceGroupManagerResizeRequestsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String instanceGroupManager = "instanceGroupManager-388242077";
+ * String resizeRequest = "resizeRequest-1656358085";
+ * Operation response =
+ * regionInstanceGroupManagerResizeRequestsClient
+ * .cancelAsync(project, region, instanceGroupManager, resizeRequest)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region scoping this request. Name should conform to RFC1035.
+ * @param instanceGroupManager The name of the managed instance group. Name should conform to
+ * RFC1035 or be a resource ID.
+ * @param resizeRequest The name of the resize request to cancel. Name should conform to RFC1035
+ * or be a resource ID.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * CancelRegionInstanceGroupManagerResizeRequestRequest request =
+ * CancelRegionInstanceGroupManagerResizeRequestRequest.newBuilder()
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setResizeRequest("resizeRequest-1656358085")
+ * .build();
+ * Operation response =
+ * regionInstanceGroupManagerResizeRequestsClient.cancelAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * CancelRegionInstanceGroupManagerResizeRequestRequest request =
+ * CancelRegionInstanceGroupManagerResizeRequestRequest.newBuilder()
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setResizeRequest("resizeRequest-1656358085")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ CancelRegionInstanceGroupManagerResizeRequestRequest, Operation, Operation>
+ cancelOperationCallable() {
+ return stub.cancelOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels the specified resize request. Cancelled resize request no longer waits for the
+ * resources to be provisioned. Cancel is only possible for requests that are in accepted state.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * CancelRegionInstanceGroupManagerResizeRequestRequest request =
+ * CancelRegionInstanceGroupManagerResizeRequestRequest.newBuilder()
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setResizeRequest("resizeRequest-1656358085")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String instanceGroupManager = "instanceGroupManager-388242077";
+ * String resizeRequest = "resizeRequest-1656358085";
+ * Operation response =
+ * regionInstanceGroupManagerResizeRequestsClient
+ * .deleteAsync(project, region, instanceGroupManager, resizeRequest)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region scoping this request. Name should conform to RFC1035.
+ * @param instanceGroupManager The name of the managed instance group. Name should conform to
+ * RFC1035 or be a resource ID.
+ * @param resizeRequest The name of the resize request to delete. Name should conform to RFC1035
+ * or be a resource ID.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * DeleteRegionInstanceGroupManagerResizeRequestRequest request =
+ * DeleteRegionInstanceGroupManagerResizeRequestRequest.newBuilder()
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setResizeRequest("resizeRequest-1656358085")
+ * .build();
+ * Operation response =
+ * regionInstanceGroupManagerResizeRequestsClient.deleteAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * DeleteRegionInstanceGroupManagerResizeRequestRequest request =
+ * DeleteRegionInstanceGroupManagerResizeRequestRequest.newBuilder()
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setResizeRequest("resizeRequest-1656358085")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ DeleteRegionInstanceGroupManagerResizeRequestRequest, Operation, Operation>
+ deleteOperationCallable() {
+ return stub.deleteOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the specified, inactive resize request. Requests that are still active cannot be
+ * deleted. Deleting request does not delete instances that were provisioned previously.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * DeleteRegionInstanceGroupManagerResizeRequestRequest request =
+ * DeleteRegionInstanceGroupManagerResizeRequestRequest.newBuilder()
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setResizeRequest("resizeRequest-1656358085")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String instanceGroupManager = "instanceGroupManager-388242077";
+ * String resizeRequest = "resizeRequest-1656358085";
+ * InstanceGroupManagerResizeRequest response =
+ * regionInstanceGroupManagerResizeRequestsClient.get(
+ * project, region, instanceGroupManager, resizeRequest);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region scoping this request. Name should conform to RFC1035.
+ * @param instanceGroupManager The name of the managed instance group. Name should conform to
+ * RFC1035 or be a resource ID.
+ * @param resizeRequest The name of the resize request. Name should conform to RFC1035 or be a
+ * resource ID.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final InstanceGroupManagerResizeRequest get(
+ String project, String region, String instanceGroupManager, String resizeRequest) {
+ GetRegionInstanceGroupManagerResizeRequestRequest request =
+ GetRegionInstanceGroupManagerResizeRequestRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setInstanceGroupManager(instanceGroupManager)
+ .setResizeRequest(resizeRequest)
+ .build();
+ return get(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns all of the details about the specified resize request.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * GetRegionInstanceGroupManagerResizeRequestRequest request =
+ * GetRegionInstanceGroupManagerResizeRequestRequest.newBuilder()
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResizeRequest("resizeRequest-1656358085")
+ * .build();
+ * InstanceGroupManagerResizeRequest response =
+ * regionInstanceGroupManagerResizeRequestsClient.get(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 InstanceGroupManagerResizeRequest get(
+ GetRegionInstanceGroupManagerResizeRequestRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns all of the details about the specified resize request.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * GetRegionInstanceGroupManagerResizeRequestRequest request =
+ * GetRegionInstanceGroupManagerResizeRequestRequest.newBuilder()
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResizeRequest("resizeRequest-1656358085")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ GetRegionInstanceGroupManagerResizeRequestRequest, InstanceGroupManagerResizeRequest>
+ getCallable() {
+ return stub.getCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new Resize Request that starts provisioning VMs immediately or queues VM creation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String instanceGroupManager = "instanceGroupManager-388242077";
+ * InstanceGroupManagerResizeRequest instanceGroupManagerResizeRequestResource =
+ * InstanceGroupManagerResizeRequest.newBuilder().build();
+ * Operation response =
+ * regionInstanceGroupManagerResizeRequestsClient
+ * .insertAsync(
+ * project, region, instanceGroupManager, instanceGroupManagerResizeRequestResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request. Name should conform to RFC1035.
+ * @param instanceGroupManager Name of the managed instance group to which the resize request is
+ * scoped. Name should conform to RFC1035 or be a resource ID.
+ * @param instanceGroupManagerResizeRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * InsertRegionInstanceGroupManagerResizeRequestRequest request =
+ * InsertRegionInstanceGroupManagerResizeRequestRequest.newBuilder()
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setInstanceGroupManagerResizeRequestResource(
+ * InstanceGroupManagerResizeRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Operation response =
+ * regionInstanceGroupManagerResizeRequestsClient.insertAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * InsertRegionInstanceGroupManagerResizeRequestRequest request =
+ * InsertRegionInstanceGroupManagerResizeRequestRequest.newBuilder()
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setInstanceGroupManagerResizeRequestResource(
+ * InstanceGroupManagerResizeRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ InsertRegionInstanceGroupManagerResizeRequestRequest, Operation, Operation>
+ insertOperationCallable() {
+ return stub.insertOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new Resize Request that starts provisioning VMs immediately or queues VM creation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * InsertRegionInstanceGroupManagerResizeRequestRequest request =
+ * InsertRegionInstanceGroupManagerResizeRequestRequest.newBuilder()
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setInstanceGroupManagerResizeRequestResource(
+ * InstanceGroupManagerResizeRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String instanceGroupManager = "instanceGroupManager-388242077";
+ * for (InstanceGroupManagerResizeRequest element :
+ * regionInstanceGroupManagerResizeRequestsClient
+ * .list(project, region, instanceGroupManager)
+ * .iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request. Name should conform to RFC1035.
+ * @param instanceGroupManager The name of the managed instance group. The name should conform to
+ * RFC1035.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPagedResponse list(String project, String region, String instanceGroupManager) {
+ ListRegionInstanceGroupManagerResizeRequestsRequest request =
+ ListRegionInstanceGroupManagerResizeRequestsRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setInstanceGroupManager(instanceGroupManager)
+ .build();
+ return list(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a list of Resize Requests that are contained in the managed instance group.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * ListRegionInstanceGroupManagerResizeRequestsRequest request =
+ * ListRegionInstanceGroupManagerResizeRequestsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * for (InstanceGroupManagerResizeRequest element :
+ * regionInstanceGroupManagerResizeRequestsClient.list(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 ListPagedResponse list(ListRegionInstanceGroupManagerResizeRequestsRequest request) {
+ return listPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a list of Resize Requests that are contained in the managed instance group.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * ListRegionInstanceGroupManagerResizeRequestsRequest request =
+ * ListRegionInstanceGroupManagerResizeRequestsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionInstanceGroupManagerResizeRequestsClient
+ * regionInstanceGroupManagerResizeRequestsClient =
+ * RegionInstanceGroupManagerResizeRequestsClient.create()) {
+ * ListRegionInstanceGroupManagerResizeRequestsRequest request =
+ * ListRegionInstanceGroupManagerResizeRequestsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setInstanceGroupManager("instanceGroupManager-388242077")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * while (true) {
+ * RegionInstanceGroupManagerResizeRequestsListResponse response =
+ * regionInstanceGroupManagerResizeRequestsClient.listCallable().call(request);
+ * for (InstanceGroupManagerResizeRequest element : response.getItemsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListRegionInstanceGroupManagerResizeRequestsRequest,
+ RegionInstanceGroupManagerResizeRequestsListResponse>
+ listCallable() {
+ return stub.listCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+
+ public static class ListPagedResponse
+ extends AbstractPagedListResponse<
+ ListRegionInstanceGroupManagerResizeRequestsRequest,
+ RegionInstanceGroupManagerResizeRequestsListResponse,
+ InstanceGroupManagerResizeRequest,
+ ListPage,
+ ListFixedSizeCollection> {
+
+ public static ApiFuture
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionInstanceGroupManagerResizeRequestsSettings.Builder
+ * regionInstanceGroupManagerResizeRequestsSettingsBuilder =
+ * RegionInstanceGroupManagerResizeRequestsSettings.newBuilder();
+ * regionInstanceGroupManagerResizeRequestsSettingsBuilder
+ * .getSettings()
+ * .setRetrySettings(
+ * regionInstanceGroupManagerResizeRequestsSettingsBuilder
+ * .getSettings()
+ * .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());
+ * RegionInstanceGroupManagerResizeRequestsSettings
+ * regionInstanceGroupManagerResizeRequestsSettings =
+ * regionInstanceGroupManagerResizeRequestsSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionInstanceGroupManagerResizeRequestsSettings.Builder
+ * regionInstanceGroupManagerResizeRequestsSettingsBuilder =
+ * RegionInstanceGroupManagerResizeRequestsSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * regionInstanceGroupManagerResizeRequestsSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class RegionInstanceGroupManagerResizeRequestsSettings
+ extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String instantSnapshotGroup = "instantSnapshotGroup500796090";
+ * InstantSnapshotGroup response =
+ * regionInstantSnapshotGroupsClient.get(project, region, instantSnapshotGroup);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionInstantSnapshotGroupsSettings regionInstantSnapshotGroupsSettings =
+ * RegionInstantSnapshotGroupsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create(regionInstantSnapshotGroupsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionInstantSnapshotGroupsSettings regionInstantSnapshotGroupsSettings =
+ * RegionInstantSnapshotGroupsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create(regionInstantSnapshotGroupsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String instantSnapshotGroup = "instantSnapshotGroup500796090";
+ * Operation response =
+ * regionInstantSnapshotGroupsClient
+ * .deleteAsync(project, region, instantSnapshotGroup)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param instantSnapshotGroup Name of the InstantSnapshotGroup resource to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * DeleteRegionInstantSnapshotGroupRequest request =
+ * DeleteRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroup("instantSnapshotGroup500796090")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Operation response = regionInstantSnapshotGroupsClient.deleteAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * DeleteRegionInstantSnapshotGroupRequest request =
+ * DeleteRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroup("instantSnapshotGroup500796090")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * DeleteRegionInstantSnapshotGroupRequest request =
+ * DeleteRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroup("instantSnapshotGroup500796090")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String instantSnapshotGroup = "instantSnapshotGroup500796090";
+ * InstantSnapshotGroup response =
+ * regionInstantSnapshotGroupsClient.get(project, region, instantSnapshotGroup);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param instantSnapshotGroup Name of the InstantSnapshotGroup resource to return.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final InstantSnapshotGroup get(
+ String project, String region, String instantSnapshotGroup) {
+ GetRegionInstantSnapshotGroupRequest request =
+ GetRegionInstantSnapshotGroupRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setInstantSnapshotGroup(instantSnapshotGroup)
+ .build();
+ return get(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * returns the specified InstantSnapshotGroup resource in the specified region.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * GetRegionInstantSnapshotGroupRequest request =
+ * GetRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroup("instantSnapshotGroup500796090")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .build();
+ * InstantSnapshotGroup response = regionInstantSnapshotGroupsClient.get(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 InstantSnapshotGroup get(GetRegionInstantSnapshotGroupRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * returns the specified InstantSnapshotGroup resource in the specified region.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * GetRegionInstantSnapshotGroupRequest request =
+ * GetRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroup("instantSnapshotGroup500796090")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * Policy response = regionInstantSnapshotGroupsClient.getIamPolicy(project, region, resource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(String project, String region, String resource) {
+ GetIamPolicyRegionInstantSnapshotGroupRequest request =
+ GetIamPolicyRegionInstantSnapshotGroupRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setResource(resource)
+ .build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
+ * exists.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * GetIamPolicyRegionInstantSnapshotGroupRequest request =
+ * GetIamPolicyRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setOptionsRequestedPolicyVersion(-574521795)
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .build();
+ * Policy response = regionInstantSnapshotGroupsClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRegionInstantSnapshotGroupRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
+ * exists.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * GetIamPolicyRegionInstantSnapshotGroupRequest request =
+ * GetIamPolicyRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setOptionsRequestedPolicyVersion(-574521795)
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * InstantSnapshotGroup instantSnapshotGroupResource = InstantSnapshotGroup.newBuilder().build();
+ * Operation response =
+ * regionInstantSnapshotGroupsClient
+ * .insertAsync(project, region, instantSnapshotGroupResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region for this request.
+ * @param instantSnapshotGroupResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * InsertRegionInstantSnapshotGroupRequest request =
+ * InsertRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroupResource(InstantSnapshotGroup.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSourceConsistencyGroup("sourceConsistencyGroup-2056893054")
+ * .build();
+ * Operation response = regionInstantSnapshotGroupsClient.insertAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * InsertRegionInstantSnapshotGroupRequest request =
+ * InsertRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroupResource(InstantSnapshotGroup.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSourceConsistencyGroup("sourceConsistencyGroup-2056893054")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * InsertRegionInstantSnapshotGroupRequest request =
+ * InsertRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setInstantSnapshotGroupResource(InstantSnapshotGroup.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSourceConsistencyGroup("sourceConsistencyGroup-2056893054")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * for (InstantSnapshotGroup element :
+ * regionInstantSnapshotGroupsClient.list(project, region).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPagedResponse list(String project, String region) {
+ ListRegionInstantSnapshotGroupsRequest request =
+ ListRegionInstantSnapshotGroupsRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .build();
+ return list(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * retrieves the list of InstantSnapshotGroup resources contained within the specified region.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * ListRegionInstantSnapshotGroupsRequest request =
+ * ListRegionInstantSnapshotGroupsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * for (InstantSnapshotGroup element :
+ * regionInstantSnapshotGroupsClient.list(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 ListPagedResponse list(ListRegionInstantSnapshotGroupsRequest request) {
+ return listPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * retrieves the list of InstantSnapshotGroup resources contained within the specified region.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * ListRegionInstantSnapshotGroupsRequest request =
+ * ListRegionInstantSnapshotGroupsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * ListRegionInstantSnapshotGroupsRequest request =
+ * ListRegionInstantSnapshotGroupsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * while (true) {
+ * ListInstantSnapshotGroups response =
+ * regionInstantSnapshotGroupsClient.listCallable().call(request);
+ * for (InstantSnapshotGroup element : response.getItemsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final 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 (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * RegionSetPolicyRequest regionSetPolicyRequestResource =
+ * RegionSetPolicyRequest.newBuilder().build();
+ * Policy response =
+ * regionInstantSnapshotGroupsClient.setIamPolicy(
+ * project, region, resource, regionSetPolicyRequestResource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param regionSetPolicyRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(
+ String project,
+ String region,
+ String resource,
+ RegionSetPolicyRequest regionSetPolicyRequestResource) {
+ SetIamPolicyRegionInstantSnapshotGroupRequest request =
+ SetIamPolicyRegionInstantSnapshotGroupRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setResource(resource)
+ .setRegionSetPolicyRequestResource(regionSetPolicyRequestResource)
+ .build();
+ return setIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * SetIamPolicyRegionInstantSnapshotGroupRequest request =
+ * SetIamPolicyRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build())
+ * .setResource("resource-341064690")
+ * .build();
+ * Policy response = regionInstantSnapshotGroupsClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRegionInstantSnapshotGroupRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * SetIamPolicyRegionInstantSnapshotGroupRequest request =
+ * SetIamPolicyRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build())
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * TestPermissionsRequest testPermissionsRequestResource =
+ * TestPermissionsRequest.newBuilder().build();
+ * TestPermissionsResponse response =
+ * regionInstantSnapshotGroupsClient.testIamPermissions(
+ * project, region, resource, testPermissionsRequestResource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param testPermissionsRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TestPermissionsResponse testIamPermissions(
+ String project,
+ String region,
+ String resource,
+ TestPermissionsRequest testPermissionsRequestResource) {
+ TestIamPermissionsRegionInstantSnapshotGroupRequest request =
+ TestIamPermissionsRegionInstantSnapshotGroupRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setResource(resource)
+ .setTestPermissionsRequestResource(testPermissionsRequestResource)
+ .build();
+ return testIamPermissions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * TestIamPermissionsRegionInstantSnapshotGroupRequest request =
+ * TestIamPermissionsRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
+ * .build();
+ * TestPermissionsResponse response =
+ * regionInstantSnapshotGroupsClient.testIamPermissions(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 TestPermissionsResponse testIamPermissions(
+ TestIamPermissionsRegionInstantSnapshotGroupRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionInstantSnapshotGroupsClient regionInstantSnapshotGroupsClient =
+ * RegionInstantSnapshotGroupsClient.create()) {
+ * TestIamPermissionsRegionInstantSnapshotGroupRequest request =
+ * TestIamPermissionsRegionInstantSnapshotGroupRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ TestIamPermissionsRegionInstantSnapshotGroupRequest, TestPermissionsResponse>
+ testIamPermissionsCallable() {
+ return stub.testIamPermissionsCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+
+ public static class ListPagedResponse
+ extends AbstractPagedListResponse<
+ ListRegionInstantSnapshotGroupsRequest,
+ ListInstantSnapshotGroups,
+ InstantSnapshotGroup,
+ ListPage,
+ ListFixedSizeCollection> {
+
+ public static ApiFuture
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionInstantSnapshotGroupsSettings.Builder regionInstantSnapshotGroupsSettingsBuilder =
+ * RegionInstantSnapshotGroupsSettings.newBuilder();
+ * regionInstantSnapshotGroupsSettingsBuilder
+ * .getSettings()
+ * .setRetrySettings(
+ * regionInstantSnapshotGroupsSettingsBuilder
+ * .getSettings()
+ * .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());
+ * RegionInstantSnapshotGroupsSettings regionInstantSnapshotGroupsSettings =
+ * regionInstantSnapshotGroupsSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionInstantSnapshotGroupsSettings.Builder regionInstantSnapshotGroupsSettingsBuilder =
+ * RegionInstantSnapshotGroupsSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * regionInstantSnapshotGroupsSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class RegionInstantSnapshotGroupsSettings
+ extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotSettingsClient regionSnapshotSettingsClient =
+ * RegionSnapshotSettingsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * SnapshotSettings response = regionSnapshotSettingsClient.get(project, region);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionSnapshotSettingsSettings regionSnapshotSettingsSettings =
+ * RegionSnapshotSettingsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * RegionSnapshotSettingsClient regionSnapshotSettingsClient =
+ * RegionSnapshotSettingsClient.create(regionSnapshotSettingsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionSnapshotSettingsSettings regionSnapshotSettingsSettings =
+ * RegionSnapshotSettingsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * RegionSnapshotSettingsClient regionSnapshotSettingsClient =
+ * RegionSnapshotSettingsClient.create(regionSnapshotSettingsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotSettingsClient regionSnapshotSettingsClient =
+ * RegionSnapshotSettingsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * SnapshotSettings response = regionSnapshotSettingsClient.get(project, region);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region for this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SnapshotSettings get(String project, String region) {
+ GetRegionSnapshotSettingRequest request =
+ GetRegionSnapshotSettingRequest.newBuilder().setProject(project).setRegion(region).build();
+ return get(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get region snapshot settings.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotSettingsClient regionSnapshotSettingsClient =
+ * RegionSnapshotSettingsClient.create()) {
+ * GetRegionSnapshotSettingRequest request =
+ * GetRegionSnapshotSettingRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .build();
+ * SnapshotSettings response = regionSnapshotSettingsClient.get(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 SnapshotSettings get(GetRegionSnapshotSettingRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get region snapshot settings.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotSettingsClient regionSnapshotSettingsClient =
+ * RegionSnapshotSettingsClient.create()) {
+ * GetRegionSnapshotSettingRequest request =
+ * GetRegionSnapshotSettingRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionSnapshotSettingsClient regionSnapshotSettingsClient =
+ * RegionSnapshotSettingsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * SnapshotSettings snapshotSettingsResource = SnapshotSettings.newBuilder().build();
+ * Operation response =
+ * regionSnapshotSettingsClient.patchAsync(project, region, snapshotSettingsResource).get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region for this request.
+ * @param snapshotSettingsResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotSettingsClient regionSnapshotSettingsClient =
+ * RegionSnapshotSettingsClient.create()) {
+ * PatchRegionSnapshotSettingRequest request =
+ * PatchRegionSnapshotSettingRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSnapshotSettingsResource(SnapshotSettings.newBuilder().build())
+ * .setUpdateMask("updateMask-296147115")
+ * .build();
+ * Operation response = regionSnapshotSettingsClient.patchAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotSettingsClient regionSnapshotSettingsClient =
+ * RegionSnapshotSettingsClient.create()) {
+ * PatchRegionSnapshotSettingRequest request =
+ * PatchRegionSnapshotSettingRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSnapshotSettingsResource(SnapshotSettings.newBuilder().build())
+ * .setUpdateMask("updateMask-296147115")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotSettingsClient regionSnapshotSettingsClient =
+ * RegionSnapshotSettingsClient.create()) {
+ * PatchRegionSnapshotSettingRequest request =
+ * PatchRegionSnapshotSettingRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSnapshotSettingsResource(SnapshotSettings.newBuilder().build())
+ * .setUpdateMask("updateMask-296147115")
+ * .build();
+ * ApiFuture
+ */
+ public final 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
+ * RegionSnapshotSettingsSettings.Builder regionSnapshotSettingsSettingsBuilder =
+ * RegionSnapshotSettingsSettings.newBuilder();
+ * regionSnapshotSettingsSettingsBuilder
+ * .getSettings()
+ * .setRetrySettings(
+ * regionSnapshotSettingsSettingsBuilder
+ * .getSettings()
+ * .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());
+ * RegionSnapshotSettingsSettings regionSnapshotSettingsSettings =
+ * regionSnapshotSettingsSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionSnapshotSettingsSettings.Builder regionSnapshotSettingsSettingsBuilder =
+ * RegionSnapshotSettingsSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * regionSnapshotSettingsSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class RegionSnapshotSettingsSettings extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String snapshot = "snapshot284874180";
+ * Snapshot response = regionSnapshotsClient.get(project, region, snapshot);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionSnapshotsSettings regionSnapshotsSettings =
+ * RegionSnapshotsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * RegionSnapshotsClient regionSnapshotsClient =
+ * RegionSnapshotsClient.create(regionSnapshotsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionSnapshotsSettings regionSnapshotsSettings =
+ * RegionSnapshotsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * RegionSnapshotsClient regionSnapshotsClient =
+ * RegionSnapshotsClient.create(regionSnapshotsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String snapshot = "snapshot284874180";
+ * Operation response = regionSnapshotsClient.deleteAsync(project, region, snapshot).get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param snapshot Name of the snapshot resource to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * DeleteRegionSnapshotRequest request =
+ * DeleteRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSnapshot("snapshot284874180")
+ * .build();
+ * Operation response = regionSnapshotsClient.deleteAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * DeleteRegionSnapshotRequest request =
+ * DeleteRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSnapshot("snapshot284874180")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * DeleteRegionSnapshotRequest request =
+ * DeleteRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSnapshot("snapshot284874180")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String snapshot = "snapshot284874180";
+ * Snapshot response = regionSnapshotsClient.get(project, region, snapshot);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region for this request.
+ * @param snapshot Name of the Snapshot resource to return.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Snapshot get(String project, String region, String snapshot) {
+ GetRegionSnapshotRequest request =
+ GetRegionSnapshotRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setSnapshot(snapshot)
+ .build();
+ return get(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the specified Snapshot resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * GetRegionSnapshotRequest request =
+ * GetRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setSnapshot("snapshot284874180")
+ * .build();
+ * Snapshot response = regionSnapshotsClient.get(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 Snapshot get(GetRegionSnapshotRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the specified Snapshot resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * GetRegionSnapshotRequest request =
+ * GetRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setSnapshot("snapshot284874180")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * Policy response = regionSnapshotsClient.getIamPolicy(project, region, resource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(String project, String region, String resource) {
+ GetIamPolicyRegionSnapshotRequest request =
+ GetIamPolicyRegionSnapshotRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setResource(resource)
+ .build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
+ * exists.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * GetIamPolicyRegionSnapshotRequest request =
+ * GetIamPolicyRegionSnapshotRequest.newBuilder()
+ * .setOptionsRequestedPolicyVersion(-574521795)
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .build();
+ * Policy response = regionSnapshotsClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRegionSnapshotRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
+ * exists.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * GetIamPolicyRegionSnapshotRequest request =
+ * GetIamPolicyRegionSnapshotRequest.newBuilder()
+ * .setOptionsRequestedPolicyVersion(-574521795)
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * Snapshot snapshotResource = Snapshot.newBuilder().build();
+ * Operation response =
+ * regionSnapshotsClient.insertAsync(project, region, snapshotResource).get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region for this request.
+ * @param snapshotResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * InsertRegionSnapshotRequest request =
+ * InsertRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSnapshotResource(Snapshot.newBuilder().build())
+ * .build();
+ * Operation response = regionSnapshotsClient.insertAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * InsertRegionSnapshotRequest request =
+ * InsertRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSnapshotResource(Snapshot.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * InsertRegionSnapshotRequest request =
+ * InsertRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSnapshotResource(Snapshot.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * for (Snapshot element : regionSnapshotsClient.list(project, region).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region for this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPagedResponse list(String project, String region) {
+ ListRegionSnapshotsRequest request =
+ ListRegionSnapshotsRequest.newBuilder().setProject(project).setRegion(region).build();
+ return list(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the list of Snapshot resources contained within the specified region.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * ListRegionSnapshotsRequest request =
+ * ListRegionSnapshotsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * for (Snapshot element : regionSnapshotsClient.list(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 ListPagedResponse list(ListRegionSnapshotsRequest request) {
+ return listPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the list of Snapshot resources contained within the specified region.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * ListRegionSnapshotsRequest request =
+ * ListRegionSnapshotsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * ListRegionSnapshotsRequest request =
+ * ListRegionSnapshotsRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * while (true) {
+ * SnapshotList response = regionSnapshotsClient.listCallable().call(request);
+ * for (Snapshot element : response.getItemsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final 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 (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * RegionSetPolicyRequest regionSetPolicyRequestResource =
+ * RegionSetPolicyRequest.newBuilder().build();
+ * Policy response =
+ * regionSnapshotsClient.setIamPolicy(
+ * project, region, resource, regionSetPolicyRequestResource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param regionSetPolicyRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(
+ String project,
+ String region,
+ String resource,
+ RegionSetPolicyRequest regionSetPolicyRequestResource) {
+ SetIamPolicyRegionSnapshotRequest request =
+ SetIamPolicyRegionSnapshotRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setResource(resource)
+ .setRegionSetPolicyRequestResource(regionSetPolicyRequestResource)
+ .build();
+ return setIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * SetIamPolicyRegionSnapshotRequest request =
+ * SetIamPolicyRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build())
+ * .setResource("resource-341064690")
+ * .build();
+ * Policy response = regionSnapshotsClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRegionSnapshotRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * SetIamPolicyRegionSnapshotRequest request =
+ * SetIamPolicyRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build())
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * RegionSetLabelsRequest regionSetLabelsRequestResource =
+ * RegionSetLabelsRequest.newBuilder().build();
+ * Operation response =
+ * regionSnapshotsClient
+ * .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param regionSetLabelsRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * SetLabelsRegionSnapshotRequest request =
+ * SetLabelsRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * Operation response = regionSnapshotsClient.setLabelsAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * SetLabelsRegionSnapshotRequest request =
+ * SetLabelsRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * SetLabelsRegionSnapshotRequest request =
+ * SetLabelsRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * TestPermissionsRequest testPermissionsRequestResource =
+ * TestPermissionsRequest.newBuilder().build();
+ * TestPermissionsResponse response =
+ * regionSnapshotsClient.testIamPermissions(
+ * project, region, resource, testPermissionsRequestResource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param testPermissionsRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TestPermissionsResponse testIamPermissions(
+ String project,
+ String region,
+ String resource,
+ TestPermissionsRequest testPermissionsRequestResource) {
+ TestIamPermissionsRegionSnapshotRequest request =
+ TestIamPermissionsRegionSnapshotRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setResource(resource)
+ .setTestPermissionsRequestResource(testPermissionsRequestResource)
+ .build();
+ return testIamPermissions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * TestIamPermissionsRegionSnapshotRequest request =
+ * TestIamPermissionsRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
+ * .build();
+ * TestPermissionsResponse response = regionSnapshotsClient.testIamPermissions(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 TestPermissionsResponse testIamPermissions(
+ TestIamPermissionsRegionSnapshotRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * TestIamPermissionsRegionSnapshotRequest request =
+ * TestIamPermissionsRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String snapshot = "snapshot284874180";
+ * RegionSnapshotUpdateKmsKeyRequest regionSnapshotUpdateKmsKeyRequestResource =
+ * RegionSnapshotUpdateKmsKeyRequest.newBuilder().build();
+ * Operation response =
+ * regionSnapshotsClient
+ * .updateKmsKeyAsync(
+ * project, region, snapshot, regionSnapshotUpdateKmsKeyRequestResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region for this request.
+ * @param snapshot Name of the snapshot resource to update. Should conform to RFC1035.
+ * @param regionSnapshotUpdateKmsKeyRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * UpdateKmsKeyRegionSnapshotRequest request =
+ * UpdateKmsKeyRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSnapshotUpdateKmsKeyRequestResource(
+ * RegionSnapshotUpdateKmsKeyRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setSnapshot("snapshot284874180")
+ * .build();
+ * Operation response = regionSnapshotsClient.updateKmsKeyAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * UpdateKmsKeyRegionSnapshotRequest request =
+ * UpdateKmsKeyRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSnapshotUpdateKmsKeyRequestResource(
+ * RegionSnapshotUpdateKmsKeyRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setSnapshot("snapshot284874180")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSnapshotsClient regionSnapshotsClient = RegionSnapshotsClient.create()) {
+ * UpdateKmsKeyRegionSnapshotRequest request =
+ * UpdateKmsKeyRegionSnapshotRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSnapshotUpdateKmsKeyRequestResource(
+ * RegionSnapshotUpdateKmsKeyRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setSnapshot("snapshot284874180")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *