googleapis/google/cloud/ces/v1beta/widget_service.proto
Google APIs 83e03cdad2 feat: update public libraries for CES v1beta
docs: A comment for field `fallback_action` in message `.google.cloud.ces.v1beta.LanguageSettings` is changed
docs: A comment for enum value `ERROR_HANDLING_STRATEGY_UNSPECIFIED` in enum `ErrorHandlingStrategy` is changed
docs: A comment for enum value `FALLBACK_RESPONSE` in enum `ErrorHandlingStrategy` is changed
docs: A comment for field `project` in message `.google.cloud.ces.v1beta.BigQueryExportSettings` is changed
docs: A comment for field `dataset` in message `.google.cloud.ces.v1beta.BigQueryExportSettings` is changed
docs: A comment for message `RunEvaluationOperationMetadata` is changed
docs: A comment for method `RunSession` in service `SessionService` is changed

PiperOrigin-RevId: 886993231
2026-03-20 15:08:30 -07:00

82 lines
3 KiB
Protocol Buffer

// 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
//
// http://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.
syntax = "proto3";
package google.cloud.ces.v1beta;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/timestamp.proto";
option go_package = "cloud.google.com/go/ces/apiv1beta/cespb;cespb";
option java_multiple_files = true;
option java_outer_classname = "WidgetServiceProto";
option java_package = "com.google.cloud.ces.v1beta";
// Provides APIs for widgets to interact with CES APIs.
service WidgetService {
option (google.api.default_host) = "ces.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/ces,"
"https://www.googleapis.com/auth/cloud-platform";
// Generates a session scoped token for chat widget to authenticate with
// Session APIs.
rpc GenerateChatToken(GenerateChatTokenRequest)
returns (GenerateChatTokenResponse) {
option (google.api.http) = {
post: "/v1beta/{name=projects/*/locations/*/apps/*/sessions/*}:generateChatToken"
body: "*"
};
}
}
// Request message for
// [WidgetService.GenerateChatToken][google.cloud.ces.v1beta.WidgetService.GenerateChatToken].
message GenerateChatTokenRequest {
// Required. The session name to generate the chat token for.
// Format:
// projects/{project}/locations/{location}/apps/{app}/sessions/{session}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { type: "ces.googleapis.com/Session" }
];
// Required. The deployment of the app to use for the session.
// Format:
// projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}
string deployment = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { type: "ces.googleapis.com/Deployment" }
];
// Optional. The reCAPTCHA token generated by the client-side chat widget.
string recaptcha_token = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. Indicates if live handoff is enabled for the session.
bool live_handoff_enabled = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Response message for
// [WidgetService.GenerateChatToken][google.cloud.ces.v1beta.WidgetService.GenerateChatToken].
message GenerateChatTokenResponse {
// The session scoped token for chat widget to authenticate with Session APIs.
string chat_token = 1;
// The time at which the chat token expires.
google.protobuf.Timestamp expire_time = 2;
}