diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceClient.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceClient.java
index 800d23198481..0e2b0286e8cd 100644
--- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceClient.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceClient.java
@@ -972,6 +972,24 @@
*
*
*
* DeleteAppVersion |
* Deletes the specified app version. |
*
@@ -7574,6 +7592,97 @@ public final UnaryCallable createAppVersion
return stub.createAppVersionCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the specified app version.
+ *
+ * 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 (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
+ * AppVersion appVersion = AppVersion.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * AppVersion response = agentServiceClient.updateAppVersion(appVersion, updateMask);
+ * }
+ * }
+ *
+ * @param appVersion Required. The app version to update.
+ * @param updateMask Optional. The list of fields to update. If empty, fields `display_name` and
+ * `description` will be updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AppVersion updateAppVersion(AppVersion appVersion, FieldMask updateMask) {
+ UpdateAppVersionRequest request =
+ UpdateAppVersionRequest.newBuilder()
+ .setAppVersion(appVersion)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateAppVersion(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the specified app version.
+ *
+ * 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 (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
+ * UpdateAppVersionRequest request =
+ * UpdateAppVersionRequest.newBuilder()
+ * .setAppVersion(AppVersion.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * AppVersion response = agentServiceClient.updateAppVersion(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 AppVersion updateAppVersion(UpdateAppVersionRequest request) {
+ return updateAppVersionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the specified app version.
+ *
+ * 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 (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
+ * UpdateAppVersionRequest request =
+ * UpdateAppVersionRequest.newBuilder()
+ * .setAppVersion(AppVersion.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * agentServiceClient.updateAppVersionCallable().futureCall(request);
+ * // Do something.
+ * AppVersion response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable updateAppVersionCallable() {
+ return stub.updateAppVersionCallable();
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes the specified app version.
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceSettings.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceSettings.java
index a7dbe6f0b0f4..10b8eef338ea 100644
--- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceSettings.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AgentServiceSettings.java
@@ -411,6 +411,11 @@ public UnaryCallSettings createAppVersionSe
return ((AgentServiceStubSettings) getStubSettings()).createAppVersionSettings();
}
+ /** Returns the object with the settings used for calls to updateAppVersion. */
+ public UnaryCallSettings updateAppVersionSettings() {
+ return ((AgentServiceStubSettings) getStubSettings()).updateAppVersionSettings();
+ }
+
/** Returns the object with the settings used for calls to deleteAppVersion. */
public UnaryCallSettings deleteAppVersionSettings() {
return ((AgentServiceStubSettings) getStubSettings()).deleteAppVersionSettings();
@@ -861,6 +866,12 @@ public UnaryCallSettings.Builder getAppVersion
return getStubSettingsBuilder().createAppVersionSettings();
}
+ /** Returns the builder for the settings used for calls to updateAppVersion. */
+ public UnaryCallSettings.Builder
+ updateAppVersionSettings() {
+ return getStubSettingsBuilder().updateAppVersionSettings();
+ }
+
/** Returns the builder for the settings used for calls to deleteAppVersion. */
public UnaryCallSettings.Builder deleteAppVersionSettings() {
return getStubSettingsBuilder().deleteAppVersionSettings();
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AssistantServiceClient.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AssistantServiceClient.java
new file mode 100644
index 000000000000..15652d085159
--- /dev/null
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AssistantServiceClient.java
@@ -0,0 +1,1395 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.ces.v1beta;
+
+import com.google.api.core.ApiFuture;
+import com.google.api.core.ApiFutures;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.paging.AbstractFixedSizeCollection;
+import com.google.api.gax.paging.AbstractPage;
+import com.google.api.gax.paging.AbstractPagedListResponse;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.ces.v1beta.stub.AssistantServiceStub;
+import com.google.cloud.ces.v1beta.stub.AssistantServiceStubSettings;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.protobuf.Empty;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+import org.jspecify.annotations.Nullable;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: The service that manages assistant-related resources in Customer Engagement
+ * Suite (CES). The assistant, Arc, is a conversational agent embedded in CES applications to help
+ * users with building their agents.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * AssistantSessionName name =
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]");
+ * AssistantSession response = assistantServiceClient.getAssistantSession(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the AssistantServiceClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ *
+ * Methods
+ *
+ * | Method |
+ * Description |
+ * Method Variants |
+ *
+ *
+ * ListAssistantSessions |
+ * Lists all assistant sessions in the given app. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * |
+ *
+ *
+ * GetAssistantSession |
+ * Gets details of the specified assistant session. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * |
+ *
+ *
+ * CreateAssistantSession |
+ * Creates a new assistant session in the given app. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *
+ * createAssistantSession(AppName parent, String assistantSessionId)
+ * createAssistantSession(String parent, String assistantSessionId)
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * |
+ *
+ *
+ * DeleteAssistantSession |
+ * Deletes the specified assistant session. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * |
+ *
+ *
+ * RunAssistant |
+ * Runs the assistant agent for the specified assistant session. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * |
+ *
+ *
+ * ChatAiAssistant |
+ * Runs Arc, the AI assistant, for the specified assistant session. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * |
+ *
+ *
+ * ListLocations |
+ * Lists information about the supported locations for this service.
+ * This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
+ * For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * |
+ *
+ *
+ * GetLocation |
+ * Gets information about a location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *
+ * |
+ *
+ *
+ *
+ * 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 AssistantServiceSettings 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
+ * AssistantServiceSettings assistantServiceSettings =
+ * AssistantServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * AssistantServiceClient assistantServiceClient =
+ * AssistantServiceClient.create(assistantServiceSettings);
+ * }
+ *
+ * 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
+ * AssistantServiceSettings assistantServiceSettings =
+ * AssistantServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AssistantServiceClient assistantServiceClient =
+ * AssistantServiceClient.create(assistantServiceSettings);
+ * }
+ *
+ * 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
+ * AssistantServiceSettings assistantServiceSettings =
+ * AssistantServiceSettings.newHttpJsonBuilder().build();
+ * AssistantServiceClient assistantServiceClient =
+ * AssistantServiceClient.create(assistantServiceSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@NullMarked
+@BetaApi
+@Generated("by gapic-generator-java")
+public class AssistantServiceClient implements BackgroundResource {
+ private final @Nullable AssistantServiceSettings settings;
+ private final AssistantServiceStub stub;
+
+ /** Constructs an instance of AssistantServiceClient with default settings. */
+ public static final AssistantServiceClient create() throws IOException {
+ return create(AssistantServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of AssistantServiceClient, 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 AssistantServiceClient create(AssistantServiceSettings settings)
+ throws IOException {
+ return new AssistantServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of AssistantServiceClient, using the given stub for making calls. This
+ * is for advanced usage - prefer using create(AssistantServiceSettings).
+ */
+ public static final AssistantServiceClient create(AssistantServiceStub stub) {
+ return new AssistantServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of AssistantServiceClient, 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 AssistantServiceClient(AssistantServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((AssistantServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected AssistantServiceClient(AssistantServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final @Nullable AssistantServiceSettings getSettings() {
+ return settings;
+ }
+
+ public AssistantServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all assistant sessions in the given app.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
+ * for (AssistantSession element :
+ * assistantServiceClient.listAssistantSessions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The app to list assistant sessions from. Format:
+ * `projects/{project}/locations/{location}/apps/{app}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAssistantSessionsPagedResponse listAssistantSessions(@Nullable AppName parent) {
+ ListAssistantSessionsRequest request =
+ ListAssistantSessionsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listAssistantSessions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all assistant sessions in the given app.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
+ * for (AssistantSession element :
+ * assistantServiceClient.listAssistantSessions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The app to list assistant sessions from. Format:
+ * `projects/{project}/locations/{location}/apps/{app}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAssistantSessionsPagedResponse listAssistantSessions(String parent) {
+ ListAssistantSessionsRequest request =
+ ListAssistantSessionsRequest.newBuilder().setParent(parent).build();
+ return listAssistantSessions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all assistant sessions in the given app.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * ListAssistantSessionsRequest request =
+ * ListAssistantSessionsRequest.newBuilder()
+ * .setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (AssistantSession element :
+ * assistantServiceClient.listAssistantSessions(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 ListAssistantSessionsPagedResponse listAssistantSessions(
+ ListAssistantSessionsRequest request) {
+ return listAssistantSessionsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all assistant sessions in the given app.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * ListAssistantSessionsRequest request =
+ * ListAssistantSessionsRequest.newBuilder()
+ * .setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture future =
+ * assistantServiceClient.listAssistantSessionsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (AssistantSession element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listAssistantSessionsPagedCallable() {
+ return stub.listAssistantSessionsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all assistant sessions in the given app.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * ListAssistantSessionsRequest request =
+ * ListAssistantSessionsRequest.newBuilder()
+ * .setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListAssistantSessionsResponse response =
+ * assistantServiceClient.listAssistantSessionsCallable().call(request);
+ * for (AssistantSession element : response.getAssistantSessionsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listAssistantSessionsCallable() {
+ return stub.listAssistantSessionsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of the specified assistant session.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * AssistantSessionName name =
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]");
+ * AssistantSession response = assistantServiceClient.getAssistantSession(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the assistant session to retrieve. Format:
+ * `projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistant_session}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AssistantSession getAssistantSession(@Nullable AssistantSessionName name) {
+ GetAssistantSessionRequest request =
+ GetAssistantSessionRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getAssistantSession(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of the specified assistant session.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * String name =
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]")
+ * .toString();
+ * AssistantSession response = assistantServiceClient.getAssistantSession(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the assistant session to retrieve. Format:
+ * `projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistant_session}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AssistantSession getAssistantSession(String name) {
+ GetAssistantSessionRequest request =
+ GetAssistantSessionRequest.newBuilder().setName(name).build();
+ return getAssistantSession(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of the specified assistant session.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * GetAssistantSessionRequest request =
+ * GetAssistantSessionRequest.newBuilder()
+ * .setName(
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]")
+ * .toString())
+ * .build();
+ * AssistantSession response = assistantServiceClient.getAssistantSession(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 AssistantSession getAssistantSession(GetAssistantSessionRequest request) {
+ return getAssistantSessionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of the specified assistant session.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * GetAssistantSessionRequest request =
+ * GetAssistantSessionRequest.newBuilder()
+ * .setName(
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * assistantServiceClient.getAssistantSessionCallable().futureCall(request);
+ * // Do something.
+ * AssistantSession response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ getAssistantSessionCallable() {
+ return stub.getAssistantSessionCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new assistant session in the given app.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
+ * String assistantSessionId = "assistantSessionId-1566358253";
+ * AssistantSession response =
+ * assistantServiceClient.createAssistantSession(parent, assistantSessionId);
+ * }
+ * }
+ *
+ * @param parent Required. The app to create the assistant session in Format:
+ * `projects/{project}/locations/{location}/apps/{app}`
+ * @param assistantSessionId Optional. The ID to use for the assistant session, which will become
+ * the final component of the assistant session's resource name. If not provided, a unique ID
+ * will be automatically assigned for the assistant session.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AssistantSession createAssistantSession(
+ @Nullable AppName parent, String assistantSessionId) {
+ CreateAssistantSessionRequest request =
+ CreateAssistantSessionRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setAssistantSessionId(assistantSessionId)
+ .build();
+ return createAssistantSession(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new assistant session in the given app.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
+ * String assistantSessionId = "assistantSessionId-1566358253";
+ * AssistantSession response =
+ * assistantServiceClient.createAssistantSession(parent, assistantSessionId);
+ * }
+ * }
+ *
+ * @param parent Required. The app to create the assistant session in Format:
+ * `projects/{project}/locations/{location}/apps/{app}`
+ * @param assistantSessionId Optional. The ID to use for the assistant session, which will become
+ * the final component of the assistant session's resource name. If not provided, a unique ID
+ * will be automatically assigned for the assistant session.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AssistantSession createAssistantSession(String parent, String assistantSessionId) {
+ CreateAssistantSessionRequest request =
+ CreateAssistantSessionRequest.newBuilder()
+ .setParent(parent)
+ .setAssistantSessionId(assistantSessionId)
+ .build();
+ return createAssistantSession(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new assistant session in the given app.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * CreateAssistantSessionRequest request =
+ * CreateAssistantSessionRequest.newBuilder()
+ * .setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+ * .setAssistantSessionId("assistantSessionId-1566358253")
+ * .addAllAssistantSessionMessages(new ArrayList())
+ * .build();
+ * AssistantSession response = assistantServiceClient.createAssistantSession(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 AssistantSession createAssistantSession(CreateAssistantSessionRequest request) {
+ return createAssistantSessionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new assistant session in the given app.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * CreateAssistantSessionRequest request =
+ * CreateAssistantSessionRequest.newBuilder()
+ * .setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+ * .setAssistantSessionId("assistantSessionId-1566358253")
+ * .addAllAssistantSessionMessages(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * assistantServiceClient.createAssistantSessionCallable().futureCall(request);
+ * // Do something.
+ * AssistantSession response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ createAssistantSessionCallable() {
+ return stub.createAssistantSessionCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the specified assistant session.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * AssistantSessionName name =
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]");
+ * assistantServiceClient.deleteAssistantSession(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the assistant session to delete. Format:
+ * `projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistant_session}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteAssistantSession(@Nullable AssistantSessionName name) {
+ DeleteAssistantSessionRequest request =
+ DeleteAssistantSessionRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteAssistantSession(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the specified assistant session.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * String name =
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]")
+ * .toString();
+ * assistantServiceClient.deleteAssistantSession(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the assistant session to delete. Format:
+ * `projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistant_session}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteAssistantSession(String name) {
+ DeleteAssistantSessionRequest request =
+ DeleteAssistantSessionRequest.newBuilder().setName(name).build();
+ deleteAssistantSession(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the specified assistant session.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * DeleteAssistantSessionRequest request =
+ * DeleteAssistantSessionRequest.newBuilder()
+ * .setName(
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]")
+ * .toString())
+ * .build();
+ * assistantServiceClient.deleteAssistantSession(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 deleteAssistantSession(DeleteAssistantSessionRequest request) {
+ deleteAssistantSessionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the specified assistant session.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * DeleteAssistantSessionRequest request =
+ * DeleteAssistantSessionRequest.newBuilder()
+ * .setName(
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * assistantServiceClient.deleteAssistantSessionCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ deleteAssistantSessionCallable() {
+ return stub.deleteAssistantSessionCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Runs the assistant agent for the specified assistant session.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * RunAssistantRequest request =
+ * RunAssistantRequest.newBuilder()
+ * .setApp(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+ * .setAssistantSession(
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]")
+ * .toString())
+ * .setMessage(AssistantMessage.newBuilder().build())
+ * .build();
+ * RunAssistantResponse response = assistantServiceClient.runAssistant(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 RunAssistantResponse runAssistant(RunAssistantRequest request) {
+ return runAssistantCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Runs the assistant agent for the specified assistant session.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * RunAssistantRequest request =
+ * RunAssistantRequest.newBuilder()
+ * .setApp(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+ * .setAssistantSession(
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]")
+ * .toString())
+ * .setMessage(AssistantMessage.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * assistantServiceClient.runAssistantCallable().futureCall(request);
+ * // Do something.
+ * RunAssistantResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable runAssistantCallable() {
+ return stub.runAssistantCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Runs Arc, the AI assistant, for the specified assistant session.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * ChatAiAssistantRequest request =
+ * ChatAiAssistantRequest.newBuilder()
+ * .setApp(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+ * .setAssistantSession(
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]")
+ * .toString())
+ * .setMessage("message954925063")
+ * .addAllAttachedGcsUris(new ArrayList())
+ * .setContextToken("contextToken1106626954")
+ * .build();
+ * ChatAiAssistantResponse response = assistantServiceClient.chatAiAssistant(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 ChatAiAssistantResponse chatAiAssistant(ChatAiAssistantRequest request) {
+ return chatAiAssistantCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Runs Arc, the AI assistant, for the specified assistant session.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * ChatAiAssistantRequest request =
+ * ChatAiAssistantRequest.newBuilder()
+ * .setApp(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+ * .setAssistantSession(
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]")
+ * .toString())
+ * .setMessage("message954925063")
+ * .addAllAttachedGcsUris(new ArrayList())
+ * .setContextToken("contextToken1106626954")
+ * .build();
+ * ApiFuture future =
+ * assistantServiceClient.chatAiAssistantCallable().futureCall(request);
+ * // Do something.
+ * ChatAiAssistantResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ chatAiAssistantCallable() {
+ return stub.chatAiAssistantCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * This method lists locations based on the resource scope provided inthe
+ * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field:
+ * ***Global locations**: If `name` is empty, the method lists thepublic
+ * locations available to all projects. * **Project-specificlocations**: If
+ * `name` follows the format`projects/{project}`, the method lists locations visible to
+ * thatspecific project. This includes public, private, or otherproject-specific locations enabled
+ * for the project.
+ *
+ * For gRPC and client library implementations, the resource name ispassed as the `name` field.
+ * For direct service calls, the resourcename isincorporated into the request path based on the
+ * specific serviceimplementation and version.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : assistantServiceClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * This method lists locations based on the resource scope provided inthe
+ * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field:
+ * ***Global locations**: If `name` is empty, the method lists thepublic
+ * locations available to all projects. * **Project-specificlocations**: If
+ * `name` follows the format`projects/{project}`, the method lists locations visible to
+ * thatspecific project. This includes public, private, or otherproject-specific locations enabled
+ * for the project.
+ *
+ * For gRPC and client library implementations, the resource name ispassed as the `name` field.
+ * For direct service calls, the resourcename isincorporated into the request path based on the
+ * specific serviceimplementation and version.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * assistantServiceClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listLocationsPagedCallable() {
+ return stub.listLocationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * This method lists locations based on the resource scope provided inthe
+ * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field:
+ * ***Global locations**: If `name` is empty, the method lists thepublic
+ * locations available to all projects. * **Project-specificlocations**: If
+ * `name` follows the format`projects/{project}`, the method lists locations visible to
+ * thatspecific project. This includes public, private, or otherproject-specific locations enabled
+ * for the project.
+ *
+ * For gRPC and client library implementations, the resource name ispassed as the `name` field.
+ * For direct service calls, the resourcename isincorporated into the request path based on the
+ * specific serviceimplementation and version.
+ *
+ * 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * assistantServiceClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listLocationsCallable() {
+ return stub.listLocationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = assistantServiceClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = assistantServiceClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getLocationCallable() {
+ return stub.getLocationCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+
+ public static class ListAssistantSessionsPagedResponse
+ extends AbstractPagedListResponse<
+ ListAssistantSessionsRequest,
+ ListAssistantSessionsResponse,
+ AssistantSession,
+ ListAssistantSessionsPage,
+ ListAssistantSessionsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext
+ context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListAssistantSessionsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListAssistantSessionsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListAssistantSessionsPagedResponse(ListAssistantSessionsPage page) {
+ super(page, ListAssistantSessionsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListAssistantSessionsPage
+ extends AbstractPage<
+ ListAssistantSessionsRequest,
+ ListAssistantSessionsResponse,
+ AssistantSession,
+ ListAssistantSessionsPage> {
+
+ private ListAssistantSessionsPage(
+ @Nullable
+ PageContext<
+ ListAssistantSessionsRequest, ListAssistantSessionsResponse, AssistantSession>
+ context,
+ @Nullable ListAssistantSessionsResponse response) {
+ super(context, response);
+ }
+
+ private static ListAssistantSessionsPage createEmptyPage() {
+ return new ListAssistantSessionsPage(null, null);
+ }
+
+ @Override
+ protected ListAssistantSessionsPage createPage(
+ @Nullable
+ PageContext<
+ ListAssistantSessionsRequest, ListAssistantSessionsResponse, AssistantSession>
+ context,
+ @Nullable ListAssistantSessionsResponse response) {
+ return new ListAssistantSessionsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ @Nullable
+ PageContext<
+ ListAssistantSessionsRequest, ListAssistantSessionsResponse, AssistantSession>
+ context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListAssistantSessionsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListAssistantSessionsRequest,
+ ListAssistantSessionsResponse,
+ AssistantSession,
+ ListAssistantSessionsPage,
+ ListAssistantSessionsFixedSizeCollection> {
+
+ private ListAssistantSessionsFixedSizeCollection(
+ @Nullable List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListAssistantSessionsFixedSizeCollection createEmptyCollection() {
+ return new ListAssistantSessionsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListAssistantSessionsFixedSizeCollection createCollection(
+ @Nullable List pages, int collectionSize) {
+ return new ListAssistantSessionsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+
+ public static class ListLocationsPagedResponse
+ extends AbstractPagedListResponse<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListLocationsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListLocationsPagedResponse(ListLocationsPage page) {
+ super(page, ListLocationsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListLocationsPage
+ extends AbstractPage<
+ ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> {
+
+ private ListLocationsPage(
+ @Nullable PageContext context,
+ @Nullable ListLocationsResponse response) {
+ super(context, response);
+ }
+
+ private static ListLocationsPage createEmptyPage() {
+ return new ListLocationsPage(null, null);
+ }
+
+ @Override
+ protected ListLocationsPage createPage(
+ @Nullable PageContext context,
+ @Nullable ListLocationsResponse response) {
+ return new ListLocationsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ @Nullable PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListLocationsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ private ListLocationsFixedSizeCollection(
+ @Nullable List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListLocationsFixedSizeCollection createEmptyCollection() {
+ return new ListLocationsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListLocationsFixedSizeCollection createCollection(
+ @Nullable List pages, int collectionSize) {
+ return new ListLocationsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+}
diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1beta/DataA2AServiceSettings.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AssistantServiceSettings.java
similarity index 54%
rename from java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1beta/DataA2AServiceSettings.java
rename to java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AssistantServiceSettings.java
index 8722adfd28e7..5fb205f464d8 100644
--- a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1beta/DataA2AServiceSettings.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/AssistantServiceSettings.java
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-package com.google.cloud.geminidataanalytics.v1beta;
+package com.google.cloud.ces.v1beta;
-import static com.google.cloud.geminidataanalytics.v1beta.DataA2AServiceClient.ListLocationsPagedResponse;
+import static com.google.cloud.ces.v1beta.AssistantServiceClient.ListAssistantSessionsPagedResponse;
+import static com.google.cloud.ces.v1beta.AssistantServiceClient.ListLocationsPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
@@ -28,14 +29,14 @@
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
import com.google.api.gax.rpc.PagedCallSettings;
-import com.google.api.gax.rpc.ServerStreamingCallSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
-import com.google.cloud.geminidataanalytics.v1beta.stub.DataA2AServiceStubSettings;
+import com.google.cloud.ces.v1beta.stub.AssistantServiceStubSettings;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
+import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
import javax.annotation.Generated;
@@ -44,13 +45,12 @@
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
- * Settings class to configure an instance of {@link DataA2AServiceClient}.
+ * Settings class to configure an instance of {@link AssistantServiceClient}.
*
* The default instance has everything set to sensible defaults:
*
*
- * - The default service address (geminidataanalytics.googleapis.com) and default port (443) are
- * used.
+ *
- The default service address (ces.googleapis.com) and default port (443) are used.
*
- Credentials are acquired automatically through Application Default Credentials.
*
- Retries are configured for idempotent methods but not for non-idempotent methods.
*
@@ -60,7 +60,7 @@
*
* For example, to set the
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
- * of sendMessage:
+ * of getAssistantSession:
*
* {@code
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -68,13 +68,13 @@
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DataA2AServiceSettings.Builder dataA2AServiceSettingsBuilder =
- * DataA2AServiceSettings.newBuilder();
- * dataA2AServiceSettingsBuilder
- * .sendMessageSettings()
+ * AssistantServiceSettings.Builder assistantServiceSettingsBuilder =
+ * AssistantServiceSettings.newBuilder();
+ * assistantServiceSettingsBuilder
+ * .getAssistantSessionSettings()
* .setRetrySettings(
- * dataA2AServiceSettingsBuilder
- * .sendMessageSettings()
+ * assistantServiceSettingsBuilder
+ * .getAssistantSessionSettings()
* .getRetrySettings()
* .toBuilder()
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
@@ -86,7 +86,7 @@
* .setRpcTimeoutMultiplier(1.5)
* .setTotalTimeoutDuration(Duration.ofSeconds(300))
* .build());
- * DataA2AServiceSettings dataA2AServiceSettings = dataA2AServiceSettingsBuilder.build();
+ * AssistantServiceSettings assistantServiceSettings = assistantServiceSettingsBuilder.build();
* }
*
* Please refer to the [Client Side Retry
@@ -96,78 +96,99 @@
@NullMarked
@BetaApi
@Generated("by gapic-generator-java")
-public class DataA2AServiceSettings extends ClientSettings {
+public class AssistantServiceSettings extends ClientSettings {
+
+ /** Returns the object with the settings used for calls to listAssistantSessions. */
+ public PagedCallSettings<
+ ListAssistantSessionsRequest,
+ ListAssistantSessionsResponse,
+ ListAssistantSessionsPagedResponse>
+ listAssistantSessionsSettings() {
+ return ((AssistantServiceStubSettings) getStubSettings()).listAssistantSessionsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getAssistantSession. */
+ public UnaryCallSettings
+ getAssistantSessionSettings() {
+ return ((AssistantServiceStubSettings) getStubSettings()).getAssistantSessionSettings();
+ }
- /** Returns the object with the settings used for calls to sendMessage. */
- public UnaryCallSettings sendMessageSettings() {
- return ((DataA2AServiceStubSettings) getStubSettings()).sendMessageSettings();
+ /** Returns the object with the settings used for calls to createAssistantSession. */
+ public UnaryCallSettings
+ createAssistantSessionSettings() {
+ return ((AssistantServiceStubSettings) getStubSettings()).createAssistantSessionSettings();
}
- /** Returns the object with the settings used for calls to sendStreamingMessage. */
- public ServerStreamingCallSettings
- sendStreamingMessageSettings() {
- return ((DataA2AServiceStubSettings) getStubSettings()).sendStreamingMessageSettings();
+ /** Returns the object with the settings used for calls to deleteAssistantSession. */
+ public UnaryCallSettings deleteAssistantSessionSettings() {
+ return ((AssistantServiceStubSettings) getStubSettings()).deleteAssistantSessionSettings();
}
- /** Returns the object with the settings used for calls to getAgentCard. */
- public UnaryCallSettings getAgentCardSettings() {
- return ((DataA2AServiceStubSettings) getStubSettings()).getAgentCardSettings();
+ /** Returns the object with the settings used for calls to runAssistant. */
+ public UnaryCallSettings runAssistantSettings() {
+ return ((AssistantServiceStubSettings) getStubSettings()).runAssistantSettings();
+ }
+
+ /** Returns the object with the settings used for calls to chatAiAssistant. */
+ public UnaryCallSettings
+ chatAiAssistantSettings() {
+ return ((AssistantServiceStubSettings) getStubSettings()).chatAiAssistantSettings();
}
/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings
listLocationsSettings() {
- return ((DataA2AServiceStubSettings) getStubSettings()).listLocationsSettings();
+ return ((AssistantServiceStubSettings) getStubSettings()).listLocationsSettings();
}
/** Returns the object with the settings used for calls to getLocation. */
public UnaryCallSettings getLocationSettings() {
- return ((DataA2AServiceStubSettings) getStubSettings()).getLocationSettings();
+ return ((AssistantServiceStubSettings) getStubSettings()).getLocationSettings();
}
- public static final DataA2AServiceSettings create(DataA2AServiceStubSettings stub)
+ public static final AssistantServiceSettings create(AssistantServiceStubSettings stub)
throws IOException {
- return new DataA2AServiceSettings.Builder(stub.toBuilder()).build();
+ return new AssistantServiceSettings.Builder(stub.toBuilder()).build();
}
/** Returns a builder for the default ExecutorProvider for this service. */
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
- return DataA2AServiceStubSettings.defaultExecutorProviderBuilder();
+ return AssistantServiceStubSettings.defaultExecutorProviderBuilder();
}
/** Returns the default service endpoint. */
public static String getDefaultEndpoint() {
- return DataA2AServiceStubSettings.getDefaultEndpoint();
+ return AssistantServiceStubSettings.getDefaultEndpoint();
}
/** Returns the default service scopes. */
public static List getDefaultServiceScopes() {
- return DataA2AServiceStubSettings.getDefaultServiceScopes();
+ return AssistantServiceStubSettings.getDefaultServiceScopes();
}
/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
- return DataA2AServiceStubSettings.defaultCredentialsProviderBuilder();
+ return AssistantServiceStubSettings.defaultCredentialsProviderBuilder();
}
/** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
- return DataA2AServiceStubSettings.defaultGrpcTransportProviderBuilder();
+ return AssistantServiceStubSettings.defaultGrpcTransportProviderBuilder();
}
/** Returns a builder for the default REST ChannelProvider for this service. */
@BetaApi
public static InstantiatingHttpJsonChannelProvider.Builder
defaultHttpJsonTransportProviderBuilder() {
- return DataA2AServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
+ return AssistantServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
}
public static TransportChannelProvider defaultTransportChannelProvider() {
- return DataA2AServiceStubSettings.defaultTransportChannelProvider();
+ return AssistantServiceStubSettings.defaultTransportChannelProvider();
}
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
- return DataA2AServiceStubSettings.defaultApiClientHeaderProviderBuilder();
+ return AssistantServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
/** Returns a new gRPC builder for this class. */
@@ -190,39 +211,39 @@ public Builder toBuilder() {
return new Builder(this);
}
- protected DataA2AServiceSettings(Builder settingsBuilder) throws IOException {
+ protected AssistantServiceSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
}
- /** Builder for DataA2AServiceSettings. */
- public static class Builder extends ClientSettings.Builder {
+ /** Builder for AssistantServiceSettings. */
+ public static class Builder extends ClientSettings.Builder {
protected Builder() throws IOException {
this(((ClientContext) null));
}
protected Builder(@Nullable ClientContext clientContext) {
- super(DataA2AServiceStubSettings.newBuilder(clientContext));
+ super(AssistantServiceStubSettings.newBuilder(clientContext));
}
- protected Builder(DataA2AServiceSettings settings) {
+ protected Builder(AssistantServiceSettings settings) {
super(settings.getStubSettings().toBuilder());
}
- protected Builder(DataA2AServiceStubSettings.Builder stubSettings) {
+ protected Builder(AssistantServiceStubSettings.Builder stubSettings) {
super(stubSettings);
}
private static Builder createDefault() {
- return new Builder(DataA2AServiceStubSettings.newBuilder());
+ return new Builder(AssistantServiceStubSettings.newBuilder());
}
private static Builder createHttpJsonDefault() {
- return new Builder(DataA2AServiceStubSettings.newHttpJsonBuilder());
+ return new Builder(AssistantServiceStubSettings.newHttpJsonBuilder());
}
- public DataA2AServiceStubSettings.Builder getStubSettingsBuilder() {
- return ((DataA2AServiceStubSettings.Builder) getStubSettings());
+ public AssistantServiceStubSettings.Builder getStubSettingsBuilder() {
+ return ((AssistantServiceStubSettings.Builder) getStubSettings());
}
/**
@@ -237,21 +258,43 @@ public Builder applyToAllUnaryMethods(
return this;
}
- /** Returns the builder for the settings used for calls to sendMessage. */
- public UnaryCallSettings.Builder
- sendMessageSettings() {
- return getStubSettingsBuilder().sendMessageSettings();
+ /** Returns the builder for the settings used for calls to listAssistantSessions. */
+ public PagedCallSettings.Builder<
+ ListAssistantSessionsRequest,
+ ListAssistantSessionsResponse,
+ ListAssistantSessionsPagedResponse>
+ listAssistantSessionsSettings() {
+ return getStubSettingsBuilder().listAssistantSessionsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getAssistantSession. */
+ public UnaryCallSettings.Builder
+ getAssistantSessionSettings() {
+ return getStubSettingsBuilder().getAssistantSessionSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to createAssistantSession. */
+ public UnaryCallSettings.Builder
+ createAssistantSessionSettings() {
+ return getStubSettingsBuilder().createAssistantSessionSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAssistantSession. */
+ public UnaryCallSettings.Builder
+ deleteAssistantSessionSettings() {
+ return getStubSettingsBuilder().deleteAssistantSessionSettings();
}
- /** Returns the builder for the settings used for calls to sendStreamingMessage. */
- public ServerStreamingCallSettings.Builder
- sendStreamingMessageSettings() {
- return getStubSettingsBuilder().sendStreamingMessageSettings();
+ /** Returns the builder for the settings used for calls to runAssistant. */
+ public UnaryCallSettings.Builder
+ runAssistantSettings() {
+ return getStubSettingsBuilder().runAssistantSettings();
}
- /** Returns the builder for the settings used for calls to getAgentCard. */
- public UnaryCallSettings.Builder getAgentCardSettings() {
- return getStubSettingsBuilder().getAgentCardSettings();
+ /** Returns the builder for the settings used for calls to chatAiAssistant. */
+ public UnaryCallSettings.Builder
+ chatAiAssistantSettings() {
+ return getStubSettingsBuilder().chatAiAssistantSettings();
}
/** Returns the builder for the settings used for calls to listLocations. */
@@ -267,8 +310,8 @@ public UnaryCallSettings.Builder getLocationSettin
}
@Override
- public DataA2AServiceSettings build() throws IOException {
- return new DataA2AServiceSettings(this);
+ public AssistantServiceSettings build() throws IOException {
+ return new AssistantServiceSettings(this);
}
}
}
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/SessionServiceClient.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/SessionServiceClient.java
index af277f8e7382..8591ad1f412b 100644
--- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/SessionServiceClient.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/SessionServiceClient.java
@@ -120,6 +120,44 @@
* |
*
*
* ListLocations |
* Lists information about the supported locations for this service.
* This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
@@ -428,6 +466,178 @@ public final UnaryCallable runSessionCall
return stub.bidiRunSessionCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Runs Arc, the AI assistant, for the specified assistant session in a streaming fashion.
+ *
+ * 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 (SessionServiceClient sessionServiceClient = SessionServiceClient.create()) {
+ * StreamChatAiAssistantRequest request =
+ * StreamChatAiAssistantRequest.newBuilder()
+ * .setName(
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]")
+ * .toString())
+ * .setMessage("message954925063")
+ * .addAllAttachedGcsUris(new ArrayList())
+ * .setContextToken("contextToken1106626954")
+ * .setConfirmationResponse(AssistantConfirmationResponse.newBuilder().build())
+ * .addAllClientCapabilities(
+ * new ArrayList())
+ * .setOperationCompletedEvent(OperationCompletedEvent.newBuilder().build())
+ * .setResumeFromSequenceNumber(15486916)
+ * .setAttachOnly(true)
+ * .build();
+ * ServerStream stream =
+ * sessionServiceClient.streamChatAiAssistantCallable().call(request);
+ * for (StreamChatAiAssistantResponse response : stream) {
+ * // Do something when a response is received.
+ * }
+ * }
+ * }
+ */
+ public final ServerStreamingCallable
+ streamChatAiAssistantCallable() {
+ return stub.streamChatAiAssistantCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels the assistant session's in-flight turn, if any: the explicit user stop for a turn
+ * running detached from any stream. A cancel landing on a task that does not host the turn
+ * preempts it through the session turn epoch instead, ending it within one lease renewal.
+ *
+ * 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 (SessionServiceClient sessionServiceClient = SessionServiceClient.create()) {
+ * CancelAssistantTurnRequest request =
+ * CancelAssistantTurnRequest.newBuilder()
+ * .setName("name3373707")
+ * .setTurnId("turnId-862429576")
+ * .build();
+ * CancelAssistantTurnResponse response = sessionServiceClient.cancelAssistantTurn(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 CancelAssistantTurnResponse cancelAssistantTurn(CancelAssistantTurnRequest request) {
+ return cancelAssistantTurnCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels the assistant session's in-flight turn, if any: the explicit user stop for a turn
+ * running detached from any stream. A cancel landing on a task that does not host the turn
+ * preempts it through the session turn epoch instead, ending it within one lease renewal.
+ *
+ * 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 (SessionServiceClient sessionServiceClient = SessionServiceClient.create()) {
+ * CancelAssistantTurnRequest request =
+ * CancelAssistantTurnRequest.newBuilder()
+ * .setName("name3373707")
+ * .setTurnId("turnId-862429576")
+ * .build();
+ * ApiFuture future =
+ * sessionServiceClient.cancelAssistantTurnCallable().futureCall(request);
+ * // Do something.
+ * CancelAssistantTurnResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ cancelAssistantTurnCallable() {
+ return stub.cancelAssistantTurnCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates personalized onboarding suggestions for the Arc zero state: classifies the requesting
+ * user (new / exploring / returning) from their assistant-session history in the app and returns
+ * suggestion chips (resume a session, continue work, or start something new) to render before any
+ * message is sent.
+ *
+ * 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 (SessionServiceClient sessionServiceClient = SessionServiceClient.create()) {
+ * GenerateOnboardingSuggestionsRequest request =
+ * GenerateOnboardingSuggestionsRequest.newBuilder()
+ * .setName(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+ * .setMaxSuggestions(618824852)
+ * .build();
+ * GenerateOnboardingSuggestionsResponse response =
+ * sessionServiceClient.generateOnboardingSuggestions(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 GenerateOnboardingSuggestionsResponse generateOnboardingSuggestions(
+ GenerateOnboardingSuggestionsRequest request) {
+ return generateOnboardingSuggestionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates personalized onboarding suggestions for the Arc zero state: classifies the requesting
+ * user (new / exploring / returning) from their assistant-session history in the app and returns
+ * suggestion chips (resume a session, continue work, or start something new) to render before any
+ * message is sent.
+ *
+ * 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 (SessionServiceClient sessionServiceClient = SessionServiceClient.create()) {
+ * GenerateOnboardingSuggestionsRequest request =
+ * GenerateOnboardingSuggestionsRequest.newBuilder()
+ * .setName(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
+ * .setMaxSuggestions(618824852)
+ * .build();
+ * ApiFuture future =
+ * sessionServiceClient.generateOnboardingSuggestionsCallable().futureCall(request);
+ * // Do something.
+ * GenerateOnboardingSuggestionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ GenerateOnboardingSuggestionsRequest, GenerateOnboardingSuggestionsResponse>
+ generateOnboardingSuggestionsCallable() {
+ return stub.generateOnboardingSuggestionsCallable();
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about the supported locations for this service.
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/SessionServiceSettings.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/SessionServiceSettings.java
index 561e295586b5..09ac62b2b202 100644
--- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/SessionServiceSettings.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/SessionServiceSettings.java
@@ -115,6 +115,25 @@ public UnaryCallSettings runSessionSettin
return ((SessionServiceStubSettings) getStubSettings()).bidiRunSessionSettings();
}
+ /** Returns the object with the settings used for calls to streamChatAiAssistant. */
+ public ServerStreamingCallSettings
+ streamChatAiAssistantSettings() {
+ return ((SessionServiceStubSettings) getStubSettings()).streamChatAiAssistantSettings();
+ }
+
+ /** Returns the object with the settings used for calls to cancelAssistantTurn. */
+ public UnaryCallSettings
+ cancelAssistantTurnSettings() {
+ return ((SessionServiceStubSettings) getStubSettings()).cancelAssistantTurnSettings();
+ }
+
+ /** Returns the object with the settings used for calls to generateOnboardingSuggestions. */
+ public UnaryCallSettings<
+ GenerateOnboardingSuggestionsRequest, GenerateOnboardingSuggestionsResponse>
+ generateOnboardingSuggestionsSettings() {
+ return ((SessionServiceStubSettings) getStubSettings()).generateOnboardingSuggestionsSettings();
+ }
+
/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings
listLocationsSettings() {
@@ -255,6 +274,26 @@ public UnaryCallSettings.Builder runSessi
return getStubSettingsBuilder().bidiRunSessionSettings();
}
+ /** Returns the builder for the settings used for calls to streamChatAiAssistant. */
+ public ServerStreamingCallSettings.Builder<
+ StreamChatAiAssistantRequest, StreamChatAiAssistantResponse>
+ streamChatAiAssistantSettings() {
+ return getStubSettingsBuilder().streamChatAiAssistantSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to cancelAssistantTurn. */
+ public UnaryCallSettings.Builder
+ cancelAssistantTurnSettings() {
+ return getStubSettingsBuilder().cancelAssistantTurnSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to generateOnboardingSuggestions. */
+ public UnaryCallSettings.Builder<
+ GenerateOnboardingSuggestionsRequest, GenerateOnboardingSuggestionsResponse>
+ generateOnboardingSuggestionsSettings() {
+ return getStubSettingsBuilder().generateOnboardingSuggestionsSettings();
+ }
+
/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/gapic_metadata.json b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/gapic_metadata.json
index 0ccc259b3886..9d272ba5c686 100644
--- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/gapic_metadata.json
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/gapic_metadata.json
@@ -151,6 +151,9 @@
"UpdateApp": {
"methods": ["updateApp", "updateApp", "updateAppCallable"]
},
+ "UpdateAppVersion": {
+ "methods": ["updateAppVersion", "updateAppVersion", "updateAppVersionCallable"]
+ },
"UpdateDeployment": {
"methods": ["updateDeployment", "updateDeployment", "updateDeploymentCallable"]
},
@@ -173,6 +176,39 @@
}
}
},
+ "AssistantService": {
+ "clients": {
+ "grpc": {
+ "libraryClient": "AssistantServiceClient",
+ "rpcs": {
+ "ChatAiAssistant": {
+ "methods": ["chatAiAssistant", "chatAiAssistantCallable"]
+ },
+ "CreateAssistantSession": {
+ "methods": ["createAssistantSession", "createAssistantSession", "createAssistantSession", "createAssistantSessionCallable"]
+ },
+ "DeleteAssistantSession": {
+ "methods": ["deleteAssistantSession", "deleteAssistantSession", "deleteAssistantSession", "deleteAssistantSessionCallable"]
+ },
+ "GetAssistantSession": {
+ "methods": ["getAssistantSession", "getAssistantSession", "getAssistantSession", "getAssistantSessionCallable"]
+ },
+ "GetLocation": {
+ "methods": ["getLocation", "getLocationCallable"]
+ },
+ "ListAssistantSessions": {
+ "methods": ["listAssistantSessions", "listAssistantSessions", "listAssistantSessions", "listAssistantSessionsPagedCallable", "listAssistantSessionsCallable"]
+ },
+ "ListLocations": {
+ "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
+ },
+ "RunAssistant": {
+ "methods": ["runAssistant", "runAssistantCallable"]
+ }
+ }
+ }
+ }
+ },
"EvaluationService": {
"clients": {
"grpc": {
@@ -301,6 +337,12 @@
"BidiRunSession": {
"methods": ["bidiRunSessionCallable"]
},
+ "CancelAssistantTurn": {
+ "methods": ["cancelAssistantTurn", "cancelAssistantTurnCallable"]
+ },
+ "GenerateOnboardingSuggestions": {
+ "methods": ["generateOnboardingSuggestions", "generateOnboardingSuggestionsCallable"]
+ },
"GetLocation": {
"methods": ["getLocation", "getLocationCallable"]
},
@@ -310,6 +352,9 @@
"RunSession": {
"methods": ["runSession", "runSessionCallable"]
},
+ "StreamChatAiAssistant": {
+ "methods": ["streamChatAiAssistantCallable"]
+ },
"StreamRunSession": {
"methods": ["streamRunSessionCallable"]
}
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/package-info.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/package-info.java
index bfb92bf06c85..007627d13e4e 100644
--- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/package-info.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/package-info.java
@@ -38,6 +38,27 @@
* }
* }
*
+ * ======================= AssistantServiceClient =======================
+ *
+ * Service Description: The service that manages assistant-related resources in Customer
+ * Engagement Suite (CES). The assistant, Arc, is a conversational agent embedded in CES
+ * applications to help users with building their agents.
+ *
+ * Sample for AssistantServiceClient:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ * AssistantSessionName name =
+ * AssistantSessionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[ASSISTANT_SESSION]");
+ * AssistantSession response = assistantServiceClient.getAssistantSession(name);
+ * }
+ * }
+ *
* ======================= EvaluationServiceClient =======================
*
* Service Description: EvaluationService exposes methods to perform evaluation for the CES app.
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStub.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStub.java
index a3e28884d741..df4a65bd9e3f 100644
--- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStub.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStub.java
@@ -105,6 +105,7 @@
import com.google.cloud.ces.v1beta.Toolset;
import com.google.cloud.ces.v1beta.UpdateAgentRequest;
import com.google.cloud.ces.v1beta.UpdateAppRequest;
+import com.google.cloud.ces.v1beta.UpdateAppVersionRequest;
import com.google.cloud.ces.v1beta.UpdateDeploymentRequest;
import com.google.cloud.ces.v1beta.UpdateExampleRequest;
import com.google.cloud.ces.v1beta.UpdateGuardrailRequest;
@@ -395,6 +396,10 @@ public UnaryCallable createAppVersionCallab
throw new UnsupportedOperationException("Not implemented: createAppVersionCallable()");
}
+ public UnaryCallable updateAppVersionCallable() {
+ throw new UnsupportedOperationException("Not implemented: updateAppVersionCallable()");
+ }
+
public UnaryCallable deleteAppVersionCallable() {
throw new UnsupportedOperationException("Not implemented: deleteAppVersionCallable()");
}
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStubSettings.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStubSettings.java
index 57a60ada8bd6..e00393e11516 100644
--- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStubSettings.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AgentServiceStubSettings.java
@@ -132,6 +132,7 @@
import com.google.cloud.ces.v1beta.Toolset;
import com.google.cloud.ces.v1beta.UpdateAgentRequest;
import com.google.cloud.ces.v1beta.UpdateAppRequest;
+import com.google.cloud.ces.v1beta.UpdateAppVersionRequest;
import com.google.cloud.ces.v1beta.UpdateDeploymentRequest;
import com.google.cloud.ces.v1beta.UpdateExampleRequest;
import com.google.cloud.ces.v1beta.UpdateGuardrailRequest;
@@ -318,6 +319,7 @@ public class AgentServiceStubSettings extends StubSettings getAppVersionSettings;
private final UnaryCallSettings createAppVersionSettings;
+ private final UnaryCallSettings updateAppVersionSettings;
private final UnaryCallSettings deleteAppVersionSettings;
private final UnaryCallSettings restoreAppVersionSettings;
private final OperationCallSettings<
@@ -1192,6 +1194,11 @@ public UnaryCallSettings createAppVersionSe
return createAppVersionSettings;
}
+ /** Returns the object with the settings used for calls to updateAppVersion. */
+ public UnaryCallSettings updateAppVersionSettings() {
+ return updateAppVersionSettings;
+ }
+
/** Returns the object with the settings used for calls to deleteAppVersion. */
public UnaryCallSettings deleteAppVersionSettings() {
return deleteAppVersionSettings;
@@ -1409,6 +1416,7 @@ protected AgentServiceStubSettings(Builder settingsBuilder) throws IOException {
listAppVersionsSettings = settingsBuilder.listAppVersionsSettings().build();
getAppVersionSettings = settingsBuilder.getAppVersionSettings().build();
createAppVersionSettings = settingsBuilder.createAppVersionSettings().build();
+ updateAppVersionSettings = settingsBuilder.updateAppVersionSettings().build();
deleteAppVersionSettings = settingsBuilder.deleteAppVersionSettings().build();
restoreAppVersionSettings = settingsBuilder.restoreAppVersionSettings().build();
restoreAppVersionOperationSettings =
@@ -1522,6 +1530,8 @@ public static class Builder extends StubSettings.Builder getAppVersionSettings;
private final UnaryCallSettings.Builder
createAppVersionSettings;
+ private final UnaryCallSettings.Builder
+ updateAppVersionSettings;
private final UnaryCallSettings.Builder
deleteAppVersionSettings;
private final UnaryCallSettings.Builder
@@ -1635,6 +1645,7 @@ protected Builder(@Nullable ClientContext clientContext) {
listAppVersionsSettings = PagedCallSettings.newBuilder(LIST_APP_VERSIONS_PAGE_STR_FACT);
getAppVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createAppVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ updateAppVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteAppVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
restoreAppVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
restoreAppVersionOperationSettings = OperationCallSettings.newBuilder();
@@ -1693,6 +1704,7 @@ protected Builder(@Nullable ClientContext clientContext) {
listAppVersionsSettings,
getAppVersionSettings,
createAppVersionSettings,
+ updateAppVersionSettings,
deleteAppVersionSettings,
restoreAppVersionSettings,
generateAppResourceSettings,
@@ -1758,6 +1770,7 @@ protected Builder(AgentServiceStubSettings settings) {
listAppVersionsSettings = settings.listAppVersionsSettings.toBuilder();
getAppVersionSettings = settings.getAppVersionSettings.toBuilder();
createAppVersionSettings = settings.createAppVersionSettings.toBuilder();
+ updateAppVersionSettings = settings.updateAppVersionSettings.toBuilder();
deleteAppVersionSettings = settings.deleteAppVersionSettings.toBuilder();
restoreAppVersionSettings = settings.restoreAppVersionSettings.toBuilder();
restoreAppVersionOperationSettings = settings.restoreAppVersionOperationSettings.toBuilder();
@@ -1817,6 +1830,7 @@ protected Builder(AgentServiceStubSettings settings) {
listAppVersionsSettings,
getAppVersionSettings,
createAppVersionSettings,
+ updateAppVersionSettings,
deleteAppVersionSettings,
restoreAppVersionSettings,
generateAppResourceSettings,
@@ -2081,6 +2095,11 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+ builder
+ .updateAppVersionSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
builder
.deleteAppVersionSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
@@ -2585,6 +2604,12 @@ public UnaryCallSettings.Builder getAppVersion
return createAppVersionSettings;
}
+ /** Returns the builder for the settings used for calls to updateAppVersion. */
+ public UnaryCallSettings.Builder
+ updateAppVersionSettings() {
+ return updateAppVersionSettings;
+ }
+
/** Returns the builder for the settings used for calls to deleteAppVersion. */
public UnaryCallSettings.Builder deleteAppVersionSettings() {
return deleteAppVersionSettings;
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AssistantServiceStub.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AssistantServiceStub.java
new file mode 100644
index 000000000000..f1b908a519b4
--- /dev/null
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AssistantServiceStub.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.ces.v1beta.stub;
+
+import static com.google.cloud.ces.v1beta.AssistantServiceClient.ListAssistantSessionsPagedResponse;
+import static com.google.cloud.ces.v1beta.AssistantServiceClient.ListLocationsPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.ces.v1beta.AssistantSession;
+import com.google.cloud.ces.v1beta.ChatAiAssistantRequest;
+import com.google.cloud.ces.v1beta.ChatAiAssistantResponse;
+import com.google.cloud.ces.v1beta.CreateAssistantSessionRequest;
+import com.google.cloud.ces.v1beta.DeleteAssistantSessionRequest;
+import com.google.cloud.ces.v1beta.GetAssistantSessionRequest;
+import com.google.cloud.ces.v1beta.ListAssistantSessionsRequest;
+import com.google.cloud.ces.v1beta.ListAssistantSessionsResponse;
+import com.google.cloud.ces.v1beta.RunAssistantRequest;
+import com.google.cloud.ces.v1beta.RunAssistantResponse;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the AssistantService service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@BetaApi
+@Generated("by gapic-generator-java")
+public abstract class AssistantServiceStub implements BackgroundResource {
+
+ public UnaryCallable
+ listAssistantSessionsPagedCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: listAssistantSessionsPagedCallable()");
+ }
+
+ public UnaryCallable
+ listAssistantSessionsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listAssistantSessionsCallable()");
+ }
+
+ public UnaryCallable getAssistantSessionCallable() {
+ throw new UnsupportedOperationException("Not implemented: getAssistantSessionCallable()");
+ }
+
+ public UnaryCallable
+ createAssistantSessionCallable() {
+ throw new UnsupportedOperationException("Not implemented: createAssistantSessionCallable()");
+ }
+
+ public UnaryCallable deleteAssistantSessionCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteAssistantSessionCallable()");
+ }
+
+ public UnaryCallable runAssistantCallable() {
+ throw new UnsupportedOperationException("Not implemented: runAssistantCallable()");
+ }
+
+ public UnaryCallable chatAiAssistantCallable() {
+ throw new UnsupportedOperationException("Not implemented: chatAiAssistantCallable()");
+ }
+
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
+ }
+
+ public UnaryCallable listLocationsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsCallable()");
+ }
+
+ public UnaryCallable getLocationCallable() {
+ throw new UnsupportedOperationException("Not implemented: getLocationCallable()");
+ }
+
+ @Override
+ public abstract void close();
+}
diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1beta/stub/DataA2AServiceStubSettings.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AssistantServiceStubSettings.java
similarity index 54%
rename from java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1beta/stub/DataA2AServiceStubSettings.java
rename to java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AssistantServiceStubSettings.java
index 8de9acdc7c10..e6b9a0790346 100644
--- a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1beta/stub/DataA2AServiceStubSettings.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/AssistantServiceStubSettings.java
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-package com.google.cloud.geminidataanalytics.v1beta.stub;
+package com.google.cloud.ces.v1beta.stub;
-import static com.google.cloud.geminidataanalytics.v1beta.DataA2AServiceClient.ListLocationsPagedResponse;
+import static com.google.cloud.ces.v1beta.AssistantServiceClient.ListAssistantSessionsPagedResponse;
+import static com.google.cloud.ces.v1beta.AssistantServiceClient.ListLocationsPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
@@ -40,17 +41,21 @@
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.PagedListDescriptor;
import com.google.api.gax.rpc.PagedListResponseFactory;
-import com.google.api.gax.rpc.ServerStreamingCallSettings;
import com.google.api.gax.rpc.StatusCode;
import com.google.api.gax.rpc.StubSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.geminidataanalytics.v1beta.AgentCard;
-import com.google.cloud.geminidataanalytics.v1beta.GetAgentCardRequest;
-import com.google.cloud.geminidataanalytics.v1beta.SendMessageRequest;
-import com.google.cloud.geminidataanalytics.v1beta.SendMessageResponse;
-import com.google.cloud.geminidataanalytics.v1beta.StreamResponse;
+import com.google.cloud.ces.v1beta.AssistantSession;
+import com.google.cloud.ces.v1beta.ChatAiAssistantRequest;
+import com.google.cloud.ces.v1beta.ChatAiAssistantResponse;
+import com.google.cloud.ces.v1beta.CreateAssistantSessionRequest;
+import com.google.cloud.ces.v1beta.DeleteAssistantSessionRequest;
+import com.google.cloud.ces.v1beta.GetAssistantSessionRequest;
+import com.google.cloud.ces.v1beta.ListAssistantSessionsRequest;
+import com.google.cloud.ces.v1beta.ListAssistantSessionsResponse;
+import com.google.cloud.ces.v1beta.RunAssistantRequest;
+import com.google.cloud.ces.v1beta.RunAssistantResponse;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
@@ -59,6 +64,7 @@
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
+import com.google.protobuf.Empty;
import java.io.IOException;
import java.time.Duration;
import java.util.List;
@@ -68,13 +74,12 @@
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
- * Settings class to configure an instance of {@link DataA2AServiceStub}.
+ * Settings class to configure an instance of {@link AssistantServiceStub}.
*
* The default instance has everything set to sensible defaults:
*
*
- * - The default service address (geminidataanalytics.googleapis.com) and default port (443) are
- * used.
+ *
- The default service address (ces.googleapis.com) and default port (443) are used.
*
- Credentials are acquired automatically through Application Default Credentials.
*
- Retries are configured for idempotent methods but not for non-idempotent methods.
*
@@ -84,7 +89,7 @@
*
* For example, to set the
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
- * of sendMessage:
+ * of getAssistantSession:
*
* {@code
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -92,13 +97,13 @@
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DataA2AServiceStubSettings.Builder dataA2AServiceSettingsBuilder =
- * DataA2AServiceStubSettings.newBuilder();
- * dataA2AServiceSettingsBuilder
- * .sendMessageSettings()
+ * AssistantServiceStubSettings.Builder assistantServiceSettingsBuilder =
+ * AssistantServiceStubSettings.newBuilder();
+ * assistantServiceSettingsBuilder
+ * .getAssistantSessionSettings()
* .setRetrySettings(
- * dataA2AServiceSettingsBuilder
- * .sendMessageSettings()
+ * assistantServiceSettingsBuilder
+ * .getAssistantSessionSettings()
* .getRetrySettings()
* .toBuilder()
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
@@ -110,7 +115,7 @@
* .setRpcTimeoutMultiplier(1.5)
* .setTotalTimeoutDuration(Duration.ofSeconds(300))
* .build());
- * DataA2AServiceStubSettings dataA2AServiceSettings = dataA2AServiceSettingsBuilder.build();
+ * AssistantServiceStubSettings assistantServiceSettings = assistantServiceSettingsBuilder.build();
* }
*
* Please refer to the [Client Side Retry
@@ -121,20 +126,72 @@
@BetaApi
@Generated("by gapic-generator-java")
@SuppressWarnings("CanonicalDuration")
-public class DataA2AServiceStubSettings extends StubSettings {
+public class AssistantServiceStubSettings extends StubSettings {
/** The default scopes of the service. */
private static final ImmutableList DEFAULT_SERVICE_SCOPES =
- ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
+ ImmutableList.builder()
+ .add("https://www.googleapis.com/auth/ces")
+ .add("https://www.googleapis.com/auth/cloud-platform")
+ .build();
- private final UnaryCallSettings sendMessageSettings;
- private final ServerStreamingCallSettings
- sendStreamingMessageSettings;
- private final UnaryCallSettings getAgentCardSettings;
+ private final PagedCallSettings<
+ ListAssistantSessionsRequest,
+ ListAssistantSessionsResponse,
+ ListAssistantSessionsPagedResponse>
+ listAssistantSessionsSettings;
+ private final UnaryCallSettings
+ getAssistantSessionSettings;
+ private final UnaryCallSettings
+ createAssistantSessionSettings;
+ private final UnaryCallSettings
+ deleteAssistantSessionSettings;
+ private final UnaryCallSettings runAssistantSettings;
+ private final UnaryCallSettings
+ chatAiAssistantSettings;
private final PagedCallSettings<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
private final UnaryCallSettings getLocationSettings;
+ private static final PagedListDescriptor<
+ ListAssistantSessionsRequest, ListAssistantSessionsResponse, AssistantSession>
+ LIST_ASSISTANT_SESSIONS_PAGE_STR_DESC =
+ new PagedListDescriptor<
+ ListAssistantSessionsRequest, ListAssistantSessionsResponse, AssistantSession>() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListAssistantSessionsRequest injectToken(
+ ListAssistantSessionsRequest payload, String token) {
+ return ListAssistantSessionsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListAssistantSessionsRequest injectPageSize(
+ ListAssistantSessionsRequest payload, int pageSize) {
+ return ListAssistantSessionsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListAssistantSessionsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListAssistantSessionsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(
+ ListAssistantSessionsResponse payload) {
+ return payload.getAssistantSessionsList();
+ }
+ };
+
private static final PagedListDescriptor
LIST_LOCATIONS_PAGE_STR_DESC =
new PagedListDescriptor() {
@@ -169,6 +226,30 @@ public Iterable extractResources(ListLocationsResponse payload) {
}
};
+ private static final PagedListResponseFactory<
+ ListAssistantSessionsRequest,
+ ListAssistantSessionsResponse,
+ ListAssistantSessionsPagedResponse>
+ LIST_ASSISTANT_SESSIONS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListAssistantSessionsRequest,
+ ListAssistantSessionsResponse,
+ ListAssistantSessionsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListAssistantSessionsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext<
+ ListAssistantSessionsRequest, ListAssistantSessionsResponse, AssistantSession>
+ pageContext =
+ PageContext.create(
+ callable, LIST_ASSISTANT_SESSIONS_PAGE_STR_DESC, request, context);
+ return ListAssistantSessionsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
private static final PagedListResponseFactory<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
LIST_LOCATIONS_PAGE_STR_FACT =
@@ -186,20 +267,41 @@ public ApiFuture getFuturePagedResponse(
}
};
- /** Returns the object with the settings used for calls to sendMessage. */
- public UnaryCallSettings sendMessageSettings() {
- return sendMessageSettings;
+ /** Returns the object with the settings used for calls to listAssistantSessions. */
+ public PagedCallSettings<
+ ListAssistantSessionsRequest,
+ ListAssistantSessionsResponse,
+ ListAssistantSessionsPagedResponse>
+ listAssistantSessionsSettings() {
+ return listAssistantSessionsSettings;
}
- /** Returns the object with the settings used for calls to sendStreamingMessage. */
- public ServerStreamingCallSettings
- sendStreamingMessageSettings() {
- return sendStreamingMessageSettings;
+ /** Returns the object with the settings used for calls to getAssistantSession. */
+ public UnaryCallSettings
+ getAssistantSessionSettings() {
+ return getAssistantSessionSettings;
}
- /** Returns the object with the settings used for calls to getAgentCard. */
- public UnaryCallSettings getAgentCardSettings() {
- return getAgentCardSettings;
+ /** Returns the object with the settings used for calls to createAssistantSession. */
+ public UnaryCallSettings
+ createAssistantSessionSettings() {
+ return createAssistantSessionSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteAssistantSession. */
+ public UnaryCallSettings deleteAssistantSessionSettings() {
+ return deleteAssistantSessionSettings;
+ }
+
+ /** Returns the object with the settings used for calls to runAssistant. */
+ public UnaryCallSettings runAssistantSettings() {
+ return runAssistantSettings;
+ }
+
+ /** Returns the object with the settings used for calls to chatAiAssistant. */
+ public UnaryCallSettings
+ chatAiAssistantSettings() {
+ return chatAiAssistantSettings;
}
/** Returns the object with the settings used for calls to listLocations. */
@@ -213,16 +315,16 @@ public UnaryCallSettings getLocationSettings() {
return getLocationSettings;
}
- public DataA2AServiceStub createStub() throws IOException {
+ public AssistantServiceStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
.equals(GrpcTransportChannel.getGrpcTransportName())) {
- return GrpcDataA2AServiceStub.create(this);
+ return GrpcAssistantServiceStub.create(this);
}
if (getTransportChannelProvider()
.getTransportName()
.equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
- return HttpJsonDataA2AServiceStub.create(this);
+ return HttpJsonAssistantServiceStub.create(this);
}
throw new UnsupportedOperationException(
String.format(
@@ -232,7 +334,7 @@ public DataA2AServiceStub createStub() throws IOException {
/** Returns the default service name. */
@Override
public String getServiceName() {
- return "geminidataanalytics";
+ return "ces";
}
/** Returns a builder for the default ExecutorProvider for this service. */
@@ -243,12 +345,12 @@ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuild
/** Returns the default service endpoint. */
@ObsoleteApi("Use getEndpoint() instead")
public static String getDefaultEndpoint() {
- return "geminidataanalytics.googleapis.com:443";
+ return "ces.googleapis.com:443";
}
/** Returns the default mTLS service endpoint. */
public static String getDefaultMtlsEndpoint() {
- return "geminidataanalytics.mtls.googleapis.com:443";
+ return "ces.mtls.googleapis.com:443";
}
/** Returns the default service scopes. */
@@ -283,7 +385,7 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
- "gapic", GaxProperties.getLibraryVersion(DataA2AServiceStubSettings.class))
+ "gapic", GaxProperties.getLibraryVersion(AssistantServiceStubSettings.class))
.setTransportToken(
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
@@ -291,14 +393,14 @@ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProvider
public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
- "gapic", GaxProperties.getLibraryVersion(DataA2AServiceStubSettings.class))
+ "gapic", GaxProperties.getLibraryVersion(AssistantServiceStubSettings.class))
.setTransportToken(
GaxHttpJsonProperties.getHttpJsonTokenName(),
GaxHttpJsonProperties.getHttpJsonVersion());
}
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
- return DataA2AServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
+ return AssistantServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
}
/** Returns a new gRPC builder for this class. */
@@ -321,12 +423,15 @@ public Builder toBuilder() {
return new Builder(this);
}
- protected DataA2AServiceStubSettings(Builder settingsBuilder) throws IOException {
+ protected AssistantServiceStubSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
- sendMessageSettings = settingsBuilder.sendMessageSettings().build();
- sendStreamingMessageSettings = settingsBuilder.sendStreamingMessageSettings().build();
- getAgentCardSettings = settingsBuilder.getAgentCardSettings().build();
+ listAssistantSessionsSettings = settingsBuilder.listAssistantSessionsSettings().build();
+ getAssistantSessionSettings = settingsBuilder.getAssistantSessionSettings().build();
+ createAssistantSessionSettings = settingsBuilder.createAssistantSessionSettings().build();
+ deleteAssistantSessionSettings = settingsBuilder.deleteAssistantSessionSettings().build();
+ runAssistantSettings = settingsBuilder.runAssistantSettings().build();
+ chatAiAssistantSettings = settingsBuilder.chatAiAssistantSettings().build();
listLocationsSettings = settingsBuilder.listLocationsSettings().build();
getLocationSettings = settingsBuilder.getLocationSettings().build();
}
@@ -334,20 +439,30 @@ protected DataA2AServiceStubSettings(Builder settingsBuilder) throws IOException
@Override
protected LibraryMetadata getLibraryMetadata() {
return LibraryMetadata.newBuilder()
- .setArtifactName("com.google.cloud:google-cloud-geminidataanalytics")
+ .setArtifactName("com.google.cloud:google-cloud-ces")
.setRepository("googleapis/google-cloud-java")
.setVersion(Version.VERSION)
.build();
}
- /** Builder for DataA2AServiceStubSettings. */
- public static class Builder extends StubSettings.Builder {
+ /** Builder for AssistantServiceStubSettings. */
+ public static class Builder extends StubSettings.Builder {
private final ImmutableList> unaryMethodSettingsBuilders;
- private final UnaryCallSettings.Builder
- sendMessageSettings;
- private final ServerStreamingCallSettings.Builder
- sendStreamingMessageSettings;
- private final UnaryCallSettings.Builder getAgentCardSettings;
+ private final PagedCallSettings.Builder<
+ ListAssistantSessionsRequest,
+ ListAssistantSessionsResponse,
+ ListAssistantSessionsPagedResponse>
+ listAssistantSessionsSettings;
+ private final UnaryCallSettings.Builder
+ getAssistantSessionSettings;
+ private final UnaryCallSettings.Builder
+ createAssistantSessionSettings;
+ private final UnaryCallSettings.Builder
+ deleteAssistantSessionSettings;
+ private final UnaryCallSettings.Builder
+ runAssistantSettings;
+ private final UnaryCallSettings.Builder
+ chatAiAssistantSettings;
private final PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
@@ -360,7 +475,14 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE)));
+ ImmutableSet.copyOf(
+ Lists.newArrayList(
+ StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+ definitions.put(
+ "retry_policy_3_codes",
+ ImmutableSet.copyOf(
+ Lists.newArrayList(
+ StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}
@@ -371,15 +493,26 @@ public static class Builder extends StubSettings.Builder>of(
- sendMessageSettings,
- getAgentCardSettings,
+ listAssistantSessionsSettings,
+ getAssistantSessionSettings,
+ createAssistantSessionSettings,
+ deleteAssistantSessionSettings,
+ runAssistantSettings,
+ chatAiAssistantSettings,
listLocationsSettings,
getLocationSettings);
initDefaults(this);
}
- protected Builder(DataA2AServiceStubSettings settings) {
+ protected Builder(AssistantServiceStubSettings settings) {
super(settings);
- sendMessageSettings = settings.sendMessageSettings.toBuilder();
- sendStreamingMessageSettings = settings.sendStreamingMessageSettings.toBuilder();
- getAgentCardSettings = settings.getAgentCardSettings.toBuilder();
+ listAssistantSessionsSettings = settings.listAssistantSessionsSettings.toBuilder();
+ getAssistantSessionSettings = settings.getAssistantSessionSettings.toBuilder();
+ createAssistantSessionSettings = settings.createAssistantSessionSettings.toBuilder();
+ deleteAssistantSessionSettings = settings.deleteAssistantSessionSettings.toBuilder();
+ runAssistantSettings = settings.runAssistantSettings.toBuilder();
+ chatAiAssistantSettings = settings.chatAiAssistantSettings.toBuilder();
listLocationsSettings = settings.listLocationsSettings.toBuilder();
getLocationSettings = settings.getLocationSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
- sendMessageSettings,
- getAgentCardSettings,
+ listAssistantSessionsSettings,
+ getAssistantSessionSettings,
+ createAssistantSessionSettings,
+ deleteAssistantSessionSettings,
+ runAssistantSettings,
+ chatAiAssistantSettings,
listLocationsSettings,
getLocationSettings);
}
@@ -448,20 +596,35 @@ private static Builder createHttpJsonDefault() {
private static Builder initDefaults(Builder builder) {
builder
- .sendMessageSettings()
+ .listAssistantSessionsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .getAssistantSessionSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .createAssistantSessionSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
- .sendStreamingMessageSettings()
+ .deleteAssistantSessionSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
builder
- .getAgentCardSettings()
+ .runAssistantSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+ builder
+ .chatAiAssistantSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params"));
+
builder
.listLocationsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
@@ -490,21 +653,43 @@ public Builder applyToAllUnaryMethods(
return unaryMethodSettingsBuilders;
}
- /** Returns the builder for the settings used for calls to sendMessage. */
- public UnaryCallSettings.Builder
- sendMessageSettings() {
- return sendMessageSettings;
+ /** Returns the builder for the settings used for calls to listAssistantSessions. */
+ public PagedCallSettings.Builder<
+ ListAssistantSessionsRequest,
+ ListAssistantSessionsResponse,
+ ListAssistantSessionsPagedResponse>
+ listAssistantSessionsSettings() {
+ return listAssistantSessionsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getAssistantSession. */
+ public UnaryCallSettings.Builder
+ getAssistantSessionSettings() {
+ return getAssistantSessionSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to createAssistantSession. */
+ public UnaryCallSettings.Builder
+ createAssistantSessionSettings() {
+ return createAssistantSessionSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAssistantSession. */
+ public UnaryCallSettings.Builder
+ deleteAssistantSessionSettings() {
+ return deleteAssistantSessionSettings;
}
- /** Returns the builder for the settings used for calls to sendStreamingMessage. */
- public ServerStreamingCallSettings.Builder
- sendStreamingMessageSettings() {
- return sendStreamingMessageSettings;
+ /** Returns the builder for the settings used for calls to runAssistant. */
+ public UnaryCallSettings.Builder
+ runAssistantSettings() {
+ return runAssistantSettings;
}
- /** Returns the builder for the settings used for calls to getAgentCard. */
- public UnaryCallSettings.Builder getAgentCardSettings() {
- return getAgentCardSettings;
+ /** Returns the builder for the settings used for calls to chatAiAssistant. */
+ public UnaryCallSettings.Builder
+ chatAiAssistantSettings() {
+ return chatAiAssistantSettings;
}
/** Returns the builder for the settings used for calls to listLocations. */
@@ -520,8 +705,8 @@ public UnaryCallSettings.Builder getLocationSettin
}
@Override
- public DataA2AServiceStubSettings build() throws IOException {
- return new DataA2AServiceStubSettings(this);
+ public AssistantServiceStubSettings build() throws IOException {
+ return new AssistantServiceStubSettings(this);
}
}
}
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAgentServiceStub.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAgentServiceStub.java
index f3a01ce1b74b..f934677dabe8 100644
--- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAgentServiceStub.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAgentServiceStub.java
@@ -110,6 +110,7 @@
import com.google.cloud.ces.v1beta.Toolset;
import com.google.cloud.ces.v1beta.UpdateAgentRequest;
import com.google.cloud.ces.v1beta.UpdateAppRequest;
+import com.google.cloud.ces.v1beta.UpdateAppVersionRequest;
import com.google.cloud.ces.v1beta.UpdateDeploymentRequest;
import com.google.cloud.ces.v1beta.UpdateExampleRequest;
import com.google.cloud.ces.v1beta.UpdateGuardrailRequest;
@@ -610,6 +611,17 @@ public class GrpcAgentServiceStub extends AgentServiceStub {
.setSampledToLocalTracing(true)
.build();
+ private static final MethodDescriptor
+ updateAppVersionMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.ces.v1beta.AgentService/UpdateAppVersion")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(UpdateAppVersionRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(AppVersion.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
private static final MethodDescriptor
deleteAppVersionMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -764,6 +776,7 @@ public class GrpcAgentServiceStub extends AgentServiceStub {
listAppVersionsPagedCallable;
private final UnaryCallable getAppVersionCallable;
private final UnaryCallable createAppVersionCallable;
+ private final UnaryCallable updateAppVersionCallable;
private final UnaryCallable deleteAppVersionCallable;
private final UnaryCallable restoreAppVersionCallable;
private final OperationCallable<
@@ -1333,6 +1346,17 @@ protected GrpcAgentServiceStub(
})
.setResourceNameExtractor(request -> request.getParent())
.build();
+ GrpcCallSettings updateAppVersionTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(updateAppVersionMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add(
+ "app_version.name", String.valueOf(request.getAppVersion().getName()));
+ return builder.build();
+ })
+ .build();
GrpcCallSettings deleteAppVersionTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(deleteAppVersionMethodDescriptor)
@@ -1617,6 +1641,9 @@ protected GrpcAgentServiceStub(
this.createAppVersionCallable =
callableFactory.createUnaryCallable(
createAppVersionTransportSettings, settings.createAppVersionSettings(), clientContext);
+ this.updateAppVersionCallable =
+ callableFactory.createUnaryCallable(
+ updateAppVersionTransportSettings, settings.updateAppVersionSettings(), clientContext);
this.deleteAppVersionCallable =
callableFactory.createUnaryCallable(
deleteAppVersionTransportSettings, settings.deleteAppVersionSettings(), clientContext);
@@ -1981,6 +2008,11 @@ public UnaryCallable createAppVersionCallab
return createAppVersionCallable;
}
+ @Override
+ public UnaryCallable updateAppVersionCallable() {
+ return updateAppVersionCallable;
+ }
+
@Override
public UnaryCallable deleteAppVersionCallable() {
return deleteAppVersionCallable;
diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1beta/stub/GrpcDataA2AServiceCallableFactory.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAssistantServiceCallableFactory.java
similarity index 95%
rename from java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1beta/stub/GrpcDataA2AServiceCallableFactory.java
rename to java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAssistantServiceCallableFactory.java
index a7efd0812237..56213f4f7b5c 100644
--- a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1beta/stub/GrpcDataA2AServiceCallableFactory.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAssistantServiceCallableFactory.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.google.cloud.geminidataanalytics.v1beta.stub;
+package com.google.cloud.ces.v1beta.stub;
import com.google.api.core.BetaApi;
import com.google.api.gax.grpc.GrpcCallSettings;
@@ -39,14 +39,14 @@
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
- * gRPC callable factory implementation for the DataA2AService service API.
+ * gRPC callable factory implementation for the AssistantService service API.
*
* This class is for advanced usage.
*/
@NullMarked
@BetaApi
@Generated("by gapic-generator-java")
-public class GrpcDataA2AServiceCallableFactory implements GrpcStubCallableFactory {
+public class GrpcAssistantServiceCallableFactory implements GrpcStubCallableFactory {
@Override
public UnaryCallable createUnaryCallable(
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAssistantServiceStub.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAssistantServiceStub.java
new file mode 100644
index 000000000000..5f02fd56f1f2
--- /dev/null
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcAssistantServiceStub.java
@@ -0,0 +1,443 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.ces.v1beta.stub;
+
+import static com.google.cloud.ces.v1beta.AssistantServiceClient.ListAssistantSessionsPagedResponse;
+import static com.google.cloud.ces.v1beta.AssistantServiceClient.ListLocationsPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.RequestParamsBuilder;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.ces.v1beta.AssistantSession;
+import com.google.cloud.ces.v1beta.ChatAiAssistantRequest;
+import com.google.cloud.ces.v1beta.ChatAiAssistantResponse;
+import com.google.cloud.ces.v1beta.CreateAssistantSessionRequest;
+import com.google.cloud.ces.v1beta.DeleteAssistantSessionRequest;
+import com.google.cloud.ces.v1beta.GetAssistantSessionRequest;
+import com.google.cloud.ces.v1beta.ListAssistantSessionsRequest;
+import com.google.cloud.ces.v1beta.ListAssistantSessionsResponse;
+import com.google.cloud.ces.v1beta.RunAssistantRequest;
+import com.google.cloud.ces.v1beta.RunAssistantResponse;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.longrunning.stub.GrpcOperationsStub;
+import com.google.protobuf.Empty;
+import io.grpc.MethodDescriptor;
+import io.grpc.protobuf.ProtoUtils;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC stub implementation for the AssistantService service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@BetaApi
+@Generated("by gapic-generator-java")
+public class GrpcAssistantServiceStub extends AssistantServiceStub {
+ private static final MethodDescriptor
+ listAssistantSessionsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.ces.v1beta.AssistantService/ListAssistantSessions")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListAssistantSessionsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListAssistantSessionsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ getAssistantSessionMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.ces.v1beta.AssistantService/GetAssistantSession")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetAssistantSessionRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(AssistantSession.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ createAssistantSessionMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.ces.v1beta.AssistantService/CreateAssistantSession")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(CreateAssistantSessionRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(AssistantSession.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ deleteAssistantSessionMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.ces.v1beta.AssistantService/DeleteAssistantSession")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(DeleteAssistantSessionRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ runAssistantMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.ces.v1beta.AssistantService/RunAssistant")
+ .setRequestMarshaller(ProtoUtils.marshaller(RunAssistantRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(RunAssistantResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ chatAiAssistantMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.ces.v1beta.AssistantService/ChatAiAssistant")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ChatAiAssistantRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ChatAiAssistantResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ listLocationsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/ListLocations")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor getLocationMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/GetLocation")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private final UnaryCallable
+ listAssistantSessionsCallable;
+ private final UnaryCallable
+ listAssistantSessionsPagedCallable;
+ private final UnaryCallable
+ getAssistantSessionCallable;
+ private final UnaryCallable
+ createAssistantSessionCallable;
+ private final UnaryCallable deleteAssistantSessionCallable;
+ private final UnaryCallable runAssistantCallable;
+ private final UnaryCallable
+ chatAiAssistantCallable;
+ private final UnaryCallable listLocationsCallable;
+ private final UnaryCallable
+ listLocationsPagedCallable;
+ private final UnaryCallable getLocationCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final GrpcOperationsStub operationsStub;
+ private final GrpcStubCallableFactory callableFactory;
+
+ public static final GrpcAssistantServiceStub create(AssistantServiceStubSettings settings)
+ throws IOException {
+ return new GrpcAssistantServiceStub(settings, ClientContext.create(settings));
+ }
+
+ public static final GrpcAssistantServiceStub create(ClientContext clientContext)
+ throws IOException {
+ return new GrpcAssistantServiceStub(
+ AssistantServiceStubSettings.newBuilder().build(), clientContext);
+ }
+
+ public static final GrpcAssistantServiceStub create(
+ ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException {
+ return new GrpcAssistantServiceStub(
+ AssistantServiceStubSettings.newBuilder().build(), clientContext, callableFactory);
+ }
+
+ /**
+ * Constructs an instance of GrpcAssistantServiceStub, 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 GrpcAssistantServiceStub(
+ AssistantServiceStubSettings settings, ClientContext clientContext) throws IOException {
+ this(settings, clientContext, new GrpcAssistantServiceCallableFactory());
+ }
+
+ /**
+ * Constructs an instance of GrpcAssistantServiceStub, 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 GrpcAssistantServiceStub(
+ AssistantServiceStubSettings settings,
+ ClientContext clientContext,
+ GrpcStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+ this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
+
+ GrpcCallSettings
+ listAssistantSessionsTransportSettings =
+ GrpcCallSettings
+ .newBuilder()
+ .setMethodDescriptor(listAssistantSessionsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getParent())
+ .build();
+ GrpcCallSettings
+ getAssistantSessionTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getAssistantSessionMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getName())
+ .build();
+ GrpcCallSettings
+ createAssistantSessionTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(createAssistantSessionMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getParent())
+ .build();
+ GrpcCallSettings deleteAssistantSessionTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deleteAssistantSessionMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getName())
+ .build();
+ GrpcCallSettings runAssistantTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(runAssistantMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("app", String.valueOf(request.getApp()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getApp())
+ .build();
+ GrpcCallSettings
+ chatAiAssistantTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(chatAiAssistantMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("app", String.valueOf(request.getApp()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getApp())
+ .build();
+ GrpcCallSettings listLocationsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listLocationsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings getLocationTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getLocationMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+
+ this.listAssistantSessionsCallable =
+ callableFactory.createUnaryCallable(
+ listAssistantSessionsTransportSettings,
+ settings.listAssistantSessionsSettings(),
+ clientContext);
+ this.listAssistantSessionsPagedCallable =
+ callableFactory.createPagedCallable(
+ listAssistantSessionsTransportSettings,
+ settings.listAssistantSessionsSettings(),
+ clientContext);
+ this.getAssistantSessionCallable =
+ callableFactory.createUnaryCallable(
+ getAssistantSessionTransportSettings,
+ settings.getAssistantSessionSettings(),
+ clientContext);
+ this.createAssistantSessionCallable =
+ callableFactory.createUnaryCallable(
+ createAssistantSessionTransportSettings,
+ settings.createAssistantSessionSettings(),
+ clientContext);
+ this.deleteAssistantSessionCallable =
+ callableFactory.createUnaryCallable(
+ deleteAssistantSessionTransportSettings,
+ settings.deleteAssistantSessionSettings(),
+ clientContext);
+ this.runAssistantCallable =
+ callableFactory.createUnaryCallable(
+ runAssistantTransportSettings, settings.runAssistantSettings(), clientContext);
+ this.chatAiAssistantCallable =
+ callableFactory.createUnaryCallable(
+ chatAiAssistantTransportSettings, settings.chatAiAssistantSettings(), clientContext);
+ this.listLocationsCallable =
+ callableFactory.createUnaryCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.listLocationsPagedCallable =
+ callableFactory.createPagedCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.getLocationCallable =
+ callableFactory.createUnaryCallable(
+ getLocationTransportSettings, settings.getLocationSettings(), clientContext);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ public GrpcOperationsStub getOperationsStub() {
+ return operationsStub;
+ }
+
+ @Override
+ public UnaryCallable
+ listAssistantSessionsCallable() {
+ return listAssistantSessionsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listAssistantSessionsPagedCallable() {
+ return listAssistantSessionsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getAssistantSessionCallable() {
+ return getAssistantSessionCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ createAssistantSessionCallable() {
+ return createAssistantSessionCallable;
+ }
+
+ @Override
+ public UnaryCallable deleteAssistantSessionCallable() {
+ return deleteAssistantSessionCallable;
+ }
+
+ @Override
+ public UnaryCallable runAssistantCallable() {
+ return runAssistantCallable;
+ }
+
+ @Override
+ public UnaryCallable chatAiAssistantCallable() {
+ return chatAiAssistantCallable;
+ }
+
+ @Override
+ public UnaryCallable listLocationsCallable() {
+ return listLocationsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ return listLocationsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getLocationCallable() {
+ return getLocationCallable;
+ }
+
+ @Override
+ public final void close() {
+ try {
+ backgroundResources.close();
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new IllegalStateException("Failed to close resource", e);
+ }
+ }
+
+ @Override
+ public void shutdown() {
+ backgroundResources.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return backgroundResources.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return backgroundResources.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ backgroundResources.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return backgroundResources.awaitTermination(duration, unit);
+ }
+}
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcSessionServiceStub.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcSessionServiceStub.java
index 18e530bc749d..83b3b3c0bfa8 100644
--- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcSessionServiceStub.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/GrpcSessionServiceStub.java
@@ -31,8 +31,14 @@
import com.google.api.pathtemplate.PathTemplate;
import com.google.cloud.ces.v1beta.BidiSessionClientMessage;
import com.google.cloud.ces.v1beta.BidiSessionServerMessage;
+import com.google.cloud.ces.v1beta.CancelAssistantTurnRequest;
+import com.google.cloud.ces.v1beta.CancelAssistantTurnResponse;
+import com.google.cloud.ces.v1beta.GenerateOnboardingSuggestionsRequest;
+import com.google.cloud.ces.v1beta.GenerateOnboardingSuggestionsResponse;
import com.google.cloud.ces.v1beta.RunSessionRequest;
import com.google.cloud.ces.v1beta.RunSessionResponse;
+import com.google.cloud.ces.v1beta.StreamChatAiAssistantRequest;
+import com.google.cloud.ces.v1beta.StreamChatAiAssistantResponse;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
@@ -87,6 +93,46 @@ public class GrpcSessionServiceStub extends SessionServiceStub {
.setSampledToLocalTracing(true)
.build();
+ private static final MethodDescriptor
+ streamChatAiAssistantMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.SERVER_STREAMING)
+ .setFullMethodName("google.cloud.ces.v1beta.SessionService/StreamChatAiAssistant")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(StreamChatAiAssistantRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(StreamChatAiAssistantResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor
+ cancelAssistantTurnMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.ces.v1beta.SessionService/CancelAssistantTurn")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(CancelAssistantTurnRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(CancelAssistantTurnResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
+ private static final MethodDescriptor<
+ GenerateOnboardingSuggestionsRequest, GenerateOnboardingSuggestionsResponse>
+ generateOnboardingSuggestionsMethodDescriptor =
+ MethodDescriptor
+ .
+ newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.ces.v1beta.SessionService/GenerateOnboardingSuggestions")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GenerateOnboardingSuggestionsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(GenerateOnboardingSuggestionsResponse.getDefaultInstance()))
+ .setSampledToLocalTracing(true)
+ .build();
+
private static final MethodDescriptor
listLocationsMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -113,6 +159,13 @@ public class GrpcSessionServiceStub extends SessionServiceStub {
streamRunSessionCallable;
private final BidiStreamingCallable
bidiRunSessionCallable;
+ private final ServerStreamingCallable
+ streamChatAiAssistantCallable;
+ private final UnaryCallable
+ cancelAssistantTurnCallable;
+ private final UnaryCallable<
+ GenerateOnboardingSuggestionsRequest, GenerateOnboardingSuggestionsResponse>
+ generateOnboardingSuggestionsCallable;
private final UnaryCallable listLocationsCallable;
private final UnaryCallable
listLocationsPagedCallable;
@@ -201,6 +254,44 @@ protected GrpcSessionServiceStub(
return builder.build();
})
.build();
+ GrpcCallSettings
+ streamChatAiAssistantTransportSettings =
+ GrpcCallSettings
+ .newBuilder()
+ .setMethodDescriptor(streamChatAiAssistantMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getName())
+ .build();
+ GrpcCallSettings
+ cancelAssistantTurnTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(cancelAssistantTurnMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ generateOnboardingSuggestionsTransportSettings =
+ GrpcCallSettings
+ .
+ newBuilder()
+ .setMethodDescriptor(generateOnboardingSuggestionsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .setResourceNameExtractor(request -> request.getName())
+ .build();
GrpcCallSettings listLocationsTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listLocationsMethodDescriptor)
@@ -231,6 +322,21 @@ protected GrpcSessionServiceStub(
this.bidiRunSessionCallable =
callableFactory.createBidiStreamingCallable(
bidiRunSessionTransportSettings, settings.bidiRunSessionSettings(), clientContext);
+ this.streamChatAiAssistantCallable =
+ callableFactory.createServerStreamingCallable(
+ streamChatAiAssistantTransportSettings,
+ settings.streamChatAiAssistantSettings(),
+ clientContext);
+ this.cancelAssistantTurnCallable =
+ callableFactory.createUnaryCallable(
+ cancelAssistantTurnTransportSettings,
+ settings.cancelAssistantTurnSettings(),
+ clientContext);
+ this.generateOnboardingSuggestionsCallable =
+ callableFactory.createUnaryCallable(
+ generateOnboardingSuggestionsTransportSettings,
+ settings.generateOnboardingSuggestionsSettings(),
+ clientContext);
this.listLocationsCallable =
callableFactory.createUnaryCallable(
listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
@@ -265,6 +371,24 @@ public ServerStreamingCallable streamRunS
return bidiRunSessionCallable;
}
+ @Override
+ public ServerStreamingCallable
+ streamChatAiAssistantCallable() {
+ return streamChatAiAssistantCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ cancelAssistantTurnCallable() {
+ return cancelAssistantTurnCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ generateOnboardingSuggestionsCallable() {
+ return generateOnboardingSuggestionsCallable;
+ }
+
@Override
public UnaryCallable listLocationsCallable() {
return listLocationsCallable;
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAgentServiceStub.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAgentServiceStub.java
index e45237eb31dd..fb2dec0228b8 100644
--- a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAgentServiceStub.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAgentServiceStub.java
@@ -118,6 +118,7 @@
import com.google.cloud.ces.v1beta.Toolset;
import com.google.cloud.ces.v1beta.UpdateAgentRequest;
import com.google.cloud.ces.v1beta.UpdateAppRequest;
+import com.google.cloud.ces.v1beta.UpdateAppVersionRequest;
import com.google.cloud.ces.v1beta.UpdateDeploymentRequest;
import com.google.cloud.ces.v1beta.UpdateExampleRequest;
import com.google.cloud.ces.v1beta.UpdateGuardrailRequest;
@@ -1851,6 +1852,45 @@ public class HttpJsonAgentServiceStub extends AgentServiceStub {
.build())
.build();
+ private static final ApiMethodDescriptor
+ updateAppVersionMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.ces.v1beta.AgentService/UpdateAppVersion")
+ .setHttpMethod("PATCH")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1beta/{appVersion.name=projects/*/locations/*/apps/*/versions/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(
+ fields, "appVersion.name", request.getAppVersion().getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "updateMask", request.getUpdateMask());
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("appVersion", request.getAppVersion(), true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(AppVersion.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
private static final ApiMethodDescriptor
deleteAppVersionMethodDescriptor =
ApiMethodDescriptor.newBuilder()
@@ -2184,6 +2224,7 @@ public class HttpJsonAgentServiceStub extends AgentServiceStub {
listAppVersionsPagedCallable;
private final UnaryCallable getAppVersionCallable;
private final UnaryCallable createAppVersionCallable;
+ private final UnaryCallable updateAppVersionCallable;
private final UnaryCallable deleteAppVersionCallable;
private final UnaryCallable restoreAppVersionCallable;
private final OperationCallable<
@@ -2827,6 +2868,18 @@ protected HttpJsonAgentServiceStub(
})
.setResourceNameExtractor(request -> request.getParent())
.build();
+ HttpJsonCallSettings updateAppVersionTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(updateAppVersionMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add(
+ "app_version.name", String.valueOf(request.getAppVersion().getName()));
+ return builder.build();
+ })
+ .build();
HttpJsonCallSettings deleteAppVersionTransportSettings =
HttpJsonCallSettings.newBuilder()
.setMethodDescriptor(deleteAppVersionMethodDescriptor)
@@ -3120,6 +3173,9 @@ protected HttpJsonAgentServiceStub(
this.createAppVersionCallable =
callableFactory.createUnaryCallable(
createAppVersionTransportSettings, settings.createAppVersionSettings(), clientContext);
+ this.updateAppVersionCallable =
+ callableFactory.createUnaryCallable(
+ updateAppVersionTransportSettings, settings.updateAppVersionSettings(), clientContext);
this.deleteAppVersionCallable =
callableFactory.createUnaryCallable(
deleteAppVersionTransportSettings, settings.deleteAppVersionSettings(), clientContext);
@@ -3217,6 +3273,7 @@ public static List getMethodDescriptors() {
methodDescriptors.add(listAppVersionsMethodDescriptor);
methodDescriptors.add(getAppVersionMethodDescriptor);
methodDescriptors.add(createAppVersionMethodDescriptor);
+ methodDescriptors.add(updateAppVersionMethodDescriptor);
methodDescriptors.add(deleteAppVersionMethodDescriptor);
methodDescriptors.add(restoreAppVersionMethodDescriptor);
methodDescriptors.add(generateAppResourceMethodDescriptor);
@@ -3543,6 +3600,11 @@ public UnaryCallable createAppVersionCallab
return createAppVersionCallable;
}
+ @Override
+ public UnaryCallable updateAppVersionCallable() {
+ return updateAppVersionCallable;
+ }
+
@Override
public UnaryCallable deleteAppVersionCallable() {
return deleteAppVersionCallable;
diff --git a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1beta/stub/HttpJsonDataA2AServiceCallableFactory.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAssistantServiceCallableFactory.java
similarity index 95%
rename from java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1beta/stub/HttpJsonDataA2AServiceCallableFactory.java
rename to java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAssistantServiceCallableFactory.java
index bd195bb8c0b2..ee8bab260b6f 100644
--- a/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1beta/stub/HttpJsonDataA2AServiceCallableFactory.java
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAssistantServiceCallableFactory.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.google.cloud.geminidataanalytics.v1beta.stub;
+package com.google.cloud.ces.v1beta.stub;
import com.google.api.core.BetaApi;
import com.google.api.gax.httpjson.HttpJsonCallSettings;
@@ -37,14 +37,14 @@
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
- * REST callable factory implementation for the DataA2AService service API.
+ * REST callable factory implementation for the AssistantService service API.
*
* This class is for advanced usage.
*/
@NullMarked
@BetaApi
@Generated("by gapic-generator-java")
-public class HttpJsonDataA2AServiceCallableFactory
+public class HttpJsonAssistantServiceCallableFactory
implements HttpJsonStubCallableFactory {
@Override
diff --git a/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAssistantServiceStub.java b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAssistantServiceStub.java
new file mode 100644
index 000000000000..0988565e2310
--- /dev/null
+++ b/java-ces/google-cloud-ces/src/main/java/com/google/cloud/ces/v1beta/stub/HttpJsonAssistantServiceStub.java
@@ -0,0 +1,667 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.ces.v1beta.stub;
+
+import static com.google.cloud.ces.v1beta.AssistantServiceClient.ListAssistantSessionsPagedResponse;
+import static com.google.cloud.ces.v1beta.AssistantServiceClient.ListLocationsPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.httpjson.ApiMethodDescriptor;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
+import com.google.api.gax.httpjson.ProtoMessageResponseParser;
+import com.google.api.gax.httpjson.ProtoRestSerializer;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.RequestParamsBuilder;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.ces.v1beta.AssistantSession;
+import com.google.cloud.ces.v1beta.ChatAiAssistantRequest;
+import com.google.cloud.ces.v1beta.ChatAiAssistantResponse;
+import com.google.cloud.ces.v1beta.CreateAssistantSessionRequest;
+import com.google.cloud.ces.v1beta.DeleteAssistantSessionRequest;
+import com.google.cloud.ces.v1beta.GetAssistantSessionRequest;
+import com.google.cloud.ces.v1beta.ListAssistantSessionsRequest;
+import com.google.cloud.ces.v1beta.ListAssistantSessionsResponse;
+import com.google.cloud.ces.v1beta.RunAssistantRequest;
+import com.google.cloud.ces.v1beta.RunAssistantResponse;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.protobuf.Empty;
+import com.google.protobuf.TypeRegistry;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST stub implementation for the AssistantService service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@BetaApi
+@Generated("by gapic-generator-java")
+public class HttpJsonAssistantServiceStub extends AssistantServiceStub {
+ private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();
+
+ private static final ApiMethodDescriptor<
+ ListAssistantSessionsRequest, ListAssistantSessionsResponse>
+ listAssistantSessionsMethodDescriptor =
+ ApiMethodDescriptor
+ .newBuilder()
+ .setFullMethodName("google.cloud.ces.v1beta.AssistantService/ListAssistantSessions")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1beta/{parent=projects/*/locations/*/apps/*}/assistantSessions",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "filter", request.getFilter());
+ serializer.putQueryParam(fields, "pageSize", request.getPageSize());
+ serializer.putQueryParam(fields, "pageToken", request.getPageToken());
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListAssistantSessionsResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getAssistantSessionMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.ces.v1beta.AssistantService/GetAssistantSession")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1beta/{name=projects/*/locations/*/apps/*/assistantSessions/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(AssistantSession.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ createAssistantSessionMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.ces.v1beta.AssistantService/CreateAssistantSession")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1beta/{parent=projects/*/locations/*/apps/*}/assistantSessions",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("*", request.toBuilder().clearParent().build(), true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(AssistantSession.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ deleteAssistantSessionMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.ces.v1beta.AssistantService/DeleteAssistantSession")
+ .setHttpMethod("DELETE")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1beta/{name=projects/*/locations/*/apps/*/assistantSessions/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Empty.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ runAssistantMethodDescriptor =
+ ApiMethodDescriptor. |