diff --git a/generation_config.yaml b/generation_config.yaml
index 117425e1f589..9eda133b789b 100644
--- a/generation_config.yaml
+++ b/generation_config.yaml
@@ -1,6 +1,6 @@
-gapic_generator_version: 2.51.1
-googleapis_commitish: 00196e2a68b16a864c57db2e870822875a7f1198
-libraries_bom_version: 26.52.0
+gapic_generator_version: 2.52.0
+googleapis_commitish: 0ce8062889f30daa64eed6810e3c124ccd89608f
+libraries_bom_version: 26.53.0
# the libraries are ordered with respect to library name, which is
# java-{library.library_name} or java-{library.api-shortname} when
diff --git a/java-accessapproval/README.md b/java-accessapproval/README.md
index 7e056e17d6e1..2c5de6048866 100644
--- a/java-accessapproval/README.md
+++ b/java-accessapproval/README.md
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * CachedContent cachedContent = CachedContent.newBuilder().build(); + * CachedContent response = genAiCacheServiceClient.createCachedContent(parent, cachedContent); + * } + * }+ * + *
Note: close() needs to be called on the GenAiCacheServiceClient 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 | + *
---|---|---|
CreateCachedContent |
+ * Creates cached content, this call will initialize the cached content in the data storage, and users need to pay for the cache data storage. |
+ *
+ * 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. + *
|
+ *
GetCachedContent |
+ * Gets cached content configurations |
+ *
+ * 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. + *
|
+ *
UpdateCachedContent |
+ * Updates cached content configurations |
+ *
+ * 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. + *
|
+ *
DeleteCachedContent |
+ * Deletes cached content |
+ *
+ * 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. + *
|
+ *
ListCachedContents |
+ * Lists cached contents in a project |
+ *
+ * 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. + *
|
+ *
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 GenAiCacheServiceSettings 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 + * GenAiCacheServiceSettings genAiCacheServiceSettings = + * GenAiCacheServiceSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * GenAiCacheServiceClient genAiCacheServiceClient = + * GenAiCacheServiceClient.create(genAiCacheServiceSettings); + * }+ * + *
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 + * GenAiCacheServiceSettings genAiCacheServiceSettings = + * GenAiCacheServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + * GenAiCacheServiceClient genAiCacheServiceClient = + * GenAiCacheServiceClient.create(genAiCacheServiceSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class GenAiCacheServiceClient implements BackgroundResource { + private final GenAiCacheServiceSettings settings; + private final GenAiCacheServiceStub stub; + + /** Constructs an instance of GenAiCacheServiceClient with default settings. */ + public static final GenAiCacheServiceClient create() throws IOException { + return create(GenAiCacheServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of GenAiCacheServiceClient, 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 GenAiCacheServiceClient create(GenAiCacheServiceSettings settings) + throws IOException { + return new GenAiCacheServiceClient(settings); + } + + /** + * Constructs an instance of GenAiCacheServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(GenAiCacheServiceSettings). + */ + public static final GenAiCacheServiceClient create(GenAiCacheServiceStub stub) { + return new GenAiCacheServiceClient(stub); + } + + /** + * Constructs an instance of GenAiCacheServiceClient, 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 GenAiCacheServiceClient(GenAiCacheServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((GenAiCacheServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected GenAiCacheServiceClient(GenAiCacheServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final GenAiCacheServiceSettings getSettings() { + return settings; + } + + public GenAiCacheServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates cached content, this call will initialize the cached content in the data storage, and + * users need to pay for the cache data storage. + * + *
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * CachedContent cachedContent = CachedContent.newBuilder().build(); + * CachedContent response = genAiCacheServiceClient.createCachedContent(parent, cachedContent); + * } + * }+ * + * @param parent Required. The parent resource where the cached content will be created + * @param cachedContent Required. The cached content to create + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CachedContent createCachedContent(LocationName parent, CachedContent cachedContent) { + CreateCachedContentRequest request = + CreateCachedContentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCachedContent(cachedContent) + .build(); + return createCachedContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates cached content, this call will initialize the cached content in the data storage, and + * users need to pay for the cache data storage. + * + *
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * CachedContent cachedContent = CachedContent.newBuilder().build(); + * CachedContent response = genAiCacheServiceClient.createCachedContent(parent, cachedContent); + * } + * }+ * + * @param parent Required. The parent resource where the cached content will be created + * @param cachedContent Required. The cached content to create + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CachedContent createCachedContent(String parent, CachedContent cachedContent) { + CreateCachedContentRequest request = + CreateCachedContentRequest.newBuilder() + .setParent(parent) + .setCachedContent(cachedContent) + .build(); + return createCachedContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates cached content, this call will initialize the cached content in the data storage, and + * users need to pay for the cache data storage. + * + *
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * CreateCachedContentRequest request = + * CreateCachedContentRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setCachedContent(CachedContent.newBuilder().build()) + * .build(); + * CachedContent response = genAiCacheServiceClient.createCachedContent(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 CachedContent createCachedContent(CreateCachedContentRequest request) { + return createCachedContentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates cached content, this call will initialize the cached content in the data storage, and + * users need to pay for the cache data storage. + * + *
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * CreateCachedContentRequest request = + * CreateCachedContentRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setCachedContent(CachedContent.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * genAiCacheServiceClient.createCachedContentCallable().futureCall(request); + * // Do something. + * CachedContent response = future.get(); + * } + * }
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * CachedContentName name = CachedContentName.of("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]"); + * CachedContent response = genAiCacheServiceClient.getCachedContent(name); + * } + * }+ * + * @param name Required. The resource name referring to the cached content + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CachedContent getCachedContent(CachedContentName name) { + GetCachedContentRequest request = + GetCachedContentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCachedContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets cached content configurations + * + *
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * String name = CachedContentName.of("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]").toString(); + * CachedContent response = genAiCacheServiceClient.getCachedContent(name); + * } + * }+ * + * @param name Required. The resource name referring to the cached content + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CachedContent getCachedContent(String name) { + GetCachedContentRequest request = GetCachedContentRequest.newBuilder().setName(name).build(); + return getCachedContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets cached content configurations + * + *
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * GetCachedContentRequest request = + * GetCachedContentRequest.newBuilder() + * .setName( + * CachedContentName.of("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]").toString()) + * .build(); + * CachedContent response = genAiCacheServiceClient.getCachedContent(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 CachedContent getCachedContent(GetCachedContentRequest request) { + return getCachedContentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets cached content configurations + * + *
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * GetCachedContentRequest request = + * GetCachedContentRequest.newBuilder() + * .setName( + * CachedContentName.of("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * genAiCacheServiceClient.getCachedContentCallable().futureCall(request); + * // Do something. + * CachedContent response = future.get(); + * } + * }
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * CachedContent cachedContent = CachedContent.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * CachedContent response = + * genAiCacheServiceClient.updateCachedContent(cachedContent, updateMask); + * } + * }+ * + * @param cachedContent Required. The cached content to update + * @param updateMask Required. The list of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CachedContent updateCachedContent( + CachedContent cachedContent, FieldMask updateMask) { + UpdateCachedContentRequest request = + UpdateCachedContentRequest.newBuilder() + .setCachedContent(cachedContent) + .setUpdateMask(updateMask) + .build(); + return updateCachedContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates cached content configurations + * + *
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * UpdateCachedContentRequest request = + * UpdateCachedContentRequest.newBuilder() + * .setCachedContent(CachedContent.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * CachedContent response = genAiCacheServiceClient.updateCachedContent(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 CachedContent updateCachedContent(UpdateCachedContentRequest request) { + return updateCachedContentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates cached content configurations + * + *
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * UpdateCachedContentRequest request = + * UpdateCachedContentRequest.newBuilder() + * .setCachedContent(CachedContent.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * genAiCacheServiceClient.updateCachedContentCallable().futureCall(request); + * // Do something. + * CachedContent response = future.get(); + * } + * }
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * CachedContentName name = CachedContentName.of("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]"); + * genAiCacheServiceClient.deleteCachedContent(name); + * } + * }+ * + * @param name Required. The resource name referring to the cached content + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCachedContent(CachedContentName name) { + DeleteCachedContentRequest request = + DeleteCachedContentRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteCachedContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes cached content + * + *
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * String name = CachedContentName.of("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]").toString(); + * genAiCacheServiceClient.deleteCachedContent(name); + * } + * }+ * + * @param name Required. The resource name referring to the cached content + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCachedContent(String name) { + DeleteCachedContentRequest request = + DeleteCachedContentRequest.newBuilder().setName(name).build(); + deleteCachedContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes cached content + * + *
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * DeleteCachedContentRequest request = + * DeleteCachedContentRequest.newBuilder() + * .setName( + * CachedContentName.of("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]").toString()) + * .build(); + * genAiCacheServiceClient.deleteCachedContent(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 void deleteCachedContent(DeleteCachedContentRequest request) { + deleteCachedContentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes cached content + * + *
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * DeleteCachedContentRequest request = + * DeleteCachedContentRequest.newBuilder() + * .setName( + * CachedContentName.of("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * genAiCacheServiceClient.deleteCachedContentCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (CachedContent element : + * genAiCacheServiceClient.listCachedContents(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The parent, which owns this collection of cached contents. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCachedContentsPagedResponse listCachedContents(LocationName parent) { + ListCachedContentsRequest request = + ListCachedContentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCachedContents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists cached contents in a 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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * for (CachedContent element : + * genAiCacheServiceClient.listCachedContents(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The parent, which owns this collection of cached contents. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCachedContentsPagedResponse listCachedContents(String parent) { + ListCachedContentsRequest request = + ListCachedContentsRequest.newBuilder().setParent(parent).build(); + return listCachedContents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists cached contents in a 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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * ListCachedContentsRequest request = + * ListCachedContentsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (CachedContent element : + * genAiCacheServiceClient.listCachedContents(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 ListCachedContentsPagedResponse listCachedContents( + ListCachedContentsRequest request) { + return listCachedContentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists cached contents in a 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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * ListCachedContentsRequest request = + * ListCachedContentsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * genAiCacheServiceClient.listCachedContentsPagedCallable().futureCall(request); + * // Do something. + * for (CachedContent element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * ListCachedContentsRequest request = + * ListCachedContentsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListCachedContentsResponse response = + * genAiCacheServiceClient.listCachedContentsCallable().call(request); + * for (CachedContent element : response.getCachedContentsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * ListLocationsRequest request = + * ListLocationsRequest.newBuilder() + * .setName("name3373707") + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (Location element : genAiCacheServiceClient.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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * ListLocationsRequest request = + * ListLocationsRequest.newBuilder() + * .setName("name3373707") + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * genAiCacheServiceClient.listLocationsPagedCallable().futureCall(request); + * // Do something. + * for (Location element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * ListLocationsRequest request = + * ListLocationsRequest.newBuilder() + * .setName("name3373707") + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListLocationsResponse response = + * genAiCacheServiceClient.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 UnaryCallable
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + * Location response = genAiCacheServiceClient.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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * genAiCacheServiceClient.getLocationCallable().futureCall(request); + * // Do something. + * Location response = future.get(); + * } + * }
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * SetIamPolicyRequest request = + * SetIamPolicyRequest.newBuilder() + * .setResource( + * EndpointName.ofProjectLocationEndpointName( + * "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + * .toString()) + * .setPolicy(Policy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * Policy response = genAiCacheServiceClient.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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * SetIamPolicyRequest request = + * SetIamPolicyRequest.newBuilder() + * .setResource( + * EndpointName.ofProjectLocationEndpointName( + * "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + * .toString()) + * .setPolicy(Policy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = genAiCacheServiceClient.setIamPolicyCallable().futureCall(request); + * // Do something. + * Policy response = future.get(); + * } + * }
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * GetIamPolicyRequest request = + * GetIamPolicyRequest.newBuilder() + * .setResource( + * EndpointName.ofProjectLocationEndpointName( + * "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + * .toString()) + * .setOptions(GetPolicyOptions.newBuilder().build()) + * .build(); + * Policy response = genAiCacheServiceClient.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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * GetIamPolicyRequest request = + * GetIamPolicyRequest.newBuilder() + * .setResource( + * EndpointName.ofProjectLocationEndpointName( + * "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + * .toString()) + * .setOptions(GetPolicyOptions.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = genAiCacheServiceClient.getIamPolicyCallable().futureCall(request); + * // Do something. + * Policy response = future.get(); + * } + * }
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * TestIamPermissionsRequest request = + * TestIamPermissionsRequest.newBuilder() + * .setResource( + * EndpointName.ofProjectLocationEndpointName( + * "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + * .toString()) + * .addAllPermissions(new ArrayList+ * + * @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. + * + *()) + * .build(); + * TestIamPermissionsResponse response = genAiCacheServiceClient.testIamPermissions(request); + * } + * }
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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) { + * TestIamPermissionsRequest request = + * TestIamPermissionsRequest.newBuilder() + * .setResource( + * EndpointName.ofProjectLocationEndpointName( + * "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + * .toString()) + * .addAllPermissions(new ArrayList+ */ + public final UnaryCallable()) + * .build(); + * ApiFuture future = + * genAiCacheServiceClient.testIamPermissionsCallable().futureCall(request); + * // Do something. + * TestIamPermissionsResponse response = future.get(); + * } + * }
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 createCachedContent: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * GenAiCacheServiceSettings.Builder genAiCacheServiceSettingsBuilder = + * GenAiCacheServiceSettings.newBuilder(); + * genAiCacheServiceSettingsBuilder + * .createCachedContentSettings() + * .setRetrySettings( + * genAiCacheServiceSettingsBuilder + * .createCachedContentSettings() + * .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()); + * GenAiCacheServiceSettings genAiCacheServiceSettings = genAiCacheServiceSettingsBuilder.build(); + * }+ * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + */ +@Generated("by gapic-generator-java") +public class GenAiCacheServiceSettings extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction ListModelVersionCheckpoints Lists checkpoints of the specified model version. Request object method variants only take one parameter, a request object, which must be constructed before the call. listModelVersionCheckpoints(ListModelVersionCheckpointsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listModelVersionCheckpoints(ModelName name)
+ * listModelVersionCheckpoints(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listModelVersionCheckpointsPagedCallable()
+ * listModelVersionCheckpointsCallable()
+ * UpdateModel Updates a Model. Sample code:
+ *
+ * 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 ReasoningEngineExecutionServiceClient object to clean
+ * up resources such as threads. In the example above, try-with-resources is used, which
+ * automatically calls close().
+ *
+ * QueryReasoningEngine Queries using a reasoning engine. Request object method variants only take one parameter, a request object, which must be constructed before the call. queryReasoningEngine(QueryReasoningEngineRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. queryReasoningEngineCallable()
+ * StreamQueryReasoningEngine Streams queries using a reasoning engine. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. streamQueryReasoningEngineCallable()
+ * 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. listLocations(ListLocationsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listLocationsPagedCallable()
+ * listLocationsCallable()
+ * GetLocation Gets information about a location. Request object method variants only take one parameter, a request object, which must be constructed before the call. getLocation(GetLocationRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getLocationCallable()
+ * 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. setIamPolicy(SetIamPolicyRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. setIamPolicyCallable()
+ * 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. getIamPolicy(GetIamPolicyRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getIamPolicyCallable()
+ * 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. testIamPermissions(TestIamPermissionsRequest request)
+ * 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
+ * ReasoningEngineExecutionServiceSettings 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 ReasoningEngineExecutionServiceClient implements BackgroundResource {
+ private final ReasoningEngineExecutionServiceSettings settings;
+ private final ReasoningEngineExecutionServiceStub stub;
+
+ /** Constructs an instance of ReasoningEngineExecutionServiceClient with default settings. */
+ public static final ReasoningEngineExecutionServiceClient create() throws IOException {
+ return create(ReasoningEngineExecutionServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ReasoningEngineExecutionServiceClient, 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 ReasoningEngineExecutionServiceClient create(
+ ReasoningEngineExecutionServiceSettings settings) throws IOException {
+ return new ReasoningEngineExecutionServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of ReasoningEngineExecutionServiceClient, using the given stub for
+ * making calls. This is for advanced usage - prefer using
+ * create(ReasoningEngineExecutionServiceSettings).
+ */
+ public static final ReasoningEngineExecutionServiceClient create(
+ ReasoningEngineExecutionServiceStub stub) {
+ return new ReasoningEngineExecutionServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of ReasoningEngineExecutionServiceClient, 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 ReasoningEngineExecutionServiceClient(ReasoningEngineExecutionServiceSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub =
+ ((ReasoningEngineExecutionServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected ReasoningEngineExecutionServiceClient(ReasoningEngineExecutionServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final ReasoningEngineExecutionServiceSettings getSettings() {
+ return settings;
+ }
+
+ public ReasoningEngineExecutionServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Queries using a reasoning engine.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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:
+ *
+ * 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:
+ *
+ * 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 queryReasoningEngine:
+ *
+ * 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 ReasoningEngineServiceClient object to clean up
+ * resources such as threads. In the example above, try-with-resources is used, which automatically
+ * calls close().
+ *
+ * CreateReasoningEngine Creates a reasoning engine. Request object method variants only take one parameter, a request object, which must be constructed before the call. createReasoningEngineAsync(CreateReasoningEngineRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. createReasoningEngineAsync(LocationName parent, ReasoningEngine reasoningEngine)
+ * createReasoningEngineAsync(String parent, ReasoningEngine reasoningEngine)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createReasoningEngineOperationCallable()
+ * createReasoningEngineCallable()
+ * GetReasoningEngine Gets a reasoning engine. Request object method variants only take one parameter, a request object, which must be constructed before the call. getReasoningEngine(GetReasoningEngineRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getReasoningEngine(ReasoningEngineName name)
+ * getReasoningEngine(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getReasoningEngineCallable()
+ * ListReasoningEngines Lists reasoning engines in a location. Request object method variants only take one parameter, a request object, which must be constructed before the call. listReasoningEngines(ListReasoningEnginesRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listReasoningEngines(LocationName parent)
+ * listReasoningEngines(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listReasoningEnginesPagedCallable()
+ * listReasoningEnginesCallable()
+ * UpdateReasoningEngine Updates a reasoning engine. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateReasoningEngineAsync(UpdateReasoningEngineRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. updateReasoningEngineAsync(ReasoningEngine reasoningEngine, FieldMask updateMask)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateReasoningEngineOperationCallable()
+ * updateReasoningEngineCallable()
+ * DeleteReasoningEngine Deletes a reasoning engine. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteReasoningEngineAsync(DeleteReasoningEngineRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. deleteReasoningEngineAsync(ReasoningEngineName name)
+ * deleteReasoningEngineAsync(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteReasoningEngineOperationCallable()
+ * deleteReasoningEngineCallable()
+ * 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. listLocations(ListLocationsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listLocationsPagedCallable()
+ * listLocationsCallable()
+ * GetLocation Gets information about a location. Request object method variants only take one parameter, a request object, which must be constructed before the call. getLocation(GetLocationRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getLocationCallable()
+ * 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. setIamPolicy(SetIamPolicyRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. setIamPolicyCallable()
+ * 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. getIamPolicy(GetIamPolicyRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getIamPolicyCallable()
+ * 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. testIamPermissions(TestIamPermissionsRequest request)
+ * 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 ReasoningEngineServiceSettings
+ * 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 ReasoningEngineServiceClient implements BackgroundResource {
+ private final ReasoningEngineServiceSettings settings;
+ private final ReasoningEngineServiceStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of ReasoningEngineServiceClient with default settings. */
+ public static final ReasoningEngineServiceClient create() throws IOException {
+ return create(ReasoningEngineServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ReasoningEngineServiceClient, 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 ReasoningEngineServiceClient create(ReasoningEngineServiceSettings settings)
+ throws IOException {
+ return new ReasoningEngineServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of ReasoningEngineServiceClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(ReasoningEngineServiceSettings).
+ */
+ public static final ReasoningEngineServiceClient create(ReasoningEngineServiceStub stub) {
+ return new ReasoningEngineServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of ReasoningEngineServiceClient, 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 ReasoningEngineServiceClient(ReasoningEngineServiceSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub = ((ReasoningEngineServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ protected ReasoningEngineServiceClient(ReasoningEngineServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final ReasoningEngineServiceSettings getSettings() {
+ return settings;
+ }
+
+ public ReasoningEngineServiceStub 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 reasoning engine.
+ *
+ * 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:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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:
+ *
+ * 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:
+ *
+ * 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 getReasoningEngine:
+ *
+ * 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 createReasoningEngine:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction ======================= GenAiCacheServiceClient =======================
+ *
+ * Service Description: Service for managing Vertex AI's CachedContent resource.
+ *
+ * Sample for GenAiCacheServiceClient:
+ *
+ * ======================= GenAiTuningServiceClient =======================
*
* Service Description: A service for creating and managing GenAI Tuning Jobs.
@@ -476,6 +495,53 @@
* }
* }
*
+ * ======================= ReasoningEngineExecutionServiceClient =======================
+ *
+ * Service Description: A service for executing queries on Reasoning Engine.
+ *
+ * Sample for ReasoningEngineExecutionServiceClient:
+ *
+ * ======================= ReasoningEngineServiceClient =======================
+ *
+ * Service Description: A service for managing Vertex AI's Reasoning Engines.
+ *
+ * Sample for ReasoningEngineServiceClient:
+ *
+ * ======================= ScheduleServiceClient =======================
*
* Service Description: A service for creating and managing Vertex AI's Schedule resources to
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GenAiCacheServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GenAiCacheServiceStub.java
new file mode 100644
index 000000000000..7c38f9c06126
--- /dev/null
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GenAiCacheServiceStub.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 static com.google.cloud.aiplatform.v1.GenAiCacheServiceClient.ListCachedContentsPagedResponse;
+import static com.google.cloud.aiplatform.v1.GenAiCacheServiceClient.ListLocationsPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.aiplatform.v1.CachedContent;
+import com.google.cloud.aiplatform.v1.CreateCachedContentRequest;
+import com.google.cloud.aiplatform.v1.DeleteCachedContentRequest;
+import com.google.cloud.aiplatform.v1.GetCachedContentRequest;
+import com.google.cloud.aiplatform.v1.ListCachedContentsRequest;
+import com.google.cloud.aiplatform.v1.ListCachedContentsResponse;
+import com.google.cloud.aiplatform.v1.UpdateCachedContentRequest;
+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.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.protobuf.Empty;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the GenAiCacheService service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class GenAiCacheServiceStub implements BackgroundResource {
+
+ 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 createCachedContent:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
*
*
@@ -1234,6 +1254,186 @@ public final ListModelVersionsPagedResponse listModelVersions(ListModelVersionsR
return stub.listModelVersionsCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists checkpoints of the specified model version.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+ * ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+ * for (ModelVersionCheckpoint element :
+ * modelServiceClient.listModelVersionCheckpoints(name).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param name Required. The name of the model version to list checkpoints for.
+ * `projects/{project}/locations/{location}/models/{model}{@literal @}{version}` Example:
+ * `projects/{project}/locations/{location}/models/{model}{@literal @}2` or
+ * `projects/{project}/locations/{location}/models/{model}{@literal @}golden` If no version ID
+ * or alias is specified, the latest version will be used.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListModelVersionCheckpointsPagedResponse listModelVersionCheckpoints(
+ ModelName name) {
+ ListModelVersionCheckpointsRequest request =
+ ListModelVersionCheckpointsRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return listModelVersionCheckpoints(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists checkpoints of the specified model version.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+ * String name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString();
+ * for (ModelVersionCheckpoint element :
+ * modelServiceClient.listModelVersionCheckpoints(name).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param name Required. The name of the model version to list checkpoints for.
+ * `projects/{project}/locations/{location}/models/{model}{@literal @}{version}` Example:
+ * `projects/{project}/locations/{location}/models/{model}{@literal @}2` or
+ * `projects/{project}/locations/{location}/models/{model}{@literal @}golden` If no version ID
+ * or alias is specified, the latest version will be used.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListModelVersionCheckpointsPagedResponse listModelVersionCheckpoints(String name) {
+ ListModelVersionCheckpointsRequest request =
+ ListModelVersionCheckpointsRequest.newBuilder().setName(name).build();
+ return listModelVersionCheckpoints(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists checkpoints of the specified model version.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+ * ListModelVersionCheckpointsRequest request =
+ * ListModelVersionCheckpointsRequest.newBuilder()
+ * .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (ModelVersionCheckpoint element :
+ * modelServiceClient.listModelVersionCheckpoints(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 ListModelVersionCheckpointsPagedResponse listModelVersionCheckpoints(
+ ListModelVersionCheckpointsRequest request) {
+ return listModelVersionCheckpointsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists checkpoints of the specified model version.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+ * ListModelVersionCheckpointsRequest request =
+ * ListModelVersionCheckpointsRequest.newBuilder()
+ * .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ ListModelVersionCheckpointsRequest, ListModelVersionCheckpointsPagedResponse>
+ listModelVersionCheckpointsPagedCallable() {
+ return stub.listModelVersionCheckpointsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists checkpoints of the specified model version.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+ * ListModelVersionCheckpointsRequest request =
+ * ListModelVersionCheckpointsRequest.newBuilder()
+ * .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListModelVersionCheckpointsResponse response =
+ * modelServiceClient.listModelVersionCheckpointsCallable().call(request);
+ * for (ModelVersionCheckpoint element : response.getCheckpointsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListModelVersionCheckpointsRequest, ListModelVersionCheckpointsResponse>
+ listModelVersionCheckpointsCallable() {
+ return stub.listModelVersionCheckpointsCallable();
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates a Model.
@@ -3951,6 +4151,103 @@ protected ListModelVersionsFixedSizeCollection createCollection(
}
}
+ public static class ListModelVersionCheckpointsPagedResponse
+ extends AbstractPagedListResponse<
+ ListModelVersionCheckpointsRequest,
+ ListModelVersionCheckpointsResponse,
+ ModelVersionCheckpoint,
+ ListModelVersionCheckpointsPage,
+ ListModelVersionCheckpointsFixedSizeCollection> {
+
+ 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
+ * try (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * QueryReasoningEngineRequest request =
+ * QueryReasoningEngineRequest.newBuilder()
+ * .setName(
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]")
+ * .toString())
+ * .setInput(Struct.newBuilder().build())
+ * .setClassMethod("classMethod-937857927")
+ * .build();
+ * QueryReasoningEngineResponse response =
+ * reasoningEngineExecutionServiceClient.queryReasoningEngine(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * 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
+ * ReasoningEngineExecutionServiceSettings reasoningEngineExecutionServiceSettings =
+ * ReasoningEngineExecutionServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create(reasoningEngineExecutionServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ReasoningEngineExecutionServiceSettings reasoningEngineExecutionServiceSettings =
+ * ReasoningEngineExecutionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create(reasoningEngineExecutionServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * QueryReasoningEngineRequest request =
+ * QueryReasoningEngineRequest.newBuilder()
+ * .setName(
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]")
+ * .toString())
+ * .setInput(Struct.newBuilder().build())
+ * .setClassMethod("classMethod-937857927")
+ * .build();
+ * QueryReasoningEngineResponse response =
+ * reasoningEngineExecutionServiceClient.queryReasoningEngine(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 QueryReasoningEngineResponse queryReasoningEngine(
+ QueryReasoningEngineRequest request) {
+ return queryReasoningEngineCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Queries using a reasoning engine.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * QueryReasoningEngineRequest request =
+ * QueryReasoningEngineRequest.newBuilder()
+ * .setName(
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]")
+ * .toString())
+ * .setInput(Struct.newBuilder().build())
+ * .setClassMethod("classMethod-937857927")
+ * .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 (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * StreamQueryReasoningEngineRequest request =
+ * StreamQueryReasoningEngineRequest.newBuilder()
+ * .setName(
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]")
+ * .toString())
+ * .setInput(Struct.newBuilder().build())
+ * .setClassMethod("classMethod-937857927")
+ * .build();
+ * ServerStream
+ */
+ public final ServerStreamingCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element :
+ * reasoningEngineExecutionServiceClient.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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .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 (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * reasoningEngineExecutionServiceClient.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 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 (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = reasoningEngineExecutionServiceClient.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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").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 (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = reasoningEngineExecutionServiceClient.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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.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 (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = reasoningEngineExecutionServiceClient.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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.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 (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .addAllPermissions(new ArrayList
+ *
+ * @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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .addAllPermissions(new ArrayList
+ */
+ 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
+ * ReasoningEngineExecutionServiceSettings.Builder reasoningEngineExecutionServiceSettingsBuilder =
+ * ReasoningEngineExecutionServiceSettings.newBuilder();
+ * reasoningEngineExecutionServiceSettingsBuilder
+ * .queryReasoningEngineSettings()
+ * .setRetrySettings(
+ * reasoningEngineExecutionServiceSettingsBuilder
+ * .queryReasoningEngineSettings()
+ * .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());
+ * ReasoningEngineExecutionServiceSettings reasoningEngineExecutionServiceSettings =
+ * reasoningEngineExecutionServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ */
+@Generated("by gapic-generator-java")
+public class ReasoningEngineExecutionServiceSettings
+ 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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * ReasoningEngineName name =
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]");
+ * ReasoningEngine response = reasoningEngineServiceClient.getReasoningEngine(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * 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
+ * ReasoningEngineServiceSettings reasoningEngineServiceSettings =
+ * ReasoningEngineServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create(reasoningEngineServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ReasoningEngineServiceSettings reasoningEngineServiceSettings =
+ * ReasoningEngineServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create(reasoningEngineServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * ReasoningEngine reasoningEngine = ReasoningEngine.newBuilder().build();
+ * ReasoningEngine response =
+ * reasoningEngineServiceClient.createReasoningEngineAsync(parent, reasoningEngine).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location to create the ReasoningEngine in.
+ * Format: `projects/{project}/locations/{location}`
+ * @param reasoningEngine Required. The ReasoningEngine to create.
+ * @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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * ReasoningEngine reasoningEngine = ReasoningEngine.newBuilder().build();
+ * ReasoningEngine response =
+ * reasoningEngineServiceClient.createReasoningEngineAsync(parent, reasoningEngine).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location to create the ReasoningEngine in.
+ * Format: `projects/{project}/locations/{location}`
+ * @param reasoningEngine Required. The ReasoningEngine to create.
+ * @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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * CreateReasoningEngineRequest request =
+ * CreateReasoningEngineRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setReasoningEngine(ReasoningEngine.newBuilder().build())
+ * .build();
+ * ReasoningEngine response =
+ * reasoningEngineServiceClient.createReasoningEngineAsync(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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * CreateReasoningEngineRequest request =
+ * CreateReasoningEngineRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setReasoningEngine(ReasoningEngine.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ CreateReasoningEngineRequest, ReasoningEngine, CreateReasoningEngineOperationMetadata>
+ createReasoningEngineOperationCallable() {
+ return stub.createReasoningEngineOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a reasoning engine.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * CreateReasoningEngineRequest request =
+ * CreateReasoningEngineRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setReasoningEngine(ReasoningEngine.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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * ReasoningEngineName name =
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]");
+ * ReasoningEngine response = reasoningEngineServiceClient.getReasoningEngine(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the ReasoningEngine resource. Format:
+ * `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ReasoningEngine getReasoningEngine(ReasoningEngineName name) {
+ GetReasoningEngineRequest request =
+ GetReasoningEngineRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getReasoningEngine(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a reasoning engine.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * String name =
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]").toString();
+ * ReasoningEngine response = reasoningEngineServiceClient.getReasoningEngine(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the ReasoningEngine resource. Format:
+ * `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ReasoningEngine getReasoningEngine(String name) {
+ GetReasoningEngineRequest request =
+ GetReasoningEngineRequest.newBuilder().setName(name).build();
+ return getReasoningEngine(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a reasoning engine.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * GetReasoningEngineRequest request =
+ * GetReasoningEngineRequest.newBuilder()
+ * .setName(
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]")
+ * .toString())
+ * .build();
+ * ReasoningEngine response = reasoningEngineServiceClient.getReasoningEngine(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 ReasoningEngine getReasoningEngine(GetReasoningEngineRequest request) {
+ return getReasoningEngineCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a reasoning engine.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * GetReasoningEngineRequest request =
+ * GetReasoningEngineRequest.newBuilder()
+ * .setName(
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]")
+ * .toString())
+ * .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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (ReasoningEngine element :
+ * reasoningEngineServiceClient.listReasoningEngines(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location to list the ReasoningEngines from.
+ * Format: `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListReasoningEnginesPagedResponse listReasoningEngines(LocationName parent) {
+ ListReasoningEnginesRequest request =
+ ListReasoningEnginesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listReasoningEngines(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists reasoning engines in a location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (ReasoningEngine element :
+ * reasoningEngineServiceClient.listReasoningEngines(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location to list the ReasoningEngines from.
+ * Format: `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListReasoningEnginesPagedResponse listReasoningEngines(String parent) {
+ ListReasoningEnginesRequest request =
+ ListReasoningEnginesRequest.newBuilder().setParent(parent).build();
+ return listReasoningEngines(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists reasoning engines in a location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * ListReasoningEnginesRequest request =
+ * ListReasoningEnginesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (ReasoningEngine element :
+ * reasoningEngineServiceClient.listReasoningEngines(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 ListReasoningEnginesPagedResponse listReasoningEngines(
+ ListReasoningEnginesRequest request) {
+ return listReasoningEnginesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists reasoning engines in a location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * ListReasoningEnginesRequest request =
+ * ListReasoningEnginesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * ListReasoningEnginesRequest request =
+ * ListReasoningEnginesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListReasoningEnginesResponse response =
+ * reasoningEngineServiceClient.listReasoningEnginesCallable().call(request);
+ * for (ReasoningEngine element : response.getReasoningEnginesList()) {
+ * // 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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * ReasoningEngine reasoningEngine = ReasoningEngine.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * ReasoningEngine response =
+ * reasoningEngineServiceClient
+ * .updateReasoningEngineAsync(reasoningEngine, updateMask)
+ * .get();
+ * }
+ * }
+ *
+ * @param reasoningEngine Required. The ReasoningEngine which replaces the resource on the server.
+ * @param updateMask Optional. Mask specifying which fields to update.
+ * @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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * UpdateReasoningEngineRequest request =
+ * UpdateReasoningEngineRequest.newBuilder()
+ * .setReasoningEngine(ReasoningEngine.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ReasoningEngine response =
+ * reasoningEngineServiceClient.updateReasoningEngineAsync(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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * UpdateReasoningEngineRequest request =
+ * UpdateReasoningEngineRequest.newBuilder()
+ * .setReasoningEngine(ReasoningEngine.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ UpdateReasoningEngineRequest, ReasoningEngine, UpdateReasoningEngineOperationMetadata>
+ updateReasoningEngineOperationCallable() {
+ return stub.updateReasoningEngineOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a reasoning engine.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * UpdateReasoningEngineRequest request =
+ * UpdateReasoningEngineRequest.newBuilder()
+ * .setReasoningEngine(ReasoningEngine.newBuilder().build())
+ * .setUpdateMask(FieldMask.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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * ReasoningEngineName name =
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]");
+ * reasoningEngineServiceClient.deleteReasoningEngineAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the ReasoningEngine resource to be deleted. Format:
+ * `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
+ * @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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * String name =
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]").toString();
+ * reasoningEngineServiceClient.deleteReasoningEngineAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the ReasoningEngine resource to be deleted. Format:
+ * `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
+ * @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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * DeleteReasoningEngineRequest request =
+ * DeleteReasoningEngineRequest.newBuilder()
+ * .setName(
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]")
+ * .toString())
+ * .build();
+ * reasoningEngineServiceClient.deleteReasoningEngineAsync(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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * DeleteReasoningEngineRequest request =
+ * DeleteReasoningEngineRequest.newBuilder()
+ * .setName(
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]")
+ * .toString())
+ * .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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * DeleteReasoningEngineRequest request =
+ * DeleteReasoningEngineRequest.newBuilder()
+ * .setName(
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]")
+ * .toString())
+ * .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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : reasoningEngineServiceClient.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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * reasoningEngineServiceClient.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 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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = reasoningEngineServiceClient.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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = reasoningEngineServiceClient.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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = reasoningEngineServiceClient.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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .addAllPermissions(new ArrayList
+ *
+ * @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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .addAllPermissions(new ArrayList
+ */
+ 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
+ * ReasoningEngineServiceSettings.Builder reasoningEngineServiceSettingsBuilder =
+ * ReasoningEngineServiceSettings.newBuilder();
+ * reasoningEngineServiceSettingsBuilder
+ * .getReasoningEngineSettings()
+ * .setRetrySettings(
+ * reasoningEngineServiceSettingsBuilder
+ * .getReasoningEngineSettings()
+ * .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());
+ * ReasoningEngineServiceSettings reasoningEngineServiceSettings =
+ * reasoningEngineServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) 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
+ * ReasoningEngineServiceSettings.Builder reasoningEngineServiceSettingsBuilder =
+ * ReasoningEngineServiceSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * reasoningEngineServiceSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ReasoningEngineServiceSettings 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 (GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * CachedContent cachedContent = CachedContent.newBuilder().build();
+ * CachedContent response = genAiCacheServiceClient.createCachedContent(parent, cachedContent);
+ * }
+ * }
+ *
* {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReasoningEngineExecutionServiceClient reasoningEngineExecutionServiceClient =
+ * ReasoningEngineExecutionServiceClient.create()) {
+ * QueryReasoningEngineRequest request =
+ * QueryReasoningEngineRequest.newBuilder()
+ * .setName(
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]")
+ * .toString())
+ * .setInput(Struct.newBuilder().build())
+ * .setClassMethod("classMethod-937857927")
+ * .build();
+ * QueryReasoningEngineResponse response =
+ * reasoningEngineExecutionServiceClient.queryReasoningEngine(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 (ReasoningEngineServiceClient reasoningEngineServiceClient =
+ * ReasoningEngineServiceClient.create()) {
+ * ReasoningEngineName name =
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]");
+ * ReasoningEngine response = reasoningEngineServiceClient.getReasoningEngine(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
+ * GenAiCacheServiceStubSettings.Builder genAiCacheServiceSettingsBuilder =
+ * GenAiCacheServiceStubSettings.newBuilder();
+ * genAiCacheServiceSettingsBuilder
+ * .createCachedContentSettings()
+ * .setRetrySettings(
+ * genAiCacheServiceSettingsBuilder
+ * .createCachedContentSettings()
+ * .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());
+ * GenAiCacheServiceStubSettings genAiCacheServiceSettings =
+ * genAiCacheServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ */
+@Generated("by gapic-generator-java")
+public class GenAiCacheServiceStubSettings extends StubSettings