diff --git a/java-discoveryengine/README.md b/java-discoveryengine/README.md
index 9a09a3d0bebe..5e7935da7033 100644
--- a/java-discoveryengine/README.md
+++ b/java-discoveryengine/README.md
@@ -23,7 +23,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 (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) { + * DataStoreName name = + * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + * DataStore response = dataStoreServiceClient.getDataStore(name); + * } + * }+ * + *
Note: close() needs to be called on the DataStoreServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
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 DataStoreServiceSettings 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 + * DataStoreServiceSettings dataStoreServiceSettings = + * DataStoreServiceSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * DataStoreServiceClient dataStoreServiceClient = + * DataStoreServiceClient.create(dataStoreServiceSettings); + * }+ * + *
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 + * DataStoreServiceSettings dataStoreServiceSettings = + * DataStoreServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + * DataStoreServiceClient dataStoreServiceClient = + * DataStoreServiceClient.create(dataStoreServiceSettings); + * }+ * + *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * DataStoreServiceSettings dataStoreServiceSettings = + * DataStoreServiceSettings.newHttpJsonBuilder().build(); + * DataStoreServiceClient dataStoreServiceClient = + * DataStoreServiceClient.create(dataStoreServiceSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataStoreServiceClient implements BackgroundResource { + private final DataStoreServiceSettings settings; + private final DataStoreServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of DataStoreServiceClient with default settings. */ + public static final DataStoreServiceClient create() throws IOException { + return create(DataStoreServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataStoreServiceClient, 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 DataStoreServiceClient create(DataStoreServiceSettings settings) + throws IOException { + return new DataStoreServiceClient(settings); + } + + /** + * Constructs an instance of DataStoreServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(DataStoreServiceSettings). + */ + public static final DataStoreServiceClient create(DataStoreServiceStub stub) { + return new DataStoreServiceClient(stub); + } + + /** + * Constructs an instance of DataStoreServiceClient, 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 DataStoreServiceClient(DataStoreServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataStoreServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected DataStoreServiceClient(DataStoreServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final DataStoreServiceSettings getSettings() { + return settings; + } + + public DataStoreServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. + * + *
DataStore is for storing [Documents][google.cloud.discoveryengine.v1alpha.Document]. To + * serve these documents for Search, or Recommendation use case, an + * [Engine][google.cloud.discoveryengine.v1alpha.Engine] needs to be created separately. + * + *
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 (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) { + * CollectionName parent = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]"); + * DataStore dataStore = DataStore.newBuilder().build(); + * String dataStoreId = "dataStoreId929489618"; + * DataStore response = + * dataStoreServiceClient.createDataStoreAsync(parent, dataStore, dataStoreId).get(); + * } + * }+ * + * @param parent Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}`. + * @param dataStore Required. The [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] to + * create. + * @param dataStoreId Required. The ID to use for the + * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], which will become the final + * component of the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]'s resource + * name. + *
This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with
+ * a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture DataStore is for storing [Documents][google.cloud.discoveryengine.v1alpha.Document]. To
+ * serve these documents for Search, or Recommendation use case, an
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine] needs to be created separately.
+ *
+ * Sample code:
+ *
+ * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with
+ * a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture DataStore is for storing [Documents][google.cloud.discoveryengine.v1alpha.Document]. To
+ * serve these documents for Search, or Recommendation use case, an
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine] needs to be created separately.
+ *
+ * Sample code:
+ *
+ * DataStore is for storing [Documents][google.cloud.discoveryengine.v1alpha.Document]. To
+ * serve these documents for Search, or Recommendation use case, an
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine] needs to be created separately.
+ *
+ * Sample code:
+ *
+ * DataStore is for storing [Documents][google.cloud.discoveryengine.v1alpha.Document]. To
+ * serve these documents for Search, or Recommendation use case, an
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine] needs to be created separately.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to access the
+ * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], regardless of whether or not
+ * it exists, a PERMISSION_DENIED error is returned.
+ * If the requested [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] does not
+ * exist, a NOT_FOUND error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DataStore getDataStore(DataStoreName name) {
+ GetDataStoreRequest request =
+ GetDataStoreRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getDataStore(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to access the
+ * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], regardless of whether or not
+ * it exists, a PERMISSION_DENIED error is returned.
+ * If the requested [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] does not
+ * exist, a NOT_FOUND error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DataStore getDataStore(String name) {
+ GetDataStoreRequest request = GetDataStoreRequest.newBuilder().setName(name).build();
+ return getDataStore(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to list [DataStores][]s under this location,
+ * regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDataStoresPagedResponse listDataStores(CollectionName parent) {
+ ListDataStoresRequest request =
+ ListDataStoresRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDataStores(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s associated with the
+ * project.
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to list [DataStores][]s under this location,
+ * regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDataStoresPagedResponse listDataStores(String parent) {
+ ListDataStoresRequest request = ListDataStoresRequest.newBuilder().setParent(parent).build();
+ return listDataStores(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s associated with the
+ * project.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to delete the
+ * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], regardless of whether or not
+ * it exists, a PERMISSION_DENIED error is returned.
+ * If the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] to delete does not
+ * exist, a NOT_FOUND error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * If the caller does not have permission to delete the
+ * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], regardless of whether or not
+ * it exists, a PERMISSION_DENIED error is returned.
+ * If the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] to delete does not
+ * exist, a NOT_FOUND error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to update the
+ * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], regardless of whether or not
+ * it exists, a PERMISSION_DENIED error is returned.
+ * If the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] to update does not
+ * exist, a NOT_FOUND error is returned.
+ * @param updateMask Indicates which fields in the provided
+ * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] to update.
+ * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DataStore updateDataStore(DataStore dataStore, FieldMask updateMask) {
+ UpdateDataStoreRequest request =
+ UpdateDataStoreRequest.newBuilder()
+ .setDataStore(dataStore)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateDataStore(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getDataStore to 30 seconds:
+ *
+ * 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 EngineServiceClient object to clean up resources such
+ * as threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ * The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ * 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 EngineServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class EngineServiceClient implements BackgroundResource {
+ private final EngineServiceSettings settings;
+ private final EngineServiceStub stub;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
+
+ /** Constructs an instance of EngineServiceClient with default settings. */
+ public static final EngineServiceClient create() throws IOException {
+ return create(EngineServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of EngineServiceClient, 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 EngineServiceClient create(EngineServiceSettings settings)
+ throws IOException {
+ return new EngineServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of EngineServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(EngineServiceSettings).
+ */
+ public static final EngineServiceClient create(EngineServiceStub stub) {
+ return new EngineServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of EngineServiceClient, 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 EngineServiceClient(EngineServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((EngineServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected EngineServiceClient(EngineServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ public final EngineServiceSettings getSettings() {
+ return settings;
+ }
+
+ public EngineServiceStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ @BetaApi
+ public final OperationsClient getHttpJsonOperationsClient() {
+ return httpJsonOperationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
+ *
+ * Sample code:
+ *
+ * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with
+ * a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with
+ * a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to delete the
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine], regardless of whether or not it
+ * exists, a PERMISSION_DENIED error is returned.
+ * If the [Engine][google.cloud.discoveryengine.v1alpha.Engine] to delete does not exist, a
+ * NOT_FOUND error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * If the caller does not have permission to delete the
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine], regardless of whether or not it
+ * exists, a PERMISSION_DENIED error is returned.
+ * If the [Engine][google.cloud.discoveryengine.v1alpha.Engine] to delete does not exist, a
+ * NOT_FOUND error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to update the
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine], regardless of whether or not it
+ * exists, a PERMISSION_DENIED error is returned.
+ * If the [Engine][google.cloud.discoveryengine.v1alpha.Engine] to update does not exist, a
+ * NOT_FOUND error is returned.
+ * @param updateMask Indicates which fields in the provided
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine] to update.
+ * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Engine updateEngine(Engine engine, FieldMask updateMask) {
+ UpdateEngineRequest request =
+ UpdateEngineRequest.newBuilder().setEngine(engine).setUpdateMask(updateMask).build();
+ return updateEngine(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an [Engine][google.cloud.discoveryengine.v1alpha.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:
+ *
+ * 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 total timeout of updateEngine to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction ======================= DataStoreServiceClient =======================
+ *
+ * Service Description: Service for managing
+ * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] configuration.
+ *
+ * Sample for DataStoreServiceClient:
+ *
+ * ======================= DocumentServiceClient =======================
*
* Service Description: Service for ingesting
@@ -91,6 +111,26 @@
* }
* }
*
+ * ======================= EngineServiceClient =======================
+ *
+ * Service Description: Service for managing
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine] configuration.
+ *
+ * Sample for EngineServiceClient:
+ *
+ * ======================= RecommendationServiceClient =======================
*
* Service Description: Service for making recommendations.
diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DataStoreServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DataStoreServiceStub.java
new file mode 100644
index 000000000000..d335bb84e900
--- /dev/null
+++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/DataStoreServiceStub.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.discoveryengine.v1alpha.stub;
+
+import static com.google.cloud.discoveryengine.v1alpha.DataStoreServiceClient.ListDataStoresPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.discoveryengine.v1alpha.CreateDataStoreMetadata;
+import com.google.cloud.discoveryengine.v1alpha.CreateDataStoreRequest;
+import com.google.cloud.discoveryengine.v1alpha.DataStore;
+import com.google.cloud.discoveryengine.v1alpha.DeleteDataStoreMetadata;
+import com.google.cloud.discoveryengine.v1alpha.DeleteDataStoreRequest;
+import com.google.cloud.discoveryengine.v1alpha.GetDataStoreRequest;
+import com.google.cloud.discoveryengine.v1alpha.ListDataStoresRequest;
+import com.google.cloud.discoveryengine.v1alpha.ListDataStoresResponse;
+import com.google.cloud.discoveryengine.v1alpha.UpdateDataStoreRequest;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the DataStoreService service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public abstract class DataStoreServiceStub implements BackgroundResource {
+
+ public OperationsStub getOperationsStub() {
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
+ }
+
+ public OperationCallable 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 total timeout of getDataStore to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage and reflects the underlying API directly.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public abstract class EngineServiceStub implements BackgroundResource {
+
+ public OperationsStub getOperationsStub() {
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
+ }
+
+ public OperationCallable 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 total timeout of updateEngine to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class GrpcDataStoreServiceCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * String parent = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString();
+ * DataStore dataStore = DataStore.newBuilder().build();
+ * String dataStoreId = "dataStoreId929489618";
+ * DataStore response =
+ * dataStoreServiceClient.createDataStoreAsync(parent, dataStore, dataStoreId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource name, such as
+ * `projects/{project}/locations/{location}/collections/{collection}`.
+ * @param dataStore Required. The [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] to
+ * create.
+ * @param dataStoreId Required. The ID to use for the
+ * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], which will become the final
+ * component of the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]'s resource
+ * 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
+ * try (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * CreateDataStoreRequest request =
+ * CreateDataStoreRequest.newBuilder()
+ * .setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
+ * .setDataStore(DataStore.newBuilder().build())
+ * .setDataStoreId("dataStoreId929489618")
+ * .setCreateAdvancedSiteSearch(true)
+ * .build();
+ * DataStore response = dataStoreServiceClient.createDataStoreAsync(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 (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * CreateDataStoreRequest request =
+ * CreateDataStoreRequest.newBuilder()
+ * .setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
+ * .setDataStore(DataStore.newBuilder().build())
+ * .setDataStoreId("dataStoreId929489618")
+ * .setCreateAdvancedSiteSearch(true)
+ * .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 (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * CreateDataStoreRequest request =
+ * CreateDataStoreRequest.newBuilder()
+ * .setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
+ * .setDataStore(DataStore.newBuilder().build())
+ * .setDataStoreId("dataStoreId929489618")
+ * .setCreateAdvancedSiteSearch(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * DataStoreName name =
+ * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
+ * DataStore response = dataStoreServiceClient.getDataStore(name);
+ * }
+ * }
+ *
+ * @param name Required. Full resource name of
+ * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], such as
+ * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * String name =
+ * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString();
+ * DataStore response = dataStoreServiceClient.getDataStore(name);
+ * }
+ * }
+ *
+ * @param name Required. Full resource name of
+ * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], such as
+ * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * GetDataStoreRequest request =
+ * GetDataStoreRequest.newBuilder()
+ * .setName(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .build();
+ * DataStore response = dataStoreServiceClient.getDataStore(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 DataStore getDataStore(GetDataStoreRequest request) {
+ return getDataStoreCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * GetDataStoreRequest request =
+ * GetDataStoreRequest.newBuilder()
+ * .setName(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .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 (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * CollectionName parent = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]");
+ * for (DataStore element : dataStoreServiceClient.listDataStores(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent branch resource name, such as
+ * `projects/{project}/locations/{location}/collections/{collection_id}`.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * String parent = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString();
+ * for (DataStore element : dataStoreServiceClient.listDataStores(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent branch resource name, such as
+ * `projects/{project}/locations/{location}/collections/{collection_id}`.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * ListDataStoresRequest request =
+ * ListDataStoresRequest.newBuilder()
+ * .setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (DataStore element : dataStoreServiceClient.listDataStores(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 ListDataStoresPagedResponse listDataStores(ListDataStoresRequest request) {
+ return listDataStoresPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s associated with the
+ * project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * ListDataStoresRequest request =
+ * ListDataStoresRequest.newBuilder()
+ * .setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .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 (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * ListDataStoresRequest request =
+ * ListDataStoresRequest.newBuilder()
+ * .setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListDataStoresResponse response =
+ * dataStoreServiceClient.listDataStoresCallable().call(request);
+ * for (DataStore element : response.getDataStoresList()) {
+ * // 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 (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * DataStoreName name =
+ * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
+ * dataStoreServiceClient.deleteDataStoreAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Full resource name of
+ * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], such as
+ * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * String name =
+ * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString();
+ * dataStoreServiceClient.deleteDataStoreAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Full resource name of
+ * [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], such as
+ * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * DeleteDataStoreRequest request =
+ * DeleteDataStoreRequest.newBuilder()
+ * .setName(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .build();
+ * dataStoreServiceClient.deleteDataStoreAsync(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 (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * DeleteDataStoreRequest request =
+ * DeleteDataStoreRequest.newBuilder()
+ * .setName(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .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 (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * DeleteDataStoreRequest request =
+ * DeleteDataStoreRequest.newBuilder()
+ * .setName(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .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 (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * DataStore dataStore = DataStore.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * DataStore response = dataStoreServiceClient.updateDataStore(dataStore, updateMask);
+ * }
+ * }
+ *
+ * @param dataStore Required. The [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] to
+ * update.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * UpdateDataStoreRequest request =
+ * UpdateDataStoreRequest.newBuilder()
+ * .setDataStore(DataStore.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * DataStore response = dataStoreServiceClient.updateDataStore(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 DataStore updateDataStore(UpdateDataStoreRequest request) {
+ return updateDataStoreCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * UpdateDataStoreRequest request =
+ * UpdateDataStoreRequest.newBuilder()
+ * .setDataStore(DataStore.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
+ * DataStoreServiceSettings.Builder dataStoreServiceSettingsBuilder =
+ * DataStoreServiceSettings.newBuilder();
+ * dataStoreServiceSettingsBuilder
+ * .getDataStoreSettings()
+ * .setRetrySettings(
+ * dataStoreServiceSettingsBuilder
+ * .getDataStoreSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * DataStoreServiceSettings dataStoreServiceSettings = dataStoreServiceSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class DataStoreServiceSettings 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * Engine engine = Engine.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Engine response = engineServiceClient.updateEngine(engine, updateMask);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * EngineServiceSettings engineServiceSettings =
+ * EngineServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * EngineServiceClient engineServiceClient = EngineServiceClient.create(engineServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * EngineServiceSettings engineServiceSettings =
+ * EngineServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * EngineServiceClient engineServiceClient = EngineServiceClient.create(engineServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * EngineServiceSettings engineServiceSettings =
+ * EngineServiceSettings.newHttpJsonBuilder().build();
+ * EngineServiceClient engineServiceClient = EngineServiceClient.create(engineServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * CollectionName parent = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]");
+ * Engine engine = Engine.newBuilder().build();
+ * String engineId = "engineId1820490493";
+ * Engine response = engineServiceClient.createEngineAsync(parent, engine, engineId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource name, such as
+ * `projects/{project}/locations/{location}/collections/{collection}`.
+ * @param engine Required. The [Engine][google.cloud.discoveryengine.v1alpha.Engine] to create.
+ * @param engineId Required. The ID to use for the
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine], which will become the final
+ * component of the [Engine][google.cloud.discoveryengine.v1alpha.Engine]'s resource 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
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * String parent = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString();
+ * Engine engine = Engine.newBuilder().build();
+ * String engineId = "engineId1820490493";
+ * Engine response = engineServiceClient.createEngineAsync(parent, engine, engineId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource name, such as
+ * `projects/{project}/locations/{location}/collections/{collection}`.
+ * @param engine Required. The [Engine][google.cloud.discoveryengine.v1alpha.Engine] to create.
+ * @param engineId Required. The ID to use for the
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine], which will become the final
+ * component of the [Engine][google.cloud.discoveryengine.v1alpha.Engine]'s resource 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
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * CreateEngineRequest request =
+ * CreateEngineRequest.newBuilder()
+ * .setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
+ * .setEngine(Engine.newBuilder().build())
+ * .setEngineId("engineId1820490493")
+ * .build();
+ * Engine response = engineServiceClient.createEngineAsync(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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * CreateEngineRequest request =
+ * CreateEngineRequest.newBuilder()
+ * .setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
+ * .setEngine(Engine.newBuilder().build())
+ * .setEngineId("engineId1820490493")
+ * .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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * CreateEngineRequest request =
+ * CreateEngineRequest.newBuilder()
+ * .setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
+ * .setEngine(Engine.newBuilder().build())
+ * .setEngineId("engineId1820490493")
+ * .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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * EngineName name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
+ * engineServiceClient.deleteEngineAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Full resource name of
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine], such as
+ * `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * String name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString();
+ * engineServiceClient.deleteEngineAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Full resource name of
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine], such as
+ * `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * DeleteEngineRequest request =
+ * DeleteEngineRequest.newBuilder()
+ * .setName(
+ * EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
+ * .build();
+ * engineServiceClient.deleteEngineAsync(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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * DeleteEngineRequest request =
+ * DeleteEngineRequest.newBuilder()
+ * .setName(
+ * EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * DeleteEngineRequest request =
+ * DeleteEngineRequest.newBuilder()
+ * .setName(
+ * EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * Engine engine = Engine.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Engine response = engineServiceClient.updateEngine(engine, updateMask);
+ * }
+ * }
+ *
+ * @param engine Required. The [Engine][google.cloud.discoveryengine.v1alpha.Engine] to update.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * UpdateEngineRequest request =
+ * UpdateEngineRequest.newBuilder()
+ * .setEngine(Engine.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Engine response = engineServiceClient.updateEngine(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 Engine updateEngine(UpdateEngineRequest request) {
+ return updateEngineCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an [Engine][google.cloud.discoveryengine.v1alpha.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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * UpdateEngineRequest request =
+ * UpdateEngineRequest.newBuilder()
+ * .setEngine(Engine.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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * EngineName name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
+ * Engine response = engineServiceClient.getEngine(name);
+ * }
+ * }
+ *
+ * @param name Required. Full resource name of
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine], such as
+ * `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Engine getEngine(EngineName name) {
+ GetEngineRequest request =
+ GetEngineRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getEngine(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a [Engine][google.cloud.discoveryengine.v1alpha.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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * String name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString();
+ * Engine response = engineServiceClient.getEngine(name);
+ * }
+ * }
+ *
+ * @param name Required. Full resource name of
+ * [Engine][google.cloud.discoveryengine.v1alpha.Engine], such as
+ * `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Engine getEngine(String name) {
+ GetEngineRequest request = GetEngineRequest.newBuilder().setName(name).build();
+ return getEngine(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a [Engine][google.cloud.discoveryengine.v1alpha.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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * GetEngineRequest request =
+ * GetEngineRequest.newBuilder()
+ * .setName(
+ * EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
+ * .build();
+ * Engine response = engineServiceClient.getEngine(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 Engine getEngine(GetEngineRequest request) {
+ return getEngineCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a [Engine][google.cloud.discoveryengine.v1alpha.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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * GetEngineRequest request =
+ * GetEngineRequest.newBuilder()
+ * .setName(
+ * EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * CollectionName parent = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]");
+ * for (Engine element : engineServiceClient.listEngines(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource name, such as
+ * `projects/{project}/locations/{location}/collections/{collection_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEnginesPagedResponse listEngines(CollectionName parent) {
+ ListEnginesRequest request =
+ ListEnginesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listEngines(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the [Engine][google.cloud.discoveryengine.v1alpha.Engine]s associated with the
+ * project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * String parent = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString();
+ * for (Engine element : engineServiceClient.listEngines(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource name, such as
+ * `projects/{project}/locations/{location}/collections/{collection_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEnginesPagedResponse listEngines(String parent) {
+ ListEnginesRequest request = ListEnginesRequest.newBuilder().setParent(parent).build();
+ return listEngines(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the [Engine][google.cloud.discoveryengine.v1alpha.Engine]s associated with the
+ * project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * ListEnginesRequest request =
+ * ListEnginesRequest.newBuilder()
+ * .setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (Engine element : engineServiceClient.listEngines(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 ListEnginesPagedResponse listEngines(ListEnginesRequest request) {
+ return listEnginesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the [Engine][google.cloud.discoveryengine.v1alpha.Engine]s associated with the
+ * project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * ListEnginesRequest request =
+ * ListEnginesRequest.newBuilder()
+ * .setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * ListEnginesRequest request =
+ * ListEnginesRequest.newBuilder()
+ * .setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListEnginesResponse response = engineServiceClient.listEnginesCallable().call(request);
+ * for (Engine element : response.getEnginesList()) {
+ * // 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * EngineName name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
+ * Engine response = engineServiceClient.pauseEngine(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the engine to pause. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Engine pauseEngine(EngineName name) {
+ PauseEngineRequest request =
+ PauseEngineRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return pauseEngine(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Pauses the training of an existing engine. Only applicable if [solution_type][] is
+ * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * String name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString();
+ * Engine response = engineServiceClient.pauseEngine(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the engine to pause. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Engine pauseEngine(String name) {
+ PauseEngineRequest request = PauseEngineRequest.newBuilder().setName(name).build();
+ return pauseEngine(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Pauses the training of an existing engine. Only applicable if [solution_type][] is
+ * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * PauseEngineRequest request =
+ * PauseEngineRequest.newBuilder()
+ * .setName(
+ * EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
+ * .build();
+ * Engine response = engineServiceClient.pauseEngine(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 Engine pauseEngine(PauseEngineRequest request) {
+ return pauseEngineCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Pauses the training of an existing engine. Only applicable if [solution_type][] is
+ * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * PauseEngineRequest request =
+ * PauseEngineRequest.newBuilder()
+ * .setName(
+ * EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * EngineName name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
+ * Engine response = engineServiceClient.resumeEngine(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the engine to resume. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Engine resumeEngine(EngineName name) {
+ ResumeEngineRequest request =
+ ResumeEngineRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return resumeEngine(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resumes the training of an existing engine. Only applicable if [solution_type][] is
+ * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * String name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString();
+ * Engine response = engineServiceClient.resumeEngine(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the engine to resume. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Engine resumeEngine(String name) {
+ ResumeEngineRequest request = ResumeEngineRequest.newBuilder().setName(name).build();
+ return resumeEngine(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resumes the training of an existing engine. Only applicable if [solution_type][] is
+ * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * ResumeEngineRequest request =
+ * ResumeEngineRequest.newBuilder()
+ * .setName(
+ * EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
+ * .build();
+ * Engine response = engineServiceClient.resumeEngine(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 Engine resumeEngine(ResumeEngineRequest request) {
+ return resumeEngineCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resumes the training of an existing engine. Only applicable if [solution_type][] is
+ * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * ResumeEngineRequest request =
+ * ResumeEngineRequest.newBuilder()
+ * .setName(
+ * EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * EngineName name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
+ * TuneEngineResponse response = engineServiceClient.tuneEngineAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the engine to tune. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * String name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString();
+ * TuneEngineResponse response = engineServiceClient.tuneEngineAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the engine to tune. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * TuneEngineRequest request =
+ * TuneEngineRequest.newBuilder()
+ * .setName(
+ * EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
+ * .build();
+ * TuneEngineResponse response = engineServiceClient.tuneEngineAsync(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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * TuneEngineRequest request =
+ * TuneEngineRequest.newBuilder()
+ * .setName(
+ * EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * TuneEngineRequest request =
+ * TuneEngineRequest.newBuilder()
+ * .setName(
+ * EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[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
+ * EngineServiceSettings.Builder engineServiceSettingsBuilder = EngineServiceSettings.newBuilder();
+ * engineServiceSettingsBuilder
+ * .updateEngineSettings()
+ * .setRetrySettings(
+ * engineServiceSettingsBuilder
+ * .updateEngineSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * EngineServiceSettings engineServiceSettings = engineServiceSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class EngineServiceSettings 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 (DataStoreServiceClient dataStoreServiceClient = DataStoreServiceClient.create()) {
+ * DataStoreName name =
+ * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
+ * DataStore response = dataStoreServiceClient.getDataStore(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
+ * try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
+ * Engine engine = Engine.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Engine response = engineServiceClient.updateEngine(engine, updateMask);
+ * }
+ * }
+ *
*
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataStoreServiceStubSettings.Builder dataStoreServiceSettingsBuilder =
+ * DataStoreServiceStubSettings.newBuilder();
+ * dataStoreServiceSettingsBuilder
+ * .getDataStoreSettings()
+ * .setRetrySettings(
+ * dataStoreServiceSettingsBuilder
+ * .getDataStoreSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * DataStoreServiceStubSettings dataStoreServiceSettings = dataStoreServiceSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class DataStoreServiceStubSettings extends StubSettings
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * EngineServiceStubSettings.Builder engineServiceSettingsBuilder =
+ * EngineServiceStubSettings.newBuilder();
+ * engineServiceSettingsBuilder
+ * .updateEngineSettings()
+ * .setRetrySettings(
+ * engineServiceSettingsBuilder
+ * .updateEngineSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * EngineServiceStubSettings engineServiceSettings = engineServiceSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class EngineServiceStubSettings extends StubSettings