diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/SemanticGovernancePolicyServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/SemanticGovernancePolicyServiceClient.java new file mode 100644 index 000000000000..bbe819c92e7b --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/SemanticGovernancePolicyServiceClient.java @@ -0,0 +1,1814 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.stub.SemanticGovernancePolicyServiceStub; +import com.google.cloud.aiplatform.v1.stub.SemanticGovernancePolicyServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Manages SemanticGovernancePolicies. A SemanticGovernancePolicy is a resource + * that represents a user-specified policy applied to an Agent and optionally a specific Tool within + * that Agent. + * + *
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * SemanticGovernancePolicyName name =
+ * SemanticGovernancePolicyName.of(
+ * "[PROJECT]", "[LOCATION]", "[SEMANTIC_GOVERNANCE_POLICY]");
+ * SemanticGovernancePolicy response =
+ * semanticGovernancePolicyServiceClient.getSemanticGovernancePolicy(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the SemanticGovernancePolicyServiceClient object to clean + * up resources such as threads. In the example above, try-with-resources is used, which + * automatically calls close(). + * + *
| Method | + *Description | + *Method Variants | + *
|---|---|---|
CreateSemanticGovernancePolicy |
+ * Creates a SemanticGovernancePolicy. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetSemanticGovernancePolicy |
+ * Gets a SemanticGovernancePolicy. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListSemanticGovernancePolicies |
+ * Lists SemanticGovernancePolicies in a given location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateSemanticGovernancePolicy |
+ * Updates a SemanticGovernancePolicy. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteSemanticGovernancePolicy |
+ * Deletes a SemanticGovernancePolicy. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListLocations |
+ * Lists information about the supported locations for this service. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetLocation |
+ * Gets information about a location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
SetIamPolicy |
+ * Sets the access control policy on the specified resource. Replacesany existing policy. + * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetIamPolicy |
+ * Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
TestIamPermissions |
+ * Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of + * SemanticGovernancePolicyServiceSettings to create(). For example: + * + *
To customize credentials: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SemanticGovernancePolicyServiceSettings semanticGovernancePolicyServiceSettings =
+ * SemanticGovernancePolicyServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create(semanticGovernancePolicyServiceSettings);
+ * }
+ *
+ * To customize the endpoint: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SemanticGovernancePolicyServiceSettings semanticGovernancePolicyServiceSettings =
+ * SemanticGovernancePolicyServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create(semanticGovernancePolicyServiceSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class SemanticGovernancePolicyServiceClient implements BackgroundResource { + private final @Nullable SemanticGovernancePolicyServiceSettings settings; + private final SemanticGovernancePolicyServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of SemanticGovernancePolicyServiceClient with default settings. */ + public static final SemanticGovernancePolicyServiceClient create() throws IOException { + return create(SemanticGovernancePolicyServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of SemanticGovernancePolicyServiceClient, 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 SemanticGovernancePolicyServiceClient create( + SemanticGovernancePolicyServiceSettings settings) throws IOException { + return new SemanticGovernancePolicyServiceClient(settings); + } + + /** + * Constructs an instance of SemanticGovernancePolicyServiceClient, using the given stub for + * making calls. This is for advanced usage - prefer using + * create(SemanticGovernancePolicyServiceSettings). + */ + public static final SemanticGovernancePolicyServiceClient create( + SemanticGovernancePolicyServiceStub stub) { + return new SemanticGovernancePolicyServiceClient(stub); + } + + /** + * Constructs an instance of SemanticGovernancePolicyServiceClient, 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 SemanticGovernancePolicyServiceClient(SemanticGovernancePolicyServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = + ((SemanticGovernancePolicyServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected SemanticGovernancePolicyServiceClient(SemanticGovernancePolicyServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final @Nullable SemanticGovernancePolicyServiceSettings getSettings() { + return settings; + } + + public SemanticGovernancePolicyServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a SemanticGovernancePolicy. + * + *
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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * SemanticGovernancePolicy semanticGovernancePolicy =
+ * SemanticGovernancePolicy.newBuilder().build();
+ * String semanticGovernancePolicyId = "semanticGovernancePolicyId1855395413";
+ * SemanticGovernancePolicy response =
+ * semanticGovernancePolicyServiceClient
+ * .createSemanticGovernancePolicyAsync(
+ * parent, semanticGovernancePolicy, semanticGovernancePolicyId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location into which to create the
+ * SemanticGovernancePolicy. Format: `projects/{project}/locations/{location}`
+ * @param semanticGovernancePolicy Required. The SemanticGovernancePolicy to create.
+ * @param semanticGovernancePolicyId Required. The ID to use for the SemanticGovernancePolicy,
+ * which will become the final component of the SemanticGovernancePolicy's resource name.
+ * This value may be up to 63 characters, and valid characters are `[a-z0-9-]`. The first + * character cannot be a number or hyphen. The last character must be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + SemanticGovernancePolicy, CreateSemanticGovernancePolicyOperationMetadata> + createSemanticGovernancePolicyAsync( + @Nullable LocationName parent, + SemanticGovernancePolicy semanticGovernancePolicy, + String semanticGovernancePolicyId) { + CreateSemanticGovernancePolicyRequest request = + CreateSemanticGovernancePolicyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSemanticGovernancePolicy(semanticGovernancePolicy) + .setSemanticGovernancePolicyId(semanticGovernancePolicyId) + .build(); + return createSemanticGovernancePolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a SemanticGovernancePolicy. + * + *
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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * SemanticGovernancePolicy semanticGovernancePolicy =
+ * SemanticGovernancePolicy.newBuilder().build();
+ * String semanticGovernancePolicyId = "semanticGovernancePolicyId1855395413";
+ * SemanticGovernancePolicy response =
+ * semanticGovernancePolicyServiceClient
+ * .createSemanticGovernancePolicyAsync(
+ * parent, semanticGovernancePolicy, semanticGovernancePolicyId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location into which to create the
+ * SemanticGovernancePolicy. Format: `projects/{project}/locations/{location}`
+ * @param semanticGovernancePolicy Required. The SemanticGovernancePolicy to create.
+ * @param semanticGovernancePolicyId Required. The ID to use for the SemanticGovernancePolicy,
+ * which will become the final component of the SemanticGovernancePolicy's resource name.
+ * This value may be up to 63 characters, and valid characters are `[a-z0-9-]`. The first + * character cannot be a number or hyphen. The last character must be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + SemanticGovernancePolicy, CreateSemanticGovernancePolicyOperationMetadata> + createSemanticGovernancePolicyAsync( + String parent, + SemanticGovernancePolicy semanticGovernancePolicy, + String semanticGovernancePolicyId) { + CreateSemanticGovernancePolicyRequest request = + CreateSemanticGovernancePolicyRequest.newBuilder() + .setParent(parent) + .setSemanticGovernancePolicy(semanticGovernancePolicy) + .setSemanticGovernancePolicyId(semanticGovernancePolicyId) + .build(); + return createSemanticGovernancePolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a SemanticGovernancePolicy. + * + *
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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * CreateSemanticGovernancePolicyRequest request =
+ * CreateSemanticGovernancePolicyRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSemanticGovernancePolicy(SemanticGovernancePolicy.newBuilder().build())
+ * .setSemanticGovernancePolicyId("semanticGovernancePolicyId1855395413")
+ * .build();
+ * SemanticGovernancePolicy response =
+ * semanticGovernancePolicyServiceClient.createSemanticGovernancePolicyAsync(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<
+ SemanticGovernancePolicy, CreateSemanticGovernancePolicyOperationMetadata>
+ createSemanticGovernancePolicyAsync(CreateSemanticGovernancePolicyRequest request) {
+ return createSemanticGovernancePolicyOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a SemanticGovernancePolicy.
+ *
+ * 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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * CreateSemanticGovernancePolicyRequest request =
+ * CreateSemanticGovernancePolicyRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSemanticGovernancePolicy(SemanticGovernancePolicy.newBuilder().build())
+ * .setSemanticGovernancePolicyId("semanticGovernancePolicyId1855395413")
+ * .build();
+ * OperationFuture
+ * future =
+ * semanticGovernancePolicyServiceClient
+ * .createSemanticGovernancePolicyOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * SemanticGovernancePolicy response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ CreateSemanticGovernancePolicyRequest,
+ SemanticGovernancePolicy,
+ CreateSemanticGovernancePolicyOperationMetadata>
+ createSemanticGovernancePolicyOperationCallable() {
+ return stub.createSemanticGovernancePolicyOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a SemanticGovernancePolicy.
+ *
+ * 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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * CreateSemanticGovernancePolicyRequest request =
+ * CreateSemanticGovernancePolicyRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSemanticGovernancePolicy(SemanticGovernancePolicy.newBuilder().build())
+ * .setSemanticGovernancePolicyId("semanticGovernancePolicyId1855395413")
+ * .build();
+ * ApiFuture future =
+ * semanticGovernancePolicyServiceClient
+ * .createSemanticGovernancePolicyCallable()
+ * .futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * SemanticGovernancePolicyName name =
+ * SemanticGovernancePolicyName.of(
+ * "[PROJECT]", "[LOCATION]", "[SEMANTIC_GOVERNANCE_POLICY]");
+ * SemanticGovernancePolicy response =
+ * semanticGovernancePolicyServiceClient.getSemanticGovernancePolicy(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the SemanticGovernancePolicy resource. Format:
+ * `projects/{project}/locations/{location}/semanticGovernancePolicies/{semantic_governance_policy}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SemanticGovernancePolicy getSemanticGovernancePolicy(
+ @Nullable SemanticGovernancePolicyName name) {
+ GetSemanticGovernancePolicyRequest request =
+ GetSemanticGovernancePolicyRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getSemanticGovernancePolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a SemanticGovernancePolicy.
+ *
+ * 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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * String name =
+ * SemanticGovernancePolicyName.of("[PROJECT]", "[LOCATION]", "[SEMANTIC_GOVERNANCE_POLICY]")
+ * .toString();
+ * SemanticGovernancePolicy response =
+ * semanticGovernancePolicyServiceClient.getSemanticGovernancePolicy(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the SemanticGovernancePolicy resource. Format:
+ * `projects/{project}/locations/{location}/semanticGovernancePolicies/{semantic_governance_policy}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SemanticGovernancePolicy getSemanticGovernancePolicy(String name) {
+ GetSemanticGovernancePolicyRequest request =
+ GetSemanticGovernancePolicyRequest.newBuilder().setName(name).build();
+ return getSemanticGovernancePolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a SemanticGovernancePolicy.
+ *
+ * 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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * GetSemanticGovernancePolicyRequest request =
+ * GetSemanticGovernancePolicyRequest.newBuilder()
+ * .setName(
+ * SemanticGovernancePolicyName.of(
+ * "[PROJECT]", "[LOCATION]", "[SEMANTIC_GOVERNANCE_POLICY]")
+ * .toString())
+ * .build();
+ * SemanticGovernancePolicy response =
+ * semanticGovernancePolicyServiceClient.getSemanticGovernancePolicy(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 SemanticGovernancePolicy getSemanticGovernancePolicy(
+ GetSemanticGovernancePolicyRequest request) {
+ return getSemanticGovernancePolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a SemanticGovernancePolicy.
+ *
+ * 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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * GetSemanticGovernancePolicyRequest request =
+ * GetSemanticGovernancePolicyRequest.newBuilder()
+ * .setName(
+ * SemanticGovernancePolicyName.of(
+ * "[PROJECT]", "[LOCATION]", "[SEMANTIC_GOVERNANCE_POLICY]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * semanticGovernancePolicyServiceClient
+ * .getSemanticGovernancePolicyCallable()
+ * .futureCall(request);
+ * // Do something.
+ * SemanticGovernancePolicy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (SemanticGovernancePolicy element :
+ * semanticGovernancePolicyServiceClient
+ * .listSemanticGovernancePolicies(parent)
+ * .iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location from which to list the
+ * SemanticGovernancePolicies. Format: `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSemanticGovernancePoliciesPagedResponse listSemanticGovernancePolicies(
+ @Nullable LocationName parent) {
+ ListSemanticGovernancePoliciesRequest request =
+ ListSemanticGovernancePoliciesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listSemanticGovernancePolicies(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists SemanticGovernancePolicies in a given location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (SemanticGovernancePolicy element :
+ * semanticGovernancePolicyServiceClient
+ * .listSemanticGovernancePolicies(parent)
+ * .iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location from which to list the
+ * SemanticGovernancePolicies. Format: `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSemanticGovernancePoliciesPagedResponse listSemanticGovernancePolicies(
+ String parent) {
+ ListSemanticGovernancePoliciesRequest request =
+ ListSemanticGovernancePoliciesRequest.newBuilder().setParent(parent).build();
+ return listSemanticGovernancePolicies(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists SemanticGovernancePolicies in a given location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * ListSemanticGovernancePoliciesRequest request =
+ * ListSemanticGovernancePoliciesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (SemanticGovernancePolicy element :
+ * semanticGovernancePolicyServiceClient
+ * .listSemanticGovernancePolicies(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 ListSemanticGovernancePoliciesPagedResponse listSemanticGovernancePolicies(
+ ListSemanticGovernancePoliciesRequest request) {
+ return listSemanticGovernancePoliciesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists SemanticGovernancePolicies in a given location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * ListSemanticGovernancePoliciesRequest request =
+ * ListSemanticGovernancePoliciesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * semanticGovernancePolicyServiceClient
+ * .listSemanticGovernancePoliciesPagedCallable()
+ * .futureCall(request);
+ * // Do something.
+ * for (SemanticGovernancePolicy element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListSemanticGovernancePoliciesRequest, ListSemanticGovernancePoliciesPagedResponse>
+ listSemanticGovernancePoliciesPagedCallable() {
+ return stub.listSemanticGovernancePoliciesPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists SemanticGovernancePolicies in a given location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * ListSemanticGovernancePoliciesRequest request =
+ * ListSemanticGovernancePoliciesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListSemanticGovernancePoliciesResponse response =
+ * semanticGovernancePolicyServiceClient
+ * .listSemanticGovernancePoliciesCallable()
+ * .call(request);
+ * for (SemanticGovernancePolicy element : response.getSemanticGovernancePoliciesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListSemanticGovernancePoliciesRequest, ListSemanticGovernancePoliciesResponse>
+ listSemanticGovernancePoliciesCallable() {
+ return stub.listSemanticGovernancePoliciesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a SemanticGovernancePolicy.
+ *
+ * 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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * SemanticGovernancePolicy semanticGovernancePolicy =
+ * SemanticGovernancePolicy.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * SemanticGovernancePolicy response =
+ * semanticGovernancePolicyServiceClient
+ * .updateSemanticGovernancePolicyAsync(semanticGovernancePolicy, updateMask)
+ * .get();
+ * }
+ * }
+ *
+ * @param semanticGovernancePolicy Required. The SemanticGovernancePolicy to update.
+ * The SemanticGovernancePolicy's `name` field is used to identify the + * SemanticGovernancePolicy to update. Format: + * `projects/{project}/locations/{location}/semanticGovernancePolicies/{semantic_governance_policy}` + * @param updateMask Optional. `update_mask` is used to specify the fields to be overwritten in + * the SemanticGovernancePolicy resource by the update. The fields specified in the + * `update_mask` are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the mask is not present, then all fields that are + * populated in the request message will be overwritten. Set the `update_mask` to `*` to + * override all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + SemanticGovernancePolicy, UpdateSemanticGovernancePolicyOperationMetadata> + updateSemanticGovernancePolicyAsync( + SemanticGovernancePolicy semanticGovernancePolicy, FieldMask updateMask) { + UpdateSemanticGovernancePolicyRequest request = + UpdateSemanticGovernancePolicyRequest.newBuilder() + .setSemanticGovernancePolicy(semanticGovernancePolicy) + .setUpdateMask(updateMask) + .build(); + return updateSemanticGovernancePolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a SemanticGovernancePolicy. + * + *
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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * UpdateSemanticGovernancePolicyRequest request =
+ * UpdateSemanticGovernancePolicyRequest.newBuilder()
+ * .setSemanticGovernancePolicy(SemanticGovernancePolicy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * SemanticGovernancePolicy response =
+ * semanticGovernancePolicyServiceClient.updateSemanticGovernancePolicyAsync(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<
+ SemanticGovernancePolicy, UpdateSemanticGovernancePolicyOperationMetadata>
+ updateSemanticGovernancePolicyAsync(UpdateSemanticGovernancePolicyRequest request) {
+ return updateSemanticGovernancePolicyOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a SemanticGovernancePolicy.
+ *
+ * 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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * UpdateSemanticGovernancePolicyRequest request =
+ * UpdateSemanticGovernancePolicyRequest.newBuilder()
+ * .setSemanticGovernancePolicy(SemanticGovernancePolicy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture
+ * future =
+ * semanticGovernancePolicyServiceClient
+ * .updateSemanticGovernancePolicyOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * SemanticGovernancePolicy response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ UpdateSemanticGovernancePolicyRequest,
+ SemanticGovernancePolicy,
+ UpdateSemanticGovernancePolicyOperationMetadata>
+ updateSemanticGovernancePolicyOperationCallable() {
+ return stub.updateSemanticGovernancePolicyOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a SemanticGovernancePolicy.
+ *
+ * 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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * UpdateSemanticGovernancePolicyRequest request =
+ * UpdateSemanticGovernancePolicyRequest.newBuilder()
+ * .setSemanticGovernancePolicy(SemanticGovernancePolicy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * semanticGovernancePolicyServiceClient
+ * .updateSemanticGovernancePolicyCallable()
+ * .futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * SemanticGovernancePolicyName name =
+ * SemanticGovernancePolicyName.of(
+ * "[PROJECT]", "[LOCATION]", "[SEMANTIC_GOVERNANCE_POLICY]");
+ * semanticGovernancePolicyServiceClient.deleteSemanticGovernancePolicyAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the SemanticGovernancePolicy resource to be deleted. Format:
+ * `projects/{project}/locations/{location}/semanticGovernancePolicies/{semantic_governance_policy}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * String name =
+ * SemanticGovernancePolicyName.of("[PROJECT]", "[LOCATION]", "[SEMANTIC_GOVERNANCE_POLICY]")
+ * .toString();
+ * semanticGovernancePolicyServiceClient.deleteSemanticGovernancePolicyAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the SemanticGovernancePolicy resource to be deleted. Format:
+ * `projects/{project}/locations/{location}/semanticGovernancePolicies/{semantic_governance_policy}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * DeleteSemanticGovernancePolicyRequest request =
+ * DeleteSemanticGovernancePolicyRequest.newBuilder()
+ * .setName(
+ * SemanticGovernancePolicyName.of(
+ * "[PROJECT]", "[LOCATION]", "[SEMANTIC_GOVERNANCE_POLICY]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * semanticGovernancePolicyServiceClient.deleteSemanticGovernancePolicyAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * DeleteSemanticGovernancePolicyRequest request =
+ * DeleteSemanticGovernancePolicyRequest.newBuilder()
+ * .setName(
+ * SemanticGovernancePolicyName.of(
+ * "[PROJECT]", "[LOCATION]", "[SEMANTIC_GOVERNANCE_POLICY]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture future =
+ * semanticGovernancePolicyServiceClient
+ * .deleteSemanticGovernancePolicyOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ DeleteSemanticGovernancePolicyRequest,
+ Empty,
+ DeleteSemanticGovernancePolicyOperationMetadata>
+ deleteSemanticGovernancePolicyOperationCallable() {
+ return stub.deleteSemanticGovernancePolicyOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a SemanticGovernancePolicy.
+ *
+ * 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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * DeleteSemanticGovernancePolicyRequest request =
+ * DeleteSemanticGovernancePolicyRequest.newBuilder()
+ * .setName(
+ * SemanticGovernancePolicyName.of(
+ * "[PROJECT]", "[LOCATION]", "[SEMANTIC_GOVERNANCE_POLICY]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture future =
+ * semanticGovernancePolicyServiceClient
+ * .deleteSemanticGovernancePolicyCallable()
+ * .futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element :
+ * semanticGovernancePolicyServiceClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * 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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * semanticGovernancePolicyServiceClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location 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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * semanticGovernancePolicyServiceClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // 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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = semanticGovernancePolicyServiceClient.getLocation(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 Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future =
+ * semanticGovernancePolicyServiceClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableCan return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *
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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = semanticGovernancePolicyServiceClient.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(SetIamPolicyRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replacesany existing policy.
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *
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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * semanticGovernancePolicyServiceClient.setIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = semanticGovernancePolicyServiceClient.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(GetIamPolicyRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. Returns an empty policyif the resource exists
+ * and does not have a policy set.
+ *
+ * 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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * semanticGovernancePolicyServiceClient.getIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableNote: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *
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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response =
+ * semanticGovernancePolicyServiceClient.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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource. If theresource does not exist,
+ * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *
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 (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * semanticGovernancePolicyServiceClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getSemanticGovernancePolicy: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SemanticGovernancePolicyServiceSettings.Builder semanticGovernancePolicyServiceSettingsBuilder =
+ * SemanticGovernancePolicyServiceSettings.newBuilder();
+ * semanticGovernancePolicyServiceSettingsBuilder
+ * .getSemanticGovernancePolicySettings()
+ * .setRetrySettings(
+ * semanticGovernancePolicyServiceSettingsBuilder
+ * .getSemanticGovernancePolicySettings()
+ * .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());
+ * SemanticGovernancePolicyServiceSettings semanticGovernancePolicyServiceSettings =
+ * semanticGovernancePolicyServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createSemanticGovernancePolicy: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SemanticGovernancePolicyServiceSettings.Builder semanticGovernancePolicyServiceSettingsBuilder =
+ * SemanticGovernancePolicyServiceSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * semanticGovernancePolicyServiceSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class SemanticGovernancePolicyServiceSettings
+ extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction ======================= SemanticGovernancePolicyServiceClient =======================
+ *
+ * Service Description: Manages SemanticGovernancePolicies. A SemanticGovernancePolicy is a
+ * resource that represents a user-specified policy applied to an Agent and optionally a specific
+ * Tool within that Agent.
+ *
+ * Sample for SemanticGovernancePolicyServiceClient:
+ *
+ * ======================= SessionServiceClient =======================
*
* Service Description: The service that manages Vertex Session related resources.
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcSemanticGovernancePolicyServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcSemanticGovernancePolicyServiceCallableFactory.java
new file mode 100644
index 000000000000..d714043bd2ba
--- /dev/null
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcSemanticGovernancePolicyServiceCallableFactory.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.aiplatform.v1.stub;
+
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the SemanticGovernancePolicyService service API.
+ *
+ * This class is for advanced usage.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class GrpcSemanticGovernancePolicyServiceCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class GrpcSemanticGovernancePolicyServiceStub extends SemanticGovernancePolicyServiceStub {
+ private static final MethodDescriptor This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public abstract class SemanticGovernancePolicyServiceStub implements BackgroundResource {
+
+ public @Nullable OperationsStub getOperationsStub() {
+ throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+ }
+
+ public OperationCallable<
+ CreateSemanticGovernancePolicyRequest,
+ SemanticGovernancePolicy,
+ CreateSemanticGovernancePolicyOperationMetadata>
+ createSemanticGovernancePolicyOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: createSemanticGovernancePolicyOperationCallable()");
+ }
+
+ public UnaryCallable 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 getSemanticGovernancePolicy:
+ *
+ * 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 createSemanticGovernancePolicy:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SemanticGovernancePolicyServiceClient semanticGovernancePolicyServiceClient =
+ * SemanticGovernancePolicyServiceClient.create()) {
+ * SemanticGovernancePolicyName name =
+ * SemanticGovernancePolicyName.of(
+ * "[PROJECT]", "[LOCATION]", "[SEMANTIC_GOVERNANCE_POLICY]");
+ * SemanticGovernancePolicy response =
+ * semanticGovernancePolicyServiceClient.getSemanticGovernancePolicy(name);
+ * }
+ * }
+ *
*
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SemanticGovernancePolicyServiceStubSettings.Builder
+ * semanticGovernancePolicyServiceSettingsBuilder =
+ * SemanticGovernancePolicyServiceStubSettings.newBuilder();
+ * semanticGovernancePolicyServiceSettingsBuilder
+ * .getSemanticGovernancePolicySettings()
+ * .setRetrySettings(
+ * semanticGovernancePolicyServiceSettingsBuilder
+ * .getSemanticGovernancePolicySettings()
+ * .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());
+ * SemanticGovernancePolicyServiceStubSettings semanticGovernancePolicyServiceSettings =
+ * semanticGovernancePolicyServiceSettingsBuilder.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
+ * SemanticGovernancePolicyServiceStubSettings.Builder
+ * semanticGovernancePolicyServiceSettingsBuilder =
+ * SemanticGovernancePolicyServiceStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * semanticGovernancePolicyServiceSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+@SuppressWarnings("CanonicalDuration")
+public class SemanticGovernancePolicyServiceStubSettings
+ extends StubSettings