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 (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) { + * CompleteQueryRequest request = + * CompleteQueryRequest.newBuilder() + * .setDataStore( + * DataStoreName.ofProjectLocationDataStoreName( + * "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + * .toString()) + * .setQuery("query107944136") + * .setQueryModel("queryModel-184930495") + * .setUserPseudoId("userPseudoId-1155274652") + * .setIncludeTailSuggestions(true) + * .build(); + * CompleteQueryResponse response = completionServiceClient.completeQuery(request); + * } + * }+ * + *
Note: close() needs to be called on the CompletionServiceClient 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 CompletionServiceSettings 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 + * CompletionServiceSettings completionServiceSettings = + * CompletionServiceSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * CompletionServiceClient completionServiceClient = + * CompletionServiceClient.create(completionServiceSettings); + * }+ * + *
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 + * CompletionServiceSettings completionServiceSettings = + * CompletionServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + * CompletionServiceClient completionServiceClient = + * CompletionServiceClient.create(completionServiceSettings); + * }+ * + *
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 + * CompletionServiceSettings completionServiceSettings = + * CompletionServiceSettings.newHttpJsonBuilder().build(); + * CompletionServiceClient completionServiceClient = + * CompletionServiceClient.create(completionServiceSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class CompletionServiceClient implements BackgroundResource { + private final CompletionServiceSettings settings; + private final CompletionServiceStub stub; + + /** Constructs an instance of CompletionServiceClient with default settings. */ + public static final CompletionServiceClient create() throws IOException { + return create(CompletionServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CompletionServiceClient, 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 CompletionServiceClient create(CompletionServiceSettings settings) + throws IOException { + return new CompletionServiceClient(settings); + } + + /** + * Constructs an instance of CompletionServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(CompletionServiceSettings). + */ + public static final CompletionServiceClient create(CompletionServiceStub stub) { + return new CompletionServiceClient(stub); + } + + /** + * Constructs an instance of CompletionServiceClient, 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 CompletionServiceClient(CompletionServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((CompletionServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected CompletionServiceClient(CompletionServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final CompletionServiceSettings getSettings() { + return settings; + } + + public CompletionServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Completes the specified user input with keyword suggestions. + * + *
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 (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) { + * CompleteQueryRequest request = + * CompleteQueryRequest.newBuilder() + * .setDataStore( + * DataStoreName.ofProjectLocationDataStoreName( + * "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + * .toString()) + * .setQuery("query107944136") + * .setQueryModel("queryModel-184930495") + * .setUserPseudoId("userPseudoId-1155274652") + * .setIncludeTailSuggestions(true) + * .build(); + * CompleteQueryResponse response = completionServiceClient.completeQuery(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 CompleteQueryResponse completeQuery(CompleteQueryRequest request) { + return completeQueryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Completes the specified user input with keyword suggestions. + * + *
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 (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) { + * CompleteQueryRequest request = + * CompleteQueryRequest.newBuilder() + * .setDataStore( + * DataStoreName.ofProjectLocationDataStoreName( + * "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + * .toString()) + * .setQuery("query107944136") + * .setQueryModel("queryModel-184930495") + * .setUserPseudoId("userPseudoId-1155274652") + * .setIncludeTailSuggestions(true) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * completionServiceClient.completeQueryCallable().futureCall(request); + * // Do something. + * CompleteQueryResponse response = future.get(); + * } + * }
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of completeQuery to 30 seconds: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * CompletionServiceSettings.Builder completionServiceSettingsBuilder = + * CompletionServiceSettings.newBuilder(); + * completionServiceSettingsBuilder + * .completeQuerySettings() + * .setRetrySettings( + * completionServiceSettingsBuilder + * .completeQuerySettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * CompletionServiceSettings completionServiceSettings = completionServiceSettingsBuilder.build(); + * }+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class CompletionServiceSettings extends ClientSettings
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 ConversationalSearchServiceClient 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
+ * ConversationalSearchServiceSettings 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 ConversationalSearchServiceClient implements BackgroundResource {
+ private final ConversationalSearchServiceSettings settings;
+ private final ConversationalSearchServiceStub stub;
+
+ /** Constructs an instance of ConversationalSearchServiceClient with default settings. */
+ public static final ConversationalSearchServiceClient create() throws IOException {
+ return create(ConversationalSearchServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ConversationalSearchServiceClient, 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 ConversationalSearchServiceClient create(
+ ConversationalSearchServiceSettings settings) throws IOException {
+ return new ConversationalSearchServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of ConversationalSearchServiceClient, using the given stub for making
+ * calls. This is for advanced usage - prefer using create(ConversationalSearchServiceSettings).
+ */
+ public static final ConversationalSearchServiceClient create(
+ ConversationalSearchServiceStub stub) {
+ return new ConversationalSearchServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of ConversationalSearchServiceClient, 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 ConversationalSearchServiceClient(ConversationalSearchServiceSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub = ((ConversationalSearchServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected ConversationalSearchServiceClient(ConversationalSearchServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final ConversationalSearchServiceSettings getSettings() {
+ return settings;
+ }
+
+ public ConversationalSearchServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Converses a conversation.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to create already
+ * exists, an ALREADY_EXISTS error is returned.
+ *
+ * Sample code:
+ *
+ * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to create already
+ * exists, an ALREADY_EXISTS error is returned.
+ *
+ * Sample code:
+ *
+ * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to create already
+ * exists, an ALREADY_EXISTS error is returned.
+ *
+ * Sample code:
+ *
+ * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to create already
+ * exists, an ALREADY_EXISTS error is returned.
+ *
+ * Sample code:
+ *
+ * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to delete does not
+ * exist, a NOT_FOUND error is returned.
+ *
+ * Sample code:
+ *
+ * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to delete does not
+ * exist, a NOT_FOUND error is returned.
+ *
+ * Sample code:
+ *
+ * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to delete does not
+ * exist, a NOT_FOUND error is returned.
+ *
+ * Sample code:
+ *
+ * If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to delete does not
+ * exist, a NOT_FOUND error is returned.
+ *
+ * Sample code:
+ *
+ * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] action type cannot be
+ * changed. If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to update
+ * does not exist, a NOT_FOUND error is returned.
+ *
+ * Sample code:
+ *
+ * If not set or empty, all supported fields are updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Conversation updateConversation(Conversation conversation, FieldMask updateMask) {
+ UpdateConversationRequest request =
+ UpdateConversationRequest.newBuilder()
+ .setConversation(conversation)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateConversation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a Conversation.
+ *
+ * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] action type cannot be
+ * changed. If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to update
+ * does not exist, a NOT_FOUND error is returned.
+ *
+ * Sample code:
+ *
+ * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] action type cannot be
+ * changed. If the [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to update
+ * does not exist, a NOT_FOUND error is returned.
+ *
+ * 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 converseConversation 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 DocumentServiceClient 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 DocumentServiceSettings 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 DocumentServiceClient implements BackgroundResource {
+ private final DocumentServiceSettings settings;
+ private final DocumentServiceStub stub;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
+
+ /** Constructs an instance of DocumentServiceClient with default settings. */
+ public static final DocumentServiceClient create() throws IOException {
+ return create(DocumentServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of DocumentServiceClient, 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 DocumentServiceClient create(DocumentServiceSettings settings)
+ throws IOException {
+ return new DocumentServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of DocumentServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(DocumentServiceSettings).
+ */
+ public static final DocumentServiceClient create(DocumentServiceStub stub) {
+ return new DocumentServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of DocumentServiceClient, 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 DocumentServiceClient(DocumentServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((DocumentServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected DocumentServiceClient(DocumentServiceStub 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 DocumentServiceSettings getSettings() {
+ return settings;
+ }
+
+ public DocumentServiceStub 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.
+ /**
+ * Gets a [Document][google.cloud.discoveryengine.v1alpha.Document].
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to access the
+ * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it
+ * exists, a `PERMISSION_DENIED` error is returned.
+ * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document] does not
+ * exist, a `NOT_FOUND` error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Document getDocument(DocumentName name) {
+ GetDocumentRequest request =
+ GetDocumentRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a [Document][google.cloud.discoveryengine.v1alpha.Document].
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to access the
+ * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it
+ * exists, a `PERMISSION_DENIED` error is returned.
+ * If the requested [Document][google.cloud.discoveryengine.v1alpha.Document] does not
+ * exist, a `NOT_FOUND` error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Document getDocument(String name) {
+ GetDocumentRequest request = GetDocumentRequest.newBuilder().setName(name).build();
+ return getDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a [Document][google.cloud.discoveryengine.v1alpha.Document].
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to list
+ * [Document][google.cloud.discoveryengine.v1alpha.Document]s under this branch, regardless of
+ * whether or not this branch exists, a `PERMISSION_DENIED` error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDocumentsPagedResponse listDocuments(BranchName parent) {
+ ListDocumentsRequest request =
+ ListDocumentsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDocuments(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to list
+ * [Document][google.cloud.discoveryengine.v1alpha.Document]s under this branch, regardless of
+ * whether or not this branch exists, a `PERMISSION_DENIED` error is returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDocumentsPagedResponse listDocuments(String parent) {
+ ListDocumentsRequest request = ListDocumentsRequest.newBuilder().setParent(parent).build();
+ return listDocuments(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to create the
+ * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it
+ * exists, a `PERMISSION_DENIED` error is returned.
+ * This field must be unique among all
+ * [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same
+ * [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent]. Otherwise, an
+ * `ALREADY_EXISTS` error is returned.
+ * 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 Document createDocument(BranchName parent, Document document, String documentId) {
+ CreateDocumentRequest request =
+ CreateDocumentRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setDocument(document)
+ .setDocumentId(documentId)
+ .build();
+ return createDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a [Document][google.cloud.discoveryengine.v1alpha.Document].
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to create the
+ * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it
+ * exists, a `PERMISSION_DENIED` error is returned.
+ * This field must be unique among all
+ * [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same
+ * [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent]. Otherwise, an
+ * `ALREADY_EXISTS` error is returned.
+ * 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 Document createDocument(String parent, Document document, String documentId) {
+ CreateDocumentRequest request =
+ CreateDocumentRequest.newBuilder()
+ .setParent(parent)
+ .setDocument(document)
+ .setDocumentId(documentId)
+ .build();
+ return createDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a [Document][google.cloud.discoveryengine.v1alpha.Document].
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to delete the
+ * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it
+ * exists, a `PERMISSION_DENIED` error is returned.
+ * If the [Document][google.cloud.discoveryengine.v1alpha.Document] 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 void deleteDocument(DocumentName name) {
+ DeleteDocumentRequest request =
+ DeleteDocumentRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document].
+ *
+ * Sample code:
+ *
+ * If the caller does not have permission to delete the
+ * [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of whether or not it
+ * exists, a `PERMISSION_DENIED` error is returned.
+ * If the [Document][google.cloud.discoveryengine.v1alpha.Document] 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 void deleteDocument(String name) {
+ DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder().setName(name).build();
+ deleteDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document].
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Note: It is possible for a subset of the
+ * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be successfully updated.
+ *
+ * Sample code:
+ *
+ * Note: It is possible for a subset of the
+ * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be successfully updated.
+ *
+ * Sample code:
+ *
+ * Note: It is possible for a subset of the
+ * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be successfully updated.
+ *
+ * Sample code:
+ *
+ * This process is asynchronous. Depending on the number of
+ * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted, this operation can
+ * take hours to complete. Before the delete operation completes, some
+ * [Document][google.cloud.discoveryengine.v1alpha.Document]s might still be returned by
+ * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
+ * or
+ * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments].
+ *
+ * To get a list of the [Document][google.cloud.discoveryengine.v1alpha.Document]s to be
+ * deleted, set
+ * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force]
+ * to false.
+ *
+ * Sample code:
+ *
+ * This process is asynchronous. Depending on the number of
+ * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted, this operation can
+ * take hours to complete. Before the delete operation completes, some
+ * [Document][google.cloud.discoveryengine.v1alpha.Document]s might still be returned by
+ * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
+ * or
+ * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments].
+ *
+ * To get a list of the [Document][google.cloud.discoveryengine.v1alpha.Document]s to be
+ * deleted, set
+ * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force]
+ * to false.
+ *
+ * Sample code:
+ *
+ * This process is asynchronous. Depending on the number of
+ * [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted, this operation can
+ * take hours to complete. Before the delete operation completes, some
+ * [Document][google.cloud.discoveryengine.v1alpha.Document]s might still be returned by
+ * [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
+ * or
+ * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments].
+ *
+ * To get a list of the [Document][google.cloud.discoveryengine.v1alpha.Document]s to be
+ * deleted, set
+ * [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force]
+ * to false.
+ *
+ * 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 getDocument 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 RecommendationServiceClient 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 RecommendationServiceSettings
+ * 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 RecommendationServiceClient implements BackgroundResource {
+ private final RecommendationServiceSettings settings;
+ private final RecommendationServiceStub stub;
+
+ /** Constructs an instance of RecommendationServiceClient with default settings. */
+ public static final RecommendationServiceClient create() throws IOException {
+ return create(RecommendationServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of RecommendationServiceClient, 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 RecommendationServiceClient create(RecommendationServiceSettings settings)
+ throws IOException {
+ return new RecommendationServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of RecommendationServiceClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(RecommendationServiceSettings).
+ */
+ public static final RecommendationServiceClient create(RecommendationServiceStub stub) {
+ return new RecommendationServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of RecommendationServiceClient, 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 RecommendationServiceClient(RecommendationServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((RecommendationServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected RecommendationServiceClient(RecommendationServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final RecommendationServiceSettings getSettings() {
+ return settings;
+ }
+
+ public RecommendationServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Makes a recommendation, which requires a contextual user event.
+ *
+ * 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 recommend 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 SchemaServiceClient 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 SchemaServiceSettings 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 SchemaServiceClient implements BackgroundResource {
+ private final SchemaServiceSettings settings;
+ private final SchemaServiceStub stub;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
+
+ /** Constructs an instance of SchemaServiceClient with default settings. */
+ public static final SchemaServiceClient create() throws IOException {
+ return create(SchemaServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SchemaServiceClient, 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 SchemaServiceClient create(SchemaServiceSettings settings)
+ throws IOException {
+ return new SchemaServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of SchemaServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(SchemaServiceSettings).
+ */
+ public static final SchemaServiceClient create(SchemaServiceStub stub) {
+ return new SchemaServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of SchemaServiceClient, 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 SchemaServiceClient(SchemaServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((SchemaServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected SchemaServiceClient(SchemaServiceStub 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 SchemaServiceSettings getSettings() {
+ return settings;
+ }
+
+ public SchemaServiceStub 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.
+ /**
+ * Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard
+ * with a length limit of 63 characters.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard
+ * with a length limit of 63 characters.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture 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 getSchema 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 SearchServiceClient 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 SearchServiceSettings 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 SearchServiceClient implements BackgroundResource {
+ private final SearchServiceSettings settings;
+ private final SearchServiceStub stub;
+
+ /** Constructs an instance of SearchServiceClient with default settings. */
+ public static final SearchServiceClient create() throws IOException {
+ return create(SearchServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SearchServiceClient, 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 SearchServiceClient create(SearchServiceSettings settings)
+ throws IOException {
+ return new SearchServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of SearchServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(SearchServiceSettings).
+ */
+ public static final SearchServiceClient create(SearchServiceStub stub) {
+ return new SearchServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of SearchServiceClient, 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 SearchServiceClient(SearchServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((SearchServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected SearchServiceClient(SearchServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final SearchServiceSettings getSettings() {
+ return settings;
+ }
+
+ public SearchServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Performs a search.
+ *
+ * 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 search 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 SiteSearchEngineServiceClient 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
+ * SiteSearchEngineServiceSettings 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 SiteSearchEngineServiceClient implements BackgroundResource {
+ private final SiteSearchEngineServiceSettings settings;
+ private final SiteSearchEngineServiceStub stub;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
+
+ /** Constructs an instance of SiteSearchEngineServiceClient with default settings. */
+ public static final SiteSearchEngineServiceClient create() throws IOException {
+ return create(SiteSearchEngineServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SiteSearchEngineServiceClient, 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 SiteSearchEngineServiceClient create(SiteSearchEngineServiceSettings settings)
+ throws IOException {
+ return new SiteSearchEngineServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of SiteSearchEngineServiceClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(SiteSearchEngineServiceSettings).
+ */
+ public static final SiteSearchEngineServiceClient create(SiteSearchEngineServiceStub stub) {
+ return new SiteSearchEngineServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of SiteSearchEngineServiceClient, 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 SiteSearchEngineServiceClient(SiteSearchEngineServiceSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub = ((SiteSearchEngineServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected SiteSearchEngineServiceClient(SiteSearchEngineServiceStub 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 SiteSearchEngineServiceSettings getSettings() {
+ return settings;
+ }
+
+ public SiteSearchEngineServiceStub 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.
+ /**
+ * Request on-demand recrawl for a list of URIs.
+ *
+ * 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 recrawlUris 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 UserEventServiceClient 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 UserEventServiceSettings 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 UserEventServiceClient implements BackgroundResource {
+ private final UserEventServiceSettings settings;
+ private final UserEventServiceStub stub;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
+
+ /** Constructs an instance of UserEventServiceClient with default settings. */
+ public static final UserEventServiceClient create() throws IOException {
+ return create(UserEventServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of UserEventServiceClient, 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 UserEventServiceClient create(UserEventServiceSettings settings)
+ throws IOException {
+ return new UserEventServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of UserEventServiceClient, using the given stub for making calls. This
+ * is for advanced usage - prefer using create(UserEventServiceSettings).
+ */
+ public static final UserEventServiceClient create(UserEventServiceStub stub) {
+ return new UserEventServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of UserEventServiceClient, 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 UserEventServiceClient(UserEventServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((UserEventServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected UserEventServiceClient(UserEventServiceStub 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 UserEventServiceSettings getSettings() {
+ return settings;
+ }
+
+ public UserEventServiceStub 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.
+ /**
+ * Writes a single user event.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * This method is used only by the Discovery Engine API JavaScript pixel and Google Tag
+ * Manager. Users should not call this method directly.
+ *
+ * Sample code:
+ *
+ * This method is used only by the Discovery Engine API JavaScript pixel and Google Tag
+ * Manager. Users should not call this method directly.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Operation.response is of type ImportResponse. Note that it is possible for a subset of the
+ * items to be successfully inserted. Operation.metadata is of type ImportMetadata.
+ *
+ * Sample code:
+ *
+ * Operation.response is of type ImportResponse. Note that it is possible for a subset of the
+ * items to be successfully inserted. Operation.metadata is of type ImportMetadata.
+ *
+ * Sample code:
+ *
+ * Operation.response is of type ImportResponse. Note that it is possible for a subset of the
+ * items to be successfully inserted. Operation.metadata is of type ImportMetadata.
+ *
+ * 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 writeUserEvent to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= CompletionServiceClient =======================
+ *
+ * Service Description: Service for Auto-Completion.
+ *
+ * Sample for CompletionServiceClient:
+ *
+ * ======================= ConversationalSearchServiceClient =======================
+ *
+ * Service Description: Service for conversational search.
+ *
+ * Sample for ConversationalSearchServiceClient:
+ *
+ * ======================= DocumentServiceClient =======================
+ *
+ * Service Description: Service for ingesting
+ * [Document][google.cloud.discoveryengine.v1alpha.Document] information of the customer's website.
+ *
+ * Sample for DocumentServiceClient:
+ *
+ * ======================= RecommendationServiceClient =======================
+ *
+ * Service Description: Service for making recommendations.
+ *
+ * Sample for RecommendationServiceClient:
+ *
+ * ======================= SchemaServiceClient =======================
+ *
+ * Service Description: Service for managing
+ * [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+ *
+ * Sample for SchemaServiceClient:
+ *
+ * ======================= SearchServiceClient =======================
+ *
+ * Service Description: Service for search.
+ *
+ * Sample for SearchServiceClient:
+ *
+ * ======================= SiteSearchEngineServiceClient =======================
+ *
+ * Service Description: Service for managing site search related resources.
+ *
+ * Sample for SiteSearchEngineServiceClient:
+ *
+ * ======================= UserEventServiceClient =======================
+ *
+ * Service Description: Service for ingesting end user actions on a website to Discovery Engine
+ * API.
+ *
+ * Sample for UserEventServiceClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public abstract class CompletionServiceStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of completeQuery 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 ConversationalSearchServiceStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of converseConversation to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * ConversationName name =
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
+ * TextInput query = TextInput.newBuilder().build();
+ * ConverseConversationResponse response =
+ * conversationalSearchServiceClient.converseConversation(name, query);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ConversationalSearchServiceSettings conversationalSearchServiceSettings =
+ * ConversationalSearchServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create(conversationalSearchServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ConversationalSearchServiceSettings conversationalSearchServiceSettings =
+ * ConversationalSearchServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create(conversationalSearchServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ConversationalSearchServiceSettings conversationalSearchServiceSettings =
+ * ConversationalSearchServiceSettings.newHttpJsonBuilder().build();
+ * ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create(conversationalSearchServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * ConversationName name =
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
+ * TextInput query = TextInput.newBuilder().build();
+ * ConverseConversationResponse response =
+ * conversationalSearchServiceClient.converseConversation(name, query);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Conversation to get. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
+ * Use
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
+ * to activate auto session mode, which automatically creates a new conversation inside a
+ * ConverseConversation session.
+ * @param query Required. Current user input.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ConverseConversationResponse converseConversation(
+ ConversationName name, TextInput query) {
+ ConverseConversationRequest request =
+ ConverseConversationRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setQuery(query)
+ .build();
+ return converseConversation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Converses a conversation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * String name =
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+ * .toString();
+ * TextInput query = TextInput.newBuilder().build();
+ * ConverseConversationResponse response =
+ * conversationalSearchServiceClient.converseConversation(name, query);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Conversation to get. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
+ * Use
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
+ * to activate auto session mode, which automatically creates a new conversation inside a
+ * ConverseConversation session.
+ * @param query Required. Current user input.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ConverseConversationResponse converseConversation(String name, TextInput query) {
+ ConverseConversationRequest request =
+ ConverseConversationRequest.newBuilder().setName(name).setQuery(query).build();
+ return converseConversation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Converses a conversation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * ConverseConversationRequest request =
+ * ConverseConversationRequest.newBuilder()
+ * .setName(
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+ * .toString())
+ * .setQuery(TextInput.newBuilder().build())
+ * .setServingConfig(
+ * ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setConversation(Conversation.newBuilder().build())
+ * .setSafeSearch(true)
+ * .putAllUserLabels(new HashMap
+ *
+ * @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 ConverseConversationResponse converseConversation(
+ ConverseConversationRequest request) {
+ return converseConversationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Converses a conversation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * ConverseConversationRequest request =
+ * ConverseConversationRequest.newBuilder()
+ * .setName(
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+ * .toString())
+ * .setQuery(TextInput.newBuilder().build())
+ * .setServingConfig(
+ * ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setConversation(Conversation.newBuilder().build())
+ * .setSafeSearch(true)
+ * .putAllUserLabels(new HashMap
+ */
+ 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 (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * DataStoreName parent =
+ * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
+ * Conversation conversation = Conversation.newBuilder().build();
+ * Conversation response =
+ * conversationalSearchServiceClient.createConversation(parent, conversation);
+ * }
+ * }
+ *
+ * @param parent Required. Full resource name of parent data store. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+ * @param conversation Required. The conversation to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Conversation createConversation(DataStoreName parent, Conversation conversation) {
+ CreateConversationRequest request =
+ CreateConversationRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setConversation(conversation)
+ .build();
+ return createConversation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a Conversation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * String parent =
+ * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString();
+ * Conversation conversation = Conversation.newBuilder().build();
+ * Conversation response =
+ * conversationalSearchServiceClient.createConversation(parent, conversation);
+ * }
+ * }
+ *
+ * @param parent Required. Full resource name of parent data store. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+ * @param conversation Required. The conversation to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Conversation createConversation(String parent, Conversation conversation) {
+ CreateConversationRequest request =
+ CreateConversationRequest.newBuilder()
+ .setParent(parent)
+ .setConversation(conversation)
+ .build();
+ return createConversation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a Conversation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * CreateConversationRequest request =
+ * CreateConversationRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setConversation(Conversation.newBuilder().build())
+ * .build();
+ * Conversation response = conversationalSearchServiceClient.createConversation(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 Conversation createConversation(CreateConversationRequest request) {
+ return createConversationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a Conversation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * CreateConversationRequest request =
+ * CreateConversationRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setConversation(Conversation.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 (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * ConversationName name =
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
+ * conversationalSearchServiceClient.deleteConversation(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Conversation to delete. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteConversation(ConversationName name) {
+ DeleteConversationRequest request =
+ DeleteConversationRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteConversation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a Conversation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * String name =
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+ * .toString();
+ * conversationalSearchServiceClient.deleteConversation(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Conversation to delete. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteConversation(String name) {
+ DeleteConversationRequest request =
+ DeleteConversationRequest.newBuilder().setName(name).build();
+ deleteConversation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a Conversation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * DeleteConversationRequest request =
+ * DeleteConversationRequest.newBuilder()
+ * .setName(
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+ * .toString())
+ * .build();
+ * conversationalSearchServiceClient.deleteConversation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteConversation(DeleteConversationRequest request) {
+ deleteConversationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a Conversation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * DeleteConversationRequest request =
+ * DeleteConversationRequest.newBuilder()
+ * .setName(
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+ * .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 (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * Conversation conversation = Conversation.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Conversation response =
+ * conversationalSearchServiceClient.updateConversation(conversation, updateMask);
+ * }
+ * }
+ *
+ * @param conversation Required. The Conversation to update.
+ * @param updateMask Indicates which fields in the provided
+ * [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to update. The following
+ * are NOT supported:
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * UpdateConversationRequest request =
+ * UpdateConversationRequest.newBuilder()
+ * .setConversation(Conversation.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Conversation response = conversationalSearchServiceClient.updateConversation(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 Conversation updateConversation(UpdateConversationRequest request) {
+ return updateConversationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a Conversation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * UpdateConversationRequest request =
+ * UpdateConversationRequest.newBuilder()
+ * .setConversation(Conversation.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 (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * ConversationName name =
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
+ * Conversation response = conversationalSearchServiceClient.getConversation(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Conversation to get. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Conversation getConversation(ConversationName name) {
+ GetConversationRequest request =
+ GetConversationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getConversation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a Conversation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * String name =
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+ * .toString();
+ * Conversation response = conversationalSearchServiceClient.getConversation(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Conversation to get. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Conversation getConversation(String name) {
+ GetConversationRequest request = GetConversationRequest.newBuilder().setName(name).build();
+ return getConversation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a Conversation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * GetConversationRequest request =
+ * GetConversationRequest.newBuilder()
+ * .setName(
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+ * .toString())
+ * .build();
+ * Conversation response = conversationalSearchServiceClient.getConversation(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 Conversation getConversation(GetConversationRequest request) {
+ return getConversationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a Conversation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * GetConversationRequest request =
+ * GetConversationRequest.newBuilder()
+ * .setName(
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]")
+ * .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 (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * DataStoreName parent =
+ * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
+ * for (Conversation element :
+ * conversationalSearchServiceClient.listConversations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The data store resource name. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListConversationsPagedResponse listConversations(DataStoreName parent) {
+ ListConversationsRequest request =
+ ListConversationsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listConversations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all Conversations by their parent
+ * [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 (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * String parent =
+ * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString();
+ * for (Conversation element :
+ * conversationalSearchServiceClient.listConversations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The data store resource name. Format:
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListConversationsPagedResponse listConversations(String parent) {
+ ListConversationsRequest request =
+ ListConversationsRequest.newBuilder().setParent(parent).build();
+ return listConversations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all Conversations by their parent
+ * [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 (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * ListConversationsRequest request =
+ * ListConversationsRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Conversation element :
+ * conversationalSearchServiceClient.listConversations(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 ListConversationsPagedResponse listConversations(ListConversationsRequest request) {
+ return listConversationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all Conversations by their parent
+ * [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 (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * ListConversationsRequest request =
+ * ListConversationsRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .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 (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * ListConversationsRequest request =
+ * ListConversationsRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListConversationsResponse response =
+ * conversationalSearchServiceClient.listConversationsCallable().call(request);
+ * for (Conversation element : response.getConversationsList()) {
+ * // 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
+ * ConversationalSearchServiceSettings.Builder conversationalSearchServiceSettingsBuilder =
+ * ConversationalSearchServiceSettings.newBuilder();
+ * conversationalSearchServiceSettingsBuilder
+ * .converseConversationSettings()
+ * .setRetrySettings(
+ * conversationalSearchServiceSettingsBuilder
+ * .converseConversationSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ConversationalSearchServiceSettings conversationalSearchServiceSettings =
+ * conversationalSearchServiceSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class ConversationalSearchServiceSettings
+ 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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * DocumentName name =
+ * DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]");
+ * Document response = documentServiceClient.getDocument(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
+ * DocumentServiceSettings documentServiceSettings =
+ * DocumentServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * DocumentServiceClient documentServiceClient =
+ * DocumentServiceClient.create(documentServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DocumentServiceSettings documentServiceSettings =
+ * DocumentServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DocumentServiceClient documentServiceClient =
+ * DocumentServiceClient.create(documentServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DocumentServiceSettings documentServiceSettings =
+ * DocumentServiceSettings.newHttpJsonBuilder().build();
+ * DocumentServiceClient documentServiceClient =
+ * DocumentServiceClient.create(documentServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * DocumentName name =
+ * DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]");
+ * Document response = documentServiceClient.getDocument(name);
+ * }
+ * }
+ *
+ * @param name Required. Full resource name of
+ * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * String name =
+ * DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+ * .toString();
+ * Document response = documentServiceClient.getDocument(name);
+ * }
+ * }
+ *
+ * @param name Required. Full resource name of
+ * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * GetDocumentRequest request =
+ * GetDocumentRequest.newBuilder()
+ * .setName(
+ * DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+ * .toString())
+ * .build();
+ * Document response = documentServiceClient.getDocument(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 Document getDocument(GetDocumentRequest request) {
+ return getDocumentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a [Document][google.cloud.discoveryengine.v1alpha.Document].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * GetDocumentRequest request =
+ * GetDocumentRequest.newBuilder()
+ * .setName(
+ * DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+ * .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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * BranchName parent =
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]");
+ * for (Document element : documentServiceClient.listDocuments(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent branch resource name, such as
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+ * Use `default_branch` as the branch ID, to list documents under the default branch.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * String parent =
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString();
+ * for (Document element : documentServiceClient.listDocuments(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent branch resource name, such as
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+ * Use `default_branch` as the branch ID, to list documents under the default branch.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * ListDocumentsRequest request =
+ * ListDocumentsRequest.newBuilder()
+ * .setParent(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Document element : documentServiceClient.listDocuments(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 ListDocumentsPagedResponse listDocuments(ListDocumentsRequest request) {
+ return listDocumentsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * ListDocumentsRequest request =
+ * ListDocumentsRequest.newBuilder()
+ * .setParent(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * ListDocumentsRequest request =
+ * ListDocumentsRequest.newBuilder()
+ * .setParent(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListDocumentsResponse response =
+ * documentServiceClient.listDocumentsCallable().call(request);
+ * for (Document element : response.getDocumentsList()) {
+ * // 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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * BranchName parent =
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]");
+ * Document document = Document.newBuilder().build();
+ * String documentId = "documentId-814940266";
+ * Document response = documentServiceClient.createDocument(parent, document, documentId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource name, such as
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+ * @param document Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+ * create.
+ * @param documentId Required. The ID to use for the
+ * [Document][google.cloud.discoveryengine.v1alpha.Document], which will become the final
+ * component of the [Document.name][google.cloud.discoveryengine.v1alpha.Document.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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * String parent =
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString();
+ * Document document = Document.newBuilder().build();
+ * String documentId = "documentId-814940266";
+ * Document response = documentServiceClient.createDocument(parent, document, documentId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource name, such as
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
+ * @param document Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
+ * create.
+ * @param documentId Required. The ID to use for the
+ * [Document][google.cloud.discoveryengine.v1alpha.Document], which will become the final
+ * component of the [Document.name][google.cloud.discoveryengine.v1alpha.Document.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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * CreateDocumentRequest request =
+ * CreateDocumentRequest.newBuilder()
+ * .setParent(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setDocument(Document.newBuilder().build())
+ * .setDocumentId("documentId-814940266")
+ * .build();
+ * Document response = documentServiceClient.createDocument(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 Document createDocument(CreateDocumentRequest request) {
+ return createDocumentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a [Document][google.cloud.discoveryengine.v1alpha.Document].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * CreateDocumentRequest request =
+ * CreateDocumentRequest.newBuilder()
+ * .setParent(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setDocument(Document.newBuilder().build())
+ * .setDocumentId("documentId-814940266")
+ * .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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * UpdateDocumentRequest request =
+ * UpdateDocumentRequest.newBuilder()
+ * .setDocument(Document.newBuilder().build())
+ * .setAllowMissing(true)
+ * .build();
+ * Document response = documentServiceClient.updateDocument(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 Document updateDocument(UpdateDocumentRequest request) {
+ return updateDocumentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a [Document][google.cloud.discoveryengine.v1alpha.Document].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * UpdateDocumentRequest request =
+ * UpdateDocumentRequest.newBuilder()
+ * .setDocument(Document.newBuilder().build())
+ * .setAllowMissing(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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * DocumentName name =
+ * DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]");
+ * documentServiceClient.deleteDocument(name);
+ * }
+ * }
+ *
+ * @param name Required. Full resource name of
+ * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * String name =
+ * DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+ * .toString();
+ * documentServiceClient.deleteDocument(name);
+ * }
+ * }
+ *
+ * @param name Required. Full resource name of
+ * [Document][google.cloud.discoveryengine.v1alpha.Document], such as
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * DeleteDocumentRequest request =
+ * DeleteDocumentRequest.newBuilder()
+ * .setName(
+ * DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+ * .toString())
+ * .build();
+ * documentServiceClient.deleteDocument(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteDocument(DeleteDocumentRequest request) {
+ deleteDocumentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * DeleteDocumentRequest request =
+ * DeleteDocumentRequest.newBuilder()
+ * .setName(
+ * DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]")
+ * .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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * ImportDocumentsRequest request =
+ * ImportDocumentsRequest.newBuilder()
+ * .setParent(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setErrorConfig(ImportErrorConfig.newBuilder().build())
+ * .setAutoGenerateIds(true)
+ * .setIdField("idField1629396127")
+ * .build();
+ * ImportDocumentsResponse response = documentServiceClient.importDocumentsAsync(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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * ImportDocumentsRequest request =
+ * ImportDocumentsRequest.newBuilder()
+ * .setParent(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setErrorConfig(ImportErrorConfig.newBuilder().build())
+ * .setAutoGenerateIds(true)
+ * .setIdField("idField1629396127")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ ImportDocumentsRequest, ImportDocumentsResponse, ImportDocumentsMetadata>
+ importDocumentsOperationCallable() {
+ return stub.importDocumentsOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Bulk import of multiple [Document][google.cloud.discoveryengine.v1alpha.Document]s. Request
+ * processing may be synchronous. Non-existing items will be created.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * ImportDocumentsRequest request =
+ * ImportDocumentsRequest.newBuilder()
+ * .setParent(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setErrorConfig(ImportErrorConfig.newBuilder().build())
+ * .setAutoGenerateIds(true)
+ * .setIdField("idField1629396127")
+ * .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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * PurgeDocumentsRequest request =
+ * PurgeDocumentsRequest.newBuilder()
+ * .setParent(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(true)
+ * .build();
+ * PurgeDocumentsResponse response = documentServiceClient.purgeDocumentsAsync(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 (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * PurgeDocumentsRequest request =
+ * PurgeDocumentsRequest.newBuilder()
+ * .setParent(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ PurgeDocumentsRequest, PurgeDocumentsResponse, PurgeDocumentsMetadata>
+ purgeDocumentsOperationCallable() {
+ return stub.purgeDocumentsOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Permanently deletes all selected [Document][google.cloud.discoveryengine.v1alpha.Document]s in
+ * a branch.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * PurgeDocumentsRequest request =
+ * PurgeDocumentsRequest.newBuilder()
+ * .setParent(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(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
+ * DocumentServiceSettings.Builder documentServiceSettingsBuilder =
+ * DocumentServiceSettings.newBuilder();
+ * documentServiceSettingsBuilder
+ * .getDocumentSettings()
+ * .setRetrySettings(
+ * documentServiceSettingsBuilder
+ * .getDocumentSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * DocumentServiceSettings documentServiceSettings = documentServiceSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class DocumentServiceSettings 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 (RecommendationServiceClient recommendationServiceClient =
+ * RecommendationServiceClient.create()) {
+ * RecommendRequest request =
+ * RecommendRequest.newBuilder()
+ * .setServingConfig(
+ * ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setUserEvent(UserEvent.newBuilder().build())
+ * .setPageSize(883849137)
+ * .setFilter("filter-1274492040")
+ * .setValidateOnly(true)
+ * .putAllParams(new HashMap
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RecommendationServiceSettings recommendationServiceSettings =
+ * RecommendationServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * RecommendationServiceClient recommendationServiceClient =
+ * RecommendationServiceClient.create(recommendationServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RecommendationServiceSettings recommendationServiceSettings =
+ * RecommendationServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * RecommendationServiceClient recommendationServiceClient =
+ * RecommendationServiceClient.create(recommendationServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RecommendationServiceSettings recommendationServiceSettings =
+ * RecommendationServiceSettings.newHttpJsonBuilder().build();
+ * RecommendationServiceClient recommendationServiceClient =
+ * RecommendationServiceClient.create(recommendationServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RecommendationServiceClient recommendationServiceClient =
+ * RecommendationServiceClient.create()) {
+ * RecommendRequest request =
+ * RecommendRequest.newBuilder()
+ * .setServingConfig(
+ * ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setUserEvent(UserEvent.newBuilder().build())
+ * .setPageSize(883849137)
+ * .setFilter("filter-1274492040")
+ * .setValidateOnly(true)
+ * .putAllParams(new HashMap
+ *
+ * @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 RecommendResponse recommend(RecommendRequest request) {
+ return recommendCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Makes a recommendation, which requires a contextual user event.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RecommendationServiceClient recommendationServiceClient =
+ * RecommendationServiceClient.create()) {
+ * RecommendRequest request =
+ * RecommendRequest.newBuilder()
+ * .setServingConfig(
+ * ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setUserEvent(UserEvent.newBuilder().build())
+ * .setPageSize(883849137)
+ * .setFilter("filter-1274492040")
+ * .setValidateOnly(true)
+ * .putAllParams(new HashMap
+ */
+ 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
+ * RecommendationServiceSettings.Builder recommendationServiceSettingsBuilder =
+ * RecommendationServiceSettings.newBuilder();
+ * recommendationServiceSettingsBuilder
+ * .recommendSettings()
+ * .setRetrySettings(
+ * recommendationServiceSettingsBuilder
+ * .recommendSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * RecommendationServiceSettings recommendationServiceSettings =
+ * recommendationServiceSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class RecommendationServiceSettings 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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * SchemaName name =
+ * SchemaName.ofProjectLocationDataStoreSchemaName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
+ * Schema response = schemaServiceClient.getSchema(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
+ * SchemaServiceSettings schemaServiceSettings =
+ * SchemaServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SchemaServiceClient schemaServiceClient = SchemaServiceClient.create(schemaServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SchemaServiceSettings schemaServiceSettings =
+ * SchemaServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SchemaServiceClient schemaServiceClient = SchemaServiceClient.create(schemaServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SchemaServiceSettings schemaServiceSettings =
+ * SchemaServiceSettings.newHttpJsonBuilder().build();
+ * SchemaServiceClient schemaServiceClient = SchemaServiceClient.create(schemaServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * SchemaName name =
+ * SchemaName.ofProjectLocationDataStoreSchemaName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
+ * Schema response = schemaServiceClient.getSchema(name);
+ * }
+ * }
+ *
+ * @param name Required. The full resource name of the schema, in the format of
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Schema getSchema(SchemaName name) {
+ GetSchemaRequest request =
+ GetSchemaRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getSchema(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * String name =
+ * SchemaName.ofProjectLocationDataStoreSchemaName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+ * .toString();
+ * Schema response = schemaServiceClient.getSchema(name);
+ * }
+ * }
+ *
+ * @param name Required. The full resource name of the schema, in the format of
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Schema getSchema(String name) {
+ GetSchemaRequest request = GetSchemaRequest.newBuilder().setName(name).build();
+ return getSchema(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * GetSchemaRequest request =
+ * GetSchemaRequest.newBuilder()
+ * .setName(
+ * SchemaName.ofProjectLocationDataStoreSchemaName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+ * .toString())
+ * .build();
+ * Schema response = schemaServiceClient.getSchema(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 Schema getSchema(GetSchemaRequest request) {
+ return getSchemaCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a [Schema][google.cloud.discoveryengine.v1alpha.Schema].
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * GetSchemaRequest request =
+ * GetSchemaRequest.newBuilder()
+ * .setName(
+ * SchemaName.ofProjectLocationDataStoreSchemaName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+ * .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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * DataStoreName parent =
+ * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
+ * for (Schema element : schemaServiceClient.listSchemas(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent data store resource name, in the format of
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSchemasPagedResponse listSchemas(DataStoreName parent) {
+ ListSchemasRequest request =
+ ListSchemasRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listSchemas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * String parent =
+ * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString();
+ * for (Schema element : schemaServiceClient.listSchemas(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent data store resource name, in the format of
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSchemasPagedResponse listSchemas(String parent) {
+ ListSchemasRequest request = ListSchemasRequest.newBuilder().setParent(parent).build();
+ return listSchemas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * ListSchemasRequest request =
+ * ListSchemasRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Schema element : schemaServiceClient.listSchemas(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 ListSchemasPagedResponse listSchemas(ListSchemasRequest request) {
+ return listSchemasPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a list of [Schema][google.cloud.discoveryengine.v1alpha.Schema]s.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * ListSchemasRequest request =
+ * ListSchemasRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * ListSchemasRequest request =
+ * ListSchemasRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListSchemasResponse response = schemaServiceClient.listSchemasCallable().call(request);
+ * for (Schema element : response.getSchemasList()) {
+ * // 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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * DataStoreName parent =
+ * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
+ * Schema schema = Schema.newBuilder().build();
+ * String schemaId = "schemaId-697673060";
+ * Schema response = schemaServiceClient.createSchemaAsync(parent, schema, schemaId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent data store resource name, in the format of
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+ * @param schema Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to create.
+ * @param schemaId Required. The ID to use for the
+ * [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become the final
+ * component of the [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * String parent =
+ * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString();
+ * Schema schema = Schema.newBuilder().build();
+ * String schemaId = "schemaId-697673060";
+ * Schema response = schemaServiceClient.createSchemaAsync(parent, schema, schemaId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent data store resource name, in the format of
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
+ * @param schema Required. The [Schema][google.cloud.discoveryengine.v1alpha.Schema] to create.
+ * @param schemaId Required. The ID to use for the
+ * [Schema][google.cloud.discoveryengine.v1alpha.Schema], which will become the final
+ * component of the [Schema.name][google.cloud.discoveryengine.v1alpha.Schema.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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * CreateSchemaRequest request =
+ * CreateSchemaRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setSchema(Schema.newBuilder().build())
+ * .setSchemaId("schemaId-697673060")
+ * .build();
+ * Schema response = schemaServiceClient.createSchemaAsync(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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * CreateSchemaRequest request =
+ * CreateSchemaRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setSchema(Schema.newBuilder().build())
+ * .setSchemaId("schemaId-697673060")
+ * .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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * CreateSchemaRequest request =
+ * CreateSchemaRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setSchema(Schema.newBuilder().build())
+ * .setSchemaId("schemaId-697673060")
+ * .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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * UpdateSchemaRequest request =
+ * UpdateSchemaRequest.newBuilder()
+ * .setSchema(Schema.newBuilder().build())
+ * .setAllowMissing(true)
+ * .build();
+ * Schema response = schemaServiceClient.updateSchemaAsync(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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * UpdateSchemaRequest request =
+ * UpdateSchemaRequest.newBuilder()
+ * .setSchema(Schema.newBuilder().build())
+ * .setAllowMissing(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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * UpdateSchemaRequest request =
+ * UpdateSchemaRequest.newBuilder()
+ * .setSchema(Schema.newBuilder().build())
+ * .setAllowMissing(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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * SchemaName name =
+ * SchemaName.ofProjectLocationDataStoreSchemaName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
+ * schemaServiceClient.deleteSchemaAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The full resource name of the schema, in the format of
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+ * @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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * String name =
+ * SchemaName.ofProjectLocationDataStoreSchemaName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+ * .toString();
+ * schemaServiceClient.deleteSchemaAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The full resource name of the schema, in the format of
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
+ * @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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * DeleteSchemaRequest request =
+ * DeleteSchemaRequest.newBuilder()
+ * .setName(
+ * SchemaName.ofProjectLocationDataStoreSchemaName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+ * .toString())
+ * .build();
+ * schemaServiceClient.deleteSchemaAsync(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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * DeleteSchemaRequest request =
+ * DeleteSchemaRequest.newBuilder()
+ * .setName(
+ * SchemaName.ofProjectLocationDataStoreSchemaName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+ * .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 (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * DeleteSchemaRequest request =
+ * DeleteSchemaRequest.newBuilder()
+ * .setName(
+ * SchemaName.ofProjectLocationDataStoreSchemaName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]")
+ * .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
+ * SchemaServiceSettings.Builder schemaServiceSettingsBuilder = SchemaServiceSettings.newBuilder();
+ * schemaServiceSettingsBuilder
+ * .getSchemaSettings()
+ * .setRetrySettings(
+ * schemaServiceSettingsBuilder
+ * .getSchemaSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * SchemaServiceSettings schemaServiceSettings = schemaServiceSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class SchemaServiceSettings 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 (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
+ * SearchRequest request =
+ * SearchRequest.newBuilder()
+ * .setServingConfig(
+ * ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setBranch(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setQuery("query107944136")
+ * .setImageQuery(SearchRequest.ImageQuery.newBuilder().build())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOffset(-1019779949)
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setUserInfo(UserInfo.newBuilder().build())
+ * .addAllFacetSpecs(new ArrayList
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SearchServiceSettings searchServiceSettings =
+ * SearchServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SearchServiceClient searchServiceClient = SearchServiceClient.create(searchServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SearchServiceSettings searchServiceSettings =
+ * SearchServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SearchServiceClient searchServiceClient = SearchServiceClient.create(searchServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SearchServiceSettings searchServiceSettings =
+ * SearchServiceSettings.newHttpJsonBuilder().build();
+ * SearchServiceClient searchServiceClient = SearchServiceClient.create(searchServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
+ * SearchRequest request =
+ * SearchRequest.newBuilder()
+ * .setServingConfig(
+ * ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setBranch(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setQuery("query107944136")
+ * .setImageQuery(SearchRequest.ImageQuery.newBuilder().build())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOffset(-1019779949)
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setUserInfo(UserInfo.newBuilder().build())
+ * .addAllFacetSpecs(new ArrayList
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchPagedResponse search(SearchRequest request) {
+ return searchPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Performs a search.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
+ * SearchRequest request =
+ * SearchRequest.newBuilder()
+ * .setServingConfig(
+ * ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setBranch(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setQuery("query107944136")
+ * .setImageQuery(SearchRequest.ImageQuery.newBuilder().build())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOffset(-1019779949)
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setUserInfo(UserInfo.newBuilder().build())
+ * .addAllFacetSpecs(new ArrayList
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
+ * SearchRequest request =
+ * SearchRequest.newBuilder()
+ * .setServingConfig(
+ * ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setBranch(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setQuery("query107944136")
+ * .setImageQuery(SearchRequest.ImageQuery.newBuilder().build())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOffset(-1019779949)
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setUserInfo(UserInfo.newBuilder().build())
+ * .addAllFacetSpecs(new ArrayList
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SearchServiceSettings.Builder searchServiceSettingsBuilder = SearchServiceSettings.newBuilder();
+ * searchServiceSettingsBuilder
+ * .searchSettings()
+ * .setRetrySettings(
+ * searchServiceSettingsBuilder
+ * .searchSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * SearchServiceSettings searchServiceSettings = searchServiceSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class SearchServiceSettings 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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+ * SiteSearchEngineServiceClient.create()) {
+ * RecrawlUrisRequest request =
+ * RecrawlUrisRequest.newBuilder()
+ * .setSiteSearchEngine(
+ * SiteSearchEngineName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .addAllUris(new ArrayList
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SiteSearchEngineServiceSettings siteSearchEngineServiceSettings =
+ * SiteSearchEngineServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+ * SiteSearchEngineServiceClient.create(siteSearchEngineServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SiteSearchEngineServiceSettings siteSearchEngineServiceSettings =
+ * SiteSearchEngineServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+ * SiteSearchEngineServiceClient.create(siteSearchEngineServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SiteSearchEngineServiceSettings siteSearchEngineServiceSettings =
+ * SiteSearchEngineServiceSettings.newHttpJsonBuilder().build();
+ * SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+ * SiteSearchEngineServiceClient.create(siteSearchEngineServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+ * SiteSearchEngineServiceClient.create()) {
+ * RecrawlUrisRequest request =
+ * RecrawlUrisRequest.newBuilder()
+ * .setSiteSearchEngine(
+ * SiteSearchEngineName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .addAllUris(new ArrayList
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final 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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+ * SiteSearchEngineServiceClient.create()) {
+ * RecrawlUrisRequest request =
+ * RecrawlUrisRequest.newBuilder()
+ * .setSiteSearchEngine(
+ * SiteSearchEngineName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .addAllUris(new ArrayList
+ */
+ 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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+ * SiteSearchEngineServiceClient.create()) {
+ * RecrawlUrisRequest request =
+ * RecrawlUrisRequest.newBuilder()
+ * .setSiteSearchEngine(
+ * SiteSearchEngineName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .addAllUris(new ArrayList
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SiteSearchEngineServiceSettings.Builder siteSearchEngineServiceSettingsBuilder =
+ * SiteSearchEngineServiceSettings.newBuilder();
+ * siteSearchEngineServiceSettingsBuilder
+ * .recrawlUrisSettings()
+ * .setRetrySettings(
+ * siteSearchEngineServiceSettingsBuilder
+ * .recrawlUrisSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * SiteSearchEngineServiceSettings siteSearchEngineServiceSettings =
+ * siteSearchEngineServiceSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class SiteSearchEngineServiceSettings
+ 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 (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ * WriteUserEventRequest request =
+ * WriteUserEventRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setUserEvent(UserEvent.newBuilder().build())
+ * .build();
+ * UserEvent response = userEventServiceClient.writeUserEvent(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * UserEventServiceSettings userEventServiceSettings =
+ * UserEventServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * UserEventServiceClient userEventServiceClient =
+ * UserEventServiceClient.create(userEventServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * UserEventServiceSettings userEventServiceSettings =
+ * UserEventServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * UserEventServiceClient userEventServiceClient =
+ * UserEventServiceClient.create(userEventServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * UserEventServiceSettings userEventServiceSettings =
+ * UserEventServiceSettings.newHttpJsonBuilder().build();
+ * UserEventServiceClient userEventServiceClient =
+ * UserEventServiceClient.create(userEventServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ * WriteUserEventRequest request =
+ * WriteUserEventRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setUserEvent(UserEvent.newBuilder().build())
+ * .build();
+ * UserEvent response = userEventServiceClient.writeUserEvent(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 UserEvent writeUserEvent(WriteUserEventRequest request) {
+ return writeUserEventCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Writes a single user event.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ * WriteUserEventRequest request =
+ * WriteUserEventRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setUserEvent(UserEvent.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 (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ * CollectUserEventRequest request =
+ * CollectUserEventRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setUserEvent("userEvent315571599")
+ * .setUri("uri116076")
+ * .setEts(100772)
+ * .build();
+ * HttpBody response = userEventServiceClient.collectUserEvent(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 HttpBody collectUserEvent(CollectUserEventRequest request) {
+ return collectUserEventCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Writes a single user event from the browser. This uses a GET request to due to browser
+ * restriction of POST-ing to a third-party domain.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ * CollectUserEventRequest request =
+ * CollectUserEventRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setUserEvent("userEvent315571599")
+ * .setUri("uri116076")
+ * .setEts(100772)
+ * .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 (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ * PurgeUserEventsRequest request =
+ * PurgeUserEventsRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(true)
+ * .build();
+ * PurgeUserEventsResponse response = userEventServiceClient.purgeUserEventsAsync(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 (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ * PurgeUserEventsRequest request =
+ * PurgeUserEventsRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ PurgeUserEventsRequest, PurgeUserEventsResponse, PurgeUserEventsMetadata>
+ purgeUserEventsOperationCallable() {
+ return stub.purgeUserEventsOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes permanently all user events specified by the filter provided. Depending on the number
+ * of events specified by the filter, this operation could take hours or days to complete. To test
+ * a filter, use the list command first.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ * PurgeUserEventsRequest request =
+ * PurgeUserEventsRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setFilter("filter-1274492040")
+ * .setForce(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 (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ * ImportUserEventsRequest request =
+ * ImportUserEventsRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setErrorConfig(ImportErrorConfig.newBuilder().build())
+ * .build();
+ * ImportUserEventsResponse response =
+ * userEventServiceClient.importUserEventsAsync(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 (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ * ImportUserEventsRequest request =
+ * ImportUserEventsRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setErrorConfig(ImportErrorConfig.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ ImportUserEventsRequest, ImportUserEventsResponse, ImportUserEventsMetadata>
+ importUserEventsOperationCallable() {
+ return stub.importUserEventsOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Bulk import of User events. Request processing might be synchronous. Events that already exist
+ * are skipped. Use this method for backfilling historical user events.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ * ImportUserEventsRequest request =
+ * ImportUserEventsRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setErrorConfig(ImportErrorConfig.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
+ * UserEventServiceSettings.Builder userEventServiceSettingsBuilder =
+ * UserEventServiceSettings.newBuilder();
+ * userEventServiceSettingsBuilder
+ * .writeUserEventSettings()
+ * .setRetrySettings(
+ * userEventServiceSettingsBuilder
+ * .writeUserEventSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * UserEventServiceSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class UserEventServiceSettings 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 (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
+ * CompleteQueryRequest request =
+ * CompleteQueryRequest.newBuilder()
+ * .setDataStore(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setQuery("query107944136")
+ * .setQueryModel("queryModel-184930495")
+ * .setUserPseudoId("userPseudoId-1155274652")
+ * .setIncludeTailSuggestions(true)
+ * .build();
+ * CompleteQueryResponse response = completionServiceClient.completeQuery(request);
+ * }
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConversationalSearchServiceClient conversationalSearchServiceClient =
+ * ConversationalSearchServiceClient.create()) {
+ * ConversationName name =
+ * ConversationName.ofProjectLocationDataStoreConversationName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[CONVERSATION]");
+ * TextInput query = TextInput.newBuilder().build();
+ * ConverseConversationResponse response =
+ * conversationalSearchServiceClient.converseConversation(name, query);
+ * }
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DocumentServiceClient documentServiceClient = DocumentServiceClient.create()) {
+ * DocumentName name =
+ * DocumentName.ofProjectLocationDataStoreBranchDocumentName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]", "[DOCUMENT]");
+ * Document response = documentServiceClient.getDocument(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 (RecommendationServiceClient recommendationServiceClient =
+ * RecommendationServiceClient.create()) {
+ * RecommendRequest request =
+ * RecommendRequest.newBuilder()
+ * .setServingConfig(
+ * ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setUserEvent(UserEvent.newBuilder().build())
+ * .setPageSize(883849137)
+ * .setFilter("filter-1274492040")
+ * .setValidateOnly(true)
+ * .putAllParams(new HashMap
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SchemaServiceClient schemaServiceClient = SchemaServiceClient.create()) {
+ * SchemaName name =
+ * SchemaName.ofProjectLocationDataStoreSchemaName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SCHEMA]");
+ * Schema response = schemaServiceClient.getSchema(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 (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
+ * SearchRequest request =
+ * SearchRequest.newBuilder()
+ * .setServingConfig(
+ * ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setBranch(
+ * BranchName.ofProjectLocationDataStoreBranchName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]")
+ * .toString())
+ * .setQuery("query107944136")
+ * .setImageQuery(SearchRequest.ImageQuery.newBuilder().build())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOffset(-1019779949)
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setUserInfo(UserInfo.newBuilder().build())
+ * .addAllFacetSpecs(new ArrayList
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
+ * SiteSearchEngineServiceClient.create()) {
+ * RecrawlUrisRequest request =
+ * RecrawlUrisRequest.newBuilder()
+ * .setSiteSearchEngine(
+ * SiteSearchEngineName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .addAllUris(new ArrayList
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
+ * WriteUserEventRequest request =
+ * WriteUserEventRequest.newBuilder()
+ * .setParent(
+ * DataStoreName.ofProjectLocationDataStoreName(
+ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
+ * .toString())
+ * .setUserEvent(UserEvent.newBuilder().build())
+ * .build();
+ * UserEvent response = userEventServiceClient.writeUserEvent(request);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.discoveryengine.v1alpha;
+
+import javax.annotation.Generated;
diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/CompletionServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/CompletionServiceStub.java
new file mode 100644
index 000000000000..3ca327a6e9e9
--- /dev/null
+++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1alpha/stub/CompletionServiceStub.java
@@ -0,0 +1,42 @@
+/*
+ * 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 com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest;
+import com.google.cloud.discoveryengine.v1alpha.CompleteQueryResponse;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the CompletionService service API.
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CompletionServiceStubSettings.Builder completionServiceSettingsBuilder =
+ * CompletionServiceStubSettings.newBuilder();
+ * completionServiceSettingsBuilder
+ * .completeQuerySettings()
+ * .setRetrySettings(
+ * completionServiceSettingsBuilder
+ * .completeQuerySettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * CompletionServiceStubSettings completionServiceSettings =
+ * completionServiceSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class CompletionServiceStubSettings 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
+ * ConversationalSearchServiceStubSettings.Builder conversationalSearchServiceSettingsBuilder =
+ * ConversationalSearchServiceStubSettings.newBuilder();
+ * conversationalSearchServiceSettingsBuilder
+ * .converseConversationSettings()
+ * .setRetrySettings(
+ * conversationalSearchServiceSettingsBuilder
+ * .converseConversationSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ConversationalSearchServiceStubSettings conversationalSearchServiceSettings =
+ * conversationalSearchServiceSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class ConversationalSearchServiceStubSettings
+ extends StubSettings