diff --git a/packages/google-cloud-ces/README.md b/packages/google-cloud-ces/README.md index 35917d44cbd..12ad043a3e3 100644 --- a/packages/google-cloud-ces/README.md +++ b/packages/google-cloud-ces/README.md @@ -107,6 +107,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | update toolset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1/agent_service.update_toolset.js) | | bidi run session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1/session_service.bidi_run_session.js) | | run session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1/session_service.run_session.js) | +| stream run session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1/session_service.stream_run_session.js) | | cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1/snippet_metadata_google.cloud.ces.v1.json) | | execute tool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1/tool_service.execute_tool.js) | | retrieve tool schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1/tool_service.retrieve_tool_schema.js) | @@ -195,6 +196,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | upload evaluation audio | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/evaluation_service.upload_evaluation_audio.js) | | bidi run session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/session_service.bidi_run_session.js) | | run session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/session_service.run_session.js) | +| stream run session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/session_service.stream_run_session.js) | | cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/snippet_metadata_google.cloud.ces.v1beta.json) | | execute tool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/tool_service.execute_tool.js) | | retrieve tool schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-ces/samples/generated/v1beta/tool_service.retrieve_tool_schema.js) | diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/agent_service.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/agent_service.proto index 71912ad2380..1543fbd2169 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1/agent_service.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/agent_service.proto @@ -628,6 +628,14 @@ message ExportAppRequest { // app. The format of this URI must be `gs:///`. The // exported app archive will be written directly to the specified GCS object. string gcs_uri = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource name of the app version to export. + // Format: + // `projects/{project}/locations/{location}/apps/{app}/versions/{version}`. + string app_version = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "ces.googleapis.com/AppVersion" } + ]; } // Response message for diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/agent_tool.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/agent_tool.proto new file mode 100644 index 00000000000..48cd124397f --- /dev/null +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/agent_tool.proto @@ -0,0 +1,41 @@ +// 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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "cloud.google.com/go/ces/apiv1/cespb;cespb"; +option java_multiple_files = true; +option java_outer_classname = "AgentToolProto"; +option java_package = "com.google.cloud.ces.v1"; + +// Represents a tool that allows the agent to call another agent. +message AgentTool { + // Required. The name of the agent tool. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description of the tool's purpose. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource name of the root agent that is the entry point of + // the tool. Format: `projects/{project}/locations/{location}/agents/{agent}` + string root_agent = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "ces.googleapis.com/Agent" } + ]; +} diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/app.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/app.proto index c62fd0194a7..6f76428e517 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1/app.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/app.proto @@ -122,6 +122,10 @@ message App { // Optional. Logging settings of the app. LoggingSettings logging_settings = 8 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Error handling settings of the app. + ErrorHandlingSettings error_handling_settings = 34 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. The default LLM model settings for the app. // Individual resources (e.g. agents, guardrails) can override these // configurations as needed. @@ -216,8 +220,11 @@ message LanguageSettings { // pre-built instructions to improve handling of multilingual input. bool enable_multilingual_support = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The action to perform when an agent receives input in an - // unsupported language. + // Optional. Deprecated: This feature is no longer supported. Use + // `enable_multilingual_support` instead to improve handling of multilingual + // input. + // The action to perform when an agent receives input in an unsupported + // language. // // This can be a predefined action or a custom tool call. // Valid values are: @@ -226,7 +233,8 @@ message LanguageSettings { // an [EndSession][google.cloud.ces.v1.EndSession] signal with corresponding // [metadata][google.cloud.ces.v1.EndSession.metadata] to terminate the // conversation. - string fallback_action = 4 [(google.api.field_behavior) = OPTIONAL]; + string fallback_action = 4 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; } // Configuration for how the input and output audio should be processed and @@ -402,6 +410,30 @@ message LoggingSettings { [(google.api.field_behavior) = OPTIONAL]; } +// Settings to describe how errors should be handled in the app. +message ErrorHandlingSettings { + // Defines the strategy for handling errors. + enum ErrorHandlingStrategy { + // Unspecified error handling strategy. + ERROR_HANDLING_STRATEGY_UNSPECIFIED = 0; + + // No specific handling is enabled. + NONE = 1; + + // A fallback message will be returned to the user in case of + // system errors (e.g. LLM errors). + FALLBACK_RESPONSE = 2; + + // An [EndSession][google.cloud.ces.v1.EndSession] signal will be emitted in + // case of system errors (e.g. LLM errors). + END_SESSION = 3; + } + + // Optional. The strategy to use for error handling. + ErrorHandlingStrategy error_handling_strategy = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + // Threshold settings for metrics in an Evaluation. message EvaluationMetricsThresholds { // Settings for golden evaluations. diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/bigquery_export.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/bigquery_export.proto index dd9e7cc1f71..982d8722668 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1/bigquery_export.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/bigquery_export.proto @@ -28,13 +28,13 @@ message BigQueryExportSettings { // Optional. Indicates whether the BigQuery export is enabled. bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The project ID of the BigQuery dataset to export the data to. + // Optional. The **project ID** of the BigQuery dataset to export the data to. // // Note: If the BigQuery dataset is in a different project from the app, // you should grant `roles/bigquery.admin` role to the CES service agent // `service-@gcp-sa-ces.iam.gserviceaccount.com`. string project = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The BigQuery dataset to export the data to. + // Optional. The BigQuery **dataset ID** to export the data to. string dataset = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/common.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/common.proto index c5e638848cd..c4c28e1d408 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1/common.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/common.proto @@ -148,11 +148,14 @@ message TlsConfig { // is empty or unspecified, CES will use Google's default trust // store to verify certificates. N.B. Make sure the HTTPS server // certificates are signed with "subject alt name". For instance a - // certificate can be self-signed using the following command, + // certificate can be self-signed using the following command: + // + // ``` // openssl x509 -req -days 200 -in example.com.csr \ // -signkey example.com.key \ // -out example.com.crt \ // -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + // ``` bytes cert = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -239,6 +242,9 @@ message ChannelProfile { // Widget supports only chat input. CHAT_ONLY = 3; + + // Widget supports chat, voice, and video input. + CHAT_VOICE_AND_VIDEO = 4; } // Theme of the web widget. @@ -289,6 +295,9 @@ message ChannelProfile { // Five9 channel. FIVE9 = 7; + + // Third party contact center integration channel. + CONTACT_CENTER_INTEGRATION = 8; } // Optional. The unique identifier of the channel profile. diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/deployment.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/deployment.proto index 0edb8ebdb68..61d238e175d 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1/deployment.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/deployment.proto @@ -38,17 +38,19 @@ message Deployment { // Identifier. The resource name of the deployment. // Format: - // projects/{project}/locations/{location}/apps/{app}/deployments/{deployment} + // `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Required. Display name of the deployment. string display_name = 8 [(google.api.field_behavior) = REQUIRED]; - // Required. The resource name of the app version to deploy. + // Optional. The resource name of the app version to deploy. // Format: - // projects/{project}/locations/{location}/apps/{app}/versions/{version} + // `projects/{project}/locations/{location}/apps/{app}/versions/{version}` + // Use `projects/{project}/locations/{location}/apps/{app}/versions/-` to use + // the draft app. string app_version = 2 [ - (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "ces.googleapis.com/AppVersion" } ]; diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/example.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/example.proto index 8f5097320f5..c658081ab05 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1/example.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/example.proto @@ -102,6 +102,9 @@ message Chunk { // Optional. Transcript associated with the audio. string transcript = 9 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Blob data. + Blob blob = 7 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Custom payload data. google.protobuf.Struct payload = 11 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/mcp_tool.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/mcp_tool.proto index fddc46e157e..03560357395 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1/mcp_tool.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/mcp_tool.proto @@ -66,4 +66,12 @@ message McpTool { // service names within a perimeter. ServiceDirectoryConfig service_directory_config = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The custom headers to send in the request to the MCP server. The + // values must be in the format `$context.variables.` and + // can be set in the session variables. See + // https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection + // for more details. + map custom_headers = 9 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/mcp_toolset.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/mcp_toolset.proto index 4f3e3ab8a52..77cec758d71 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1/mcp_toolset.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/mcp_toolset.proto @@ -51,4 +51,12 @@ message McpToolset { // Optional. The TLS configuration. Includes the custom server certificates // that the client should trust. TlsConfig tls_config = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The custom headers to send in the request to the MCP server. The + // values must be in the format `$context.variables.` and + // can be set in the session variables. See + // https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection + // for more details. + map custom_headers = 5 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/security_settings.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/security_settings.proto new file mode 100644 index 00000000000..c535d97dbbe --- /dev/null +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/security_settings.proto @@ -0,0 +1,85 @@ +// 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.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/ces/apiv1/cespb;cespb"; +option java_multiple_files = true; +option java_outer_classname = "SecuritySettingsProto"; +option java_package = "com.google.cloud.ces.v1"; + +// Project/Location level security settings for CES. +message SecuritySettings { + option (google.api.resource) = { + type: "ces.googleapis.com/SecuritySettings" + pattern: "projects/{project}/locations/{location}/securitySettings" + plural: "securitySettings" + singular: "securitySettings" + }; + + // Identifier. The unique identifier of the security settings. + // Format: `projects/{project}/locations/{location}/securitySettings` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. Endpoint control related settings. + EndpointControlPolicy endpoint_control_policy = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Create time of the security settings. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update time of the security settings. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Etag of the security settings. + string etag = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Defines project/location level endpoint control policy. +message EndpointControlPolicy { + // Defines the scope in which this policy's allowed_origins list is + // enforced. + enum EnforcementScope { + // Unspecified. This policy will be treated as VPCSC_ONLY. + ENFORCEMENT_SCOPE_UNSPECIFIED = 0; + + // This policy applies only when VPC-SC is active. + VPCSC_ONLY = 1; + + // This policy ALWAYS applies, regardless of VPC-SC status. + ALWAYS = 2; + } + + // Optional. The scope in which this policy's allowed_origins list is + // enforced. + EnforcementScope enforcement_scope = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The allowed HTTP(s) origins that tools in the App are able to + // directly call. The enforcement depends on the value of + // enforcement_scope and the VPC-SC status of the project. + // If a port number is not provided, all ports will be allowed. Otherwise, + // the port number must match exactly. For example, "https://example.com" + // will match "https://example.com:443" and any other port. + // "https://example.com:443" will only match "https://example.com:443". + repeated string allowed_origins = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/session_service.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/session_service.proto index 7804515b178..93e33a197f4 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1/session_service.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/session_service.proto @@ -41,8 +41,7 @@ service SessionService { "https://www.googleapis.com/auth/ces," "https://www.googleapis.com/auth/cloud-platform"; - // Initiates a single turn interaction with the CES agent within a - // session. + // Initiates a single-turn interaction with the CES agent within a session. rpc RunSession(RunSessionRequest) returns (RunSessionResponse) { option (google.api.http) = { post: "/v1/{config.session=projects/*/locations/*/apps/*/sessions/*}:runSession" @@ -50,6 +49,22 @@ service SessionService { }; } + // Initiates a single-turn interaction with the CES agent. Uses server-side + // streaming to deliver incremental results and partial responses as they are + // generated. + // + // By default, complete responses (e.g., messages from callbacks or full LLM + // responses) are sent to the client as soon as they are available. To enable + // streaming individual text chunks directly from the model, set + // [enable_text_streaming][google.cloud.ces.v1.SessionConfig.enable_text_streaming] + // to true. + rpc StreamRunSession(RunSessionRequest) returns (stream RunSessionResponse) { + option (google.api.http) = { + post: "/v1/{config.session=projects/*/locations/*/apps/*/sessions/*}:streamRunSession" + body: "*" + }; + } + // Establishes a bidirectional streaming connection with the CES agent. // The agent processes continuous multimodal inputs (e.g., text, audio) and // generates real-time multimodal output streams. @@ -205,7 +220,7 @@ message SessionConfig { // Optional. The entry agent to handle the session. If not specified, the // session will be handled by the [root // agent][google.cloud.ces.v1.App.root_agent] of the app. Format: - // `projects/{project}/locations/{location}/agents/{agent}` + // `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` string entry_agent = 12 [ (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "ces.googleapis.com/Agent" } @@ -224,6 +239,11 @@ message SessionConfig { // "America/Los_Angeles". string time_zone = 11 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Whether to use tool fakes for the session. + // If this field is set, the agent will attempt use tool fakes instead of + // calling the real tools. + bool use_tool_fakes = 14 [(google.api.field_behavior) = OPTIONAL]; + // Optional. // [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters) // to send to the remote @@ -231,6 +251,14 @@ message SessionConfig { // agent when the session control is transferred to the remote agent. RemoteDialogflowQueryParameters remote_dialogflow_query_parameters = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to enable streaming text outputs from the model. + // By default, text outputs from the model are collected before sending to the + // client. + // NOTE: This is only supported for text (non-voice) sessions via + // [StreamRunSession][google.cloud.ces.v1.SessionService.StreamRunSession] or + // [BidiRunSession][google.cloud.ces.v1.SessionService.BidiRunSession]. + bool enable_text_streaming = 18 [(google.api.field_behavior) = OPTIONAL]; } // Request for the client to execute the tools and return the execution results @@ -306,12 +334,14 @@ message SessionInput { } // Optional. A flag to indicate if the current message is a fragment of a - // larger input in the bidi streaming session. When `true`, the agent will - // defer processing until a subsequent message with `will_continue` set to - // `false` is received. + // larger input in the bidi streaming session. + // + // When set to `true`, the agent defers processing until it receives a + // subsequent message where `will_continue` is `false`, or until the system + // detects an endpoint in the audio input. // - // Note: This flag has no effect on audio and DTMF inputs, which are always - // processed in real-time. + // NOTE: This field does not apply to audio and DTMF inputs, as they are + // always processed automatically based on the endpointing signal. bool will_continue = 8 [(google.api.field_behavior) = OPTIONAL]; } @@ -442,7 +472,7 @@ message BidiSessionServerMessage { RecognitionResult recognition_result = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Interruption signal detected from the audio input. + // Optional. Indicates the agent's audio response has been interrupted. InterruptionSignal interruption_signal = 3 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/tool.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/tool.proto index 6b30a6d9263..5bb4821b91f 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1/tool.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/tool.proto @@ -18,6 +18,7 @@ package google.cloud.ces.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/ces/v1/agent_tool.proto"; import "google/cloud/ces/v1/client_function.proto"; import "google/cloud/ces/v1/common.proto"; import "google/cloud/ces/v1/connector_tool.proto"; @@ -80,18 +81,22 @@ message Tool { // Optional. The system tool. SystemTool system_tool = 18 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The agent tool. + AgentTool agent_tool = 23 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The widget tool. WidgetTool widget_tool = 24 [(google.api.field_behavior) = OPTIONAL]; } - // Identifier. The unique identifier of the tool. - // Format: - // - `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` for - // ## standalone tools. + // Identifier. The resource name of the tool. Format: + // + // * `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` + // for standalone tools. + // * `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}/tools/{tool}` + // for tools retrieved from a toolset. // - // `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}/tools/{tool}` - // for tools retrieved from a toolset. These tools are dynamic and - // output-only, they cannot be referenced directly where a tool is expected. + // These tools are dynamic and output-only; they cannot be referenced directly + // where a tool is expected. string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. The display name of the tool, derived based on the tool's diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/tool_service.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/tool_service.proto index 650c8f50cb4..b14807418ec 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1/tool_service.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/tool_service.proto @@ -83,6 +83,18 @@ message ExecuteToolRequest { ToolsetTool toolset_tool = 3 [(google.api.field_behavior) = OPTIONAL]; } + // Additional context to be provided for the tool execution + oneof tool_execution_context { + // Optional. The variables that are available for the tool execution. + google.protobuf.Struct variables = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The + // [ToolCallContext](https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/python#environment + // for details) to be passed to the Python tool. + google.protobuf.Struct context = 6 [(google.api.field_behavior) = OPTIONAL]; + } + // Required. The resource name of the app which the tool/toolset belongs to. // Format: `projects/{project}/locations/{location}/apps/{app}` string parent = 4 [ @@ -109,11 +121,14 @@ message ExecuteToolResponse { ToolsetTool toolset_tool = 3; } - // Required. The tool execution result in JSON object format. + // The tool execution result in JSON object format. // Use "output" key to specify tool response and "error" key to specify // error details (if any). If "output" and "error" keys are not specified, // then whole "response" is treated as tool execution result. - google.protobuf.Struct response = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Struct response = 2; + + // The variable values at the end of the tool execution. + google.protobuf.Struct variables = 4; } // Request message for @@ -158,11 +173,11 @@ message RetrieveToolSchemaResponse { ToolsetTool toolset_tool = 2; } - // Required. The schema of the tool input parameters. - Schema input_schema = 3 [(google.api.field_behavior) = REQUIRED]; + // The schema of the tool input parameters. + Schema input_schema = 3; - // Required. The schema of the tool output parameters. - Schema output_schema = 4 [(google.api.field_behavior) = REQUIRED]; + // The schema of the tool output parameters. + Schema output_schema = 4; } // Request message for @@ -184,6 +199,6 @@ message RetrieveToolsRequest { // Response message for // [ToolService.RetrieveTools][google.cloud.ces.v1.ToolService.RetrieveTools]. message RetrieveToolsResponse { - // Required. The list of tools that are included in the specified toolset. - repeated Tool tools = 1 [(google.api.field_behavior) = REQUIRED]; + // The list of tools that are included in the specified toolset. + repeated Tool tools = 1; } diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/widget_service.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/widget_service.proto index 2aba8953115..d4047c00907 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1/widget_service.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/widget_service.proto @@ -66,6 +66,9 @@ message GenerateChatTokenRequest { // 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 diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1/widget_tool.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1/widget_tool.proto index dff7057ab73..eaa4cfb384d 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1/widget_tool.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1/widget_tool.proto @@ -17,7 +17,9 @@ syntax = "proto3"; package google.cloud.ces.v1; import "google/api/field_behavior.proto"; +import "google/cloud/ces/v1/python_function.proto"; import "google/cloud/ces/v1/schema.proto"; +import "google/protobuf/struct.proto"; option go_package = "cloud.google.com/go/ces/apiv1/cespb;cespb"; option java_multiple_files = true; @@ -29,6 +31,42 @@ option java_package = "com.google.cloud.ces.v1"; // responsible for processing the widget and generating the next user query to // continue the interaction with the agent. message WidgetTool { + // Configuration for mapping data from a source tool to the widget's input + // parameters. + message DataMapping { + // The strategy used to map data from the source tool to the widget. + enum Mode { + // Unspecified mode. + MODE_UNSPECIFIED = 0; + + // Use the `field_mappings` map for data transformation. + FIELD_MAPPING = 1; + + // Use the `python_script` for data transformation. + PYTHON_SCRIPT = 2; + } + + // Optional. The resource name of the tool that provides the data for the + // widget (e.g., a search tool or a custom function). Format: + // `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}` + string source_tool_name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A map of widget input parameter fields to the corresponding + // output fields of the source tool. + map field_mappings = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for a Python function used to transform the + // source tool's output into the widget's input format. + PythonFunction python_function = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mode of the data mapping. + Mode mode = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Deprecated: Use `python_function` instead. + string python_script = 3 [deprecated = true]; + } + // All available widget types. // New values may be added to this enum in the future. enum WidgetType { @@ -64,6 +102,12 @@ message WidgetTool { // Appointment details widget. APPOINTMENT_DETAILS = 10; + + // Appointment scheduler widget. + APPOINTMENT_SCHEDULER = 11; + + // Contact form widget. + CONTACT_FORM = 12; } // The input of the widget tool. @@ -81,4 +125,11 @@ message WidgetTool { // Optional. The type of the widget tool. If not specified, the default type // will be CUSTOMIZED. WidgetType widget_type = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for rendering the widget. + google.protobuf.Struct ui_config = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mapping that defines how data from a source tool is mapped to + // the widget's input parameters. + DataMapping data_mapping = 6 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/agent_service.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/agent_service.proto index ad68fdbaa4f..db9661b816a 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/agent_service.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/agent_service.proto @@ -650,6 +650,14 @@ message ExportAppRequest { // app. The format of this URI must be `gs:///`. The // exported app archive will be written directly to the specified GCS object. string gcs_uri = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource name of the app version to export. + // Format: + // `projects/{project}/locations/{location}/apps/{app}/versions/{version}`. + string app_version = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "ces.googleapis.com/AppVersion" } + ]; } // Response message for @@ -1701,12 +1709,53 @@ message GenerateAppResourceResponse { // The app resources generated by the LLM assistant. AppResources app_resources = 7; + + // The quality report generated by the LLM assistant. + QualityReport quality_report = 8; } // Additional information about the generated result. GenerateResultInfo generate_result_info = 2; } +// The report describing any identified quality issues in the app. +message QualityReport { + // The issue identified. + message Issue { + // Optional. Description of the issue found. + string description = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. How many times this issue occurred. + int32 occurrence_count = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Proposed solution to fix the issue by modifying instructions or + // tools. + string proposed_solution = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Issues identified for a single agent. + message AgentIssues { + // Optional. The name of the agent to which the issues are related. + // Format: + // `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` + string agent = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of issues found for this agent. + repeated Issue issues = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The issues grouped by agent. + repeated AgentIssues issues = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of evaluation runs used to generate the quality report. + // Format: + // `projects/{project}/locations/{location}/evaluationRuns/{evaluationRun}`. + repeated string evaluation_runs = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. General issues not specific to any agent. + repeated Issue general_issues = 3 [(google.api.field_behavior) = OPTIONAL]; +} + // Request message for // [AgentService.ListChangelogs][google.cloud.ces.v1beta.AgentService.ListChangelogs]. message ListChangelogsRequest { diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/app.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/app.proto index be77bebe5eb..7ac3059788d 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/app.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/app.proto @@ -232,8 +232,11 @@ message LanguageSettings { // pre-built instructions to improve handling of multilingual input. bool enable_multilingual_support = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The action to perform when an agent receives input in an - // unsupported language. + // Optional. Deprecated: This feature is no longer supported. Use + // `enable_multilingual_support` instead to improve handling of multilingual + // input. + // The action to perform when an agent receives input in an unsupported + // language. // // This can be a predefined action or a custom tool call. // Valid values are: @@ -242,7 +245,8 @@ message LanguageSettings { // an [EndSession][google.cloud.ces.v1beta.EndSession] signal with // corresponding [metadata][google.cloud.ces.v1beta.EndSession.metadata] to // terminate the conversation. - string fallback_action = 4 [(google.api.field_behavior) = OPTIONAL]; + string fallback_action = 4 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; } // Configuration for how the input and output audio should be processed and @@ -422,15 +426,19 @@ message LoggingSettings { message ErrorHandlingSettings { // Defines the strategy for handling errors. enum ErrorHandlingStrategy { - // Unspecified error handling strategy. Defaults to FALLBACK_RESPONSE. + // Unspecified error handling strategy. ERROR_HANDLING_STRATEGY_UNSPECIFIED = 0; // No specific handling is enabled. NONE = 1; // A fallback message will be returned to the user in case of - // LLM errors. + // system errors (e.g. LLM errors). FALLBACK_RESPONSE = 2; + + // An [EndSession][google.cloud.ces.v1beta.EndSession] signal will be + // emitted in case of system errors (e.g. LLM errors). + END_SESSION = 3; } // Optional. The strategy to use for error handling. diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/bigquery_export.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/bigquery_export.proto index 62a99997f31..ed505b1d2cb 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/bigquery_export.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/bigquery_export.proto @@ -28,13 +28,13 @@ message BigQueryExportSettings { // Optional. Indicates whether the BigQuery export is enabled. bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The project ID of the BigQuery dataset to export the data to. + // Optional. The **project ID** of the BigQuery dataset to export the data to. // // Note: If the BigQuery dataset is in a different project from the app, // you should grant `roles/bigquery.admin` role to the CES service agent // `service-@gcp-sa-ces.iam.gserviceaccount.com`. string project = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The BigQuery dataset to export the data to. + // Optional. The BigQuery **dataset ID** to export the data to. string dataset = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/common.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/common.proto index 8aba054d30d..a1c4b162a18 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/common.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/common.proto @@ -242,6 +242,9 @@ message ChannelProfile { // Widget supports only chat input. CHAT_ONLY = 3; + + // Widget supports chat, voice, and video input. + CHAT_VOICE_AND_VIDEO = 4; } // Theme of the web widget. diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/evaluation_service.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/evaluation_service.proto index 1d0d46affaa..9e61271d789 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/evaluation_service.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/evaluation_service.proto @@ -368,7 +368,7 @@ message RunEvaluationResponse { } // Operation metadata for -// [EvaluationService.RunEvaluation][google.cloud.ces.v1beta.EvaluationService.RunEvaluation] +// [EvaluationService.RunEvaluation][google.cloud.ces.v1beta.EvaluationService.RunEvaluation]. message RunEvaluationOperationMetadata { // Output only. The list of evaluations that were run. // Format: diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/mcp_tool.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/mcp_tool.proto index b966847f4e3..d9a98740248 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/mcp_tool.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/mcp_tool.proto @@ -66,4 +66,12 @@ message McpTool { // service names within a perimeter. ServiceDirectoryConfig service_directory_config = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The custom headers to send in the request to the MCP server. The + // values must be in the format `$context.variables.` and + // can be set in the session variables. See + // https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection + // for more details. + map custom_headers = 9 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/mcp_toolset.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/mcp_toolset.proto index 165af9c4a80..fa4758a375e 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/mcp_toolset.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/mcp_toolset.proto @@ -51,4 +51,12 @@ message McpToolset { // Optional. The TLS configuration. Includes the custom server certificates // that the client should trust. TlsConfig tls_config = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The custom headers to send in the request to the MCP server. The + // values must be in the format `$context.variables.` and + // can be set in the session variables. See + // https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection + // for more details. + map custom_headers = 5 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/session_service.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/session_service.proto index 4298586f74f..59f00fc67d5 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/session_service.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/session_service.proto @@ -41,8 +41,7 @@ service SessionService { "https://www.googleapis.com/auth/ces," "https://www.googleapis.com/auth/cloud-platform"; - // Initiates a single turn interaction with the CES agent within a - // session. + // Initiates a single-turn interaction with the CES agent within a session. rpc RunSession(RunSessionRequest) returns (RunSessionResponse) { option (google.api.http) = { post: "/v1beta/{config.session=projects/*/locations/*/apps/*/sessions/*}:runSession" @@ -50,6 +49,22 @@ service SessionService { }; } + // Initiates a single-turn interaction with the CES agent. Uses server-side + // streaming to deliver incremental results and partial responses as they are + // generated. + // + // By default, complete responses (e.g., messages from callbacks or full LLM + // responses) are sent to the client as soon as they are available. To enable + // streaming individual text chunks directly from the model, set + // [enable_text_streaming][google.cloud.ces.v1beta.SessionConfig.enable_text_streaming] + // to true. + rpc StreamRunSession(RunSessionRequest) returns (stream RunSessionResponse) { + option (google.api.http) = { + post: "/v1beta/{config.session=projects/*/locations/*/apps/*/sessions/*}:streamRunSession" + body: "*" + }; + } + // Establishes a bidirectional streaming connection with the CES agent. // The agent processes continuous multimodal inputs (e.g., text, audio) and // generates real-time multimodal output streams. @@ -237,6 +252,14 @@ message SessionConfig { // agent when the session control is transferred to the remote agent. RemoteDialogflowQueryParameters remote_dialogflow_query_parameters = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to enable streaming text outputs from the model. + // By default, text outputs from the model are collected before sending to the + // client. + // NOTE: This is only supported for text (non-voice) sessions via + // [StreamRunSession][google.cloud.ces.v1beta.SessionService.StreamRunSession] + // or [BidiRunSession][google.cloud.ces.v1beta.SessionService.BidiRunSession]. + bool enable_text_streaming = 18 [(google.api.field_behavior) = OPTIONAL]; } // Request for the client to execute the tools and return the execution results diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/widget_service.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/widget_service.proto index da9850d7b40..200a48207ae 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/widget_service.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/widget_service.proto @@ -66,6 +66,9 @@ message GenerateChatTokenRequest { // 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 diff --git a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/widget_tool.proto b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/widget_tool.proto index 6d6430443c7..670cf532778 100644 --- a/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/widget_tool.proto +++ b/packages/google-cloud-ces/protos/google/cloud/ces/v1beta/widget_tool.proto @@ -17,7 +17,9 @@ syntax = "proto3"; package google.cloud.ces.v1beta; import "google/api/field_behavior.proto"; +import "google/cloud/ces/v1beta/python_function.proto"; import "google/cloud/ces/v1beta/schema.proto"; +import "google/protobuf/struct.proto"; option go_package = "cloud.google.com/go/ces/apiv1beta/cespb;cespb"; option java_multiple_files = true; @@ -29,6 +31,42 @@ option java_package = "com.google.cloud.ces.v1beta"; // responsible for processing the widget and generating the next user query to // continue the interaction with the agent. message WidgetTool { + // Configuration for mapping data from a source tool to the widget's input + // parameters. + message DataMapping { + // The strategy used to map data from the source tool to the widget. + enum Mode { + // Unspecified mode. + MODE_UNSPECIFIED = 0; + + // Use the `field_mappings` map for data transformation. + FIELD_MAPPING = 1; + + // Use the `python_script` for data transformation. + PYTHON_SCRIPT = 2; + } + + // Optional. The resource name of the tool that provides the data for the + // widget (e.g., a search tool or a custom function). Format: + // `projects/{project}/locations/{location}/agents/{agent}/tools/{tool}` + string source_tool_name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A map of widget input parameter fields to the corresponding + // output fields of the source tool. + map field_mappings = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for a Python function used to transform the + // source tool's output into the widget's input format. + PythonFunction python_function = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mode of the data mapping. + Mode mode = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Deprecated: Use `python_function` instead. + string python_script = 3 [deprecated = true]; + } + // All available widget types. // New values may be added to this enum in the future. enum WidgetType { @@ -87,4 +125,11 @@ message WidgetTool { // Optional. The type of the widget tool. If not specified, the default type // will be CUSTOMIZED. WidgetType widget_type = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for rendering the widget. + google.protobuf.Struct ui_config = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mapping that defines how data from a source tool is mapped to + // the widget's input parameters. + DataMapping data_mapping = 6 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-ces/protos/protos.d.ts b/packages/google-cloud-ces/protos/protos.d.ts index 1d60667dcad..4062049f880 100644 --- a/packages/google-cloud-ces/protos/protos.d.ts +++ b/packages/google-cloud-ces/protos/protos.d.ts @@ -2617,7 +2617,8 @@ export namespace google { MODALITY_UNSPECIFIED = 0, CHAT_AND_VOICE = 1, VOICE_ONLY = 2, - CHAT_ONLY = 3 + CHAT_ONLY = 3, + CHAT_VOICE_AND_VIDEO = 4 } /** Theme enum. */ @@ -2636,7 +2637,8 @@ export namespace google { TWILIO = 4, GOOGLE_TELEPHONY_PLATFORM = 5, CONTACT_CENTER_AS_A_SERVICE = 6, - FIVE9 = 7 + FIVE9 = 7, + CONTACT_CENTER_INTEGRATION = 8 } } @@ -4452,6 +4454,9 @@ export namespace google { /** ExportAppRequest gcsUri */ gcsUri?: (string|null); + + /** ExportAppRequest appVersion */ + appVersion?: (string|null); } /** Represents an ExportAppRequest. */ @@ -4472,6 +4477,9 @@ export namespace google { /** ExportAppRequest gcsUri. */ public gcsUri: string; + /** ExportAppRequest appVersion. */ + public appVersion: string; + /** * Creates a new ExportAppRequest instance using the specified properties. * @param [properties] Properties to set @@ -10684,6 +10692,9 @@ export namespace google { /** App loggingSettings */ loggingSettings?: (google.cloud.ces.v1.ILoggingSettings|null); + /** App errorHandlingSettings */ + errorHandlingSettings?: (google.cloud.ces.v1.IErrorHandlingSettings|null); + /** App modelSettings */ modelSettings?: (google.cloud.ces.v1.IModelSettings|null); @@ -10769,6 +10780,9 @@ export namespace google { /** App loggingSettings. */ public loggingSettings?: (google.cloud.ces.v1.ILoggingSettings|null); + /** App errorHandlingSettings. */ + public errorHandlingSettings?: (google.cloud.ces.v1.IErrorHandlingSettings|null); + /** App modelSettings. */ public modelSettings?: (google.cloud.ces.v1.IModelSettings|null); @@ -11906,6 +11920,114 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an ErrorHandlingSettings. */ + interface IErrorHandlingSettings { + + /** ErrorHandlingSettings errorHandlingStrategy */ + errorHandlingStrategy?: (google.cloud.ces.v1.ErrorHandlingSettings.ErrorHandlingStrategy|keyof typeof google.cloud.ces.v1.ErrorHandlingSettings.ErrorHandlingStrategy|null); + } + + /** Represents an ErrorHandlingSettings. */ + class ErrorHandlingSettings implements IErrorHandlingSettings { + + /** + * Constructs a new ErrorHandlingSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1.IErrorHandlingSettings); + + /** ErrorHandlingSettings errorHandlingStrategy. */ + public errorHandlingStrategy: (google.cloud.ces.v1.ErrorHandlingSettings.ErrorHandlingStrategy|keyof typeof google.cloud.ces.v1.ErrorHandlingSettings.ErrorHandlingStrategy); + + /** + * Creates a new ErrorHandlingSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorHandlingSettings instance + */ + public static create(properties?: google.cloud.ces.v1.IErrorHandlingSettings): google.cloud.ces.v1.ErrorHandlingSettings; + + /** + * Encodes the specified ErrorHandlingSettings message. Does not implicitly {@link google.cloud.ces.v1.ErrorHandlingSettings.verify|verify} messages. + * @param message ErrorHandlingSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1.IErrorHandlingSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorHandlingSettings message, length delimited. Does not implicitly {@link google.cloud.ces.v1.ErrorHandlingSettings.verify|verify} messages. + * @param message ErrorHandlingSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1.IErrorHandlingSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorHandlingSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorHandlingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1.ErrorHandlingSettings; + + /** + * Decodes an ErrorHandlingSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorHandlingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1.ErrorHandlingSettings; + + /** + * Verifies an ErrorHandlingSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ErrorHandlingSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorHandlingSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1.ErrorHandlingSettings; + + /** + * Creates a plain object from an ErrorHandlingSettings message. Also converts values to other types if specified. + * @param message ErrorHandlingSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1.ErrorHandlingSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorHandlingSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorHandlingSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ErrorHandlingSettings { + + /** ErrorHandlingStrategy enum. */ + enum ErrorHandlingStrategy { + ERROR_HANDLING_STRATEGY_UNSPECIFIED = 0, + NONE = 1, + FALLBACK_RESPONSE = 2, + END_SESSION = 3 + } + } + /** Properties of an EvaluationMetricsThresholds. */ interface IEvaluationMetricsThresholds { @@ -14045,6 +14167,9 @@ export namespace google { /** Chunk transcript */ transcript?: (string|null); + /** Chunk blob */ + blob?: (google.cloud.ces.v1.IBlob|null); + /** Chunk payload */ payload?: (google.protobuf.IStruct|null); @@ -14082,6 +14207,9 @@ export namespace google { /** Chunk transcript. */ public transcript?: (string|null); + /** Chunk blob. */ + public blob?: (google.cloud.ces.v1.IBlob|null); + /** Chunk payload. */ public payload?: (google.protobuf.IStruct|null); @@ -14104,7 +14232,7 @@ export namespace google { public defaultVariables?: (google.protobuf.IStruct|null); /** Chunk data. */ - public data?: ("text"|"transcript"|"payload"|"image"|"toolCall"|"toolResponse"|"agentTransfer"|"updatedVariables"|"defaultVariables"); + public data?: ("text"|"transcript"|"blob"|"payload"|"image"|"toolCall"|"toolResponse"|"agentTransfer"|"updatedVariables"|"defaultVariables"); /** * Creates a new Chunk instance using the specified properties. @@ -15868,6 +15996,9 @@ export namespace google { /** Tool systemTool */ systemTool?: (google.cloud.ces.v1.ISystemTool|null); + /** Tool agentTool */ + agentTool?: (google.cloud.ces.v1.IAgentTool|null); + /** Tool widgetTool */ widgetTool?: (google.cloud.ces.v1.IWidgetTool|null); @@ -15932,6 +16063,9 @@ export namespace google { /** Tool systemTool. */ public systemTool?: (google.cloud.ces.v1.ISystemTool|null); + /** Tool agentTool. */ + public agentTool?: (google.cloud.ces.v1.IAgentTool|null); + /** Tool widgetTool. */ public widgetTool?: (google.cloud.ces.v1.IWidgetTool|null); @@ -15960,7 +16094,7 @@ export namespace google { public toolFakeConfig?: (google.cloud.ces.v1.IToolFakeConfig|null); /** Tool toolType. */ - public toolType?: ("clientFunction"|"openApiTool"|"googleSearchTool"|"connectorTool"|"dataStoreTool"|"pythonFunction"|"mcpTool"|"fileSearchTool"|"systemTool"|"widgetTool"); + public toolType?: ("clientFunction"|"openApiTool"|"googleSearchTool"|"connectorTool"|"dataStoreTool"|"pythonFunction"|"mcpTool"|"fileSearchTool"|"systemTool"|"agentTool"|"widgetTool"); /** * Creates a new Tool instance using the specified properties. @@ -16040,6 +16174,115 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an AgentTool. */ + interface IAgentTool { + + /** AgentTool name */ + name?: (string|null); + + /** AgentTool description */ + description?: (string|null); + + /** AgentTool rootAgent */ + rootAgent?: (string|null); + } + + /** Represents an AgentTool. */ + class AgentTool implements IAgentTool { + + /** + * Constructs a new AgentTool. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1.IAgentTool); + + /** AgentTool name. */ + public name: string; + + /** AgentTool description. */ + public description: string; + + /** AgentTool rootAgent. */ + public rootAgent: string; + + /** + * Creates a new AgentTool instance using the specified properties. + * @param [properties] Properties to set + * @returns AgentTool instance + */ + public static create(properties?: google.cloud.ces.v1.IAgentTool): google.cloud.ces.v1.AgentTool; + + /** + * Encodes the specified AgentTool message. Does not implicitly {@link google.cloud.ces.v1.AgentTool.verify|verify} messages. + * @param message AgentTool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1.IAgentTool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AgentTool message, length delimited. Does not implicitly {@link google.cloud.ces.v1.AgentTool.verify|verify} messages. + * @param message AgentTool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1.IAgentTool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AgentTool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AgentTool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1.AgentTool; + + /** + * Decodes an AgentTool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AgentTool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1.AgentTool; + + /** + * Verifies an AgentTool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AgentTool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AgentTool + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1.AgentTool; + + /** + * Creates a plain object from an AgentTool message. Also converts values to other types if specified. + * @param message AgentTool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1.AgentTool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AgentTool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AgentTool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ClientFunction. */ interface IClientFunction { @@ -19687,6 +19930,9 @@ export namespace google { /** McpTool serviceDirectoryConfig */ serviceDirectoryConfig?: (google.cloud.ces.v1.IServiceDirectoryConfig|null); + + /** McpTool customHeaders */ + customHeaders?: ({ [k: string]: string }|null); } /** Represents a McpTool. */ @@ -19722,6 +19968,9 @@ export namespace google { /** McpTool serviceDirectoryConfig. */ public serviceDirectoryConfig?: (google.cloud.ces.v1.IServiceDirectoryConfig|null); + /** McpTool customHeaders. */ + public customHeaders: { [k: string]: string }; + /** * Creates a new McpTool instance using the specified properties. * @param [properties] Properties to set @@ -20165,6 +20414,12 @@ export namespace google { /** WidgetTool widgetType */ widgetType?: (google.cloud.ces.v1.WidgetTool.WidgetType|keyof typeof google.cloud.ces.v1.WidgetTool.WidgetType|null); + + /** WidgetTool uiConfig */ + uiConfig?: (google.protobuf.IStruct|null); + + /** WidgetTool dataMapping */ + dataMapping?: (google.cloud.ces.v1.WidgetTool.IDataMapping|null); } /** Represents a WidgetTool. */ @@ -20188,6 +20443,12 @@ export namespace google { /** WidgetTool widgetType. */ public widgetType: (google.cloud.ces.v1.WidgetTool.WidgetType|keyof typeof google.cloud.ces.v1.WidgetTool.WidgetType); + /** WidgetTool uiConfig. */ + public uiConfig?: (google.protobuf.IStruct|null); + + /** WidgetTool dataMapping. */ + public dataMapping?: (google.cloud.ces.v1.WidgetTool.IDataMapping|null); + /** WidgetTool input. */ public input?: "parameters"; @@ -20271,6 +20532,137 @@ export namespace google { namespace WidgetTool { + /** Properties of a DataMapping. */ + interface IDataMapping { + + /** DataMapping sourceToolName */ + sourceToolName?: (string|null); + + /** DataMapping fieldMappings */ + fieldMappings?: ({ [k: string]: string }|null); + + /** DataMapping pythonFunction */ + pythonFunction?: (google.cloud.ces.v1.IPythonFunction|null); + + /** DataMapping mode */ + mode?: (google.cloud.ces.v1.WidgetTool.DataMapping.Mode|keyof typeof google.cloud.ces.v1.WidgetTool.DataMapping.Mode|null); + + /** DataMapping pythonScript */ + pythonScript?: (string|null); + } + + /** Represents a DataMapping. */ + class DataMapping implements IDataMapping { + + /** + * Constructs a new DataMapping. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1.WidgetTool.IDataMapping); + + /** DataMapping sourceToolName. */ + public sourceToolName: string; + + /** DataMapping fieldMappings. */ + public fieldMappings: { [k: string]: string }; + + /** DataMapping pythonFunction. */ + public pythonFunction?: (google.cloud.ces.v1.IPythonFunction|null); + + /** DataMapping mode. */ + public mode: (google.cloud.ces.v1.WidgetTool.DataMapping.Mode|keyof typeof google.cloud.ces.v1.WidgetTool.DataMapping.Mode); + + /** DataMapping pythonScript. */ + public pythonScript: string; + + /** + * Creates a new DataMapping instance using the specified properties. + * @param [properties] Properties to set + * @returns DataMapping instance + */ + public static create(properties?: google.cloud.ces.v1.WidgetTool.IDataMapping): google.cloud.ces.v1.WidgetTool.DataMapping; + + /** + * Encodes the specified DataMapping message. Does not implicitly {@link google.cloud.ces.v1.WidgetTool.DataMapping.verify|verify} messages. + * @param message DataMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1.WidgetTool.IDataMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataMapping message, length delimited. Does not implicitly {@link google.cloud.ces.v1.WidgetTool.DataMapping.verify|verify} messages. + * @param message DataMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1.WidgetTool.IDataMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataMapping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1.WidgetTool.DataMapping; + + /** + * Decodes a DataMapping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1.WidgetTool.DataMapping; + + /** + * Verifies a DataMapping message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataMapping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataMapping + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1.WidgetTool.DataMapping; + + /** + * Creates a plain object from a DataMapping message. Also converts values to other types if specified. + * @param message DataMapping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1.WidgetTool.DataMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataMapping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataMapping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataMapping { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + FIELD_MAPPING = 1, + PYTHON_SCRIPT = 2 + } + } + /** WidgetType enum. */ enum WidgetType { WIDGET_TYPE_UNSPECIFIED = 0, @@ -20283,7 +20675,9 @@ export namespace google { SHORT_FORM = 7, OVERALL_SATISFACTION = 8, ORDER_SUMMARY = 9, - APPOINTMENT_DETAILS = 10 + APPOINTMENT_DETAILS = 10, + APPOINTMENT_SCHEDULER = 11, + CONTACT_FORM = 12 } } @@ -20570,6 +20964,9 @@ export namespace google { /** McpToolset tlsConfig */ tlsConfig?: (google.cloud.ces.v1.ITlsConfig|null); + + /** McpToolset customHeaders */ + customHeaders?: ({ [k: string]: string }|null); } /** Represents a McpToolset. */ @@ -20593,6 +20990,9 @@ export namespace google { /** McpToolset tlsConfig. */ public tlsConfig?: (google.cloud.ces.v1.ITlsConfig|null); + /** McpToolset customHeaders. */ + public customHeaders: { [k: string]: string }; + /** * Creates a new McpToolset instance using the specified properties. * @param [properties] Properties to set @@ -22483,6 +22883,240 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a SecuritySettings. */ + interface ISecuritySettings { + + /** SecuritySettings name */ + name?: (string|null); + + /** SecuritySettings endpointControlPolicy */ + endpointControlPolicy?: (google.cloud.ces.v1.IEndpointControlPolicy|null); + + /** SecuritySettings createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** SecuritySettings updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** SecuritySettings etag */ + etag?: (string|null); + } + + /** Represents a SecuritySettings. */ + class SecuritySettings implements ISecuritySettings { + + /** + * Constructs a new SecuritySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1.ISecuritySettings); + + /** SecuritySettings name. */ + public name: string; + + /** SecuritySettings endpointControlPolicy. */ + public endpointControlPolicy?: (google.cloud.ces.v1.IEndpointControlPolicy|null); + + /** SecuritySettings createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** SecuritySettings updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** SecuritySettings etag. */ + public etag: string; + + /** + * Creates a new SecuritySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns SecuritySettings instance + */ + public static create(properties?: google.cloud.ces.v1.ISecuritySettings): google.cloud.ces.v1.SecuritySettings; + + /** + * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.ces.v1.SecuritySettings.verify|verify} messages. + * @param message SecuritySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.ces.v1.SecuritySettings.verify|verify} messages. + * @param message SecuritySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1.ISecuritySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecuritySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecuritySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1.SecuritySettings; + + /** + * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecuritySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1.SecuritySettings; + + /** + * Verifies a SecuritySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecuritySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecuritySettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1.SecuritySettings; + + /** + * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. + * @param message SecuritySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1.SecuritySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecuritySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecuritySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EndpointControlPolicy. */ + interface IEndpointControlPolicy { + + /** EndpointControlPolicy enforcementScope */ + enforcementScope?: (google.cloud.ces.v1.EndpointControlPolicy.EnforcementScope|keyof typeof google.cloud.ces.v1.EndpointControlPolicy.EnforcementScope|null); + + /** EndpointControlPolicy allowedOrigins */ + allowedOrigins?: (string[]|null); + } + + /** Represents an EndpointControlPolicy. */ + class EndpointControlPolicy implements IEndpointControlPolicy { + + /** + * Constructs a new EndpointControlPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1.IEndpointControlPolicy); + + /** EndpointControlPolicy enforcementScope. */ + public enforcementScope: (google.cloud.ces.v1.EndpointControlPolicy.EnforcementScope|keyof typeof google.cloud.ces.v1.EndpointControlPolicy.EnforcementScope); + + /** EndpointControlPolicy allowedOrigins. */ + public allowedOrigins: string[]; + + /** + * Creates a new EndpointControlPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns EndpointControlPolicy instance + */ + public static create(properties?: google.cloud.ces.v1.IEndpointControlPolicy): google.cloud.ces.v1.EndpointControlPolicy; + + /** + * Encodes the specified EndpointControlPolicy message. Does not implicitly {@link google.cloud.ces.v1.EndpointControlPolicy.verify|verify} messages. + * @param message EndpointControlPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1.IEndpointControlPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EndpointControlPolicy message, length delimited. Does not implicitly {@link google.cloud.ces.v1.EndpointControlPolicy.verify|verify} messages. + * @param message EndpointControlPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1.IEndpointControlPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EndpointControlPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EndpointControlPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1.EndpointControlPolicy; + + /** + * Decodes an EndpointControlPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EndpointControlPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1.EndpointControlPolicy; + + /** + * Verifies an EndpointControlPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EndpointControlPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EndpointControlPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1.EndpointControlPolicy; + + /** + * Creates a plain object from an EndpointControlPolicy message. Also converts values to other types if specified. + * @param message EndpointControlPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1.EndpointControlPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EndpointControlPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EndpointControlPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EndpointControlPolicy { + + /** EnforcementScope enum. */ + enum EnforcementScope { + ENFORCEMENT_SCOPE_UNSPECIFIED = 0, + VPCSC_ONLY = 1, + ALWAYS = 2 + } + } + /** Represents a SessionService */ class SessionService extends $protobuf.rpc.Service { @@ -22517,6 +23151,20 @@ export namespace google { */ public runSession(request: google.cloud.ces.v1.IRunSessionRequest): Promise; + /** + * Calls StreamRunSession. + * @param request RunSessionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunSessionResponse + */ + public streamRunSession(request: google.cloud.ces.v1.IRunSessionRequest, callback: google.cloud.ces.v1.SessionService.StreamRunSessionCallback): void; + + /** + * Calls StreamRunSession. + * @param request RunSessionRequest message or plain object + * @returns Promise + */ + public streamRunSession(request: google.cloud.ces.v1.IRunSessionRequest): Promise; + /** * Calls BidiRunSession. * @param request BidiSessionClientMessage message or plain object @@ -22541,6 +23189,13 @@ export namespace google { */ type RunSessionCallback = (error: (Error|null), response?: google.cloud.ces.v1.RunSessionResponse) => void; + /** + * Callback as used by {@link google.cloud.ces.v1.SessionService|streamRunSession}. + * @param error Error, if any + * @param [response] RunSessionResponse + */ + type StreamRunSessionCallback = (error: (Error|null), response?: google.cloud.ces.v1.RunSessionResponse) => void; + /** * Callback as used by {@link google.cloud.ces.v1.SessionService|bidiRunSession}. * @param error Error, if any @@ -22793,8 +23448,14 @@ export namespace google { /** SessionConfig timeZone */ timeZone?: (string|null); + /** SessionConfig useToolFakes */ + useToolFakes?: (boolean|null); + /** SessionConfig remoteDialogflowQueryParameters */ remoteDialogflowQueryParameters?: (google.cloud.ces.v1.SessionConfig.IRemoteDialogflowQueryParameters|null); + + /** SessionConfig enableTextStreaming */ + enableTextStreaming?: (boolean|null); } /** Represents a SessionConfig. */ @@ -22827,9 +23488,15 @@ export namespace google { /** SessionConfig timeZone. */ public timeZone: string; + /** SessionConfig useToolFakes. */ + public useToolFakes: boolean; + /** SessionConfig remoteDialogflowQueryParameters. */ public remoteDialogflowQueryParameters?: (google.cloud.ces.v1.SessionConfig.IRemoteDialogflowQueryParameters|null); + /** SessionConfig enableTextStreaming. */ + public enableTextStreaming: boolean; + /** * Creates a new SessionConfig instance using the specified properties. * @param [properties] Properties to set @@ -24836,6 +25503,12 @@ export namespace google { /** ExecuteToolRequest toolsetTool */ toolsetTool?: (google.cloud.ces.v1.IToolsetTool|null); + /** ExecuteToolRequest variables */ + variables?: (google.protobuf.IStruct|null); + + /** ExecuteToolRequest context */ + context?: (google.protobuf.IStruct|null); + /** ExecuteToolRequest parent */ parent?: (string|null); @@ -24858,6 +25531,12 @@ export namespace google { /** ExecuteToolRequest toolsetTool. */ public toolsetTool?: (google.cloud.ces.v1.IToolsetTool|null); + /** ExecuteToolRequest variables. */ + public variables?: (google.protobuf.IStruct|null); + + /** ExecuteToolRequest context. */ + public context?: (google.protobuf.IStruct|null); + /** ExecuteToolRequest parent. */ public parent: string; @@ -24867,6 +25546,9 @@ export namespace google { /** ExecuteToolRequest toolIdentifier. */ public toolIdentifier?: ("tool"|"toolsetTool"); + /** ExecuteToolRequest toolExecutionContext. */ + public toolExecutionContext?: ("variables"|"context"); + /** * Creates a new ExecuteToolRequest instance using the specified properties. * @param [properties] Properties to set @@ -24956,6 +25638,9 @@ export namespace google { /** ExecuteToolResponse response */ response?: (google.protobuf.IStruct|null); + + /** ExecuteToolResponse variables */ + variables?: (google.protobuf.IStruct|null); } /** Represents an ExecuteToolResponse. */ @@ -24976,6 +25661,9 @@ export namespace google { /** ExecuteToolResponse response. */ public response?: (google.protobuf.IStruct|null); + /** ExecuteToolResponse variables. */ + public variables?: (google.protobuf.IStruct|null); + /** ExecuteToolResponse toolIdentifier. */ public toolIdentifier?: ("tool"|"toolsetTool"); @@ -25543,6 +26231,9 @@ export namespace google { /** GenerateChatTokenRequest recaptchaToken */ recaptchaToken?: (string|null); + + /** GenerateChatTokenRequest liveHandoffEnabled */ + liveHandoffEnabled?: (boolean|null); } /** Represents a GenerateChatTokenRequest. */ @@ -25563,6 +26254,9 @@ export namespace google { /** GenerateChatTokenRequest recaptchaToken. */ public recaptchaToken: string; + /** GenerateChatTokenRequest liveHandoffEnabled. */ + public liveHandoffEnabled: boolean; + /** * Creates a new GenerateChatTokenRequest instance using the specified properties. * @param [properties] Properties to set @@ -28339,7 +29033,8 @@ export namespace google { MODALITY_UNSPECIFIED = 0, CHAT_AND_VOICE = 1, VOICE_ONLY = 2, - CHAT_ONLY = 3 + CHAT_ONLY = 3, + CHAT_VOICE_AND_VIDEO = 4 } /** Theme enum. */ @@ -30217,6 +30912,9 @@ export namespace google { /** ExportAppRequest gcsUri */ gcsUri?: (string|null); + + /** ExportAppRequest appVersion */ + appVersion?: (string|null); } /** Represents an ExportAppRequest. */ @@ -30237,6 +30935,9 @@ export namespace google { /** ExportAppRequest gcsUri. */ public gcsUri: string; + /** ExportAppRequest appVersion. */ + public appVersion: string; + /** * Creates a new ExportAppRequest instance using the specified properties. * @param [properties] Properties to set @@ -36119,6 +36820,9 @@ export namespace google { /** GenerateAppResourceResponse appResources */ appResources?: (google.cloud.ces.v1beta.GenerateAppResourceResponse.IAppResources|null); + /** GenerateAppResourceResponse qualityReport */ + qualityReport?: (google.cloud.ces.v1beta.IQualityReport|null); + /** GenerateAppResourceResponse generateResultInfo */ generateResultInfo?: (google.cloud.ces.v1beta.GenerateAppResourceResponse.IGenerateResultInfo|null); } @@ -36150,11 +36854,14 @@ export namespace google { /** GenerateAppResourceResponse appResources. */ public appResources?: (google.cloud.ces.v1beta.GenerateAppResourceResponse.IAppResources|null); + /** GenerateAppResourceResponse qualityReport. */ + public qualityReport?: (google.cloud.ces.v1beta.IQualityReport|null); + /** GenerateAppResourceResponse generateResultInfo. */ public generateResultInfo?: (google.cloud.ces.v1beta.GenerateAppResourceResponse.IGenerateResultInfo|null); /** GenerateAppResourceResponse generatedResource. */ - public generatedResource?: ("agent"|"toolset"|"appSnapshot"|"tools"|"evaluations"|"appResources"); + public generatedResource?: ("agent"|"toolset"|"appSnapshot"|"tools"|"evaluations"|"appResources"|"qualityReport"); /** * Creates a new GenerateAppResourceResponse instance using the specified properties. @@ -36631,6 +37338,330 @@ export namespace google { } } + /** Properties of a QualityReport. */ + interface IQualityReport { + + /** QualityReport issues */ + issues?: (google.cloud.ces.v1beta.QualityReport.IAgentIssues[]|null); + + /** QualityReport evaluationRuns */ + evaluationRuns?: (string[]|null); + + /** QualityReport generalIssues */ + generalIssues?: (google.cloud.ces.v1beta.QualityReport.IIssue[]|null); + } + + /** Represents a QualityReport. */ + class QualityReport implements IQualityReport { + + /** + * Constructs a new QualityReport. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1beta.IQualityReport); + + /** QualityReport issues. */ + public issues: google.cloud.ces.v1beta.QualityReport.IAgentIssues[]; + + /** QualityReport evaluationRuns. */ + public evaluationRuns: string[]; + + /** QualityReport generalIssues. */ + public generalIssues: google.cloud.ces.v1beta.QualityReport.IIssue[]; + + /** + * Creates a new QualityReport instance using the specified properties. + * @param [properties] Properties to set + * @returns QualityReport instance + */ + public static create(properties?: google.cloud.ces.v1beta.IQualityReport): google.cloud.ces.v1beta.QualityReport; + + /** + * Encodes the specified QualityReport message. Does not implicitly {@link google.cloud.ces.v1beta.QualityReport.verify|verify} messages. + * @param message QualityReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1beta.IQualityReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QualityReport message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.QualityReport.verify|verify} messages. + * @param message QualityReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1beta.IQualityReport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QualityReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QualityReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.QualityReport; + + /** + * Decodes a QualityReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QualityReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.QualityReport; + + /** + * Verifies a QualityReport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QualityReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QualityReport + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.QualityReport; + + /** + * Creates a plain object from a QualityReport message. Also converts values to other types if specified. + * @param message QualityReport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1beta.QualityReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QualityReport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QualityReport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QualityReport { + + /** Properties of an Issue. */ + interface IIssue { + + /** Issue description */ + description?: (string|null); + + /** Issue occurrenceCount */ + occurrenceCount?: (number|null); + + /** Issue proposedSolution */ + proposedSolution?: (string|null); + } + + /** Represents an Issue. */ + class Issue implements IIssue { + + /** + * Constructs a new Issue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1beta.QualityReport.IIssue); + + /** Issue description. */ + public description: string; + + /** Issue occurrenceCount. */ + public occurrenceCount: number; + + /** Issue proposedSolution. */ + public proposedSolution: string; + + /** + * Creates a new Issue instance using the specified properties. + * @param [properties] Properties to set + * @returns Issue instance + */ + public static create(properties?: google.cloud.ces.v1beta.QualityReport.IIssue): google.cloud.ces.v1beta.QualityReport.Issue; + + /** + * Encodes the specified Issue message. Does not implicitly {@link google.cloud.ces.v1beta.QualityReport.Issue.verify|verify} messages. + * @param message Issue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1beta.QualityReport.IIssue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Issue message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.QualityReport.Issue.verify|verify} messages. + * @param message Issue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1beta.QualityReport.IIssue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Issue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Issue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.QualityReport.Issue; + + /** + * Decodes an Issue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Issue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.QualityReport.Issue; + + /** + * Verifies an Issue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Issue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Issue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.QualityReport.Issue; + + /** + * Creates a plain object from an Issue message. Also converts values to other types if specified. + * @param message Issue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1beta.QualityReport.Issue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Issue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Issue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AgentIssues. */ + interface IAgentIssues { + + /** AgentIssues agent */ + agent?: (string|null); + + /** AgentIssues issues */ + issues?: (google.cloud.ces.v1beta.QualityReport.IIssue[]|null); + } + + /** Represents an AgentIssues. */ + class AgentIssues implements IAgentIssues { + + /** + * Constructs a new AgentIssues. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1beta.QualityReport.IAgentIssues); + + /** AgentIssues agent. */ + public agent: string; + + /** AgentIssues issues. */ + public issues: google.cloud.ces.v1beta.QualityReport.IIssue[]; + + /** + * Creates a new AgentIssues instance using the specified properties. + * @param [properties] Properties to set + * @returns AgentIssues instance + */ + public static create(properties?: google.cloud.ces.v1beta.QualityReport.IAgentIssues): google.cloud.ces.v1beta.QualityReport.AgentIssues; + + /** + * Encodes the specified AgentIssues message. Does not implicitly {@link google.cloud.ces.v1beta.QualityReport.AgentIssues.verify|verify} messages. + * @param message AgentIssues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1beta.QualityReport.IAgentIssues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AgentIssues message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.QualityReport.AgentIssues.verify|verify} messages. + * @param message AgentIssues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1beta.QualityReport.IAgentIssues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AgentIssues message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AgentIssues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.QualityReport.AgentIssues; + + /** + * Decodes an AgentIssues message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AgentIssues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.QualityReport.AgentIssues; + + /** + * Verifies an AgentIssues message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AgentIssues message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AgentIssues + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.QualityReport.AgentIssues; + + /** + * Creates a plain object from an AgentIssues message. Also converts values to other types if specified. + * @param message AgentIssues + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1beta.QualityReport.AgentIssues, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AgentIssues to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AgentIssues + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a ListChangelogsRequest. */ interface IListChangelogsRequest { @@ -38525,7 +39556,8 @@ export namespace google { enum ErrorHandlingStrategy { ERROR_HANDLING_STRATEGY_UNSPECIFIED = 0, NONE = 1, - FALLBACK_RESPONSE = 2 + FALLBACK_RESPONSE = 2, + END_SESSION = 3 } } @@ -46815,6 +47847,9 @@ export namespace google { /** McpTool serviceDirectoryConfig */ serviceDirectoryConfig?: (google.cloud.ces.v1beta.IServiceDirectoryConfig|null); + + /** McpTool customHeaders */ + customHeaders?: ({ [k: string]: string }|null); } /** Represents a McpTool. */ @@ -46850,6 +47885,9 @@ export namespace google { /** McpTool serviceDirectoryConfig. */ public serviceDirectoryConfig?: (google.cloud.ces.v1beta.IServiceDirectoryConfig|null); + /** McpTool customHeaders. */ + public customHeaders: { [k: string]: string }; + /** * Creates a new McpTool instance using the specified properties. * @param [properties] Properties to set @@ -47293,6 +48331,12 @@ export namespace google { /** WidgetTool widgetType */ widgetType?: (google.cloud.ces.v1beta.WidgetTool.WidgetType|keyof typeof google.cloud.ces.v1beta.WidgetTool.WidgetType|null); + + /** WidgetTool uiConfig */ + uiConfig?: (google.protobuf.IStruct|null); + + /** WidgetTool dataMapping */ + dataMapping?: (google.cloud.ces.v1beta.WidgetTool.IDataMapping|null); } /** Represents a WidgetTool. */ @@ -47316,6 +48360,12 @@ export namespace google { /** WidgetTool widgetType. */ public widgetType: (google.cloud.ces.v1beta.WidgetTool.WidgetType|keyof typeof google.cloud.ces.v1beta.WidgetTool.WidgetType); + /** WidgetTool uiConfig. */ + public uiConfig?: (google.protobuf.IStruct|null); + + /** WidgetTool dataMapping. */ + public dataMapping?: (google.cloud.ces.v1beta.WidgetTool.IDataMapping|null); + /** WidgetTool input. */ public input?: "parameters"; @@ -47399,6 +48449,137 @@ export namespace google { namespace WidgetTool { + /** Properties of a DataMapping. */ + interface IDataMapping { + + /** DataMapping sourceToolName */ + sourceToolName?: (string|null); + + /** DataMapping fieldMappings */ + fieldMappings?: ({ [k: string]: string }|null); + + /** DataMapping pythonFunction */ + pythonFunction?: (google.cloud.ces.v1beta.IPythonFunction|null); + + /** DataMapping mode */ + mode?: (google.cloud.ces.v1beta.WidgetTool.DataMapping.Mode|keyof typeof google.cloud.ces.v1beta.WidgetTool.DataMapping.Mode|null); + + /** DataMapping pythonScript */ + pythonScript?: (string|null); + } + + /** Represents a DataMapping. */ + class DataMapping implements IDataMapping { + + /** + * Constructs a new DataMapping. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.ces.v1beta.WidgetTool.IDataMapping); + + /** DataMapping sourceToolName. */ + public sourceToolName: string; + + /** DataMapping fieldMappings. */ + public fieldMappings: { [k: string]: string }; + + /** DataMapping pythonFunction. */ + public pythonFunction?: (google.cloud.ces.v1beta.IPythonFunction|null); + + /** DataMapping mode. */ + public mode: (google.cloud.ces.v1beta.WidgetTool.DataMapping.Mode|keyof typeof google.cloud.ces.v1beta.WidgetTool.DataMapping.Mode); + + /** DataMapping pythonScript. */ + public pythonScript: string; + + /** + * Creates a new DataMapping instance using the specified properties. + * @param [properties] Properties to set + * @returns DataMapping instance + */ + public static create(properties?: google.cloud.ces.v1beta.WidgetTool.IDataMapping): google.cloud.ces.v1beta.WidgetTool.DataMapping; + + /** + * Encodes the specified DataMapping message. Does not implicitly {@link google.cloud.ces.v1beta.WidgetTool.DataMapping.verify|verify} messages. + * @param message DataMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.ces.v1beta.WidgetTool.IDataMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataMapping message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.WidgetTool.DataMapping.verify|verify} messages. + * @param message DataMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.ces.v1beta.WidgetTool.IDataMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataMapping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.ces.v1beta.WidgetTool.DataMapping; + + /** + * Decodes a DataMapping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.ces.v1beta.WidgetTool.DataMapping; + + /** + * Verifies a DataMapping message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataMapping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataMapping + */ + public static fromObject(object: { [k: string]: any }): google.cloud.ces.v1beta.WidgetTool.DataMapping; + + /** + * Creates a plain object from a DataMapping message. Also converts values to other types if specified. + * @param message DataMapping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.ces.v1beta.WidgetTool.DataMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataMapping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataMapping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataMapping { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + FIELD_MAPPING = 1, + PYTHON_SCRIPT = 2 + } + } + /** WidgetType enum. */ enum WidgetType { WIDGET_TYPE_UNSPECIFIED = 0, @@ -47700,6 +48881,9 @@ export namespace google { /** McpToolset tlsConfig */ tlsConfig?: (google.cloud.ces.v1beta.ITlsConfig|null); + + /** McpToolset customHeaders */ + customHeaders?: ({ [k: string]: string }|null); } /** Represents a McpToolset. */ @@ -47723,6 +48907,9 @@ export namespace google { /** McpToolset tlsConfig. */ public tlsConfig?: (google.cloud.ces.v1beta.ITlsConfig|null); + /** McpToolset customHeaders. */ + public customHeaders: { [k: string]: string }; + /** * Creates a new McpToolset instance using the specified properties. * @param [properties] Properties to set @@ -55246,6 +56433,20 @@ export namespace google { */ public runSession(request: google.cloud.ces.v1beta.IRunSessionRequest): Promise; + /** + * Calls StreamRunSession. + * @param request RunSessionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunSessionResponse + */ + public streamRunSession(request: google.cloud.ces.v1beta.IRunSessionRequest, callback: google.cloud.ces.v1beta.SessionService.StreamRunSessionCallback): void; + + /** + * Calls StreamRunSession. + * @param request RunSessionRequest message or plain object + * @returns Promise + */ + public streamRunSession(request: google.cloud.ces.v1beta.IRunSessionRequest): Promise; + /** * Calls BidiRunSession. * @param request BidiSessionClientMessage message or plain object @@ -55270,6 +56471,13 @@ export namespace google { */ type RunSessionCallback = (error: (Error|null), response?: google.cloud.ces.v1beta.RunSessionResponse) => void; + /** + * Callback as used by {@link google.cloud.ces.v1beta.SessionService|streamRunSession}. + * @param error Error, if any + * @param [response] RunSessionResponse + */ + type StreamRunSessionCallback = (error: (Error|null), response?: google.cloud.ces.v1beta.RunSessionResponse) => void; + /** * Callback as used by {@link google.cloud.ces.v1beta.SessionService|bidiRunSession}. * @param error Error, if any @@ -55527,6 +56735,9 @@ export namespace google { /** SessionConfig remoteDialogflowQueryParameters */ remoteDialogflowQueryParameters?: (google.cloud.ces.v1beta.SessionConfig.IRemoteDialogflowQueryParameters|null); + + /** SessionConfig enableTextStreaming */ + enableTextStreaming?: (boolean|null); } /** Represents a SessionConfig. */ @@ -55565,6 +56776,9 @@ export namespace google { /** SessionConfig remoteDialogflowQueryParameters. */ public remoteDialogflowQueryParameters?: (google.cloud.ces.v1beta.SessionConfig.IRemoteDialogflowQueryParameters|null); + /** SessionConfig enableTextStreaming. */ + public enableTextStreaming: boolean; + /** * Creates a new SessionConfig instance using the specified properties. * @param [properties] Properties to set @@ -65182,6 +66396,9 @@ export namespace google { /** GenerateChatTokenRequest recaptchaToken */ recaptchaToken?: (string|null); + + /** GenerateChatTokenRequest liveHandoffEnabled */ + liveHandoffEnabled?: (boolean|null); } /** Represents a GenerateChatTokenRequest. */ @@ -65202,6 +66419,9 @@ export namespace google { /** GenerateChatTokenRequest recaptchaToken. */ public recaptchaToken: string; + /** GenerateChatTokenRequest liveHandoffEnabled. */ + public liveHandoffEnabled: boolean; + /** * Creates a new GenerateChatTokenRequest instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-ces/protos/protos.js b/packages/google-cloud-ces/protos/protos.js index 1554a499412..caf62dc3e39 100644 --- a/packages/google-cloud-ces/protos/protos.js +++ b/packages/google-cloud-ces/protos/protos.js @@ -5697,6 +5697,7 @@ case 5: case 6: case 7: + case 8: break; } if (message.personaProperty != null && message.hasOwnProperty("personaProperty")) { @@ -5770,6 +5771,10 @@ case 7: message.channelType = 7; break; + case "CONTACT_CENTER_INTEGRATION": + case 8: + message.channelType = 8; + break; } if (object.personaProperty != null) { if (typeof object.personaProperty !== "object") @@ -6286,6 +6291,7 @@ case 1: case 2: case 3: + case 4: break; } if (message.theme != null && message.hasOwnProperty("theme")) @@ -6343,6 +6349,10 @@ case 3: message.modality = 3; break; + case "CHAT_VOICE_AND_VIDEO": + case 4: + message.modality = 4; + break; } switch (object.theme) { default: @@ -6730,6 +6740,7 @@ * @property {number} CHAT_AND_VOICE=1 CHAT_AND_VOICE value * @property {number} VOICE_ONLY=2 VOICE_ONLY value * @property {number} CHAT_ONLY=3 CHAT_ONLY value + * @property {number} CHAT_VOICE_AND_VIDEO=4 CHAT_VOICE_AND_VIDEO value */ WebWidgetConfig.Modality = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -6737,6 +6748,7 @@ values[valuesById[1] = "CHAT_AND_VOICE"] = 1; values[valuesById[2] = "VOICE_ONLY"] = 2; values[valuesById[3] = "CHAT_ONLY"] = 3; + values[valuesById[4] = "CHAT_VOICE_AND_VIDEO"] = 4; return values; })(); @@ -6770,6 +6782,7 @@ * @property {number} GOOGLE_TELEPHONY_PLATFORM=5 GOOGLE_TELEPHONY_PLATFORM value * @property {number} CONTACT_CENTER_AS_A_SERVICE=6 CONTACT_CENTER_AS_A_SERVICE value * @property {number} FIVE9=7 FIVE9 value + * @property {number} CONTACT_CENTER_INTEGRATION=8 CONTACT_CENTER_INTEGRATION value */ ChannelProfile.ChannelType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -6780,6 +6793,7 @@ values[valuesById[5] = "GOOGLE_TELEPHONY_PLATFORM"] = 5; values[valuesById[6] = "CONTACT_CENTER_AS_A_SERVICE"] = 6; values[valuesById[7] = "FIVE9"] = 7; + values[valuesById[8] = "CONTACT_CENTER_INTEGRATION"] = 8; return values; })(); @@ -10295,6 +10309,7 @@ * @property {string|null} [name] ExportAppRequest name * @property {google.cloud.ces.v1.ExportAppRequest.ExportFormat|null} [exportFormat] ExportAppRequest exportFormat * @property {string|null} [gcsUri] ExportAppRequest gcsUri + * @property {string|null} [appVersion] ExportAppRequest appVersion */ /** @@ -10336,6 +10351,14 @@ */ ExportAppRequest.prototype.gcsUri = ""; + /** + * ExportAppRequest appVersion. + * @member {string} appVersion + * @memberof google.cloud.ces.v1.ExportAppRequest + * @instance + */ + ExportAppRequest.prototype.appVersion = ""; + /** * Creates a new ExportAppRequest instance using the specified properties. * @function create @@ -10366,6 +10389,8 @@ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.exportFormat); if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.gcsUri); + if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.appVersion); return writer; }; @@ -10414,6 +10439,10 @@ message.gcsUri = reader.string(); break; } + case 4: { + message.appVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10464,6 +10493,9 @@ if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) if (!$util.isString(message.gcsUri)) return "gcsUri: string expected"; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (!$util.isString(message.appVersion)) + return "appVersion: string expected"; return null; }; @@ -10503,6 +10535,8 @@ } if (object.gcsUri != null) message.gcsUri = String(object.gcsUri); + if (object.appVersion != null) + message.appVersion = String(object.appVersion); return message; }; @@ -10523,6 +10557,7 @@ object.name = ""; object.exportFormat = options.enums === String ? "EXPORT_FORMAT_UNSPECIFIED" : 0; object.gcsUri = ""; + object.appVersion = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -10530,6 +10565,8 @@ object.exportFormat = options.enums === String ? $root.google.cloud.ces.v1.ExportAppRequest.ExportFormat[message.exportFormat] === undefined ? message.exportFormat : $root.google.cloud.ces.v1.ExportAppRequest.ExportFormat[message.exportFormat] : message.exportFormat; if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) object.gcsUri = message.gcsUri; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + object.appVersion = message.appVersion; return object; }; @@ -25026,6 +25063,7 @@ * @property {google.cloud.ces.v1.ITimeZoneSettings|null} [timeZoneSettings] App timeZoneSettings * @property {google.cloud.ces.v1.IAudioProcessingConfig|null} [audioProcessingConfig] App audioProcessingConfig * @property {google.cloud.ces.v1.ILoggingSettings|null} [loggingSettings] App loggingSettings + * @property {google.cloud.ces.v1.IErrorHandlingSettings|null} [errorHandlingSettings] App errorHandlingSettings * @property {google.cloud.ces.v1.IModelSettings|null} [modelSettings] App modelSettings * @property {google.cloud.ces.v1.App.ToolExecutionMode|null} [toolExecutionMode] App toolExecutionMode * @property {google.cloud.ces.v1.IEvaluationMetricsThresholds|null} [evaluationMetricsThresholds] App evaluationMetricsThresholds @@ -25135,6 +25173,14 @@ */ App.prototype.loggingSettings = null; + /** + * App errorHandlingSettings. + * @member {google.cloud.ces.v1.IErrorHandlingSettings|null|undefined} errorHandlingSettings + * @memberof google.cloud.ces.v1.App + * @instance + */ + App.prototype.errorHandlingSettings = null; + /** * App modelSettings. * @member {google.cloud.ces.v1.IModelSettings|null|undefined} modelSettings @@ -25341,6 +25387,8 @@ writer.uint32(/* id 31, wireType 0 =*/248).bool(message.pinned); if (message.toolExecutionMode != null && Object.hasOwnProperty.call(message, "toolExecutionMode")) writer.uint32(/* id 32, wireType 0 =*/256).int32(message.toolExecutionMode); + if (message.errorHandlingSettings != null && Object.hasOwnProperty.call(message, "errorHandlingSettings")) + $root.google.cloud.ces.v1.ErrorHandlingSettings.encode(message.errorHandlingSettings, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); return writer; }; @@ -25413,6 +25461,10 @@ message.loggingSettings = $root.google.cloud.ces.v1.LoggingSettings.decode(reader, reader.uint32()); break; } + case 34: { + message.errorHandlingSettings = $root.google.cloud.ces.v1.ErrorHandlingSettings.decode(reader, reader.uint32()); + break; + } case 13: { message.modelSettings = $root.google.cloud.ces.v1.ModelSettings.decode(reader, reader.uint32()); break; @@ -25572,6 +25624,11 @@ if (error) return "loggingSettings." + error; } + if (message.errorHandlingSettings != null && message.hasOwnProperty("errorHandlingSettings")) { + var error = $root.google.cloud.ces.v1.ErrorHandlingSettings.verify(message.errorHandlingSettings); + if (error) + return "errorHandlingSettings." + error; + } if (message.modelSettings != null && message.hasOwnProperty("modelSettings")) { var error = $root.google.cloud.ces.v1.ModelSettings.verify(message.modelSettings); if (error) @@ -25706,6 +25763,11 @@ throw TypeError(".google.cloud.ces.v1.App.loggingSettings: object expected"); message.loggingSettings = $root.google.cloud.ces.v1.LoggingSettings.fromObject(object.loggingSettings); } + if (object.errorHandlingSettings != null) { + if (typeof object.errorHandlingSettings !== "object") + throw TypeError(".google.cloud.ces.v1.App.errorHandlingSettings: object expected"); + message.errorHandlingSettings = $root.google.cloud.ces.v1.ErrorHandlingSettings.fromObject(object.errorHandlingSettings); + } if (object.modelSettings != null) { if (typeof object.modelSettings !== "object") throw TypeError(".google.cloud.ces.v1.App.modelSettings: object expected"); @@ -25848,6 +25910,7 @@ object.locked = false; object.pinned = false; object.toolExecutionMode = options.enums === String ? "TOOL_EXECUTION_MODE_UNSPECIFIED" : 0; + object.errorHandlingSettings = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -25912,6 +25975,8 @@ object.pinned = message.pinned; if (message.toolExecutionMode != null && message.hasOwnProperty("toolExecutionMode")) object.toolExecutionMode = options.enums === String ? $root.google.cloud.ces.v1.App.ToolExecutionMode[message.toolExecutionMode] === undefined ? message.toolExecutionMode : $root.google.cloud.ces.v1.App.ToolExecutionMode[message.toolExecutionMode] : message.toolExecutionMode; + if (message.errorHandlingSettings != null && message.hasOwnProperty("errorHandlingSettings")) + object.errorHandlingSettings = $root.google.cloud.ces.v1.ErrorHandlingSettings.toObject(message.errorHandlingSettings, options); return object; }; @@ -28441,6 +28506,258 @@ return LoggingSettings; })(); + v1.ErrorHandlingSettings = (function() { + + /** + * Properties of an ErrorHandlingSettings. + * @memberof google.cloud.ces.v1 + * @interface IErrorHandlingSettings + * @property {google.cloud.ces.v1.ErrorHandlingSettings.ErrorHandlingStrategy|null} [errorHandlingStrategy] ErrorHandlingSettings errorHandlingStrategy + */ + + /** + * Constructs a new ErrorHandlingSettings. + * @memberof google.cloud.ces.v1 + * @classdesc Represents an ErrorHandlingSettings. + * @implements IErrorHandlingSettings + * @constructor + * @param {google.cloud.ces.v1.IErrorHandlingSettings=} [properties] Properties to set + */ + function ErrorHandlingSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorHandlingSettings errorHandlingStrategy. + * @member {google.cloud.ces.v1.ErrorHandlingSettings.ErrorHandlingStrategy} errorHandlingStrategy + * @memberof google.cloud.ces.v1.ErrorHandlingSettings + * @instance + */ + ErrorHandlingSettings.prototype.errorHandlingStrategy = 0; + + /** + * Creates a new ErrorHandlingSettings instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1.ErrorHandlingSettings + * @static + * @param {google.cloud.ces.v1.IErrorHandlingSettings=} [properties] Properties to set + * @returns {google.cloud.ces.v1.ErrorHandlingSettings} ErrorHandlingSettings instance + */ + ErrorHandlingSettings.create = function create(properties) { + return new ErrorHandlingSettings(properties); + }; + + /** + * Encodes the specified ErrorHandlingSettings message. Does not implicitly {@link google.cloud.ces.v1.ErrorHandlingSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1.ErrorHandlingSettings + * @static + * @param {google.cloud.ces.v1.IErrorHandlingSettings} message ErrorHandlingSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorHandlingSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errorHandlingStrategy != null && Object.hasOwnProperty.call(message, "errorHandlingStrategy")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.errorHandlingStrategy); + return writer; + }; + + /** + * Encodes the specified ErrorHandlingSettings message, length delimited. Does not implicitly {@link google.cloud.ces.v1.ErrorHandlingSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1.ErrorHandlingSettings + * @static + * @param {google.cloud.ces.v1.IErrorHandlingSettings} message ErrorHandlingSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorHandlingSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorHandlingSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1.ErrorHandlingSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1.ErrorHandlingSettings} ErrorHandlingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorHandlingSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1.ErrorHandlingSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.errorHandlingStrategy = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorHandlingSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1.ErrorHandlingSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1.ErrorHandlingSettings} ErrorHandlingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorHandlingSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorHandlingSettings message. + * @function verify + * @memberof google.cloud.ces.v1.ErrorHandlingSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorHandlingSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errorHandlingStrategy != null && message.hasOwnProperty("errorHandlingStrategy")) + switch (message.errorHandlingStrategy) { + default: + return "errorHandlingStrategy: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an ErrorHandlingSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1.ErrorHandlingSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1.ErrorHandlingSettings} ErrorHandlingSettings + */ + ErrorHandlingSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1.ErrorHandlingSettings) + return object; + var message = new $root.google.cloud.ces.v1.ErrorHandlingSettings(); + switch (object.errorHandlingStrategy) { + default: + if (typeof object.errorHandlingStrategy === "number") { + message.errorHandlingStrategy = object.errorHandlingStrategy; + break; + } + break; + case "ERROR_HANDLING_STRATEGY_UNSPECIFIED": + case 0: + message.errorHandlingStrategy = 0; + break; + case "NONE": + case 1: + message.errorHandlingStrategy = 1; + break; + case "FALLBACK_RESPONSE": + case 2: + message.errorHandlingStrategy = 2; + break; + case "END_SESSION": + case 3: + message.errorHandlingStrategy = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an ErrorHandlingSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1.ErrorHandlingSettings + * @static + * @param {google.cloud.ces.v1.ErrorHandlingSettings} message ErrorHandlingSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorHandlingSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.errorHandlingStrategy = options.enums === String ? "ERROR_HANDLING_STRATEGY_UNSPECIFIED" : 0; + if (message.errorHandlingStrategy != null && message.hasOwnProperty("errorHandlingStrategy")) + object.errorHandlingStrategy = options.enums === String ? $root.google.cloud.ces.v1.ErrorHandlingSettings.ErrorHandlingStrategy[message.errorHandlingStrategy] === undefined ? message.errorHandlingStrategy : $root.google.cloud.ces.v1.ErrorHandlingSettings.ErrorHandlingStrategy[message.errorHandlingStrategy] : message.errorHandlingStrategy; + return object; + }; + + /** + * Converts this ErrorHandlingSettings to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1.ErrorHandlingSettings + * @instance + * @returns {Object.} JSON object + */ + ErrorHandlingSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorHandlingSettings + * @function getTypeUrl + * @memberof google.cloud.ces.v1.ErrorHandlingSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorHandlingSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1.ErrorHandlingSettings"; + }; + + /** + * ErrorHandlingStrategy enum. + * @name google.cloud.ces.v1.ErrorHandlingSettings.ErrorHandlingStrategy + * @enum {number} + * @property {number} ERROR_HANDLING_STRATEGY_UNSPECIFIED=0 ERROR_HANDLING_STRATEGY_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} FALLBACK_RESPONSE=2 FALLBACK_RESPONSE value + * @property {number} END_SESSION=3 END_SESSION value + */ + ErrorHandlingSettings.ErrorHandlingStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERROR_HANDLING_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "FALLBACK_RESPONSE"] = 2; + values[valuesById[3] = "END_SESSION"] = 3; + return values; + })(); + + return ErrorHandlingSettings; + })(); + v1.EvaluationMetricsThresholds = (function() { /** @@ -34155,6 +34472,7 @@ * @interface IChunk * @property {string|null} [text] Chunk text * @property {string|null} [transcript] Chunk transcript + * @property {google.cloud.ces.v1.IBlob|null} [blob] Chunk blob * @property {google.protobuf.IStruct|null} [payload] Chunk payload * @property {google.cloud.ces.v1.IImage|null} [image] Chunk image * @property {google.cloud.ces.v1.IToolCall|null} [toolCall] Chunk toolCall @@ -34195,6 +34513,14 @@ */ Chunk.prototype.transcript = null; + /** + * Chunk blob. + * @member {google.cloud.ces.v1.IBlob|null|undefined} blob + * @memberof google.cloud.ces.v1.Chunk + * @instance + */ + Chunk.prototype.blob = null; + /** * Chunk payload. * @member {google.protobuf.IStruct|null|undefined} payload @@ -34256,12 +34582,12 @@ /** * Chunk data. - * @member {"text"|"transcript"|"payload"|"image"|"toolCall"|"toolResponse"|"agentTransfer"|"updatedVariables"|"defaultVariables"|undefined} data + * @member {"text"|"transcript"|"blob"|"payload"|"image"|"toolCall"|"toolResponse"|"agentTransfer"|"updatedVariables"|"defaultVariables"|undefined} data * @memberof google.cloud.ces.v1.Chunk * @instance */ Object.defineProperty(Chunk.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["text", "transcript", "payload", "image", "toolCall", "toolResponse", "agentTransfer", "updatedVariables", "defaultVariables"]), + get: $util.oneOfGetter($oneOfFields = ["text", "transcript", "blob", "payload", "image", "toolCall", "toolResponse", "agentTransfer", "updatedVariables", "defaultVariables"]), set: $util.oneOfSetter($oneOfFields) }); @@ -34299,6 +34625,8 @@ $root.google.cloud.ces.v1.AgentTransfer.encode(message.agentTransfer, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.image != null && Object.hasOwnProperty.call(message, "image")) $root.google.cloud.ces.v1.Image.encode(message.image, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.blob != null && Object.hasOwnProperty.call(message, "blob")) + $root.google.cloud.ces.v1.Blob.encode(message.blob, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.updatedVariables != null && Object.hasOwnProperty.call(message, "updatedVariables")) $root.google.protobuf.Struct.encode(message.updatedVariables, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) @@ -34351,6 +34679,10 @@ message.transcript = reader.string(); break; } + case 7: { + message.blob = $root.google.cloud.ces.v1.Blob.decode(reader, reader.uint32()); + break; + } case 11: { message.payload = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; @@ -34427,6 +34759,16 @@ if (!$util.isString(message.transcript)) return "transcript: string expected"; } + if (message.blob != null && message.hasOwnProperty("blob")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.ces.v1.Blob.verify(message.blob); + if (error) + return "blob." + error; + } + } if (message.payload != null && message.hasOwnProperty("payload")) { if (properties.data === 1) return "data: multiple values"; @@ -34516,6 +34858,11 @@ message.text = String(object.text); if (object.transcript != null) message.transcript = String(object.transcript); + if (object.blob != null) { + if (typeof object.blob !== "object") + throw TypeError(".google.cloud.ces.v1.Chunk.blob: object expected"); + message.blob = $root.google.cloud.ces.v1.Blob.fromObject(object.blob); + } if (object.payload != null) { if (typeof object.payload !== "object") throw TypeError(".google.cloud.ces.v1.Chunk.payload: object expected"); @@ -34592,6 +34939,11 @@ if (options.oneofs) object.data = "image"; } + if (message.blob != null && message.hasOwnProperty("blob")) { + object.blob = $root.google.cloud.ces.v1.Blob.toObject(message.blob, options); + if (options.oneofs) + object.data = "blob"; + } if (message.updatedVariables != null && message.hasOwnProperty("updatedVariables")) { object.updatedVariables = $root.google.protobuf.Struct.toObject(message.updatedVariables, options); if (options.oneofs) @@ -38957,6 +39309,7 @@ * @property {google.cloud.ces.v1.IMcpTool|null} [mcpTool] Tool mcpTool * @property {google.cloud.ces.v1.IFileSearchTool|null} [fileSearchTool] Tool fileSearchTool * @property {google.cloud.ces.v1.ISystemTool|null} [systemTool] Tool systemTool + * @property {google.cloud.ces.v1.IAgentTool|null} [agentTool] Tool agentTool * @property {google.cloud.ces.v1.IWidgetTool|null} [widgetTool] Tool widgetTool * @property {string|null} [name] Tool name * @property {string|null} [displayName] Tool displayName @@ -39055,6 +39408,14 @@ */ Tool.prototype.systemTool = null; + /** + * Tool agentTool. + * @member {google.cloud.ces.v1.IAgentTool|null|undefined} agentTool + * @memberof google.cloud.ces.v1.Tool + * @instance + */ + Tool.prototype.agentTool = null; + /** * Tool widgetTool. * @member {google.cloud.ces.v1.IWidgetTool|null|undefined} widgetTool @@ -39132,12 +39493,12 @@ /** * Tool toolType. - * @member {"clientFunction"|"openApiTool"|"googleSearchTool"|"connectorTool"|"dataStoreTool"|"pythonFunction"|"mcpTool"|"fileSearchTool"|"systemTool"|"widgetTool"|undefined} toolType + * @member {"clientFunction"|"openApiTool"|"googleSearchTool"|"connectorTool"|"dataStoreTool"|"pythonFunction"|"mcpTool"|"fileSearchTool"|"systemTool"|"agentTool"|"widgetTool"|undefined} toolType * @memberof google.cloud.ces.v1.Tool * @instance */ Object.defineProperty(Tool.prototype, "toolType", { - get: $util.oneOfGetter($oneOfFields = ["clientFunction", "openApiTool", "googleSearchTool", "connectorTool", "dataStoreTool", "pythonFunction", "mcpTool", "fileSearchTool", "systemTool", "widgetTool"]), + get: $util.oneOfGetter($oneOfFields = ["clientFunction", "openApiTool", "googleSearchTool", "connectorTool", "dataStoreTool", "pythonFunction", "mcpTool", "fileSearchTool", "systemTool", "agentTool", "widgetTool"]), set: $util.oneOfSetter($oneOfFields) }); @@ -39199,6 +39560,8 @@ $root.google.cloud.ces.v1.SystemTool.encode(message.systemTool, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); if (message.toolFakeConfig != null && Object.hasOwnProperty.call(message, "toolFakeConfig")) $root.google.cloud.ces.v1.ToolFakeConfig.encode(message.toolFakeConfig, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.agentTool != null && Object.hasOwnProperty.call(message, "agentTool")) + $root.google.cloud.ces.v1.AgentTool.encode(message.agentTool, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); if (message.widgetTool != null && Object.hasOwnProperty.call(message, "widgetTool")) $root.google.cloud.ces.v1.WidgetTool.encode(message.widgetTool, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); return writer; @@ -39273,6 +39636,10 @@ message.systemTool = $root.google.cloud.ces.v1.SystemTool.decode(reader, reader.uint32()); break; } + case 23: { + message.agentTool = $root.google.cloud.ces.v1.AgentTool.decode(reader, reader.uint32()); + break; + } case 24: { message.widgetTool = $root.google.cloud.ces.v1.WidgetTool.decode(reader, reader.uint32()); break; @@ -39433,6 +39800,16 @@ return "systemTool." + error; } } + if (message.agentTool != null && message.hasOwnProperty("agentTool")) { + if (properties.toolType === 1) + return "toolType: multiple values"; + properties.toolType = 1; + { + var error = $root.google.cloud.ces.v1.AgentTool.verify(message.agentTool); + if (error) + return "agentTool." + error; + } + } if (message.widgetTool != null && message.hasOwnProperty("widgetTool")) { if (properties.toolType === 1) return "toolType: multiple values"; @@ -39539,6 +39916,11 @@ throw TypeError(".google.cloud.ces.v1.Tool.systemTool: object expected"); message.systemTool = $root.google.cloud.ces.v1.SystemTool.fromObject(object.systemTool); } + if (object.agentTool != null) { + if (typeof object.agentTool !== "object") + throw TypeError(".google.cloud.ces.v1.Tool.agentTool: object expected"); + message.agentTool = $root.google.cloud.ces.v1.AgentTool.fromObject(object.agentTool); + } if (object.widgetTool != null) { if (typeof object.widgetTool !== "object") throw TypeError(".google.cloud.ces.v1.Tool.widgetTool: object expected"); @@ -39674,6 +40056,11 @@ } if (message.toolFakeConfig != null && message.hasOwnProperty("toolFakeConfig")) object.toolFakeConfig = $root.google.cloud.ces.v1.ToolFakeConfig.toObject(message.toolFakeConfig, options); + if (message.agentTool != null && message.hasOwnProperty("agentTool")) { + object.agentTool = $root.google.cloud.ces.v1.AgentTool.toObject(message.agentTool, options); + if (options.oneofs) + object.toolType = "agentTool"; + } if (message.widgetTool != null && message.hasOwnProperty("widgetTool")) { object.widgetTool = $root.google.cloud.ces.v1.WidgetTool.toObject(message.widgetTool, options); if (options.oneofs) @@ -39711,6 +40098,258 @@ return Tool; })(); + v1.AgentTool = (function() { + + /** + * Properties of an AgentTool. + * @memberof google.cloud.ces.v1 + * @interface IAgentTool + * @property {string|null} [name] AgentTool name + * @property {string|null} [description] AgentTool description + * @property {string|null} [rootAgent] AgentTool rootAgent + */ + + /** + * Constructs a new AgentTool. + * @memberof google.cloud.ces.v1 + * @classdesc Represents an AgentTool. + * @implements IAgentTool + * @constructor + * @param {google.cloud.ces.v1.IAgentTool=} [properties] Properties to set + */ + function AgentTool(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AgentTool name. + * @member {string} name + * @memberof google.cloud.ces.v1.AgentTool + * @instance + */ + AgentTool.prototype.name = ""; + + /** + * AgentTool description. + * @member {string} description + * @memberof google.cloud.ces.v1.AgentTool + * @instance + */ + AgentTool.prototype.description = ""; + + /** + * AgentTool rootAgent. + * @member {string} rootAgent + * @memberof google.cloud.ces.v1.AgentTool + * @instance + */ + AgentTool.prototype.rootAgent = ""; + + /** + * Creates a new AgentTool instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1.AgentTool + * @static + * @param {google.cloud.ces.v1.IAgentTool=} [properties] Properties to set + * @returns {google.cloud.ces.v1.AgentTool} AgentTool instance + */ + AgentTool.create = function create(properties) { + return new AgentTool(properties); + }; + + /** + * Encodes the specified AgentTool message. Does not implicitly {@link google.cloud.ces.v1.AgentTool.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1.AgentTool + * @static + * @param {google.cloud.ces.v1.IAgentTool} message AgentTool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentTool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.rootAgent != null && Object.hasOwnProperty.call(message, "rootAgent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rootAgent); + return writer; + }; + + /** + * Encodes the specified AgentTool message, length delimited. Does not implicitly {@link google.cloud.ces.v1.AgentTool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1.AgentTool + * @static + * @param {google.cloud.ces.v1.IAgentTool} message AgentTool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentTool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AgentTool message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1.AgentTool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1.AgentTool} AgentTool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentTool.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1.AgentTool(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.rootAgent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AgentTool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1.AgentTool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1.AgentTool} AgentTool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentTool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AgentTool message. + * @function verify + * @memberof google.cloud.ces.v1.AgentTool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AgentTool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.rootAgent != null && message.hasOwnProperty("rootAgent")) + if (!$util.isString(message.rootAgent)) + return "rootAgent: string expected"; + return null; + }; + + /** + * Creates an AgentTool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1.AgentTool + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1.AgentTool} AgentTool + */ + AgentTool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1.AgentTool) + return object; + var message = new $root.google.cloud.ces.v1.AgentTool(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.rootAgent != null) + message.rootAgent = String(object.rootAgent); + return message; + }; + + /** + * Creates a plain object from an AgentTool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1.AgentTool + * @static + * @param {google.cloud.ces.v1.AgentTool} message AgentTool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AgentTool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.rootAgent = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.rootAgent != null && message.hasOwnProperty("rootAgent")) + object.rootAgent = message.rootAgent; + return object; + }; + + /** + * Converts this AgentTool to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1.AgentTool + * @instance + * @returns {Object.} JSON object + */ + AgentTool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AgentTool + * @function getTypeUrl + * @memberof google.cloud.ces.v1.AgentTool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AgentTool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1.AgentTool"; + }; + + return AgentTool; + })(); + v1.ClientFunction = (function() { /** @@ -48752,6 +49391,7 @@ * @property {google.cloud.ces.v1.IApiAuthentication|null} [apiAuthentication] McpTool apiAuthentication * @property {google.cloud.ces.v1.ITlsConfig|null} [tlsConfig] McpTool tlsConfig * @property {google.cloud.ces.v1.IServiceDirectoryConfig|null} [serviceDirectoryConfig] McpTool serviceDirectoryConfig + * @property {Object.|null} [customHeaders] McpTool customHeaders */ /** @@ -48763,6 +49403,7 @@ * @param {google.cloud.ces.v1.IMcpTool=} [properties] Properties to set */ function McpTool(properties) { + this.customHeaders = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48833,6 +49474,14 @@ */ McpTool.prototype.serviceDirectoryConfig = null; + /** + * McpTool customHeaders. + * @member {Object.} customHeaders + * @memberof google.cloud.ces.v1.McpTool + * @instance + */ + McpTool.prototype.customHeaders = $util.emptyObject; + /** * Creates a new McpTool instance using the specified properties. * @function create @@ -48873,6 +49522,9 @@ $root.google.cloud.ces.v1.TlsConfig.encode(message.tlsConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.serviceDirectoryConfig != null && Object.hasOwnProperty.call(message, "serviceDirectoryConfig")) $root.google.cloud.ces.v1.ServiceDirectoryConfig.encode(message.serviceDirectoryConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.customHeaders != null && Object.hasOwnProperty.call(message, "customHeaders")) + for (var keys = Object.keys(message.customHeaders), i = 0; i < keys.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.customHeaders[keys[i]]).ldelim(); return writer; }; @@ -48903,7 +49555,7 @@ McpTool.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1.McpTool(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1.McpTool(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -48941,6 +49593,29 @@ message.serviceDirectoryConfig = $root.google.cloud.ces.v1.ServiceDirectoryConfig.decode(reader, reader.uint32()); break; } + case 9: { + if (message.customHeaders === $util.emptyObject) + message.customHeaders = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.customHeaders[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -49010,6 +49685,14 @@ if (error) return "serviceDirectoryConfig." + error; } + if (message.customHeaders != null && message.hasOwnProperty("customHeaders")) { + if (!$util.isObject(message.customHeaders)) + return "customHeaders: object expected"; + var key = Object.keys(message.customHeaders); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.customHeaders[key[i]])) + return "customHeaders: string{k:string} expected"; + } return null; }; @@ -49056,6 +49739,13 @@ throw TypeError(".google.cloud.ces.v1.McpTool.serviceDirectoryConfig: object expected"); message.serviceDirectoryConfig = $root.google.cloud.ces.v1.ServiceDirectoryConfig.fromObject(object.serviceDirectoryConfig); } + if (object.customHeaders) { + if (typeof object.customHeaders !== "object") + throw TypeError(".google.cloud.ces.v1.McpTool.customHeaders: object expected"); + message.customHeaders = {}; + for (var keys = Object.keys(object.customHeaders), i = 0; i < keys.length; ++i) + message.customHeaders[keys[i]] = String(object.customHeaders[keys[i]]); + } return message; }; @@ -49072,6 +49762,8 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.customHeaders = {}; if (options.defaults) { object.name = ""; object.description = ""; @@ -49098,6 +49790,12 @@ object.tlsConfig = $root.google.cloud.ces.v1.TlsConfig.toObject(message.tlsConfig, options); if (message.serviceDirectoryConfig != null && message.hasOwnProperty("serviceDirectoryConfig")) object.serviceDirectoryConfig = $root.google.cloud.ces.v1.ServiceDirectoryConfig.toObject(message.serviceDirectoryConfig, options); + var keys2; + if (message.customHeaders && (keys2 = Object.keys(message.customHeaders)).length) { + object.customHeaders = {}; + for (var j = 0; j < keys2.length; ++j) + object.customHeaders[keys2[j]] = message.customHeaders[keys2[j]]; + } return object; }; @@ -50003,6 +50701,8 @@ * @property {string|null} [name] WidgetTool name * @property {string|null} [description] WidgetTool description * @property {google.cloud.ces.v1.WidgetTool.WidgetType|null} [widgetType] WidgetTool widgetType + * @property {google.protobuf.IStruct|null} [uiConfig] WidgetTool uiConfig + * @property {google.cloud.ces.v1.WidgetTool.IDataMapping|null} [dataMapping] WidgetTool dataMapping */ /** @@ -50052,6 +50752,22 @@ */ WidgetTool.prototype.widgetType = 0; + /** + * WidgetTool uiConfig. + * @member {google.protobuf.IStruct|null|undefined} uiConfig + * @memberof google.cloud.ces.v1.WidgetTool + * @instance + */ + WidgetTool.prototype.uiConfig = null; + + /** + * WidgetTool dataMapping. + * @member {google.cloud.ces.v1.WidgetTool.IDataMapping|null|undefined} dataMapping + * @memberof google.cloud.ces.v1.WidgetTool + * @instance + */ + WidgetTool.prototype.dataMapping = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -50098,6 +50814,10 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.widgetType); if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) $root.google.cloud.ces.v1.Schema.encode(message.parameters, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.uiConfig != null && Object.hasOwnProperty.call(message, "uiConfig")) + $root.google.protobuf.Struct.encode(message.uiConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dataMapping != null && Object.hasOwnProperty.call(message, "dataMapping")) + $root.google.cloud.ces.v1.WidgetTool.DataMapping.encode(message.dataMapping, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -50150,6 +50870,14 @@ message.widgetType = reader.int32(); break; } + case 5: { + message.uiConfig = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.dataMapping = $root.google.cloud.ces.v1.WidgetTool.DataMapping.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -50215,8 +50943,20 @@ case 8: case 9: case 10: + case 11: + case 12: break; } + if (message.uiConfig != null && message.hasOwnProperty("uiConfig")) { + var error = $root.google.protobuf.Struct.verify(message.uiConfig); + if (error) + return "uiConfig." + error; + } + if (message.dataMapping != null && message.hasOwnProperty("dataMapping")) { + var error = $root.google.cloud.ces.v1.WidgetTool.DataMapping.verify(message.dataMapping); + if (error) + return "dataMapping." + error; + } return null; }; @@ -50292,6 +51032,24 @@ case 10: message.widgetType = 10; break; + case "APPOINTMENT_SCHEDULER": + case 11: + message.widgetType = 11; + break; + case "CONTACT_FORM": + case 12: + message.widgetType = 12; + break; + } + if (object.uiConfig != null) { + if (typeof object.uiConfig !== "object") + throw TypeError(".google.cloud.ces.v1.WidgetTool.uiConfig: object expected"); + message.uiConfig = $root.google.protobuf.Struct.fromObject(object.uiConfig); + } + if (object.dataMapping != null) { + if (typeof object.dataMapping !== "object") + throw TypeError(".google.cloud.ces.v1.WidgetTool.dataMapping: object expected"); + message.dataMapping = $root.google.cloud.ces.v1.WidgetTool.DataMapping.fromObject(object.dataMapping); } return message; }; @@ -50313,6 +51071,8 @@ object.name = ""; object.description = ""; object.widgetType = options.enums === String ? "WIDGET_TYPE_UNSPECIFIED" : 0; + object.uiConfig = null; + object.dataMapping = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -50325,6 +51085,10 @@ if (options.oneofs) object.input = "parameters"; } + if (message.uiConfig != null && message.hasOwnProperty("uiConfig")) + object.uiConfig = $root.google.protobuf.Struct.toObject(message.uiConfig, options); + if (message.dataMapping != null && message.hasOwnProperty("dataMapping")) + object.dataMapping = $root.google.cloud.ces.v1.WidgetTool.DataMapping.toObject(message.dataMapping, options); return object; }; @@ -50354,6 +51118,385 @@ return typeUrlPrefix + "/google.cloud.ces.v1.WidgetTool"; }; + WidgetTool.DataMapping = (function() { + + /** + * Properties of a DataMapping. + * @memberof google.cloud.ces.v1.WidgetTool + * @interface IDataMapping + * @property {string|null} [sourceToolName] DataMapping sourceToolName + * @property {Object.|null} [fieldMappings] DataMapping fieldMappings + * @property {google.cloud.ces.v1.IPythonFunction|null} [pythonFunction] DataMapping pythonFunction + * @property {google.cloud.ces.v1.WidgetTool.DataMapping.Mode|null} [mode] DataMapping mode + * @property {string|null} [pythonScript] DataMapping pythonScript + */ + + /** + * Constructs a new DataMapping. + * @memberof google.cloud.ces.v1.WidgetTool + * @classdesc Represents a DataMapping. + * @implements IDataMapping + * @constructor + * @param {google.cloud.ces.v1.WidgetTool.IDataMapping=} [properties] Properties to set + */ + function DataMapping(properties) { + this.fieldMappings = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataMapping sourceToolName. + * @member {string} sourceToolName + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @instance + */ + DataMapping.prototype.sourceToolName = ""; + + /** + * DataMapping fieldMappings. + * @member {Object.} fieldMappings + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @instance + */ + DataMapping.prototype.fieldMappings = $util.emptyObject; + + /** + * DataMapping pythonFunction. + * @member {google.cloud.ces.v1.IPythonFunction|null|undefined} pythonFunction + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @instance + */ + DataMapping.prototype.pythonFunction = null; + + /** + * DataMapping mode. + * @member {google.cloud.ces.v1.WidgetTool.DataMapping.Mode} mode + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @instance + */ + DataMapping.prototype.mode = 0; + + /** + * DataMapping pythonScript. + * @member {string} pythonScript + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @instance + */ + DataMapping.prototype.pythonScript = ""; + + /** + * Creates a new DataMapping instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @static + * @param {google.cloud.ces.v1.WidgetTool.IDataMapping=} [properties] Properties to set + * @returns {google.cloud.ces.v1.WidgetTool.DataMapping} DataMapping instance + */ + DataMapping.create = function create(properties) { + return new DataMapping(properties); + }; + + /** + * Encodes the specified DataMapping message. Does not implicitly {@link google.cloud.ces.v1.WidgetTool.DataMapping.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @static + * @param {google.cloud.ces.v1.WidgetTool.IDataMapping} message DataMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataMapping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceToolName != null && Object.hasOwnProperty.call(message, "sourceToolName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceToolName); + if (message.fieldMappings != null && Object.hasOwnProperty.call(message, "fieldMappings")) + for (var keys = Object.keys(message.fieldMappings), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.fieldMappings[keys[i]]).ldelim(); + if (message.pythonScript != null && Object.hasOwnProperty.call(message, "pythonScript")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pythonScript); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mode); + if (message.pythonFunction != null && Object.hasOwnProperty.call(message, "pythonFunction")) + $root.google.cloud.ces.v1.PythonFunction.encode(message.pythonFunction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataMapping message, length delimited. Does not implicitly {@link google.cloud.ces.v1.WidgetTool.DataMapping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @static + * @param {google.cloud.ces.v1.WidgetTool.IDataMapping} message DataMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataMapping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataMapping message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1.WidgetTool.DataMapping} DataMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataMapping.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1.WidgetTool.DataMapping(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sourceToolName = reader.string(); + break; + } + case 2: { + if (message.fieldMappings === $util.emptyObject) + message.fieldMappings = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fieldMappings[key] = value; + break; + } + case 5: { + message.pythonFunction = $root.google.cloud.ces.v1.PythonFunction.decode(reader, reader.uint32()); + break; + } + case 4: { + message.mode = reader.int32(); + break; + } + case 3: { + message.pythonScript = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataMapping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1.WidgetTool.DataMapping} DataMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataMapping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataMapping message. + * @function verify + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataMapping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceToolName != null && message.hasOwnProperty("sourceToolName")) + if (!$util.isString(message.sourceToolName)) + return "sourceToolName: string expected"; + if (message.fieldMappings != null && message.hasOwnProperty("fieldMappings")) { + if (!$util.isObject(message.fieldMappings)) + return "fieldMappings: object expected"; + var key = Object.keys(message.fieldMappings); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.fieldMappings[key[i]])) + return "fieldMappings: string{k:string} expected"; + } + if (message.pythonFunction != null && message.hasOwnProperty("pythonFunction")) { + var error = $root.google.cloud.ces.v1.PythonFunction.verify(message.pythonFunction); + if (error) + return "pythonFunction." + error; + } + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.pythonScript != null && message.hasOwnProperty("pythonScript")) + if (!$util.isString(message.pythonScript)) + return "pythonScript: string expected"; + return null; + }; + + /** + * Creates a DataMapping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1.WidgetTool.DataMapping} DataMapping + */ + DataMapping.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1.WidgetTool.DataMapping) + return object; + var message = new $root.google.cloud.ces.v1.WidgetTool.DataMapping(); + if (object.sourceToolName != null) + message.sourceToolName = String(object.sourceToolName); + if (object.fieldMappings) { + if (typeof object.fieldMappings !== "object") + throw TypeError(".google.cloud.ces.v1.WidgetTool.DataMapping.fieldMappings: object expected"); + message.fieldMappings = {}; + for (var keys = Object.keys(object.fieldMappings), i = 0; i < keys.length; ++i) + message.fieldMappings[keys[i]] = String(object.fieldMappings[keys[i]]); + } + if (object.pythonFunction != null) { + if (typeof object.pythonFunction !== "object") + throw TypeError(".google.cloud.ces.v1.WidgetTool.DataMapping.pythonFunction: object expected"); + message.pythonFunction = $root.google.cloud.ces.v1.PythonFunction.fromObject(object.pythonFunction); + } + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "FIELD_MAPPING": + case 1: + message.mode = 1; + break; + case "PYTHON_SCRIPT": + case 2: + message.mode = 2; + break; + } + if (object.pythonScript != null) + message.pythonScript = String(object.pythonScript); + return message; + }; + + /** + * Creates a plain object from a DataMapping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @static + * @param {google.cloud.ces.v1.WidgetTool.DataMapping} message DataMapping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fieldMappings = {}; + if (options.defaults) { + object.sourceToolName = ""; + object.pythonScript = ""; + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + object.pythonFunction = null; + } + if (message.sourceToolName != null && message.hasOwnProperty("sourceToolName")) + object.sourceToolName = message.sourceToolName; + var keys2; + if (message.fieldMappings && (keys2 = Object.keys(message.fieldMappings)).length) { + object.fieldMappings = {}; + for (var j = 0; j < keys2.length; ++j) + object.fieldMappings[keys2[j]] = message.fieldMappings[keys2[j]]; + } + if (message.pythonScript != null && message.hasOwnProperty("pythonScript")) + object.pythonScript = message.pythonScript; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.ces.v1.WidgetTool.DataMapping.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.ces.v1.WidgetTool.DataMapping.Mode[message.mode] : message.mode; + if (message.pythonFunction != null && message.hasOwnProperty("pythonFunction")) + object.pythonFunction = $root.google.cloud.ces.v1.PythonFunction.toObject(message.pythonFunction, options); + return object; + }; + + /** + * Converts this DataMapping to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @instance + * @returns {Object.} JSON object + */ + DataMapping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataMapping + * @function getTypeUrl + * @memberof google.cloud.ces.v1.WidgetTool.DataMapping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1.WidgetTool.DataMapping"; + }; + + /** + * Mode enum. + * @name google.cloud.ces.v1.WidgetTool.DataMapping.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} FIELD_MAPPING=1 FIELD_MAPPING value + * @property {number} PYTHON_SCRIPT=2 PYTHON_SCRIPT value + */ + DataMapping.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIELD_MAPPING"] = 1; + values[valuesById[2] = "PYTHON_SCRIPT"] = 2; + return values; + })(); + + return DataMapping; + })(); + /** * WidgetType enum. * @name google.cloud.ces.v1.WidgetTool.WidgetType @@ -50369,6 +51512,8 @@ * @property {number} OVERALL_SATISFACTION=8 OVERALL_SATISFACTION value * @property {number} ORDER_SUMMARY=9 ORDER_SUMMARY value * @property {number} APPOINTMENT_DETAILS=10 APPOINTMENT_DETAILS value + * @property {number} APPOINTMENT_SCHEDULER=11 APPOINTMENT_SCHEDULER value + * @property {number} CONTACT_FORM=12 CONTACT_FORM value */ WidgetTool.WidgetType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -50383,6 +51528,8 @@ values[valuesById[8] = "OVERALL_SATISFACTION"] = 8; values[valuesById[9] = "ORDER_SUMMARY"] = 9; values[valuesById[10] = "APPOINTMENT_DETAILS"] = 10; + values[valuesById[11] = "APPOINTMENT_SCHEDULER"] = 11; + values[valuesById[12] = "CONTACT_FORM"] = 12; return values; })(); @@ -51202,6 +52349,7 @@ * @property {google.cloud.ces.v1.IApiAuthentication|null} [apiAuthentication] McpToolset apiAuthentication * @property {google.cloud.ces.v1.IServiceDirectoryConfig|null} [serviceDirectoryConfig] McpToolset serviceDirectoryConfig * @property {google.cloud.ces.v1.ITlsConfig|null} [tlsConfig] McpToolset tlsConfig + * @property {Object.|null} [customHeaders] McpToolset customHeaders */ /** @@ -51213,6 +52361,7 @@ * @param {google.cloud.ces.v1.IMcpToolset=} [properties] Properties to set */ function McpToolset(properties) { + this.customHeaders = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51251,6 +52400,14 @@ */ McpToolset.prototype.tlsConfig = null; + /** + * McpToolset customHeaders. + * @member {Object.} customHeaders + * @memberof google.cloud.ces.v1.McpToolset + * @instance + */ + McpToolset.prototype.customHeaders = $util.emptyObject; + /** * Creates a new McpToolset instance using the specified properties. * @function create @@ -51283,6 +52440,9 @@ $root.google.cloud.ces.v1.ServiceDirectoryConfig.encode(message.serviceDirectoryConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.tlsConfig != null && Object.hasOwnProperty.call(message, "tlsConfig")) $root.google.cloud.ces.v1.TlsConfig.encode(message.tlsConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.customHeaders != null && Object.hasOwnProperty.call(message, "customHeaders")) + for (var keys = Object.keys(message.customHeaders), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.customHeaders[keys[i]]).ldelim(); return writer; }; @@ -51313,7 +52473,7 @@ McpToolset.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1.McpToolset(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1.McpToolset(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -51335,6 +52495,29 @@ message.tlsConfig = $root.google.cloud.ces.v1.TlsConfig.decode(reader, reader.uint32()); break; } + case 5: { + if (message.customHeaders === $util.emptyObject) + message.customHeaders = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.customHeaders[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -51388,6 +52571,14 @@ if (error) return "tlsConfig." + error; } + if (message.customHeaders != null && message.hasOwnProperty("customHeaders")) { + if (!$util.isObject(message.customHeaders)) + return "customHeaders: object expected"; + var key = Object.keys(message.customHeaders); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.customHeaders[key[i]])) + return "customHeaders: string{k:string} expected"; + } return null; }; @@ -51420,6 +52611,13 @@ throw TypeError(".google.cloud.ces.v1.McpToolset.tlsConfig: object expected"); message.tlsConfig = $root.google.cloud.ces.v1.TlsConfig.fromObject(object.tlsConfig); } + if (object.customHeaders) { + if (typeof object.customHeaders !== "object") + throw TypeError(".google.cloud.ces.v1.McpToolset.customHeaders: object expected"); + message.customHeaders = {}; + for (var keys = Object.keys(object.customHeaders), i = 0; i < keys.length; ++i) + message.customHeaders[keys[i]] = String(object.customHeaders[keys[i]]); + } return message; }; @@ -51436,6 +52634,8 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.customHeaders = {}; if (options.defaults) { object.serverAddress = ""; object.apiAuthentication = null; @@ -51450,6 +52650,12 @@ object.serviceDirectoryConfig = $root.google.cloud.ces.v1.ServiceDirectoryConfig.toObject(message.serviceDirectoryConfig, options); if (message.tlsConfig != null && message.hasOwnProperty("tlsConfig")) object.tlsConfig = $root.google.cloud.ces.v1.TlsConfig.toObject(message.tlsConfig, options); + var keys2; + if (message.customHeaders && (keys2 = Object.keys(message.customHeaders)).length) { + object.customHeaders = {}; + for (var j = 0; j < keys2.length; ++j) + object.customHeaders[keys2[j]] = message.customHeaders[keys2[j]]; + } return object; }; @@ -56368,6 +57574,604 @@ return WebSearchQuery; })(); + v1.SecuritySettings = (function() { + + /** + * Properties of a SecuritySettings. + * @memberof google.cloud.ces.v1 + * @interface ISecuritySettings + * @property {string|null} [name] SecuritySettings name + * @property {google.cloud.ces.v1.IEndpointControlPolicy|null} [endpointControlPolicy] SecuritySettings endpointControlPolicy + * @property {google.protobuf.ITimestamp|null} [createTime] SecuritySettings createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] SecuritySettings updateTime + * @property {string|null} [etag] SecuritySettings etag + */ + + /** + * Constructs a new SecuritySettings. + * @memberof google.cloud.ces.v1 + * @classdesc Represents a SecuritySettings. + * @implements ISecuritySettings + * @constructor + * @param {google.cloud.ces.v1.ISecuritySettings=} [properties] Properties to set + */ + function SecuritySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecuritySettings name. + * @member {string} name + * @memberof google.cloud.ces.v1.SecuritySettings + * @instance + */ + SecuritySettings.prototype.name = ""; + + /** + * SecuritySettings endpointControlPolicy. + * @member {google.cloud.ces.v1.IEndpointControlPolicy|null|undefined} endpointControlPolicy + * @memberof google.cloud.ces.v1.SecuritySettings + * @instance + */ + SecuritySettings.prototype.endpointControlPolicy = null; + + /** + * SecuritySettings createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.ces.v1.SecuritySettings + * @instance + */ + SecuritySettings.prototype.createTime = null; + + /** + * SecuritySettings updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.ces.v1.SecuritySettings + * @instance + */ + SecuritySettings.prototype.updateTime = null; + + /** + * SecuritySettings etag. + * @member {string} etag + * @memberof google.cloud.ces.v1.SecuritySettings + * @instance + */ + SecuritySettings.prototype.etag = ""; + + /** + * Creates a new SecuritySettings instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1.SecuritySettings + * @static + * @param {google.cloud.ces.v1.ISecuritySettings=} [properties] Properties to set + * @returns {google.cloud.ces.v1.SecuritySettings} SecuritySettings instance + */ + SecuritySettings.create = function create(properties) { + return new SecuritySettings(properties); + }; + + /** + * Encodes the specified SecuritySettings message. Does not implicitly {@link google.cloud.ces.v1.SecuritySettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1.SecuritySettings + * @static + * @param {google.cloud.ces.v1.ISecuritySettings} message SecuritySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecuritySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.endpointControlPolicy != null && Object.hasOwnProperty.call(message, "endpointControlPolicy")) + $root.google.cloud.ces.v1.EndpointControlPolicy.encode(message.endpointControlPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.etag); + return writer; + }; + + /** + * Encodes the specified SecuritySettings message, length delimited. Does not implicitly {@link google.cloud.ces.v1.SecuritySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1.SecuritySettings + * @static + * @param {google.cloud.ces.v1.ISecuritySettings} message SecuritySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecuritySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecuritySettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1.SecuritySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1.SecuritySettings} SecuritySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecuritySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1.SecuritySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.endpointControlPolicy = $root.google.cloud.ces.v1.EndpointControlPolicy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecuritySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1.SecuritySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1.SecuritySettings} SecuritySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecuritySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecuritySettings message. + * @function verify + * @memberof google.cloud.ces.v1.SecuritySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecuritySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.endpointControlPolicy != null && message.hasOwnProperty("endpointControlPolicy")) { + var error = $root.google.cloud.ces.v1.EndpointControlPolicy.verify(message.endpointControlPolicy); + if (error) + return "endpointControlPolicy." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a SecuritySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1.SecuritySettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1.SecuritySettings} SecuritySettings + */ + SecuritySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1.SecuritySettings) + return object; + var message = new $root.google.cloud.ces.v1.SecuritySettings(); + if (object.name != null) + message.name = String(object.name); + if (object.endpointControlPolicy != null) { + if (typeof object.endpointControlPolicy !== "object") + throw TypeError(".google.cloud.ces.v1.SecuritySettings.endpointControlPolicy: object expected"); + message.endpointControlPolicy = $root.google.cloud.ces.v1.EndpointControlPolicy.fromObject(object.endpointControlPolicy); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.ces.v1.SecuritySettings.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.ces.v1.SecuritySettings.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a SecuritySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1.SecuritySettings + * @static + * @param {google.cloud.ces.v1.SecuritySettings} message SecuritySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecuritySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.endpointControlPolicy = null; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.endpointControlPolicy != null && message.hasOwnProperty("endpointControlPolicy")) + object.endpointControlPolicy = $root.google.cloud.ces.v1.EndpointControlPolicy.toObject(message.endpointControlPolicy, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this SecuritySettings to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1.SecuritySettings + * @instance + * @returns {Object.} JSON object + */ + SecuritySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecuritySettings + * @function getTypeUrl + * @memberof google.cloud.ces.v1.SecuritySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecuritySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1.SecuritySettings"; + }; + + return SecuritySettings; + })(); + + v1.EndpointControlPolicy = (function() { + + /** + * Properties of an EndpointControlPolicy. + * @memberof google.cloud.ces.v1 + * @interface IEndpointControlPolicy + * @property {google.cloud.ces.v1.EndpointControlPolicy.EnforcementScope|null} [enforcementScope] EndpointControlPolicy enforcementScope + * @property {Array.|null} [allowedOrigins] EndpointControlPolicy allowedOrigins + */ + + /** + * Constructs a new EndpointControlPolicy. + * @memberof google.cloud.ces.v1 + * @classdesc Represents an EndpointControlPolicy. + * @implements IEndpointControlPolicy + * @constructor + * @param {google.cloud.ces.v1.IEndpointControlPolicy=} [properties] Properties to set + */ + function EndpointControlPolicy(properties) { + this.allowedOrigins = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EndpointControlPolicy enforcementScope. + * @member {google.cloud.ces.v1.EndpointControlPolicy.EnforcementScope} enforcementScope + * @memberof google.cloud.ces.v1.EndpointControlPolicy + * @instance + */ + EndpointControlPolicy.prototype.enforcementScope = 0; + + /** + * EndpointControlPolicy allowedOrigins. + * @member {Array.} allowedOrigins + * @memberof google.cloud.ces.v1.EndpointControlPolicy + * @instance + */ + EndpointControlPolicy.prototype.allowedOrigins = $util.emptyArray; + + /** + * Creates a new EndpointControlPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1.EndpointControlPolicy + * @static + * @param {google.cloud.ces.v1.IEndpointControlPolicy=} [properties] Properties to set + * @returns {google.cloud.ces.v1.EndpointControlPolicy} EndpointControlPolicy instance + */ + EndpointControlPolicy.create = function create(properties) { + return new EndpointControlPolicy(properties); + }; + + /** + * Encodes the specified EndpointControlPolicy message. Does not implicitly {@link google.cloud.ces.v1.EndpointControlPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1.EndpointControlPolicy + * @static + * @param {google.cloud.ces.v1.IEndpointControlPolicy} message EndpointControlPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndpointControlPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enforcementScope != null && Object.hasOwnProperty.call(message, "enforcementScope")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.enforcementScope); + if (message.allowedOrigins != null && message.allowedOrigins.length) + for (var i = 0; i < message.allowedOrigins.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.allowedOrigins[i]); + return writer; + }; + + /** + * Encodes the specified EndpointControlPolicy message, length delimited. Does not implicitly {@link google.cloud.ces.v1.EndpointControlPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1.EndpointControlPolicy + * @static + * @param {google.cloud.ces.v1.IEndpointControlPolicy} message EndpointControlPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndpointControlPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EndpointControlPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1.EndpointControlPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1.EndpointControlPolicy} EndpointControlPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndpointControlPolicy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1.EndpointControlPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.enforcementScope = reader.int32(); + break; + } + case 2: { + if (!(message.allowedOrigins && message.allowedOrigins.length)) + message.allowedOrigins = []; + message.allowedOrigins.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EndpointControlPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1.EndpointControlPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1.EndpointControlPolicy} EndpointControlPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndpointControlPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EndpointControlPolicy message. + * @function verify + * @memberof google.cloud.ces.v1.EndpointControlPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EndpointControlPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enforcementScope != null && message.hasOwnProperty("enforcementScope")) + switch (message.enforcementScope) { + default: + return "enforcementScope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.allowedOrigins != null && message.hasOwnProperty("allowedOrigins")) { + if (!Array.isArray(message.allowedOrigins)) + return "allowedOrigins: array expected"; + for (var i = 0; i < message.allowedOrigins.length; ++i) + if (!$util.isString(message.allowedOrigins[i])) + return "allowedOrigins: string[] expected"; + } + return null; + }; + + /** + * Creates an EndpointControlPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1.EndpointControlPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1.EndpointControlPolicy} EndpointControlPolicy + */ + EndpointControlPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1.EndpointControlPolicy) + return object; + var message = new $root.google.cloud.ces.v1.EndpointControlPolicy(); + switch (object.enforcementScope) { + default: + if (typeof object.enforcementScope === "number") { + message.enforcementScope = object.enforcementScope; + break; + } + break; + case "ENFORCEMENT_SCOPE_UNSPECIFIED": + case 0: + message.enforcementScope = 0; + break; + case "VPCSC_ONLY": + case 1: + message.enforcementScope = 1; + break; + case "ALWAYS": + case 2: + message.enforcementScope = 2; + break; + } + if (object.allowedOrigins) { + if (!Array.isArray(object.allowedOrigins)) + throw TypeError(".google.cloud.ces.v1.EndpointControlPolicy.allowedOrigins: array expected"); + message.allowedOrigins = []; + for (var i = 0; i < object.allowedOrigins.length; ++i) + message.allowedOrigins[i] = String(object.allowedOrigins[i]); + } + return message; + }; + + /** + * Creates a plain object from an EndpointControlPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1.EndpointControlPolicy + * @static + * @param {google.cloud.ces.v1.EndpointControlPolicy} message EndpointControlPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EndpointControlPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedOrigins = []; + if (options.defaults) + object.enforcementScope = options.enums === String ? "ENFORCEMENT_SCOPE_UNSPECIFIED" : 0; + if (message.enforcementScope != null && message.hasOwnProperty("enforcementScope")) + object.enforcementScope = options.enums === String ? $root.google.cloud.ces.v1.EndpointControlPolicy.EnforcementScope[message.enforcementScope] === undefined ? message.enforcementScope : $root.google.cloud.ces.v1.EndpointControlPolicy.EnforcementScope[message.enforcementScope] : message.enforcementScope; + if (message.allowedOrigins && message.allowedOrigins.length) { + object.allowedOrigins = []; + for (var j = 0; j < message.allowedOrigins.length; ++j) + object.allowedOrigins[j] = message.allowedOrigins[j]; + } + return object; + }; + + /** + * Converts this EndpointControlPolicy to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1.EndpointControlPolicy + * @instance + * @returns {Object.} JSON object + */ + EndpointControlPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EndpointControlPolicy + * @function getTypeUrl + * @memberof google.cloud.ces.v1.EndpointControlPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EndpointControlPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1.EndpointControlPolicy"; + }; + + /** + * EnforcementScope enum. + * @name google.cloud.ces.v1.EndpointControlPolicy.EnforcementScope + * @enum {number} + * @property {number} ENFORCEMENT_SCOPE_UNSPECIFIED=0 ENFORCEMENT_SCOPE_UNSPECIFIED value + * @property {number} VPCSC_ONLY=1 VPCSC_ONLY value + * @property {number} ALWAYS=2 ALWAYS value + */ + EndpointControlPolicy.EnforcementScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCEMENT_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VPCSC_ONLY"] = 1; + values[valuesById[2] = "ALWAYS"] = 2; + return values; + })(); + + return EndpointControlPolicy; + })(); + v1.SessionService = (function() { /** @@ -56433,6 +58237,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.ces.v1.SessionService|streamRunSession}. + * @memberof google.cloud.ces.v1.SessionService + * @typedef StreamRunSessionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.ces.v1.RunSessionResponse} [response] RunSessionResponse + */ + + /** + * Calls StreamRunSession. + * @function streamRunSession + * @memberof google.cloud.ces.v1.SessionService + * @instance + * @param {google.cloud.ces.v1.IRunSessionRequest} request RunSessionRequest message or plain object + * @param {google.cloud.ces.v1.SessionService.StreamRunSessionCallback} callback Node-style callback called with the error, if any, and RunSessionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SessionService.prototype.streamRunSession = function streamRunSession(request, callback) { + return this.rpcCall(streamRunSession, $root.google.cloud.ces.v1.RunSessionRequest, $root.google.cloud.ces.v1.RunSessionResponse, request, callback); + }, "name", { value: "StreamRunSession" }); + + /** + * Calls StreamRunSession. + * @function streamRunSession + * @memberof google.cloud.ces.v1.SessionService + * @instance + * @param {google.cloud.ces.v1.IRunSessionRequest} request RunSessionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.ces.v1.SessionService|bidiRunSession}. * @memberof google.cloud.ces.v1.SessionService @@ -57039,7 +58876,9 @@ * @property {string|null} [entryAgent] SessionConfig entryAgent * @property {string|null} [deployment] SessionConfig deployment * @property {string|null} [timeZone] SessionConfig timeZone + * @property {boolean|null} [useToolFakes] SessionConfig useToolFakes * @property {google.cloud.ces.v1.SessionConfig.IRemoteDialogflowQueryParameters|null} [remoteDialogflowQueryParameters] SessionConfig remoteDialogflowQueryParameters + * @property {boolean|null} [enableTextStreaming] SessionConfig enableTextStreaming */ /** @@ -57114,6 +58953,14 @@ */ SessionConfig.prototype.timeZone = ""; + /** + * SessionConfig useToolFakes. + * @member {boolean} useToolFakes + * @memberof google.cloud.ces.v1.SessionConfig + * @instance + */ + SessionConfig.prototype.useToolFakes = false; + /** * SessionConfig remoteDialogflowQueryParameters. * @member {google.cloud.ces.v1.SessionConfig.IRemoteDialogflowQueryParameters|null|undefined} remoteDialogflowQueryParameters @@ -57122,6 +58969,14 @@ */ SessionConfig.prototype.remoteDialogflowQueryParameters = null; + /** + * SessionConfig enableTextStreaming. + * @member {boolean} enableTextStreaming + * @memberof google.cloud.ces.v1.SessionConfig + * @instance + */ + SessionConfig.prototype.enableTextStreaming = false; + /** * Creates a new SessionConfig instance using the specified properties. * @function create @@ -57161,8 +59016,12 @@ writer.uint32(/* id 11, wireType 2 =*/90).string(message.timeZone); if (message.entryAgent != null && Object.hasOwnProperty.call(message, "entryAgent")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.entryAgent); + if (message.useToolFakes != null && Object.hasOwnProperty.call(message, "useToolFakes")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.useToolFakes); if (message.remoteDialogflowQueryParameters != null && Object.hasOwnProperty.call(message, "remoteDialogflowQueryParameters")) $root.google.cloud.ces.v1.SessionConfig.RemoteDialogflowQueryParameters.encode(message.remoteDialogflowQueryParameters, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.enableTextStreaming != null && Object.hasOwnProperty.call(message, "enableTextStreaming")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.enableTextStreaming); return writer; }; @@ -57229,10 +59088,18 @@ message.timeZone = reader.string(); break; } + case 14: { + message.useToolFakes = reader.bool(); + break; + } case 15: { message.remoteDialogflowQueryParameters = $root.google.cloud.ces.v1.SessionConfig.RemoteDialogflowQueryParameters.decode(reader, reader.uint32()); break; } + case 18: { + message.enableTextStreaming = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -57299,11 +59166,17 @@ if (message.timeZone != null && message.hasOwnProperty("timeZone")) if (!$util.isString(message.timeZone)) return "timeZone: string expected"; + if (message.useToolFakes != null && message.hasOwnProperty("useToolFakes")) + if (typeof message.useToolFakes !== "boolean") + return "useToolFakes: boolean expected"; if (message.remoteDialogflowQueryParameters != null && message.hasOwnProperty("remoteDialogflowQueryParameters")) { var error = $root.google.cloud.ces.v1.SessionConfig.RemoteDialogflowQueryParameters.verify(message.remoteDialogflowQueryParameters); if (error) return "remoteDialogflowQueryParameters." + error; } + if (message.enableTextStreaming != null && message.hasOwnProperty("enableTextStreaming")) + if (typeof message.enableTextStreaming !== "boolean") + return "enableTextStreaming: boolean expected"; return null; }; @@ -57347,11 +59220,15 @@ message.deployment = String(object.deployment); if (object.timeZone != null) message.timeZone = String(object.timeZone); + if (object.useToolFakes != null) + message.useToolFakes = Boolean(object.useToolFakes); if (object.remoteDialogflowQueryParameters != null) { if (typeof object.remoteDialogflowQueryParameters !== "object") throw TypeError(".google.cloud.ces.v1.SessionConfig.remoteDialogflowQueryParameters: object expected"); message.remoteDialogflowQueryParameters = $root.google.cloud.ces.v1.SessionConfig.RemoteDialogflowQueryParameters.fromObject(object.remoteDialogflowQueryParameters); } + if (object.enableTextStreaming != null) + message.enableTextStreaming = Boolean(object.enableTextStreaming); return message; }; @@ -57377,7 +59254,9 @@ object.deployment = ""; object.timeZone = ""; object.entryAgent = ""; + object.useToolFakes = false; object.remoteDialogflowQueryParameters = null; + object.enableTextStreaming = false; } if (message.session != null && message.hasOwnProperty("session")) object.session = message.session; @@ -57396,8 +59275,12 @@ object.timeZone = message.timeZone; if (message.entryAgent != null && message.hasOwnProperty("entryAgent")) object.entryAgent = message.entryAgent; + if (message.useToolFakes != null && message.hasOwnProperty("useToolFakes")) + object.useToolFakes = message.useToolFakes; if (message.remoteDialogflowQueryParameters != null && message.hasOwnProperty("remoteDialogflowQueryParameters")) object.remoteDialogflowQueryParameters = $root.google.cloud.ces.v1.SessionConfig.RemoteDialogflowQueryParameters.toObject(message.remoteDialogflowQueryParameters, options); + if (message.enableTextStreaming != null && message.hasOwnProperty("enableTextStreaming")) + object.enableTextStreaming = message.enableTextStreaming; return object; }; @@ -62160,6 +64043,8 @@ * @interface IExecuteToolRequest * @property {string|null} [tool] ExecuteToolRequest tool * @property {google.cloud.ces.v1.IToolsetTool|null} [toolsetTool] ExecuteToolRequest toolsetTool + * @property {google.protobuf.IStruct|null} [variables] ExecuteToolRequest variables + * @property {google.protobuf.IStruct|null} [context] ExecuteToolRequest context * @property {string|null} [parent] ExecuteToolRequest parent * @property {google.protobuf.IStruct|null} [args] ExecuteToolRequest args */ @@ -62195,6 +64080,22 @@ */ ExecuteToolRequest.prototype.toolsetTool = null; + /** + * ExecuteToolRequest variables. + * @member {google.protobuf.IStruct|null|undefined} variables + * @memberof google.cloud.ces.v1.ExecuteToolRequest + * @instance + */ + ExecuteToolRequest.prototype.variables = null; + + /** + * ExecuteToolRequest context. + * @member {google.protobuf.IStruct|null|undefined} context + * @memberof google.cloud.ces.v1.ExecuteToolRequest + * @instance + */ + ExecuteToolRequest.prototype.context = null; + /** * ExecuteToolRequest parent. * @member {string} parent @@ -62225,6 +64126,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * ExecuteToolRequest toolExecutionContext. + * @member {"variables"|"context"|undefined} toolExecutionContext + * @memberof google.cloud.ces.v1.ExecuteToolRequest + * @instance + */ + Object.defineProperty(ExecuteToolRequest.prototype, "toolExecutionContext", { + get: $util.oneOfGetter($oneOfFields = ["variables", "context"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ExecuteToolRequest instance using the specified properties. * @function create @@ -62257,6 +64169,10 @@ $root.google.cloud.ces.v1.ToolsetTool.encode(message.toolsetTool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + if (message.variables != null && Object.hasOwnProperty.call(message, "variables")) + $root.google.protobuf.Struct.encode(message.variables, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + $root.google.protobuf.Struct.encode(message.context, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -62301,6 +64217,14 @@ message.toolsetTool = $root.google.cloud.ces.v1.ToolsetTool.decode(reader, reader.uint32()); break; } + case 5: { + message.variables = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.context = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } case 4: { message.parent = reader.string(); break; @@ -62360,6 +64284,24 @@ return "toolsetTool." + error; } } + if (message.variables != null && message.hasOwnProperty("variables")) { + properties.toolExecutionContext = 1; + { + var error = $root.google.protobuf.Struct.verify(message.variables); + if (error) + return "variables." + error; + } + } + if (message.context != null && message.hasOwnProperty("context")) { + if (properties.toolExecutionContext === 1) + return "toolExecutionContext: multiple values"; + properties.toolExecutionContext = 1; + { + var error = $root.google.protobuf.Struct.verify(message.context); + if (error) + return "context." + error; + } + } if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; @@ -62390,6 +64332,16 @@ throw TypeError(".google.cloud.ces.v1.ExecuteToolRequest.toolsetTool: object expected"); message.toolsetTool = $root.google.cloud.ces.v1.ToolsetTool.fromObject(object.toolsetTool); } + if (object.variables != null) { + if (typeof object.variables !== "object") + throw TypeError(".google.cloud.ces.v1.ExecuteToolRequest.variables: object expected"); + message.variables = $root.google.protobuf.Struct.fromObject(object.variables); + } + if (object.context != null) { + if (typeof object.context !== "object") + throw TypeError(".google.cloud.ces.v1.ExecuteToolRequest.context: object expected"); + message.context = $root.google.protobuf.Struct.fromObject(object.context); + } if (object.parent != null) message.parent = String(object.parent); if (object.args != null) { @@ -62431,6 +64383,16 @@ } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; + if (message.variables != null && message.hasOwnProperty("variables")) { + object.variables = $root.google.protobuf.Struct.toObject(message.variables, options); + if (options.oneofs) + object.toolExecutionContext = "variables"; + } + if (message.context != null && message.hasOwnProperty("context")) { + object.context = $root.google.protobuf.Struct.toObject(message.context, options); + if (options.oneofs) + object.toolExecutionContext = "context"; + } return object; }; @@ -62472,6 +64434,7 @@ * @property {string|null} [tool] ExecuteToolResponse tool * @property {google.cloud.ces.v1.IToolsetTool|null} [toolsetTool] ExecuteToolResponse toolsetTool * @property {google.protobuf.IStruct|null} [response] ExecuteToolResponse response + * @property {google.protobuf.IStruct|null} [variables] ExecuteToolResponse variables */ /** @@ -62513,6 +64476,14 @@ */ ExecuteToolResponse.prototype.response = null; + /** + * ExecuteToolResponse variables. + * @member {google.protobuf.IStruct|null|undefined} variables + * @memberof google.cloud.ces.v1.ExecuteToolResponse + * @instance + */ + ExecuteToolResponse.prototype.variables = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -62557,6 +64528,8 @@ $root.google.protobuf.Struct.encode(message.response, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.toolsetTool != null && Object.hasOwnProperty.call(message, "toolsetTool")) $root.google.cloud.ces.v1.ToolsetTool.encode(message.toolsetTool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.variables != null && Object.hasOwnProperty.call(message, "variables")) + $root.google.protobuf.Struct.encode(message.variables, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -62605,6 +64578,10 @@ message.response = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } + case 4: { + message.variables = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -62661,6 +64638,11 @@ if (error) return "response." + error; } + if (message.variables != null && message.hasOwnProperty("variables")) { + var error = $root.google.protobuf.Struct.verify(message.variables); + if (error) + return "variables." + error; + } return null; }; @@ -62688,6 +64670,11 @@ throw TypeError(".google.cloud.ces.v1.ExecuteToolResponse.response: object expected"); message.response = $root.google.protobuf.Struct.fromObject(object.response); } + if (object.variables != null) { + if (typeof object.variables !== "object") + throw TypeError(".google.cloud.ces.v1.ExecuteToolResponse.variables: object expected"); + message.variables = $root.google.protobuf.Struct.fromObject(object.variables); + } return message; }; @@ -62704,8 +64691,10 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.response = null; + object.variables = null; + } if (message.tool != null && message.hasOwnProperty("tool")) { object.tool = message.tool; if (options.oneofs) @@ -62718,6 +64707,8 @@ if (options.oneofs) object.toolIdentifier = "toolsetTool"; } + if (message.variables != null && message.hasOwnProperty("variables")) + object.variables = $root.google.protobuf.Struct.toObject(message.variables, options); return object; }; @@ -63896,6 +65887,7 @@ * @property {string|null} [name] GenerateChatTokenRequest name * @property {string|null} [deployment] GenerateChatTokenRequest deployment * @property {string|null} [recaptchaToken] GenerateChatTokenRequest recaptchaToken + * @property {boolean|null} [liveHandoffEnabled] GenerateChatTokenRequest liveHandoffEnabled */ /** @@ -63937,6 +65929,14 @@ */ GenerateChatTokenRequest.prototype.recaptchaToken = ""; + /** + * GenerateChatTokenRequest liveHandoffEnabled. + * @member {boolean} liveHandoffEnabled + * @memberof google.cloud.ces.v1.GenerateChatTokenRequest + * @instance + */ + GenerateChatTokenRequest.prototype.liveHandoffEnabled = false; + /** * Creates a new GenerateChatTokenRequest instance using the specified properties. * @function create @@ -63967,6 +65967,8 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.deployment); if (message.recaptchaToken != null && Object.hasOwnProperty.call(message, "recaptchaToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.recaptchaToken); + if (message.liveHandoffEnabled != null && Object.hasOwnProperty.call(message, "liveHandoffEnabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.liveHandoffEnabled); return writer; }; @@ -64015,6 +66017,10 @@ message.recaptchaToken = reader.string(); break; } + case 4: { + message.liveHandoffEnabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -64059,6 +66065,9 @@ if (message.recaptchaToken != null && message.hasOwnProperty("recaptchaToken")) if (!$util.isString(message.recaptchaToken)) return "recaptchaToken: string expected"; + if (message.liveHandoffEnabled != null && message.hasOwnProperty("liveHandoffEnabled")) + if (typeof message.liveHandoffEnabled !== "boolean") + return "liveHandoffEnabled: boolean expected"; return null; }; @@ -64080,6 +66089,8 @@ message.deployment = String(object.deployment); if (object.recaptchaToken != null) message.recaptchaToken = String(object.recaptchaToken); + if (object.liveHandoffEnabled != null) + message.liveHandoffEnabled = Boolean(object.liveHandoffEnabled); return message; }; @@ -64100,6 +66111,7 @@ object.name = ""; object.deployment = ""; object.recaptchaToken = ""; + object.liveHandoffEnabled = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -64107,6 +66119,8 @@ object.deployment = message.deployment; if (message.recaptchaToken != null && message.hasOwnProperty("recaptchaToken")) object.recaptchaToken = message.recaptchaToken; + if (message.liveHandoffEnabled != null && message.hasOwnProperty("liveHandoffEnabled")) + object.liveHandoffEnabled = message.liveHandoffEnabled; return object; }; @@ -70610,6 +72624,7 @@ case 1: case 2: case 3: + case 4: break; } if (message.theme != null && message.hasOwnProperty("theme")) @@ -70667,6 +72682,10 @@ case 3: message.modality = 3; break; + case "CHAT_VOICE_AND_VIDEO": + case 4: + message.modality = 4; + break; } switch (object.theme) { default: @@ -71054,6 +73073,7 @@ * @property {number} CHAT_AND_VOICE=1 CHAT_AND_VOICE value * @property {number} VOICE_ONLY=2 VOICE_ONLY value * @property {number} CHAT_ONLY=3 CHAT_ONLY value + * @property {number} CHAT_VOICE_AND_VIDEO=4 CHAT_VOICE_AND_VIDEO value */ WebWidgetConfig.Modality = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -71061,6 +73081,7 @@ values[valuesById[1] = "CHAT_AND_VOICE"] = 1; values[valuesById[2] = "VOICE_ONLY"] = 2; values[valuesById[3] = "CHAT_ONLY"] = 3; + values[valuesById[4] = "CHAT_VOICE_AND_VIDEO"] = 4; return values; })(); @@ -74687,6 +76708,7 @@ * @property {string|null} [name] ExportAppRequest name * @property {google.cloud.ces.v1beta.ExportAppRequest.ExportFormat|null} [exportFormat] ExportAppRequest exportFormat * @property {string|null} [gcsUri] ExportAppRequest gcsUri + * @property {string|null} [appVersion] ExportAppRequest appVersion */ /** @@ -74728,6 +76750,14 @@ */ ExportAppRequest.prototype.gcsUri = ""; + /** + * ExportAppRequest appVersion. + * @member {string} appVersion + * @memberof google.cloud.ces.v1beta.ExportAppRequest + * @instance + */ + ExportAppRequest.prototype.appVersion = ""; + /** * Creates a new ExportAppRequest instance using the specified properties. * @function create @@ -74758,6 +76788,8 @@ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.exportFormat); if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.gcsUri); + if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.appVersion); return writer; }; @@ -74806,6 +76838,10 @@ message.gcsUri = reader.string(); break; } + case 4: { + message.appVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -74856,6 +76892,9 @@ if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) if (!$util.isString(message.gcsUri)) return "gcsUri: string expected"; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (!$util.isString(message.appVersion)) + return "appVersion: string expected"; return null; }; @@ -74895,6 +76934,8 @@ } if (object.gcsUri != null) message.gcsUri = String(object.gcsUri); + if (object.appVersion != null) + message.appVersion = String(object.appVersion); return message; }; @@ -74915,6 +76956,7 @@ object.name = ""; object.exportFormat = options.enums === String ? "EXPORT_FORMAT_UNSPECIFIED" : 0; object.gcsUri = ""; + object.appVersion = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -74922,6 +76964,8 @@ object.exportFormat = options.enums === String ? $root.google.cloud.ces.v1beta.ExportAppRequest.ExportFormat[message.exportFormat] === undefined ? message.exportFormat : $root.google.cloud.ces.v1beta.ExportAppRequest.ExportFormat[message.exportFormat] : message.exportFormat; if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) object.gcsUri = message.gcsUri; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + object.appVersion = message.appVersion; return object; }; @@ -88662,6 +90706,7 @@ * @property {google.cloud.ces.v1beta.GenerateAppResourceResponse.ITools|null} [tools] GenerateAppResourceResponse tools * @property {google.cloud.ces.v1beta.GenerateAppResourceResponse.IEvaluations|null} [evaluations] GenerateAppResourceResponse evaluations * @property {google.cloud.ces.v1beta.GenerateAppResourceResponse.IAppResources|null} [appResources] GenerateAppResourceResponse appResources + * @property {google.cloud.ces.v1beta.IQualityReport|null} [qualityReport] GenerateAppResourceResponse qualityReport * @property {google.cloud.ces.v1beta.GenerateAppResourceResponse.IGenerateResultInfo|null} [generateResultInfo] GenerateAppResourceResponse generateResultInfo */ @@ -88728,6 +90773,14 @@ */ GenerateAppResourceResponse.prototype.appResources = null; + /** + * GenerateAppResourceResponse qualityReport. + * @member {google.cloud.ces.v1beta.IQualityReport|null|undefined} qualityReport + * @memberof google.cloud.ces.v1beta.GenerateAppResourceResponse + * @instance + */ + GenerateAppResourceResponse.prototype.qualityReport = null; + /** * GenerateAppResourceResponse generateResultInfo. * @member {google.cloud.ces.v1beta.GenerateAppResourceResponse.IGenerateResultInfo|null|undefined} generateResultInfo @@ -88741,12 +90794,12 @@ /** * GenerateAppResourceResponse generatedResource. - * @member {"agent"|"toolset"|"appSnapshot"|"tools"|"evaluations"|"appResources"|undefined} generatedResource + * @member {"agent"|"toolset"|"appSnapshot"|"tools"|"evaluations"|"appResources"|"qualityReport"|undefined} generatedResource * @memberof google.cloud.ces.v1beta.GenerateAppResourceResponse * @instance */ Object.defineProperty(GenerateAppResourceResponse.prototype, "generatedResource", { - get: $util.oneOfGetter($oneOfFields = ["agent", "toolset", "appSnapshot", "tools", "evaluations", "appResources"]), + get: $util.oneOfGetter($oneOfFields = ["agent", "toolset", "appSnapshot", "tools", "evaluations", "appResources", "qualityReport"]), set: $util.oneOfSetter($oneOfFields) }); @@ -88788,6 +90841,8 @@ $root.google.cloud.ces.v1beta.GenerateAppResourceResponse.Evaluations.encode(message.evaluations, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.appResources != null && Object.hasOwnProperty.call(message, "appResources")) $root.google.cloud.ces.v1beta.GenerateAppResourceResponse.AppResources.encode(message.appResources, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.qualityReport != null && Object.hasOwnProperty.call(message, "qualityReport")) + $root.google.cloud.ces.v1beta.QualityReport.encode(message.qualityReport, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -88848,6 +90903,10 @@ message.appResources = $root.google.cloud.ces.v1beta.GenerateAppResourceResponse.AppResources.decode(reader, reader.uint32()); break; } + case 8: { + message.qualityReport = $root.google.cloud.ces.v1beta.QualityReport.decode(reader, reader.uint32()); + break; + } case 2: { message.generateResultInfo = $root.google.cloud.ces.v1beta.GenerateAppResourceResponse.GenerateResultInfo.decode(reader, reader.uint32()); break; @@ -88946,6 +91005,16 @@ return "appResources." + error; } } + if (message.qualityReport != null && message.hasOwnProperty("qualityReport")) { + if (properties.generatedResource === 1) + return "generatedResource: multiple values"; + properties.generatedResource = 1; + { + var error = $root.google.cloud.ces.v1beta.QualityReport.verify(message.qualityReport); + if (error) + return "qualityReport." + error; + } + } if (message.generateResultInfo != null && message.hasOwnProperty("generateResultInfo")) { var error = $root.google.cloud.ces.v1beta.GenerateAppResourceResponse.GenerateResultInfo.verify(message.generateResultInfo); if (error) @@ -88996,6 +91065,11 @@ throw TypeError(".google.cloud.ces.v1beta.GenerateAppResourceResponse.appResources: object expected"); message.appResources = $root.google.cloud.ces.v1beta.GenerateAppResourceResponse.AppResources.fromObject(object.appResources); } + if (object.qualityReport != null) { + if (typeof object.qualityReport !== "object") + throw TypeError(".google.cloud.ces.v1beta.GenerateAppResourceResponse.qualityReport: object expected"); + message.qualityReport = $root.google.cloud.ces.v1beta.QualityReport.fromObject(object.qualityReport); + } if (object.generateResultInfo != null) { if (typeof object.generateResultInfo !== "object") throw TypeError(".google.cloud.ces.v1beta.GenerateAppResourceResponse.generateResultInfo: object expected"); @@ -89051,6 +91125,11 @@ if (options.oneofs) object.generatedResource = "appResources"; } + if (message.qualityReport != null && message.hasOwnProperty("qualityReport")) { + object.qualityReport = $root.google.cloud.ces.v1beta.QualityReport.toObject(message.qualityReport, options); + if (options.oneofs) + object.generatedResource = "qualityReport"; + } return object; }; @@ -89995,6 +92074,818 @@ return GenerateAppResourceResponse; })(); + v1beta.QualityReport = (function() { + + /** + * Properties of a QualityReport. + * @memberof google.cloud.ces.v1beta + * @interface IQualityReport + * @property {Array.|null} [issues] QualityReport issues + * @property {Array.|null} [evaluationRuns] QualityReport evaluationRuns + * @property {Array.|null} [generalIssues] QualityReport generalIssues + */ + + /** + * Constructs a new QualityReport. + * @memberof google.cloud.ces.v1beta + * @classdesc Represents a QualityReport. + * @implements IQualityReport + * @constructor + * @param {google.cloud.ces.v1beta.IQualityReport=} [properties] Properties to set + */ + function QualityReport(properties) { + this.issues = []; + this.evaluationRuns = []; + this.generalIssues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QualityReport issues. + * @member {Array.} issues + * @memberof google.cloud.ces.v1beta.QualityReport + * @instance + */ + QualityReport.prototype.issues = $util.emptyArray; + + /** + * QualityReport evaluationRuns. + * @member {Array.} evaluationRuns + * @memberof google.cloud.ces.v1beta.QualityReport + * @instance + */ + QualityReport.prototype.evaluationRuns = $util.emptyArray; + + /** + * QualityReport generalIssues. + * @member {Array.} generalIssues + * @memberof google.cloud.ces.v1beta.QualityReport + * @instance + */ + QualityReport.prototype.generalIssues = $util.emptyArray; + + /** + * Creates a new QualityReport instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1beta.QualityReport + * @static + * @param {google.cloud.ces.v1beta.IQualityReport=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.QualityReport} QualityReport instance + */ + QualityReport.create = function create(properties) { + return new QualityReport(properties); + }; + + /** + * Encodes the specified QualityReport message. Does not implicitly {@link google.cloud.ces.v1beta.QualityReport.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1beta.QualityReport + * @static + * @param {google.cloud.ces.v1beta.IQualityReport} message QualityReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QualityReport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issues != null && message.issues.length) + for (var i = 0; i < message.issues.length; ++i) + $root.google.cloud.ces.v1beta.QualityReport.AgentIssues.encode(message.issues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.evaluationRuns != null && message.evaluationRuns.length) + for (var i = 0; i < message.evaluationRuns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.evaluationRuns[i]); + if (message.generalIssues != null && message.generalIssues.length) + for (var i = 0; i < message.generalIssues.length; ++i) + $root.google.cloud.ces.v1beta.QualityReport.Issue.encode(message.generalIssues[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QualityReport message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.QualityReport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1beta.QualityReport + * @static + * @param {google.cloud.ces.v1beta.IQualityReport} message QualityReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QualityReport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QualityReport message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1beta.QualityReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1beta.QualityReport} QualityReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QualityReport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.QualityReport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.issues && message.issues.length)) + message.issues = []; + message.issues.push($root.google.cloud.ces.v1beta.QualityReport.AgentIssues.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.evaluationRuns && message.evaluationRuns.length)) + message.evaluationRuns = []; + message.evaluationRuns.push(reader.string()); + break; + } + case 3: { + if (!(message.generalIssues && message.generalIssues.length)) + message.generalIssues = []; + message.generalIssues.push($root.google.cloud.ces.v1beta.QualityReport.Issue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QualityReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1beta.QualityReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1beta.QualityReport} QualityReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QualityReport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QualityReport message. + * @function verify + * @memberof google.cloud.ces.v1beta.QualityReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QualityReport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issues != null && message.hasOwnProperty("issues")) { + if (!Array.isArray(message.issues)) + return "issues: array expected"; + for (var i = 0; i < message.issues.length; ++i) { + var error = $root.google.cloud.ces.v1beta.QualityReport.AgentIssues.verify(message.issues[i]); + if (error) + return "issues." + error; + } + } + if (message.evaluationRuns != null && message.hasOwnProperty("evaluationRuns")) { + if (!Array.isArray(message.evaluationRuns)) + return "evaluationRuns: array expected"; + for (var i = 0; i < message.evaluationRuns.length; ++i) + if (!$util.isString(message.evaluationRuns[i])) + return "evaluationRuns: string[] expected"; + } + if (message.generalIssues != null && message.hasOwnProperty("generalIssues")) { + if (!Array.isArray(message.generalIssues)) + return "generalIssues: array expected"; + for (var i = 0; i < message.generalIssues.length; ++i) { + var error = $root.google.cloud.ces.v1beta.QualityReport.Issue.verify(message.generalIssues[i]); + if (error) + return "generalIssues." + error; + } + } + return null; + }; + + /** + * Creates a QualityReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1beta.QualityReport + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1beta.QualityReport} QualityReport + */ + QualityReport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.QualityReport) + return object; + var message = new $root.google.cloud.ces.v1beta.QualityReport(); + if (object.issues) { + if (!Array.isArray(object.issues)) + throw TypeError(".google.cloud.ces.v1beta.QualityReport.issues: array expected"); + message.issues = []; + for (var i = 0; i < object.issues.length; ++i) { + if (typeof object.issues[i] !== "object") + throw TypeError(".google.cloud.ces.v1beta.QualityReport.issues: object expected"); + message.issues[i] = $root.google.cloud.ces.v1beta.QualityReport.AgentIssues.fromObject(object.issues[i]); + } + } + if (object.evaluationRuns) { + if (!Array.isArray(object.evaluationRuns)) + throw TypeError(".google.cloud.ces.v1beta.QualityReport.evaluationRuns: array expected"); + message.evaluationRuns = []; + for (var i = 0; i < object.evaluationRuns.length; ++i) + message.evaluationRuns[i] = String(object.evaluationRuns[i]); + } + if (object.generalIssues) { + if (!Array.isArray(object.generalIssues)) + throw TypeError(".google.cloud.ces.v1beta.QualityReport.generalIssues: array expected"); + message.generalIssues = []; + for (var i = 0; i < object.generalIssues.length; ++i) { + if (typeof object.generalIssues[i] !== "object") + throw TypeError(".google.cloud.ces.v1beta.QualityReport.generalIssues: object expected"); + message.generalIssues[i] = $root.google.cloud.ces.v1beta.QualityReport.Issue.fromObject(object.generalIssues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a QualityReport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1beta.QualityReport + * @static + * @param {google.cloud.ces.v1beta.QualityReport} message QualityReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QualityReport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.issues = []; + object.evaluationRuns = []; + object.generalIssues = []; + } + if (message.issues && message.issues.length) { + object.issues = []; + for (var j = 0; j < message.issues.length; ++j) + object.issues[j] = $root.google.cloud.ces.v1beta.QualityReport.AgentIssues.toObject(message.issues[j], options); + } + if (message.evaluationRuns && message.evaluationRuns.length) { + object.evaluationRuns = []; + for (var j = 0; j < message.evaluationRuns.length; ++j) + object.evaluationRuns[j] = message.evaluationRuns[j]; + } + if (message.generalIssues && message.generalIssues.length) { + object.generalIssues = []; + for (var j = 0; j < message.generalIssues.length; ++j) + object.generalIssues[j] = $root.google.cloud.ces.v1beta.QualityReport.Issue.toObject(message.generalIssues[j], options); + } + return object; + }; + + /** + * Converts this QualityReport to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1beta.QualityReport + * @instance + * @returns {Object.} JSON object + */ + QualityReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QualityReport + * @function getTypeUrl + * @memberof google.cloud.ces.v1beta.QualityReport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QualityReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1beta.QualityReport"; + }; + + QualityReport.Issue = (function() { + + /** + * Properties of an Issue. + * @memberof google.cloud.ces.v1beta.QualityReport + * @interface IIssue + * @property {string|null} [description] Issue description + * @property {number|null} [occurrenceCount] Issue occurrenceCount + * @property {string|null} [proposedSolution] Issue proposedSolution + */ + + /** + * Constructs a new Issue. + * @memberof google.cloud.ces.v1beta.QualityReport + * @classdesc Represents an Issue. + * @implements IIssue + * @constructor + * @param {google.cloud.ces.v1beta.QualityReport.IIssue=} [properties] Properties to set + */ + function Issue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Issue description. + * @member {string} description + * @memberof google.cloud.ces.v1beta.QualityReport.Issue + * @instance + */ + Issue.prototype.description = ""; + + /** + * Issue occurrenceCount. + * @member {number} occurrenceCount + * @memberof google.cloud.ces.v1beta.QualityReport.Issue + * @instance + */ + Issue.prototype.occurrenceCount = 0; + + /** + * Issue proposedSolution. + * @member {string} proposedSolution + * @memberof google.cloud.ces.v1beta.QualityReport.Issue + * @instance + */ + Issue.prototype.proposedSolution = ""; + + /** + * Creates a new Issue instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1beta.QualityReport.Issue + * @static + * @param {google.cloud.ces.v1beta.QualityReport.IIssue=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.QualityReport.Issue} Issue instance + */ + Issue.create = function create(properties) { + return new Issue(properties); + }; + + /** + * Encodes the specified Issue message. Does not implicitly {@link google.cloud.ces.v1beta.QualityReport.Issue.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1beta.QualityReport.Issue + * @static + * @param {google.cloud.ces.v1beta.QualityReport.IIssue} message Issue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Issue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.occurrenceCount != null && Object.hasOwnProperty.call(message, "occurrenceCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.occurrenceCount); + if (message.proposedSolution != null && Object.hasOwnProperty.call(message, "proposedSolution")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.proposedSolution); + return writer; + }; + + /** + * Encodes the specified Issue message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.QualityReport.Issue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1beta.QualityReport.Issue + * @static + * @param {google.cloud.ces.v1beta.QualityReport.IIssue} message Issue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Issue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Issue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1beta.QualityReport.Issue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1beta.QualityReport.Issue} Issue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Issue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.QualityReport.Issue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + message.occurrenceCount = reader.int32(); + break; + } + case 3: { + message.proposedSolution = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Issue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1beta.QualityReport.Issue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1beta.QualityReport.Issue} Issue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Issue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Issue message. + * @function verify + * @memberof google.cloud.ces.v1beta.QualityReport.Issue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Issue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.occurrenceCount != null && message.hasOwnProperty("occurrenceCount")) + if (!$util.isInteger(message.occurrenceCount)) + return "occurrenceCount: integer expected"; + if (message.proposedSolution != null && message.hasOwnProperty("proposedSolution")) + if (!$util.isString(message.proposedSolution)) + return "proposedSolution: string expected"; + return null; + }; + + /** + * Creates an Issue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1beta.QualityReport.Issue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1beta.QualityReport.Issue} Issue + */ + Issue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.QualityReport.Issue) + return object; + var message = new $root.google.cloud.ces.v1beta.QualityReport.Issue(); + if (object.description != null) + message.description = String(object.description); + if (object.occurrenceCount != null) + message.occurrenceCount = object.occurrenceCount | 0; + if (object.proposedSolution != null) + message.proposedSolution = String(object.proposedSolution); + return message; + }; + + /** + * Creates a plain object from an Issue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1beta.QualityReport.Issue + * @static + * @param {google.cloud.ces.v1beta.QualityReport.Issue} message Issue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Issue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = ""; + object.occurrenceCount = 0; + object.proposedSolution = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.occurrenceCount != null && message.hasOwnProperty("occurrenceCount")) + object.occurrenceCount = message.occurrenceCount; + if (message.proposedSolution != null && message.hasOwnProperty("proposedSolution")) + object.proposedSolution = message.proposedSolution; + return object; + }; + + /** + * Converts this Issue to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1beta.QualityReport.Issue + * @instance + * @returns {Object.} JSON object + */ + Issue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Issue + * @function getTypeUrl + * @memberof google.cloud.ces.v1beta.QualityReport.Issue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Issue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1beta.QualityReport.Issue"; + }; + + return Issue; + })(); + + QualityReport.AgentIssues = (function() { + + /** + * Properties of an AgentIssues. + * @memberof google.cloud.ces.v1beta.QualityReport + * @interface IAgentIssues + * @property {string|null} [agent] AgentIssues agent + * @property {Array.|null} [issues] AgentIssues issues + */ + + /** + * Constructs a new AgentIssues. + * @memberof google.cloud.ces.v1beta.QualityReport + * @classdesc Represents an AgentIssues. + * @implements IAgentIssues + * @constructor + * @param {google.cloud.ces.v1beta.QualityReport.IAgentIssues=} [properties] Properties to set + */ + function AgentIssues(properties) { + this.issues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AgentIssues agent. + * @member {string} agent + * @memberof google.cloud.ces.v1beta.QualityReport.AgentIssues + * @instance + */ + AgentIssues.prototype.agent = ""; + + /** + * AgentIssues issues. + * @member {Array.} issues + * @memberof google.cloud.ces.v1beta.QualityReport.AgentIssues + * @instance + */ + AgentIssues.prototype.issues = $util.emptyArray; + + /** + * Creates a new AgentIssues instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1beta.QualityReport.AgentIssues + * @static + * @param {google.cloud.ces.v1beta.QualityReport.IAgentIssues=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.QualityReport.AgentIssues} AgentIssues instance + */ + AgentIssues.create = function create(properties) { + return new AgentIssues(properties); + }; + + /** + * Encodes the specified AgentIssues message. Does not implicitly {@link google.cloud.ces.v1beta.QualityReport.AgentIssues.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1beta.QualityReport.AgentIssues + * @static + * @param {google.cloud.ces.v1beta.QualityReport.IAgentIssues} message AgentIssues message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentIssues.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.agent); + if (message.issues != null && message.issues.length) + for (var i = 0; i < message.issues.length; ++i) + $root.google.cloud.ces.v1beta.QualityReport.Issue.encode(message.issues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AgentIssues message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.QualityReport.AgentIssues.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1beta.QualityReport.AgentIssues + * @static + * @param {google.cloud.ces.v1beta.QualityReport.IAgentIssues} message AgentIssues message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentIssues.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AgentIssues message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1beta.QualityReport.AgentIssues + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1beta.QualityReport.AgentIssues} AgentIssues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentIssues.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.QualityReport.AgentIssues(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.agent = reader.string(); + break; + } + case 2: { + if (!(message.issues && message.issues.length)) + message.issues = []; + message.issues.push($root.google.cloud.ces.v1beta.QualityReport.Issue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AgentIssues message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1beta.QualityReport.AgentIssues + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1beta.QualityReport.AgentIssues} AgentIssues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentIssues.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AgentIssues message. + * @function verify + * @memberof google.cloud.ces.v1beta.QualityReport.AgentIssues + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AgentIssues.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.agent != null && message.hasOwnProperty("agent")) + if (!$util.isString(message.agent)) + return "agent: string expected"; + if (message.issues != null && message.hasOwnProperty("issues")) { + if (!Array.isArray(message.issues)) + return "issues: array expected"; + for (var i = 0; i < message.issues.length; ++i) { + var error = $root.google.cloud.ces.v1beta.QualityReport.Issue.verify(message.issues[i]); + if (error) + return "issues." + error; + } + } + return null; + }; + + /** + * Creates an AgentIssues message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1beta.QualityReport.AgentIssues + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1beta.QualityReport.AgentIssues} AgentIssues + */ + AgentIssues.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.QualityReport.AgentIssues) + return object; + var message = new $root.google.cloud.ces.v1beta.QualityReport.AgentIssues(); + if (object.agent != null) + message.agent = String(object.agent); + if (object.issues) { + if (!Array.isArray(object.issues)) + throw TypeError(".google.cloud.ces.v1beta.QualityReport.AgentIssues.issues: array expected"); + message.issues = []; + for (var i = 0; i < object.issues.length; ++i) { + if (typeof object.issues[i] !== "object") + throw TypeError(".google.cloud.ces.v1beta.QualityReport.AgentIssues.issues: object expected"); + message.issues[i] = $root.google.cloud.ces.v1beta.QualityReport.Issue.fromObject(object.issues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AgentIssues message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1beta.QualityReport.AgentIssues + * @static + * @param {google.cloud.ces.v1beta.QualityReport.AgentIssues} message AgentIssues + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AgentIssues.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.issues = []; + if (options.defaults) + object.agent = ""; + if (message.agent != null && message.hasOwnProperty("agent")) + object.agent = message.agent; + if (message.issues && message.issues.length) { + object.issues = []; + for (var j = 0; j < message.issues.length; ++j) + object.issues[j] = $root.google.cloud.ces.v1beta.QualityReport.Issue.toObject(message.issues[j], options); + } + return object; + }; + + /** + * Converts this AgentIssues to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1beta.QualityReport.AgentIssues + * @instance + * @returns {Object.} JSON object + */ + AgentIssues.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AgentIssues + * @function getTypeUrl + * @memberof google.cloud.ces.v1beta.QualityReport.AgentIssues + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AgentIssues.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1beta.QualityReport.AgentIssues"; + }; + + return AgentIssues; + })(); + + return QualityReport; + })(); + v1beta.ListChangelogsRequest = (function() { /** @@ -94862,6 +97753,7 @@ case 0: case 1: case 2: + case 3: break; } return null; @@ -94898,6 +97790,10 @@ case 2: message.errorHandlingStrategy = 2; break; + case "END_SESSION": + case 3: + message.errorHandlingStrategy = 3; + break; } return message; }; @@ -94955,12 +97851,14 @@ * @property {number} ERROR_HANDLING_STRATEGY_UNSPECIFIED=0 ERROR_HANDLING_STRATEGY_UNSPECIFIED value * @property {number} NONE=1 NONE value * @property {number} FALLBACK_RESPONSE=2 FALLBACK_RESPONSE value + * @property {number} END_SESSION=3 END_SESSION value */ ErrorHandlingSettings.ErrorHandlingStrategy = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "ERROR_HANDLING_STRATEGY_UNSPECIFIED"] = 0; values[valuesById[1] = "NONE"] = 1; values[valuesById[2] = "FALLBACK_RESPONSE"] = 2; + values[valuesById[3] = "END_SESSION"] = 3; return values; })(); @@ -116628,6 +119526,7 @@ * @property {google.cloud.ces.v1beta.IApiAuthentication|null} [apiAuthentication] McpTool apiAuthentication * @property {google.cloud.ces.v1beta.ITlsConfig|null} [tlsConfig] McpTool tlsConfig * @property {google.cloud.ces.v1beta.IServiceDirectoryConfig|null} [serviceDirectoryConfig] McpTool serviceDirectoryConfig + * @property {Object.|null} [customHeaders] McpTool customHeaders */ /** @@ -116639,6 +119538,7 @@ * @param {google.cloud.ces.v1beta.IMcpTool=} [properties] Properties to set */ function McpTool(properties) { + this.customHeaders = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -116709,6 +119609,14 @@ */ McpTool.prototype.serviceDirectoryConfig = null; + /** + * McpTool customHeaders. + * @member {Object.} customHeaders + * @memberof google.cloud.ces.v1beta.McpTool + * @instance + */ + McpTool.prototype.customHeaders = $util.emptyObject; + /** * Creates a new McpTool instance using the specified properties. * @function create @@ -116749,6 +119657,9 @@ $root.google.cloud.ces.v1beta.TlsConfig.encode(message.tlsConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.serviceDirectoryConfig != null && Object.hasOwnProperty.call(message, "serviceDirectoryConfig")) $root.google.cloud.ces.v1beta.ServiceDirectoryConfig.encode(message.serviceDirectoryConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.customHeaders != null && Object.hasOwnProperty.call(message, "customHeaders")) + for (var keys = Object.keys(message.customHeaders), i = 0; i < keys.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.customHeaders[keys[i]]).ldelim(); return writer; }; @@ -116779,7 +119690,7 @@ McpTool.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.McpTool(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.McpTool(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -116817,6 +119728,29 @@ message.serviceDirectoryConfig = $root.google.cloud.ces.v1beta.ServiceDirectoryConfig.decode(reader, reader.uint32()); break; } + case 9: { + if (message.customHeaders === $util.emptyObject) + message.customHeaders = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.customHeaders[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -116886,6 +119820,14 @@ if (error) return "serviceDirectoryConfig." + error; } + if (message.customHeaders != null && message.hasOwnProperty("customHeaders")) { + if (!$util.isObject(message.customHeaders)) + return "customHeaders: object expected"; + var key = Object.keys(message.customHeaders); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.customHeaders[key[i]])) + return "customHeaders: string{k:string} expected"; + } return null; }; @@ -116932,6 +119874,13 @@ throw TypeError(".google.cloud.ces.v1beta.McpTool.serviceDirectoryConfig: object expected"); message.serviceDirectoryConfig = $root.google.cloud.ces.v1beta.ServiceDirectoryConfig.fromObject(object.serviceDirectoryConfig); } + if (object.customHeaders) { + if (typeof object.customHeaders !== "object") + throw TypeError(".google.cloud.ces.v1beta.McpTool.customHeaders: object expected"); + message.customHeaders = {}; + for (var keys = Object.keys(object.customHeaders), i = 0; i < keys.length; ++i) + message.customHeaders[keys[i]] = String(object.customHeaders[keys[i]]); + } return message; }; @@ -116948,6 +119897,8 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.customHeaders = {}; if (options.defaults) { object.name = ""; object.description = ""; @@ -116974,6 +119925,12 @@ object.tlsConfig = $root.google.cloud.ces.v1beta.TlsConfig.toObject(message.tlsConfig, options); if (message.serviceDirectoryConfig != null && message.hasOwnProperty("serviceDirectoryConfig")) object.serviceDirectoryConfig = $root.google.cloud.ces.v1beta.ServiceDirectoryConfig.toObject(message.serviceDirectoryConfig, options); + var keys2; + if (message.customHeaders && (keys2 = Object.keys(message.customHeaders)).length) { + object.customHeaders = {}; + for (var j = 0; j < keys2.length; ++j) + object.customHeaders[keys2[j]] = message.customHeaders[keys2[j]]; + } return object; }; @@ -117879,6 +120836,8 @@ * @property {string|null} [name] WidgetTool name * @property {string|null} [description] WidgetTool description * @property {google.cloud.ces.v1beta.WidgetTool.WidgetType|null} [widgetType] WidgetTool widgetType + * @property {google.protobuf.IStruct|null} [uiConfig] WidgetTool uiConfig + * @property {google.cloud.ces.v1beta.WidgetTool.IDataMapping|null} [dataMapping] WidgetTool dataMapping */ /** @@ -117928,6 +120887,22 @@ */ WidgetTool.prototype.widgetType = 0; + /** + * WidgetTool uiConfig. + * @member {google.protobuf.IStruct|null|undefined} uiConfig + * @memberof google.cloud.ces.v1beta.WidgetTool + * @instance + */ + WidgetTool.prototype.uiConfig = null; + + /** + * WidgetTool dataMapping. + * @member {google.cloud.ces.v1beta.WidgetTool.IDataMapping|null|undefined} dataMapping + * @memberof google.cloud.ces.v1beta.WidgetTool + * @instance + */ + WidgetTool.prototype.dataMapping = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -117974,6 +120949,10 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.widgetType); if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) $root.google.cloud.ces.v1beta.Schema.encode(message.parameters, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.uiConfig != null && Object.hasOwnProperty.call(message, "uiConfig")) + $root.google.protobuf.Struct.encode(message.uiConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dataMapping != null && Object.hasOwnProperty.call(message, "dataMapping")) + $root.google.cloud.ces.v1beta.WidgetTool.DataMapping.encode(message.dataMapping, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -118026,6 +121005,14 @@ message.widgetType = reader.int32(); break; } + case 5: { + message.uiConfig = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.dataMapping = $root.google.cloud.ces.v1beta.WidgetTool.DataMapping.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -118095,6 +121082,16 @@ case 12: break; } + if (message.uiConfig != null && message.hasOwnProperty("uiConfig")) { + var error = $root.google.protobuf.Struct.verify(message.uiConfig); + if (error) + return "uiConfig." + error; + } + if (message.dataMapping != null && message.hasOwnProperty("dataMapping")) { + var error = $root.google.cloud.ces.v1beta.WidgetTool.DataMapping.verify(message.dataMapping); + if (error) + return "dataMapping." + error; + } return null; }; @@ -118179,6 +121176,16 @@ message.widgetType = 12; break; } + if (object.uiConfig != null) { + if (typeof object.uiConfig !== "object") + throw TypeError(".google.cloud.ces.v1beta.WidgetTool.uiConfig: object expected"); + message.uiConfig = $root.google.protobuf.Struct.fromObject(object.uiConfig); + } + if (object.dataMapping != null) { + if (typeof object.dataMapping !== "object") + throw TypeError(".google.cloud.ces.v1beta.WidgetTool.dataMapping: object expected"); + message.dataMapping = $root.google.cloud.ces.v1beta.WidgetTool.DataMapping.fromObject(object.dataMapping); + } return message; }; @@ -118199,6 +121206,8 @@ object.name = ""; object.description = ""; object.widgetType = options.enums === String ? "WIDGET_TYPE_UNSPECIFIED" : 0; + object.uiConfig = null; + object.dataMapping = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -118211,6 +121220,10 @@ if (options.oneofs) object.input = "parameters"; } + if (message.uiConfig != null && message.hasOwnProperty("uiConfig")) + object.uiConfig = $root.google.protobuf.Struct.toObject(message.uiConfig, options); + if (message.dataMapping != null && message.hasOwnProperty("dataMapping")) + object.dataMapping = $root.google.cloud.ces.v1beta.WidgetTool.DataMapping.toObject(message.dataMapping, options); return object; }; @@ -118240,6 +121253,385 @@ return typeUrlPrefix + "/google.cloud.ces.v1beta.WidgetTool"; }; + WidgetTool.DataMapping = (function() { + + /** + * Properties of a DataMapping. + * @memberof google.cloud.ces.v1beta.WidgetTool + * @interface IDataMapping + * @property {string|null} [sourceToolName] DataMapping sourceToolName + * @property {Object.|null} [fieldMappings] DataMapping fieldMappings + * @property {google.cloud.ces.v1beta.IPythonFunction|null} [pythonFunction] DataMapping pythonFunction + * @property {google.cloud.ces.v1beta.WidgetTool.DataMapping.Mode|null} [mode] DataMapping mode + * @property {string|null} [pythonScript] DataMapping pythonScript + */ + + /** + * Constructs a new DataMapping. + * @memberof google.cloud.ces.v1beta.WidgetTool + * @classdesc Represents a DataMapping. + * @implements IDataMapping + * @constructor + * @param {google.cloud.ces.v1beta.WidgetTool.IDataMapping=} [properties] Properties to set + */ + function DataMapping(properties) { + this.fieldMappings = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataMapping sourceToolName. + * @member {string} sourceToolName + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @instance + */ + DataMapping.prototype.sourceToolName = ""; + + /** + * DataMapping fieldMappings. + * @member {Object.} fieldMappings + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @instance + */ + DataMapping.prototype.fieldMappings = $util.emptyObject; + + /** + * DataMapping pythonFunction. + * @member {google.cloud.ces.v1beta.IPythonFunction|null|undefined} pythonFunction + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @instance + */ + DataMapping.prototype.pythonFunction = null; + + /** + * DataMapping mode. + * @member {google.cloud.ces.v1beta.WidgetTool.DataMapping.Mode} mode + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @instance + */ + DataMapping.prototype.mode = 0; + + /** + * DataMapping pythonScript. + * @member {string} pythonScript + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @instance + */ + DataMapping.prototype.pythonScript = ""; + + /** + * Creates a new DataMapping instance using the specified properties. + * @function create + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @static + * @param {google.cloud.ces.v1beta.WidgetTool.IDataMapping=} [properties] Properties to set + * @returns {google.cloud.ces.v1beta.WidgetTool.DataMapping} DataMapping instance + */ + DataMapping.create = function create(properties) { + return new DataMapping(properties); + }; + + /** + * Encodes the specified DataMapping message. Does not implicitly {@link google.cloud.ces.v1beta.WidgetTool.DataMapping.verify|verify} messages. + * @function encode + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @static + * @param {google.cloud.ces.v1beta.WidgetTool.IDataMapping} message DataMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataMapping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceToolName != null && Object.hasOwnProperty.call(message, "sourceToolName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceToolName); + if (message.fieldMappings != null && Object.hasOwnProperty.call(message, "fieldMappings")) + for (var keys = Object.keys(message.fieldMappings), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.fieldMappings[keys[i]]).ldelim(); + if (message.pythonScript != null && Object.hasOwnProperty.call(message, "pythonScript")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pythonScript); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mode); + if (message.pythonFunction != null && Object.hasOwnProperty.call(message, "pythonFunction")) + $root.google.cloud.ces.v1beta.PythonFunction.encode(message.pythonFunction, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataMapping message, length delimited. Does not implicitly {@link google.cloud.ces.v1beta.WidgetTool.DataMapping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @static + * @param {google.cloud.ces.v1beta.WidgetTool.IDataMapping} message DataMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataMapping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataMapping message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.ces.v1beta.WidgetTool.DataMapping} DataMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataMapping.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.WidgetTool.DataMapping(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sourceToolName = reader.string(); + break; + } + case 2: { + if (message.fieldMappings === $util.emptyObject) + message.fieldMappings = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fieldMappings[key] = value; + break; + } + case 5: { + message.pythonFunction = $root.google.cloud.ces.v1beta.PythonFunction.decode(reader, reader.uint32()); + break; + } + case 4: { + message.mode = reader.int32(); + break; + } + case 3: { + message.pythonScript = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataMapping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.ces.v1beta.WidgetTool.DataMapping} DataMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataMapping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataMapping message. + * @function verify + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataMapping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceToolName != null && message.hasOwnProperty("sourceToolName")) + if (!$util.isString(message.sourceToolName)) + return "sourceToolName: string expected"; + if (message.fieldMappings != null && message.hasOwnProperty("fieldMappings")) { + if (!$util.isObject(message.fieldMappings)) + return "fieldMappings: object expected"; + var key = Object.keys(message.fieldMappings); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.fieldMappings[key[i]])) + return "fieldMappings: string{k:string} expected"; + } + if (message.pythonFunction != null && message.hasOwnProperty("pythonFunction")) { + var error = $root.google.cloud.ces.v1beta.PythonFunction.verify(message.pythonFunction); + if (error) + return "pythonFunction." + error; + } + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.pythonScript != null && message.hasOwnProperty("pythonScript")) + if (!$util.isString(message.pythonScript)) + return "pythonScript: string expected"; + return null; + }; + + /** + * Creates a DataMapping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.ces.v1beta.WidgetTool.DataMapping} DataMapping + */ + DataMapping.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.ces.v1beta.WidgetTool.DataMapping) + return object; + var message = new $root.google.cloud.ces.v1beta.WidgetTool.DataMapping(); + if (object.sourceToolName != null) + message.sourceToolName = String(object.sourceToolName); + if (object.fieldMappings) { + if (typeof object.fieldMappings !== "object") + throw TypeError(".google.cloud.ces.v1beta.WidgetTool.DataMapping.fieldMappings: object expected"); + message.fieldMappings = {}; + for (var keys = Object.keys(object.fieldMappings), i = 0; i < keys.length; ++i) + message.fieldMappings[keys[i]] = String(object.fieldMappings[keys[i]]); + } + if (object.pythonFunction != null) { + if (typeof object.pythonFunction !== "object") + throw TypeError(".google.cloud.ces.v1beta.WidgetTool.DataMapping.pythonFunction: object expected"); + message.pythonFunction = $root.google.cloud.ces.v1beta.PythonFunction.fromObject(object.pythonFunction); + } + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "FIELD_MAPPING": + case 1: + message.mode = 1; + break; + case "PYTHON_SCRIPT": + case 2: + message.mode = 2; + break; + } + if (object.pythonScript != null) + message.pythonScript = String(object.pythonScript); + return message; + }; + + /** + * Creates a plain object from a DataMapping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @static + * @param {google.cloud.ces.v1beta.WidgetTool.DataMapping} message DataMapping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fieldMappings = {}; + if (options.defaults) { + object.sourceToolName = ""; + object.pythonScript = ""; + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + object.pythonFunction = null; + } + if (message.sourceToolName != null && message.hasOwnProperty("sourceToolName")) + object.sourceToolName = message.sourceToolName; + var keys2; + if (message.fieldMappings && (keys2 = Object.keys(message.fieldMappings)).length) { + object.fieldMappings = {}; + for (var j = 0; j < keys2.length; ++j) + object.fieldMappings[keys2[j]] = message.fieldMappings[keys2[j]]; + } + if (message.pythonScript != null && message.hasOwnProperty("pythonScript")) + object.pythonScript = message.pythonScript; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.ces.v1beta.WidgetTool.DataMapping.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.ces.v1beta.WidgetTool.DataMapping.Mode[message.mode] : message.mode; + if (message.pythonFunction != null && message.hasOwnProperty("pythonFunction")) + object.pythonFunction = $root.google.cloud.ces.v1beta.PythonFunction.toObject(message.pythonFunction, options); + return object; + }; + + /** + * Converts this DataMapping to JSON. + * @function toJSON + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @instance + * @returns {Object.} JSON object + */ + DataMapping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataMapping + * @function getTypeUrl + * @memberof google.cloud.ces.v1beta.WidgetTool.DataMapping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.ces.v1beta.WidgetTool.DataMapping"; + }; + + /** + * Mode enum. + * @name google.cloud.ces.v1beta.WidgetTool.DataMapping.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} FIELD_MAPPING=1 FIELD_MAPPING value + * @property {number} PYTHON_SCRIPT=2 PYTHON_SCRIPT value + */ + DataMapping.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIELD_MAPPING"] = 1; + values[valuesById[2] = "PYTHON_SCRIPT"] = 2; + return values; + })(); + + return DataMapping; + })(); + /** * WidgetType enum. * @name google.cloud.ces.v1beta.WidgetTool.WidgetType @@ -119092,6 +122484,7 @@ * @property {google.cloud.ces.v1beta.IApiAuthentication|null} [apiAuthentication] McpToolset apiAuthentication * @property {google.cloud.ces.v1beta.IServiceDirectoryConfig|null} [serviceDirectoryConfig] McpToolset serviceDirectoryConfig * @property {google.cloud.ces.v1beta.ITlsConfig|null} [tlsConfig] McpToolset tlsConfig + * @property {Object.|null} [customHeaders] McpToolset customHeaders */ /** @@ -119103,6 +122496,7 @@ * @param {google.cloud.ces.v1beta.IMcpToolset=} [properties] Properties to set */ function McpToolset(properties) { + this.customHeaders = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -119141,6 +122535,14 @@ */ McpToolset.prototype.tlsConfig = null; + /** + * McpToolset customHeaders. + * @member {Object.} customHeaders + * @memberof google.cloud.ces.v1beta.McpToolset + * @instance + */ + McpToolset.prototype.customHeaders = $util.emptyObject; + /** * Creates a new McpToolset instance using the specified properties. * @function create @@ -119173,6 +122575,9 @@ $root.google.cloud.ces.v1beta.ServiceDirectoryConfig.encode(message.serviceDirectoryConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.tlsConfig != null && Object.hasOwnProperty.call(message, "tlsConfig")) $root.google.cloud.ces.v1beta.TlsConfig.encode(message.tlsConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.customHeaders != null && Object.hasOwnProperty.call(message, "customHeaders")) + for (var keys = Object.keys(message.customHeaders), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.customHeaders[keys[i]]).ldelim(); return writer; }; @@ -119203,7 +122608,7 @@ McpToolset.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.McpToolset(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.ces.v1beta.McpToolset(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -119225,6 +122630,29 @@ message.tlsConfig = $root.google.cloud.ces.v1beta.TlsConfig.decode(reader, reader.uint32()); break; } + case 5: { + if (message.customHeaders === $util.emptyObject) + message.customHeaders = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.customHeaders[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -119278,6 +122706,14 @@ if (error) return "tlsConfig." + error; } + if (message.customHeaders != null && message.hasOwnProperty("customHeaders")) { + if (!$util.isObject(message.customHeaders)) + return "customHeaders: object expected"; + var key = Object.keys(message.customHeaders); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.customHeaders[key[i]])) + return "customHeaders: string{k:string} expected"; + } return null; }; @@ -119310,6 +122746,13 @@ throw TypeError(".google.cloud.ces.v1beta.McpToolset.tlsConfig: object expected"); message.tlsConfig = $root.google.cloud.ces.v1beta.TlsConfig.fromObject(object.tlsConfig); } + if (object.customHeaders) { + if (typeof object.customHeaders !== "object") + throw TypeError(".google.cloud.ces.v1beta.McpToolset.customHeaders: object expected"); + message.customHeaders = {}; + for (var keys = Object.keys(object.customHeaders), i = 0; i < keys.length; ++i) + message.customHeaders[keys[i]] = String(object.customHeaders[keys[i]]); + } return message; }; @@ -119326,6 +122769,8 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.customHeaders = {}; if (options.defaults) { object.serverAddress = ""; object.apiAuthentication = null; @@ -119340,6 +122785,12 @@ object.serviceDirectoryConfig = $root.google.cloud.ces.v1beta.ServiceDirectoryConfig.toObject(message.serviceDirectoryConfig, options); if (message.tlsConfig != null && message.hasOwnProperty("tlsConfig")) object.tlsConfig = $root.google.cloud.ces.v1beta.TlsConfig.toObject(message.tlsConfig, options); + var keys2; + if (message.customHeaders && (keys2 = Object.keys(message.customHeaders)).length) { + object.customHeaders = {}; + for (var j = 0; j < keys2.length; ++j) + object.customHeaders[keys2[j]] = message.customHeaders[keys2[j]]; + } return object; }; @@ -140488,6 +143939,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.ces.v1beta.SessionService|streamRunSession}. + * @memberof google.cloud.ces.v1beta.SessionService + * @typedef StreamRunSessionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.ces.v1beta.RunSessionResponse} [response] RunSessionResponse + */ + + /** + * Calls StreamRunSession. + * @function streamRunSession + * @memberof google.cloud.ces.v1beta.SessionService + * @instance + * @param {google.cloud.ces.v1beta.IRunSessionRequest} request RunSessionRequest message or plain object + * @param {google.cloud.ces.v1beta.SessionService.StreamRunSessionCallback} callback Node-style callback called with the error, if any, and RunSessionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SessionService.prototype.streamRunSession = function streamRunSession(request, callback) { + return this.rpcCall(streamRunSession, $root.google.cloud.ces.v1beta.RunSessionRequest, $root.google.cloud.ces.v1beta.RunSessionResponse, request, callback); + }, "name", { value: "StreamRunSession" }); + + /** + * Calls StreamRunSession. + * @function streamRunSession + * @memberof google.cloud.ces.v1beta.SessionService + * @instance + * @param {google.cloud.ces.v1beta.IRunSessionRequest} request RunSessionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.ces.v1beta.SessionService|bidiRunSession}. * @memberof google.cloud.ces.v1beta.SessionService @@ -141096,6 +144580,7 @@ * @property {string|null} [timeZone] SessionConfig timeZone * @property {boolean|null} [useToolFakes] SessionConfig useToolFakes * @property {google.cloud.ces.v1beta.SessionConfig.IRemoteDialogflowQueryParameters|null} [remoteDialogflowQueryParameters] SessionConfig remoteDialogflowQueryParameters + * @property {boolean|null} [enableTextStreaming] SessionConfig enableTextStreaming */ /** @@ -141186,6 +144671,14 @@ */ SessionConfig.prototype.remoteDialogflowQueryParameters = null; + /** + * SessionConfig enableTextStreaming. + * @member {boolean} enableTextStreaming + * @memberof google.cloud.ces.v1beta.SessionConfig + * @instance + */ + SessionConfig.prototype.enableTextStreaming = false; + /** * Creates a new SessionConfig instance using the specified properties. * @function create @@ -141229,6 +144722,8 @@ writer.uint32(/* id 14, wireType 0 =*/112).bool(message.useToolFakes); if (message.remoteDialogflowQueryParameters != null && Object.hasOwnProperty.call(message, "remoteDialogflowQueryParameters")) $root.google.cloud.ces.v1beta.SessionConfig.RemoteDialogflowQueryParameters.encode(message.remoteDialogflowQueryParameters, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.enableTextStreaming != null && Object.hasOwnProperty.call(message, "enableTextStreaming")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.enableTextStreaming); return writer; }; @@ -141303,6 +144798,10 @@ message.remoteDialogflowQueryParameters = $root.google.cloud.ces.v1beta.SessionConfig.RemoteDialogflowQueryParameters.decode(reader, reader.uint32()); break; } + case 18: { + message.enableTextStreaming = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -141377,6 +144876,9 @@ if (error) return "remoteDialogflowQueryParameters." + error; } + if (message.enableTextStreaming != null && message.hasOwnProperty("enableTextStreaming")) + if (typeof message.enableTextStreaming !== "boolean") + return "enableTextStreaming: boolean expected"; return null; }; @@ -141427,6 +144929,8 @@ throw TypeError(".google.cloud.ces.v1beta.SessionConfig.remoteDialogflowQueryParameters: object expected"); message.remoteDialogflowQueryParameters = $root.google.cloud.ces.v1beta.SessionConfig.RemoteDialogflowQueryParameters.fromObject(object.remoteDialogflowQueryParameters); } + if (object.enableTextStreaming != null) + message.enableTextStreaming = Boolean(object.enableTextStreaming); return message; }; @@ -141454,6 +144958,7 @@ object.entryAgent = ""; object.useToolFakes = false; object.remoteDialogflowQueryParameters = null; + object.enableTextStreaming = false; } if (message.session != null && message.hasOwnProperty("session")) object.session = message.session; @@ -141476,6 +144981,8 @@ object.useToolFakes = message.useToolFakes; if (message.remoteDialogflowQueryParameters != null && message.hasOwnProperty("remoteDialogflowQueryParameters")) object.remoteDialogflowQueryParameters = $root.google.cloud.ces.v1beta.SessionConfig.RemoteDialogflowQueryParameters.toObject(message.remoteDialogflowQueryParameters, options); + if (message.enableTextStreaming != null && message.hasOwnProperty("enableTextStreaming")) + object.enableTextStreaming = message.enableTextStreaming; return object; }; @@ -163879,6 +167386,7 @@ * @property {string|null} [name] GenerateChatTokenRequest name * @property {string|null} [deployment] GenerateChatTokenRequest deployment * @property {string|null} [recaptchaToken] GenerateChatTokenRequest recaptchaToken + * @property {boolean|null} [liveHandoffEnabled] GenerateChatTokenRequest liveHandoffEnabled */ /** @@ -163920,6 +167428,14 @@ */ GenerateChatTokenRequest.prototype.recaptchaToken = ""; + /** + * GenerateChatTokenRequest liveHandoffEnabled. + * @member {boolean} liveHandoffEnabled + * @memberof google.cloud.ces.v1beta.GenerateChatTokenRequest + * @instance + */ + GenerateChatTokenRequest.prototype.liveHandoffEnabled = false; + /** * Creates a new GenerateChatTokenRequest instance using the specified properties. * @function create @@ -163950,6 +167466,8 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.deployment); if (message.recaptchaToken != null && Object.hasOwnProperty.call(message, "recaptchaToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.recaptchaToken); + if (message.liveHandoffEnabled != null && Object.hasOwnProperty.call(message, "liveHandoffEnabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.liveHandoffEnabled); return writer; }; @@ -163998,6 +167516,10 @@ message.recaptchaToken = reader.string(); break; } + case 4: { + message.liveHandoffEnabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -164042,6 +167564,9 @@ if (message.recaptchaToken != null && message.hasOwnProperty("recaptchaToken")) if (!$util.isString(message.recaptchaToken)) return "recaptchaToken: string expected"; + if (message.liveHandoffEnabled != null && message.hasOwnProperty("liveHandoffEnabled")) + if (typeof message.liveHandoffEnabled !== "boolean") + return "liveHandoffEnabled: boolean expected"; return null; }; @@ -164063,6 +167588,8 @@ message.deployment = String(object.deployment); if (object.recaptchaToken != null) message.recaptchaToken = String(object.recaptchaToken); + if (object.liveHandoffEnabled != null) + message.liveHandoffEnabled = Boolean(object.liveHandoffEnabled); return message; }; @@ -164083,6 +167610,7 @@ object.name = ""; object.deployment = ""; object.recaptchaToken = ""; + object.liveHandoffEnabled = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -164090,6 +167618,8 @@ object.deployment = message.deployment; if (message.recaptchaToken != null && message.hasOwnProperty("recaptchaToken")) object.recaptchaToken = message.recaptchaToken; + if (message.liveHandoffEnabled != null && message.hasOwnProperty("liveHandoffEnabled")) + object.liveHandoffEnabled = message.liveHandoffEnabled; return object; }; diff --git a/packages/google-cloud-ces/protos/protos.json b/packages/google-cloud-ces/protos/protos.json index ff8342b02bc..28fab613157 100644 --- a/packages/google-cloud-ces/protos/protos.json +++ b/packages/google-cloud-ces/protos/protos.json @@ -730,7 +730,8 @@ "MODALITY_UNSPECIFIED": 0, "CHAT_AND_VOICE": 1, "VOICE_ONLY": 2, - "CHAT_ONLY": 3 + "CHAT_ONLY": 3, + "CHAT_VOICE_AND_VIDEO": 4 } }, "Theme": { @@ -750,7 +751,8 @@ "TWILIO": 4, "GOOGLE_TELEPHONY_PLATFORM": 5, "CONTACT_CENTER_AS_A_SERVICE": 6, - "FIVE9": 7 + "FIVE9": 7, + "CONTACT_CENTER_INTEGRATION": 8 } } } @@ -1943,6 +1945,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "appVersion": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "ces.googleapis.com/AppVersion" + } } }, "nested": { @@ -3296,6 +3306,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "errorHandlingSettings": { + "type": "ErrorHandlingSettings", + "id": 34, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "modelSettings": { "type": "ModelSettings", "id": 13, @@ -3488,6 +3505,7 @@ "type": "string", "id": 4, "options": { + "deprecated": true, "(google.api.field_behavior)": "OPTIONAL" } } @@ -3679,6 +3697,27 @@ } } }, + "ErrorHandlingSettings": { + "fields": { + "errorHandlingStrategy": { + "type": "ErrorHandlingStrategy", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ErrorHandlingStrategy": { + "values": { + "ERROR_HANDLING_STRATEGY_UNSPECIFIED": 0, + "NONE": 1, + "FALLBACK_RESPONSE": 2, + "END_SESSION": 3 + } + } + } + }, "EvaluationMetricsThresholds": { "fields": { "goldenEvaluationMetricsThresholds": { @@ -4379,6 +4418,7 @@ "oneof": [ "text", "transcript", + "blob", "payload", "image", "toolCall", @@ -4404,6 +4444,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "blob": { + "type": "Blob", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "payload": { "type": "google.protobuf.Struct", "id": 11, @@ -4986,6 +5033,7 @@ "mcpTool", "fileSearchTool", "systemTool", + "agentTool", "widgetTool" ] } @@ -5054,6 +5102,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "agentTool": { + "type": "AgentTool", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "widgetTool": { "type": "WidgetTool", "id": 24, @@ -5116,6 +5171,32 @@ } } }, + "AgentTool": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rootAgent": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "ces.googleapis.com/Agent" + } + } + } + }, "ClientFunction": { "fields": { "name": { @@ -6115,6 +6196,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "customHeaders": { + "keyType": "string", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -6257,9 +6346,72 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "uiConfig": { + "type": "google.protobuf.Struct", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataMapping": { + "type": "DataMapping", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { + "DataMapping": { + "fields": { + "sourceToolName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "fieldMappings": { + "keyType": "string", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pythonFunction": { + "type": "PythonFunction", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mode": { + "type": "Mode", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pythonScript": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "FIELD_MAPPING": 1, + "PYTHON_SCRIPT": 2 + } + } + } + }, "WidgetType": { "values": { "WIDGET_TYPE_UNSPECIFIED": 0, @@ -6272,7 +6424,9 @@ "SHORT_FORM": 7, "OVERALL_SATISFACTION": 8, "ORDER_SUMMARY": 9, - "APPOINTMENT_DETAILS": 10 + "APPOINTMENT_DETAILS": 10, + "APPOINTMENT_SCHEDULER": 11, + "CONTACT_FORM": 12 } } } @@ -6425,6 +6579,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "customHeaders": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -6750,7 +6912,7 @@ "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED", + "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "ces.googleapis.com/AppVersion" } }, @@ -7008,6 +7170,79 @@ } } }, + "SecuritySettings": { + "options": { + "(google.api.resource).type": "ces.googleapis.com/SecuritySettings", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/securitySettings", + "(google.api.resource).plural": "securitySettings", + "(google.api.resource).singular": "securitySettings" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "endpointControlPolicy": { + "type": "EndpointControlPolicy", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "EndpointControlPolicy": { + "fields": { + "enforcementScope": { + "type": "EnforcementScope", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowedOrigins": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EnforcementScope": { + "values": { + "ENFORCEMENT_SCOPE_UNSPECIFIED": 0, + "VPCSC_ONLY": 1, + "ALWAYS": 2 + } + } + } + }, "SessionService": { "options": { "(google.api.default_host)": "ces.googleapis.com", @@ -7030,6 +7265,23 @@ } ] }, + "StreamRunSession": { + "requestType": "RunSessionRequest", + "responseType": "RunSessionResponse", + "responseStream": true, + "options": { + "(google.api.http).post": "/v1/{config.session=projects/*/locations/*/apps/*/sessions/*}:streamRunSession", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{config.session=projects/*/locations/*/apps/*/sessions/*}:streamRunSession", + "body": "*" + } + } + ] + }, "BidiRunSession": { "requestType": "BidiSessionClientMessage", "requestStream": true, @@ -7143,12 +7395,26 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "useToolFakes": { + "type": "bool", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "remoteDialogflowQueryParameters": { "type": "RemoteDialogflowQueryParameters", "id": 15, "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "enableTextStreaming": { + "type": "bool", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -7598,6 +7864,12 @@ "tool", "toolsetTool" ] + }, + "toolExecutionContext": { + "oneof": [ + "variables", + "context" + ] } }, "fields": { @@ -7616,6 +7888,20 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "variables": { + "type": "google.protobuf.Struct", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "context": { + "type": "google.protobuf.Struct", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "parent": { "type": "string", "id": 4, @@ -7656,10 +7942,11 @@ }, "response": { "type": "google.protobuf.Struct", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 2 + }, + "variables": { + "type": "google.protobuf.Struct", + "id": 4 } } }, @@ -7721,17 +8008,11 @@ }, "inputSchema": { "type": "Schema", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 3 }, "outputSchema": { "type": "Schema", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 4 } } }, @@ -7760,10 +8041,7 @@ "tools": { "rule": "repeated", "type": "Tool", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 1 } } }, @@ -7815,6 +8093,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "liveHandoffEnabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -8556,7 +8841,8 @@ "MODALITY_UNSPECIFIED": 0, "CHAT_AND_VOICE": 1, "VOICE_ONLY": 2, - "CHAT_ONLY": 3 + "CHAT_ONLY": 3, + "CHAT_VOICE_AND_VIDEO": 4 } }, "Theme": { @@ -9808,6 +10094,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "appVersion": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "ces.googleapis.com/AppVersion" + } } }, "nested": { @@ -11033,7 +11327,8 @@ "appSnapshot", "tools", "evaluations", - "appResources" + "appResources", + "qualityReport" ] } }, @@ -11062,6 +11357,10 @@ "type": "AppResources", "id": 7 }, + "qualityReport": { + "type": "QualityReport", + "id": 8 + }, "generateResultInfo": { "type": "GenerateResultInfo", "id": 2 @@ -11109,6 +11408,80 @@ } } }, + "QualityReport": { + "fields": { + "issues": { + "rule": "repeated", + "type": "AgentIssues", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "evaluationRuns": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "generalIssues": { + "rule": "repeated", + "type": "Issue", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Issue": { + "fields": { + "description": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "occurrenceCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "proposedSolution": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AgentIssues": { + "fields": { + "agent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "issues": { + "rule": "repeated", + "type": "Issue", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, "ListChangelogsRequest": { "fields": { "parent": { @@ -11490,6 +11863,7 @@ "type": "string", "id": 4, "options": { + "deprecated": true, "(google.api.field_behavior)": "OPTIONAL" } } @@ -11696,7 +12070,8 @@ "values": { "ERROR_HANDLING_STRATEGY_UNSPECIFIED": 0, "NONE": 1, - "FALLBACK_RESPONSE": 2 + "FALLBACK_RESPONSE": 2, + "END_SESSION": 3 } } } @@ -14311,6 +14686,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "customHeaders": { + "keyType": "string", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -14453,9 +14836,72 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "uiConfig": { + "type": "google.protobuf.Struct", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataMapping": { + "type": "DataMapping", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { + "DataMapping": { + "fields": { + "sourceToolName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "fieldMappings": { + "keyType": "string", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pythonFunction": { + "type": "PythonFunction", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mode": { + "type": "Mode", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pythonScript": { + "type": "string", + "id": 3, + "options": { + "deprecated": true + } + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "FIELD_MAPPING": 1, + "PYTHON_SCRIPT": 2 + } + } + } + }, "WidgetType": { "values": { "WIDGET_TYPE_UNSPECIFIED": 0, @@ -14623,6 +15069,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "customHeaders": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -17607,6 +18061,23 @@ } ] }, + "StreamRunSession": { + "requestType": "RunSessionRequest", + "responseType": "RunSessionResponse", + "responseStream": true, + "options": { + "(google.api.http).post": "/v1beta/{config.session=projects/*/locations/*/apps/*/sessions/*}:streamRunSession", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{config.session=projects/*/locations/*/apps/*/sessions/*}:streamRunSession", + "body": "*" + } + } + ] + }, "BidiRunSession": { "requestType": "BidiSessionClientMessage", "requestStream": true, @@ -17733,6 +18204,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "enableTextStreaming": { + "type": "bool", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -20322,6 +20800,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "liveHandoffEnabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, diff --git a/packages/google-cloud-ces/samples/generated/v1/agent_service.export_app.js b/packages/google-cloud-ces/samples/generated/v1/agent_service.export_app.js index 8a2db578f8c..c274c1744ef 100644 --- a/packages/google-cloud-ces/samples/generated/v1/agent_service.export_app.js +++ b/packages/google-cloud-ces/samples/generated/v1/agent_service.export_app.js @@ -43,6 +43,12 @@ function main(name, exportFormat) { * exported app archive will be written directly to the specified GCS object. */ // const gcsUri = 'abc123' + /** + * Optional. The resource name of the app version to export. + * Format: + * `projects/{project}/locations/{location}/apps/{app}/versions/{version}`. + */ + // const appVersion = 'abc123' // Imports the Ces library const {AgentServiceClient} = require('@google-cloud/ces').v1; diff --git a/packages/google-cloud-ces/samples/generated/v1/session_service.stream_run_session.js b/packages/google-cloud-ces/samples/generated/v1/session_service.stream_run_session.js new file mode 100644 index 00000000000..0014bd775fa --- /dev/null +++ b/packages/google-cloud-ces/samples/generated/v1/session_service.stream_run_session.js @@ -0,0 +1,68 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(config, inputs) { + // [START ces_v1_generated_SessionService_StreamRunSession_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The configuration for the session. + */ + // const config = {} + /** + * Required. Inputs for the session. + */ + // const inputs = [1,2,3,4] + + // Imports the Ces library + const {SessionServiceClient} = require('@google-cloud/ces').v1; + + // Instantiates a client + const cesClient = new SessionServiceClient(); + + async function callStreamRunSession() { + // Construct request + const request = { + config, + inputs, + }; + + // Run request + const stream = await cesClient.streamRunSession(request); + stream.on('data', (response) => { console.log(response) }); + stream.on('error', (err) => { throw(err) }); + stream.on('end', () => { /* API call completed */ }); + } + + callStreamRunSession(); + // [END ces_v1_generated_SessionService_StreamRunSession_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-ces/samples/generated/v1/snippet_metadata_google.cloud.ces.v1.json b/packages/google-cloud-ces/samples/generated/v1/snippet_metadata_google.cloud.ces.v1.json index f42ad2854a7..a639897886b 100644 --- a/packages/google-cloud-ces/samples/generated/v1/snippet_metadata_google.cloud.ces.v1.json +++ b/packages/google-cloud-ces/samples/generated/v1/snippet_metadata_google.cloud.ces.v1.json @@ -254,7 +254,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 72, "type": "FULL" } ], @@ -274,6 +274,10 @@ { "name": "gcs_uri", "type": "TYPE_STRING" + }, + { + "name": "app_version", + "type": "TYPE_STRING" } ], "resultType": ".google.longrunning.Operation", @@ -2279,7 +2283,7 @@ "regionTag": "ces_v1_generated_SessionService_RunSession_async", "title": "AgentService runSession Sample", "origin": "API_DEFINITION", - "description": " Initiates a single turn interaction with the CES agent within a session.", + "description": " Initiates a single-turn interaction with the CES agent within a session.", "canonical": true, "file": "session_service.run_session.js", "language": "JAVASCRIPT", @@ -2319,6 +2323,50 @@ } } }, + { + "regionTag": "ces_v1_generated_SessionService_StreamRunSession_async", + "title": "AgentService streamRunSession Sample", + "origin": "API_DEFINITION", + "description": " Initiates a single-turn interaction with the CES agent. Uses server-side streaming to deliver incremental results and partial responses as they are generated. By default, complete responses (e.g., messages from callbacks or full LLM responses) are sent to the client as soon as they are available. To enable streaming individual text chunks directly from the model, set [enable_text_streaming][google.cloud.ces.v1.SessionConfig.enable_text_streaming] to true.", + "canonical": true, + "file": "session_service.stream_run_session.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "StreamRunSession", + "fullName": "google.cloud.ces.v1.SessionService.StreamRunSession", + "async": true, + "parameters": [ + { + "name": "config", + "type": ".google.cloud.ces.v1.SessionConfig" + }, + { + "name": "inputs", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.ces.v1.RunSessionResponse", + "client": { + "shortName": "SessionServiceClient", + "fullName": "google.cloud.ces.v1.SessionServiceClient" + }, + "method": { + "shortName": "StreamRunSession", + "fullName": "google.cloud.ces.v1.SessionService.StreamRunSession", + "service": { + "shortName": "SessionService", + "fullName": "google.cloud.ces.v1.SessionService" + } + } + } + }, { "regionTag": "ces_v1_generated_SessionService_BidiRunSession_async", "title": "AgentService bidiRunSession Sample", @@ -2374,7 +2422,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 80, "type": "FULL" } ], @@ -2391,6 +2439,14 @@ "name": "toolset_tool", "type": ".google.cloud.ces.v1.ToolsetTool" }, + { + "name": "variables", + "type": ".google.protobuf.Struct" + }, + { + "name": "context", + "type": ".google.protobuf.Struct" + }, { "name": "parent", "type": "TYPE_STRING" @@ -2518,7 +2574,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 70, "type": "FULL" } ], @@ -2538,6 +2594,10 @@ { "name": "recaptcha_token", "type": "TYPE_STRING" + }, + { + "name": "live_handoff_enabled", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.ces.v1.GenerateChatTokenResponse", diff --git a/packages/google-cloud-ces/samples/generated/v1/tool_service.execute_tool.js b/packages/google-cloud-ces/samples/generated/v1/tool_service.execute_tool.js index b5f6cb6c937..8a50a138c34 100644 --- a/packages/google-cloud-ces/samples/generated/v1/tool_service.execute_tool.js +++ b/packages/google-cloud-ces/samples/generated/v1/tool_service.execute_tool.js @@ -39,6 +39,16 @@ function main(parent) { * predicate from the toolset. Otherwise, an error will be returned. */ // const toolsetTool = {} + /** + * Optional. The variables that are available for the tool execution. + */ + // const variables = {} + /** + * Optional. The + * ToolCallContext (https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/python#environment + * for details) to be passed to the Python tool. + */ + // const context = {} /** * Required. The resource name of the app which the tool/toolset belongs to. * Format: `projects/{project}/locations/{location}/apps/{app}` diff --git a/packages/google-cloud-ces/samples/generated/v1/widget_service.generate_chat_token.js b/packages/google-cloud-ces/samples/generated/v1/widget_service.generate_chat_token.js index c17e0cba557..7e01b204c55 100644 --- a/packages/google-cloud-ces/samples/generated/v1/widget_service.generate_chat_token.js +++ b/packages/google-cloud-ces/samples/generated/v1/widget_service.generate_chat_token.js @@ -44,6 +44,10 @@ function main(name, deployment) { * Optional. The reCAPTCHA token generated by the client-side chat widget. */ // const recaptchaToken = 'abc123' + /** + * Optional. Indicates if live handoff is enabled for the session. + */ + // const liveHandoffEnabled = true // Imports the Ces library const {WidgetServiceClient} = require('@google-cloud/ces').v1; diff --git a/packages/google-cloud-ces/samples/generated/v1beta/agent_service.export_app.js b/packages/google-cloud-ces/samples/generated/v1beta/agent_service.export_app.js index 5bc27edb38e..469d183f8eb 100644 --- a/packages/google-cloud-ces/samples/generated/v1beta/agent_service.export_app.js +++ b/packages/google-cloud-ces/samples/generated/v1beta/agent_service.export_app.js @@ -43,6 +43,12 @@ function main(name, exportFormat) { * exported app archive will be written directly to the specified GCS object. */ // const gcsUri = 'abc123' + /** + * Optional. The resource name of the app version to export. + * Format: + * `projects/{project}/locations/{location}/apps/{app}/versions/{version}`. + */ + // const appVersion = 'abc123' // Imports the Ces library const {AgentServiceClient} = require('@google-cloud/ces').v1beta; diff --git a/packages/google-cloud-ces/samples/generated/v1beta/session_service.stream_run_session.js b/packages/google-cloud-ces/samples/generated/v1beta/session_service.stream_run_session.js new file mode 100644 index 00000000000..5ec1cbbb1af --- /dev/null +++ b/packages/google-cloud-ces/samples/generated/v1beta/session_service.stream_run_session.js @@ -0,0 +1,68 @@ +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(config, inputs) { + // [START ces_v1beta_generated_SessionService_StreamRunSession_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The configuration for the session. + */ + // const config = {} + /** + * Required. Inputs for the session. + */ + // const inputs = [1,2,3,4] + + // Imports the Ces library + const {SessionServiceClient} = require('@google-cloud/ces').v1beta; + + // Instantiates a client + const cesClient = new SessionServiceClient(); + + async function callStreamRunSession() { + // Construct request + const request = { + config, + inputs, + }; + + // Run request + const stream = await cesClient.streamRunSession(request); + stream.on('data', (response) => { console.log(response) }); + stream.on('error', (err) => { throw(err) }); + stream.on('end', () => { /* API call completed */ }); + } + + callStreamRunSession(); + // [END ces_v1beta_generated_SessionService_StreamRunSession_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-ces/samples/generated/v1beta/snippet_metadata_google.cloud.ces.v1beta.json b/packages/google-cloud-ces/samples/generated/v1beta/snippet_metadata_google.cloud.ces.v1beta.json index ff05c73f9d1..1cd1bb9460e 100644 --- a/packages/google-cloud-ces/samples/generated/v1beta/snippet_metadata_google.cloud.ces.v1beta.json +++ b/packages/google-cloud-ces/samples/generated/v1beta/snippet_metadata_google.cloud.ces.v1beta.json @@ -254,7 +254,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 72, "type": "FULL" } ], @@ -274,6 +274,10 @@ { "name": "gcs_uri", "type": "TYPE_STRING" + }, + { + "name": "app_version", + "type": "TYPE_STRING" } ], "resultType": ".google.longrunning.Operation", @@ -3859,7 +3863,7 @@ "regionTag": "ces_v1beta_generated_SessionService_RunSession_async", "title": "AgentService runSession Sample", "origin": "API_DEFINITION", - "description": " Initiates a single turn interaction with the CES agent within a session.", + "description": " Initiates a single-turn interaction with the CES agent within a session.", "canonical": true, "file": "session_service.run_session.js", "language": "JAVASCRIPT", @@ -3899,6 +3903,50 @@ } } }, + { + "regionTag": "ces_v1beta_generated_SessionService_StreamRunSession_async", + "title": "AgentService streamRunSession Sample", + "origin": "API_DEFINITION", + "description": " Initiates a single-turn interaction with the CES agent. Uses server-side streaming to deliver incremental results and partial responses as they are generated. By default, complete responses (e.g., messages from callbacks or full LLM responses) are sent to the client as soon as they are available. To enable streaming individual text chunks directly from the model, set [enable_text_streaming][google.cloud.ces.v1beta.SessionConfig.enable_text_streaming] to true.", + "canonical": true, + "file": "session_service.stream_run_session.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "StreamRunSession", + "fullName": "google.cloud.ces.v1beta.SessionService.StreamRunSession", + "async": true, + "parameters": [ + { + "name": "config", + "type": ".google.cloud.ces.v1beta.SessionConfig" + }, + { + "name": "inputs", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.ces.v1beta.RunSessionResponse", + "client": { + "shortName": "SessionServiceClient", + "fullName": "google.cloud.ces.v1beta.SessionServiceClient" + }, + "method": { + "shortName": "StreamRunSession", + "fullName": "google.cloud.ces.v1beta.SessionService.StreamRunSession", + "service": { + "shortName": "SessionService", + "fullName": "google.cloud.ces.v1beta.SessionService" + } + } + } + }, { "regionTag": "ces_v1beta_generated_SessionService_BidiRunSession_async", "title": "AgentService bidiRunSession Sample", @@ -4106,7 +4154,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 70, "type": "FULL" } ], @@ -4126,6 +4174,10 @@ { "name": "recaptcha_token", "type": "TYPE_STRING" + }, + { + "name": "live_handoff_enabled", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.ces.v1beta.GenerateChatTokenResponse", diff --git a/packages/google-cloud-ces/samples/generated/v1beta/widget_service.generate_chat_token.js b/packages/google-cloud-ces/samples/generated/v1beta/widget_service.generate_chat_token.js index 89bd647db1d..8e9e4927167 100644 --- a/packages/google-cloud-ces/samples/generated/v1beta/widget_service.generate_chat_token.js +++ b/packages/google-cloud-ces/samples/generated/v1beta/widget_service.generate_chat_token.js @@ -44,6 +44,10 @@ function main(name, deployment) { * Optional. The reCAPTCHA token generated by the client-side chat widget. */ // const recaptchaToken = 'abc123' + /** + * Optional. Indicates if live handoff is enabled for the session. + */ + // const liveHandoffEnabled = true // Imports the Ces library const {WidgetServiceClient} = require('@google-cloud/ces').v1beta; diff --git a/packages/google-cloud-ces/src/v1/agent_service_client.ts b/packages/google-cloud-ces/src/v1/agent_service_client.ts index f5b4a1e68cd..0a0ae59a84a 100644 --- a/packages/google-cloud-ces/src/v1/agent_service_client.ts +++ b/packages/google-cloud-ces/src/v1/agent_service_client.ts @@ -218,6 +218,9 @@ export class AgentServiceClient { projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), + securitySettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/securitySettings' + ), toolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/apps/{app}/tools/{tool}' ), @@ -3853,6 +3856,10 @@ export class AgentServiceClient { * Storage](https://cloud.google.com/storage/docs/) URI to which to export the * app. The format of this URI must be `gs:///`. The * exported app archive will be written directly to the specified GCS object. + * @param {string} [request.appVersion] + * Optional. The resource name of the app version to export. + * Format: + * `projects/{project}/locations/{location}/apps/{app}/versions/{version}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -7496,6 +7503,42 @@ export class AgentServiceClient { return this.pathTemplates.projectPathTemplate.match(projectName).project; } + /** + * Return a fully-qualified securitySettings resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + securitySettingsPath(project:string,location:string) { + return this.pathTemplates.securitySettingsPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).project; + } + + /** + * Parse the location from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).location; + } + /** * Return a fully-qualified tool resource name string. * diff --git a/packages/google-cloud-ces/src/v1/agent_service_proto_list.json b/packages/google-cloud-ces/src/v1/agent_service_proto_list.json index 7f9a4c1d7f8..6d6b6ee7507 100644 --- a/packages/google-cloud-ces/src/v1/agent_service_proto_list.json +++ b/packages/google-cloud-ces/src/v1/agent_service_proto_list.json @@ -1,6 +1,7 @@ [ "../../protos/google/cloud/ces/v1/agent.proto", "../../protos/google/cloud/ces/v1/agent_service.proto", + "../../protos/google/cloud/ces/v1/agent_tool.proto", "../../protos/google/cloud/ces/v1/agent_transfers.proto", "../../protos/google/cloud/ces/v1/app.proto", "../../protos/google/cloud/ces/v1/app_version.proto", @@ -29,6 +30,7 @@ "../../protos/google/cloud/ces/v1/python_function.proto", "../../protos/google/cloud/ces/v1/schema.proto", "../../protos/google/cloud/ces/v1/search_suggestions.proto", + "../../protos/google/cloud/ces/v1/security_settings.proto", "../../protos/google/cloud/ces/v1/session_service.proto", "../../protos/google/cloud/ces/v1/system_tool.proto", "../../protos/google/cloud/ces/v1/tool.proto", diff --git a/packages/google-cloud-ces/src/v1/gapic_metadata.json b/packages/google-cloud-ces/src/v1/gapic_metadata.json index 2dc1cdbae2e..ecfd641e90a 100644 --- a/packages/google-cloud-ces/src/v1/gapic_metadata.json +++ b/packages/google-cloud-ces/src/v1/gapic_metadata.json @@ -549,6 +549,11 @@ "runSession" ] }, + "StreamRunSession": { + "methods": [ + "streamRunSession" + ] + }, "BidiRunSession": { "methods": [ "bidiRunSession" diff --git a/packages/google-cloud-ces/src/v1/session_service_client.ts b/packages/google-cloud-ces/src/v1/session_service_client.ts index 11eec14af45..651ee660c83 100644 --- a/packages/google-cloud-ces/src/v1/session_service_client.ts +++ b/packages/google-cloud-ces/src/v1/session_service_client.ts @@ -210,6 +210,9 @@ export class SessionServiceClient { omnichannelPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/omnichannels/{omnichannel}' ), + securitySettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/securitySettings' + ), sessionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/apps/{app}/sessions/{session}' ), @@ -224,6 +227,7 @@ export class SessionServiceClient { // Some of the methods on this service provide streaming responses. // Provide descriptors for these. this.descriptors.stream = { + streamRunSession: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries), bidiRunSession: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries) }; @@ -270,7 +274,7 @@ export class SessionServiceClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const sessionServiceStubMethods = - ['runSession', 'bidiRunSession']; + ['runSession', 'streamRunSession', 'bidiRunSession']; for (const methodName of sessionServiceStubMethods) { const callPromise = this.sessionServiceStub.then( stub => (...args: Array<{}>) => { @@ -382,8 +386,7 @@ export class SessionServiceClient { // -- Service calls -- // ------------------- /** - * Initiates a single turn interaction with the CES agent within a - * session. + * Initiates a single-turn interaction with the CES agent within a session. * * @param {Object} request * The request object that will be sent. @@ -479,6 +482,50 @@ export class SessionServiceClient { }); } +/** + * Initiates a single-turn interaction with the CES agent. Uses server-side + * streaming to deliver incremental results and partial responses as they are + * generated. + * + * By default, complete responses (e.g., messages from callbacks or full LLM + * responses) are sent to the client as soon as they are available. To enable + * streaming individual text chunks directly from the model, set + * {@link protos.google.cloud.ces.v1.SessionConfig.enable_text_streaming|enable_text_streaming} + * to true. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.ces.v1.SessionConfig} request.config + * Required. The configuration for the session. + * @param {number[]} request.inputs + * Required. Inputs for the session. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits {@link protos.google.cloud.ces.v1.RunSessionResponse|RunSessionResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } + * for more details and examples. + * @example include:samples/generated/v1/session_service.stream_run_session.js + * region_tag:ces_v1_generated_SessionService_StreamRunSession_async + */ + streamRunSession( + request?: protos.google.cloud.ces.v1.IRunSessionRequest, + options?: CallOptions): + gax.CancellableStream{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'config.session': request.config!.session ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('streamRunSession stream %j', options); + return this.innerApiCalls.streamRunSession(request, options); + } + /** * Establishes a bidirectional streaming connection with the CES agent. * The agent processes continuous multimodal inputs (e.g., text, audio) and @@ -1177,6 +1224,42 @@ export class SessionServiceClient { return this.pathTemplates.omnichannelPathTemplate.match(omnichannelName).omnichannel; } + /** + * Return a fully-qualified securitySettings resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + securitySettingsPath(project:string,location:string) { + return this.pathTemplates.securitySettingsPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).project; + } + + /** + * Parse the location from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).location; + } + /** * Return a fully-qualified session resource name string. * diff --git a/packages/google-cloud-ces/src/v1/session_service_client_config.json b/packages/google-cloud-ces/src/v1/session_service_client_config.json index a34904d9094..e6f151f1bf6 100644 --- a/packages/google-cloud-ces/src/v1/session_service_client_config.json +++ b/packages/google-cloud-ces/src/v1/session_service_client_config.json @@ -25,6 +25,11 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "StreamRunSession": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, "BidiRunSession": { "timeout_millis": 3600000, "retry_codes_name": "non_idempotent", diff --git a/packages/google-cloud-ces/src/v1/session_service_proto_list.json b/packages/google-cloud-ces/src/v1/session_service_proto_list.json index 7f9a4c1d7f8..6d6b6ee7507 100644 --- a/packages/google-cloud-ces/src/v1/session_service_proto_list.json +++ b/packages/google-cloud-ces/src/v1/session_service_proto_list.json @@ -1,6 +1,7 @@ [ "../../protos/google/cloud/ces/v1/agent.proto", "../../protos/google/cloud/ces/v1/agent_service.proto", + "../../protos/google/cloud/ces/v1/agent_tool.proto", "../../protos/google/cloud/ces/v1/agent_transfers.proto", "../../protos/google/cloud/ces/v1/app.proto", "../../protos/google/cloud/ces/v1/app_version.proto", @@ -29,6 +30,7 @@ "../../protos/google/cloud/ces/v1/python_function.proto", "../../protos/google/cloud/ces/v1/schema.proto", "../../protos/google/cloud/ces/v1/search_suggestions.proto", + "../../protos/google/cloud/ces/v1/security_settings.proto", "../../protos/google/cloud/ces/v1/session_service.proto", "../../protos/google/cloud/ces/v1/system_tool.proto", "../../protos/google/cloud/ces/v1/tool.proto", diff --git a/packages/google-cloud-ces/src/v1/tool_service_client.ts b/packages/google-cloud-ces/src/v1/tool_service_client.ts index a3caf366aac..aa3d7c70923 100644 --- a/packages/google-cloud-ces/src/v1/tool_service_client.ts +++ b/packages/google-cloud-ces/src/v1/tool_service_client.ts @@ -210,6 +210,9 @@ export class ToolServiceClient { omnichannelPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/omnichannels/{omnichannel}' ), + securitySettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/securitySettings' + ), toolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/apps/{app}/tools/{tool}' ), @@ -376,6 +379,12 @@ export class ToolServiceClient { * @param {google.cloud.ces.v1.ToolsetTool} [request.toolsetTool] * Optional. The toolset tool to execute. Only one tool should match the * predicate from the toolset. Otherwise, an error will be returned. + * @param {google.protobuf.Struct} [request.variables] + * Optional. The variables that are available for the tool execution. + * @param {google.protobuf.Struct} [request.context] + * Optional. The + * [ToolCallContext](https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/python#environment + * for details) to be passed to the Python tool. * @param {string} request.parent * Required. The resource name of the app which the tool/toolset belongs to. * Format: `projects/{project}/locations/{location}/apps/{app}` @@ -1287,6 +1296,42 @@ export class ToolServiceClient { return this.pathTemplates.omnichannelPathTemplate.match(omnichannelName).omnichannel; } + /** + * Return a fully-qualified securitySettings resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + securitySettingsPath(project:string,location:string) { + return this.pathTemplates.securitySettingsPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).project; + } + + /** + * Parse the location from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).location; + } + /** * Return a fully-qualified tool resource name string. * diff --git a/packages/google-cloud-ces/src/v1/tool_service_proto_list.json b/packages/google-cloud-ces/src/v1/tool_service_proto_list.json index 7f9a4c1d7f8..6d6b6ee7507 100644 --- a/packages/google-cloud-ces/src/v1/tool_service_proto_list.json +++ b/packages/google-cloud-ces/src/v1/tool_service_proto_list.json @@ -1,6 +1,7 @@ [ "../../protos/google/cloud/ces/v1/agent.proto", "../../protos/google/cloud/ces/v1/agent_service.proto", + "../../protos/google/cloud/ces/v1/agent_tool.proto", "../../protos/google/cloud/ces/v1/agent_transfers.proto", "../../protos/google/cloud/ces/v1/app.proto", "../../protos/google/cloud/ces/v1/app_version.proto", @@ -29,6 +30,7 @@ "../../protos/google/cloud/ces/v1/python_function.proto", "../../protos/google/cloud/ces/v1/schema.proto", "../../protos/google/cloud/ces/v1/search_suggestions.proto", + "../../protos/google/cloud/ces/v1/security_settings.proto", "../../protos/google/cloud/ces/v1/session_service.proto", "../../protos/google/cloud/ces/v1/system_tool.proto", "../../protos/google/cloud/ces/v1/tool.proto", diff --git a/packages/google-cloud-ces/src/v1/widget_service_client.ts b/packages/google-cloud-ces/src/v1/widget_service_client.ts index 4192fca5f6f..355525c3fb5 100644 --- a/packages/google-cloud-ces/src/v1/widget_service_client.ts +++ b/packages/google-cloud-ces/src/v1/widget_service_client.ts @@ -210,6 +210,9 @@ export class WidgetServiceClient { omnichannelPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/omnichannels/{omnichannel}' ), + securitySettingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/securitySettings' + ), sessionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/apps/{app}/sessions/{session}' ), @@ -383,6 +386,8 @@ export class WidgetServiceClient { * projects/{project}/locations/{location}/apps/{app}/deployments/{deployment} * @param {string} [request.recaptchaToken] * Optional. The reCAPTCHA token generated by the client-side chat widget. + * @param {boolean} [request.liveHandoffEnabled] + * Optional. Indicates if live handoff is enabled for the session. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1085,6 +1090,42 @@ export class WidgetServiceClient { return this.pathTemplates.omnichannelPathTemplate.match(omnichannelName).omnichannel; } + /** + * Return a fully-qualified securitySettings resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + securitySettingsPath(project:string,location:string) { + return this.pathTemplates.securitySettingsPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).project; + } + + /** + * Parse the location from SecuritySettings resource. + * + * @param {string} securitySettingsName + * A fully-qualified path representing SecuritySettings resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSecuritySettingsName(securitySettingsName: string) { + return this.pathTemplates.securitySettingsPathTemplate.match(securitySettingsName).location; + } + /** * Return a fully-qualified session resource name string. * diff --git a/packages/google-cloud-ces/src/v1/widget_service_proto_list.json b/packages/google-cloud-ces/src/v1/widget_service_proto_list.json index 7f9a4c1d7f8..6d6b6ee7507 100644 --- a/packages/google-cloud-ces/src/v1/widget_service_proto_list.json +++ b/packages/google-cloud-ces/src/v1/widget_service_proto_list.json @@ -1,6 +1,7 @@ [ "../../protos/google/cloud/ces/v1/agent.proto", "../../protos/google/cloud/ces/v1/agent_service.proto", + "../../protos/google/cloud/ces/v1/agent_tool.proto", "../../protos/google/cloud/ces/v1/agent_transfers.proto", "../../protos/google/cloud/ces/v1/app.proto", "../../protos/google/cloud/ces/v1/app_version.proto", @@ -29,6 +30,7 @@ "../../protos/google/cloud/ces/v1/python_function.proto", "../../protos/google/cloud/ces/v1/schema.proto", "../../protos/google/cloud/ces/v1/search_suggestions.proto", + "../../protos/google/cloud/ces/v1/security_settings.proto", "../../protos/google/cloud/ces/v1/session_service.proto", "../../protos/google/cloud/ces/v1/system_tool.proto", "../../protos/google/cloud/ces/v1/tool.proto", diff --git a/packages/google-cloud-ces/src/v1beta/agent_service_client.ts b/packages/google-cloud-ces/src/v1beta/agent_service_client.ts index 7fa241e9956..bc79dd0c5db 100644 --- a/packages/google-cloud-ces/src/v1beta/agent_service_client.ts +++ b/packages/google-cloud-ces/src/v1beta/agent_service_client.ts @@ -4066,6 +4066,10 @@ export class AgentServiceClient { * Storage](https://cloud.google.com/storage/docs/) URI to which to export the * app. The format of this URI must be `gs:///`. The * exported app archive will be written directly to the specified GCS object. + * @param {string} [request.appVersion] + * Optional. The resource name of the app version to export. + * Format: + * `projects/{project}/locations/{location}/apps/{app}/versions/{version}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. diff --git a/packages/google-cloud-ces/src/v1beta/gapic_metadata.json b/packages/google-cloud-ces/src/v1beta/gapic_metadata.json index 655be710404..370e2134460 100644 --- a/packages/google-cloud-ces/src/v1beta/gapic_metadata.json +++ b/packages/google-cloud-ces/src/v1beta/gapic_metadata.json @@ -917,6 +917,11 @@ "runSession" ] }, + "StreamRunSession": { + "methods": [ + "streamRunSession" + ] + }, "BidiRunSession": { "methods": [ "bidiRunSession" diff --git a/packages/google-cloud-ces/src/v1beta/session_service_client.ts b/packages/google-cloud-ces/src/v1beta/session_service_client.ts index d28c6acf325..e6c5602e81e 100644 --- a/packages/google-cloud-ces/src/v1beta/session_service_client.ts +++ b/packages/google-cloud-ces/src/v1beta/session_service_client.ts @@ -245,6 +245,7 @@ export class SessionServiceClient { // Some of the methods on this service provide streaming responses. // Provide descriptors for these. this.descriptors.stream = { + streamRunSession: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries), bidiRunSession: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries) }; @@ -291,7 +292,7 @@ export class SessionServiceClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const sessionServiceStubMethods = - ['runSession', 'bidiRunSession']; + ['runSession', 'streamRunSession', 'bidiRunSession']; for (const methodName of sessionServiceStubMethods) { const callPromise = this.sessionServiceStub.then( stub => (...args: Array<{}>) => { @@ -403,8 +404,7 @@ export class SessionServiceClient { // -- Service calls -- // ------------------- /** - * Initiates a single turn interaction with the CES agent within a - * session. + * Initiates a single-turn interaction with the CES agent within a session. * * @param {Object} request * The request object that will be sent. @@ -500,6 +500,50 @@ export class SessionServiceClient { }); } +/** + * Initiates a single-turn interaction with the CES agent. Uses server-side + * streaming to deliver incremental results and partial responses as they are + * generated. + * + * By default, complete responses (e.g., messages from callbacks or full LLM + * responses) are sent to the client as soon as they are available. To enable + * streaming individual text chunks directly from the model, set + * {@link protos.google.cloud.ces.v1beta.SessionConfig.enable_text_streaming|enable_text_streaming} + * to true. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.ces.v1beta.SessionConfig} request.config + * Required. The configuration for the session. + * @param {number[]} request.inputs + * Required. Inputs for the session. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits {@link protos.google.cloud.ces.v1beta.RunSessionResponse|RunSessionResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta/session_service.stream_run_session.js + * region_tag:ces_v1beta_generated_SessionService_StreamRunSession_async + */ + streamRunSession( + request?: protos.google.cloud.ces.v1beta.IRunSessionRequest, + options?: CallOptions): + gax.CancellableStream{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'config.session': request.config!.session ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('streamRunSession stream %j', options); + return this.innerApiCalls.streamRunSession(request, options); + } + /** * Establishes a bidirectional streaming connection with the CES agent. * The agent processes continuous multimodal inputs (e.g., text, audio) and diff --git a/packages/google-cloud-ces/src/v1beta/session_service_client_config.json b/packages/google-cloud-ces/src/v1beta/session_service_client_config.json index 49d54f49e29..cad8b370de0 100644 --- a/packages/google-cloud-ces/src/v1beta/session_service_client_config.json +++ b/packages/google-cloud-ces/src/v1beta/session_service_client_config.json @@ -25,6 +25,11 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "StreamRunSession": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, "BidiRunSession": { "timeout_millis": 3600000, "retry_codes_name": "non_idempotent", diff --git a/packages/google-cloud-ces/src/v1beta/widget_service_client.ts b/packages/google-cloud-ces/src/v1beta/widget_service_client.ts index 4459869b1ff..9e4d336525c 100644 --- a/packages/google-cloud-ces/src/v1beta/widget_service_client.ts +++ b/packages/google-cloud-ces/src/v1beta/widget_service_client.ts @@ -404,6 +404,8 @@ export class WidgetServiceClient { * projects/{project}/locations/{location}/apps/{app}/deployments/{deployment} * @param {string} [request.recaptchaToken] * Optional. The reCAPTCHA token generated by the client-side chat widget. + * @param {boolean} [request.liveHandoffEnabled] + * Optional. Indicates if live handoff is enabled for the session. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. diff --git a/packages/google-cloud-ces/test/gapic_agent_service_v1.ts b/packages/google-cloud-ces/test/gapic_agent_service_v1.ts index 5713676ea6d..11c6d68d308 100644 --- a/packages/google-cloud-ces/test/gapic_agent_service_v1.ts +++ b/packages/google-cloud-ces/test/gapic_agent_service_v1.ts @@ -8094,6 +8094,44 @@ describe('v1.AgentServiceClient', () => { }); }); + describe('securitySettings', async () => { + const fakePath = "/rendered/path/securitySettings"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new agentserviceModule.v1.AgentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.securitySettingsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.securitySettingsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('securitySettingsPath', () => { + const result = client.securitySettingsPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.securitySettingsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSecuritySettingsName', () => { + const result = client.matchProjectFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSecuritySettingsName', () => { + const result = client.matchLocationFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('tool', async () => { const fakePath = "/rendered/path/tool"; const expectedParameters = { diff --git a/packages/google-cloud-ces/test/gapic_session_service_v1.ts b/packages/google-cloud-ces/test/gapic_session_service_v1.ts index 85e591e4c94..e92582ab478 100644 --- a/packages/google-cloud-ces/test/gapic_session_service_v1.ts +++ b/packages/google-cloud-ces/test/gapic_session_service_v1.ts @@ -54,6 +54,18 @@ function stubSimpleCallWithCallback(response?: ResponseType, error return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); } +function stubServerStreamingCall(response?: ResponseType, error?: Error) { + const transformStub = error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // write something to the stream to trigger transformStub and send the response back to the client + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + return sinon.stub().returns(mockStream); +} + function stubBidiStreamingCall(response?: ResponseType, error?: Error) { const transformStub = error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); const mockStream = new PassThrough({ @@ -355,6 +367,150 @@ describe('v1.SessionServiceClient', () => { }); }); + describe('streamRunSession', () => { + it('invokes streamRunSession without error', async () => { + const client = new sessionserviceModule.v1.SessionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.ces.v1.RunSessionRequest() + ); + request.config ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.ces.v1.RunSessionRequest', ['config', 'session']); + request.config.session = defaultValue1; + const expectedHeaderRequestParams = `config.session=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.ces.v1.RunSessionResponse() + ); + client.innerApiCalls.streamRunSession = stubServerStreamingCall(expectedResponse); + const stream = client.streamRunSession(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.ces.v1.RunSessionResponse) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.streamRunSession as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.streamRunSession as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes streamRunSession without error and gaxServerStreamingRetries enabled', async () => { + const client = new sessionserviceModule.v1.SessionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + gaxServerStreamingRetries: true + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.ces.v1.RunSessionRequest() + ); + request.config ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.ces.v1.RunSessionRequest', ['config', 'session']); + request.config.session = defaultValue1; + const expectedHeaderRequestParams = `config.session=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.ces.v1.RunSessionResponse() + ); + client.innerApiCalls.streamRunSession = stubServerStreamingCall(expectedResponse); + const stream = client.streamRunSession(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.ces.v1.RunSessionResponse) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.streamRunSession as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.streamRunSession as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes streamRunSession with error', async () => { + const client = new sessionserviceModule.v1.SessionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.ces.v1.RunSessionRequest() + ); + request.config ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.ces.v1.RunSessionRequest', ['config', 'session']); + request.config.session = defaultValue1; + const expectedHeaderRequestParams = `config.session=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.streamRunSession = stubServerStreamingCall(undefined, expectedError); + const stream = client.streamRunSession(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.ces.v1.RunSessionResponse) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + const actualRequest = (client.innerApiCalls.streamRunSession as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.streamRunSession as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes streamRunSession with closed client', async () => { + const client = new sessionserviceModule.v1.SessionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.ces.v1.RunSessionRequest() + ); + request.config ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.ces.v1.RunSessionRequest', ['config', 'session']); + request.config.session = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + const stream = client.streamRunSession(request, {retryRequestOptions: {noResponseRetries: 0}}); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.ces.v1.RunSessionResponse) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + }); + it('should create a client with gaxServerStreamingRetries enabled', () => { + const client = new sessionserviceModule.v1.SessionServiceClient({ + gaxServerStreamingRetries: true, + }); + assert(client); + }); + }); + describe('bidiRunSession', () => { it('invokes bidiRunSession without error', async () => { const client = new sessionserviceModule.v1.SessionServiceClient({ @@ -1057,6 +1213,44 @@ describe('v1.SessionServiceClient', () => { }); }); + describe('securitySettings', async () => { + const fakePath = "/rendered/path/securitySettings"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new sessionserviceModule.v1.SessionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.securitySettingsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.securitySettingsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('securitySettingsPath', () => { + const result = client.securitySettingsPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.securitySettingsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSecuritySettingsName', () => { + const result = client.matchProjectFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSecuritySettingsName', () => { + const result = client.matchLocationFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('session', async () => { const fakePath = "/rendered/path/session"; const expectedParameters = { diff --git a/packages/google-cloud-ces/test/gapic_session_service_v1beta.ts b/packages/google-cloud-ces/test/gapic_session_service_v1beta.ts index b41c370a250..83b2d976e0f 100644 --- a/packages/google-cloud-ces/test/gapic_session_service_v1beta.ts +++ b/packages/google-cloud-ces/test/gapic_session_service_v1beta.ts @@ -54,6 +54,18 @@ function stubSimpleCallWithCallback(response?: ResponseType, error return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); } +function stubServerStreamingCall(response?: ResponseType, error?: Error) { + const transformStub = error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // write something to the stream to trigger transformStub and send the response back to the client + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + return sinon.stub().returns(mockStream); +} + function stubBidiStreamingCall(response?: ResponseType, error?: Error) { const transformStub = error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); const mockStream = new PassThrough({ @@ -355,6 +367,150 @@ describe('v1beta.SessionServiceClient', () => { }); }); + describe('streamRunSession', () => { + it('invokes streamRunSession without error', async () => { + const client = new sessionserviceModule.v1beta.SessionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.ces.v1beta.RunSessionRequest() + ); + request.config ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.ces.v1beta.RunSessionRequest', ['config', 'session']); + request.config.session = defaultValue1; + const expectedHeaderRequestParams = `config.session=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.ces.v1beta.RunSessionResponse() + ); + client.innerApiCalls.streamRunSession = stubServerStreamingCall(expectedResponse); + const stream = client.streamRunSession(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.ces.v1beta.RunSessionResponse) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.streamRunSession as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.streamRunSession as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes streamRunSession without error and gaxServerStreamingRetries enabled', async () => { + const client = new sessionserviceModule.v1beta.SessionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + gaxServerStreamingRetries: true + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.ces.v1beta.RunSessionRequest() + ); + request.config ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.ces.v1beta.RunSessionRequest', ['config', 'session']); + request.config.session = defaultValue1; + const expectedHeaderRequestParams = `config.session=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.ces.v1beta.RunSessionResponse() + ); + client.innerApiCalls.streamRunSession = stubServerStreamingCall(expectedResponse); + const stream = client.streamRunSession(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.ces.v1beta.RunSessionResponse) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.streamRunSession as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.streamRunSession as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes streamRunSession with error', async () => { + const client = new sessionserviceModule.v1beta.SessionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.ces.v1beta.RunSessionRequest() + ); + request.config ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.ces.v1beta.RunSessionRequest', ['config', 'session']); + request.config.session = defaultValue1; + const expectedHeaderRequestParams = `config.session=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.streamRunSession = stubServerStreamingCall(undefined, expectedError); + const stream = client.streamRunSession(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.ces.v1beta.RunSessionResponse) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + const actualRequest = (client.innerApiCalls.streamRunSession as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.streamRunSession as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes streamRunSession with closed client', async () => { + const client = new sessionserviceModule.v1beta.SessionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.ces.v1beta.RunSessionRequest() + ); + request.config ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.ces.v1beta.RunSessionRequest', ['config', 'session']); + request.config.session = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + const stream = client.streamRunSession(request, {retryRequestOptions: {noResponseRetries: 0}}); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.ces.v1beta.RunSessionResponse) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + }); + it('should create a client with gaxServerStreamingRetries enabled', () => { + const client = new sessionserviceModule.v1beta.SessionServiceClient({ + gaxServerStreamingRetries: true, + }); + assert(client); + }); + }); + describe('bidiRunSession', () => { it('invokes bidiRunSession without error', async () => { const client = new sessionserviceModule.v1beta.SessionServiceClient({ diff --git a/packages/google-cloud-ces/test/gapic_tool_service_v1.ts b/packages/google-cloud-ces/test/gapic_tool_service_v1.ts index 588ddeeb222..918b5e1d30c 100644 --- a/packages/google-cloud-ces/test/gapic_tool_service_v1.ts +++ b/packages/google-cloud-ces/test/gapic_tool_service_v1.ts @@ -1194,6 +1194,44 @@ describe('v1.ToolServiceClient', () => { }); }); + describe('securitySettings', async () => { + const fakePath = "/rendered/path/securitySettings"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new toolserviceModule.v1.ToolServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.securitySettingsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.securitySettingsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('securitySettingsPath', () => { + const result = client.securitySettingsPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.securitySettingsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSecuritySettingsName', () => { + const result = client.matchProjectFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSecuritySettingsName', () => { + const result = client.matchLocationFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('tool', async () => { const fakePath = "/rendered/path/tool"; const expectedParameters = { diff --git a/packages/google-cloud-ces/test/gapic_widget_service_v1.ts b/packages/google-cloud-ces/test/gapic_widget_service_v1.ts index eb75d8d4f4b..69064d346b7 100644 --- a/packages/google-cloud-ces/test/gapic_widget_service_v1.ts +++ b/packages/google-cloud-ces/test/gapic_widget_service_v1.ts @@ -978,6 +978,44 @@ describe('v1.WidgetServiceClient', () => { }); }); + describe('securitySettings', async () => { + const fakePath = "/rendered/path/securitySettings"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new widgetserviceModule.v1.WidgetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.securitySettingsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.securitySettingsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('securitySettingsPath', () => { + const result = client.securitySettingsPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.securitySettingsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSecuritySettingsName', () => { + const result = client.matchProjectFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSecuritySettingsName', () => { + const result = client.matchLocationFromSecuritySettingsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.securitySettingsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('session', async () => { const fakePath = "/rendered/path/session"; const expectedParameters = {