diff --git a/.librarian/generator-input/client-post-processing/temporary-post-processing.yaml b/.librarian/generator-input/client-post-processing/temporary-post-processing.yaml new file mode 100644 index 000000000000..fdc27f034614 --- /dev/null +++ b/.librarian/generator-input/client-post-processing/temporary-post-processing.yaml @@ -0,0 +1,27 @@ +# 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. +description: Temporary post processing until https://github.com/googleapis/google-cloud-python/pull/17914 is released +url: https://github.com/googleapis/google-cloud-python/pull/17914 +replacements: + - paths: [ + "packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/async_client.py", + "packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/client.py", + "packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/async_client.py", + "packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/client.py", + ] + before: | + header_params = \{\} + after: | + header_params: dict[str, str] = {} + count: 4 diff --git a/librarian.yaml b/librarian.yaml index 1cc6c2fcbef0..17011271ff1f 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -737,7 +737,6 @@ libraries: apis: - path: google/cloud/ces/v1 - path: google/cloud/ces/v1beta - skip_generate: true python: default_version: v1 - name: google-cloud-channel diff --git a/packages/google-cloud-ces/google/cloud/ces/__init__.py b/packages/google-cloud-ces/google/cloud/ces/__init__.py index e11abbd5fb32..ee537619d027 100644 --- a/packages/google-cloud-ces/google/cloud/ces/__init__.py +++ b/packages/google-cloud-ces/google/cloud/ces/__init__.py @@ -35,6 +35,12 @@ ) from google.cloud.ces_v1.services.widget_service.client import WidgetServiceClient from google.cloud.ces_v1.types.agent import Agent +from google.cloud.ces_v1.types.agent_card import ( + AgentCard, + AgentInterface, + AgentSkill, + RemoteAgentTool, +) from google.cloud.ces_v1.types.agent_service import ( BatchDeleteConversationsRequest, BatchDeleteConversationsResponse, @@ -124,6 +130,7 @@ RedactionConfig, SynthesizeSpeechConfig, TimeZoneSettings, + VpcScSettings, ) from google.cloud.ces_v1.types.app_version import AppSnapshot, AppVersion from google.cloud.ces_v1.types.auth import ( @@ -153,7 +160,12 @@ from google.cloud.ces_v1.types.conversation import Conversation from google.cloud.ces_v1.types.data_store import DataStore from google.cloud.ces_v1.types.data_store_tool import DataStoreTool -from google.cloud.ces_v1.types.deployment import Deployment +from google.cloud.ces_v1.types.deployment import ( + Deployment, + ExperimentConfig, + InstagramCredentials, + WhatsAppCredentials, +) from google.cloud.ces_v1.types.example import ( AgentTransfer, Blob, @@ -169,7 +181,12 @@ from google.cloud.ces_v1.types.google_search_tool import GoogleSearchTool from google.cloud.ces_v1.types.guardrail import Guardrail from google.cloud.ces_v1.types.mcp_tool import McpTool -from google.cloud.ces_v1.types.mcp_toolset import McpToolset +from google.cloud.ces_v1.types.mcp_toolset import ( + McpToolDefinition, + McpToolOverride, + McpToolset, +) +from google.cloud.ces_v1.types.mocks import MockedToolCall from google.cloud.ces_v1.types.omnichannel import ( Omnichannel, OmnichannelIntegrationConfig, @@ -197,6 +214,7 @@ GoAway, InputAudioConfig, InterruptionSignal, + MockConfig, OutputAudioConfig, RecognitionResult, RunSessionRequest, @@ -235,6 +253,10 @@ "WidgetServiceClient", "WidgetServiceAsyncClient", "Agent", + "AgentCard", + "AgentInterface", + "AgentSkill", + "RemoteAgentTool", "BatchDeleteConversationsRequest", "BatchDeleteConversationsResponse", "CreateAgentRequest", @@ -319,6 +341,7 @@ "RedactionConfig", "SynthesizeSpeechConfig", "TimeZoneSettings", + "VpcScSettings", "AppSnapshot", "AppVersion", "ApiAuthentication", @@ -346,6 +369,9 @@ "DataStore", "DataStoreTool", "Deployment", + "ExperimentConfig", + "InstagramCredentials", + "WhatsAppCredentials", "AgentTransfer", "Blob", "Chunk", @@ -360,7 +386,10 @@ "GoogleSearchTool", "Guardrail", "McpTool", + "McpToolDefinition", + "McpToolOverride", "McpToolset", + "MockedToolCall", "Omnichannel", "OmnichannelIntegrationConfig", "OmnichannelOperationMetadata", @@ -380,6 +409,7 @@ "GoAway", "InputAudioConfig", "InterruptionSignal", + "MockConfig", "OutputAudioConfig", "RecognitionResult", "RunSessionRequest", diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/__init__.py b/packages/google-cloud-ces/google/cloud/ces_v1/__init__.py index 0cf94f276d46..a96692af0221 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/__init__.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/__init__.py @@ -23,11 +23,68 @@ from importlib import metadata +# PEP 0810: Explicit Lazy Imports +# Python 3.15+ natively intercepts and defers these imports. +# Developers can disable this behavior and force eager imports. +# For more information, see: +# https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter +# Older Python versions safely ignore this variable. +__lazy_modules__ = { + "google.cloud.ces_v1.services.agent_service", + "google.cloud.ces_v1.services.session_service", + "google.cloud.ces_v1.services.tool_service", + "google.cloud.ces_v1.services.widget_service", + "google.cloud.ces_v1.types.agent", + "google.cloud.ces_v1.types.agent_card", + "google.cloud.ces_v1.types.agent_service", + "google.cloud.ces_v1.types.agent_tool", + "google.cloud.ces_v1.types.agent_transfers", + "google.cloud.ces_v1.types.app", + "google.cloud.ces_v1.types.app_version", + "google.cloud.ces_v1.types.auth", + "google.cloud.ces_v1.types.bigquery_export", + "google.cloud.ces_v1.types.changelog", + "google.cloud.ces_v1.types.client_function", + "google.cloud.ces_v1.types.common", + "google.cloud.ces_v1.types.connector_tool", + "google.cloud.ces_v1.types.connector_toolset", + "google.cloud.ces_v1.types.conversation", + "google.cloud.ces_v1.types.data_store", + "google.cloud.ces_v1.types.data_store_tool", + "google.cloud.ces_v1.types.deployment", + "google.cloud.ces_v1.types.example", + "google.cloud.ces_v1.types.fakes", + "google.cloud.ces_v1.types.file_search_tool", + "google.cloud.ces_v1.types.google_search_tool", + "google.cloud.ces_v1.types.guardrail", + "google.cloud.ces_v1.types.mcp_tool", + "google.cloud.ces_v1.types.mcp_toolset", + "google.cloud.ces_v1.types.mocks", + "google.cloud.ces_v1.types.omnichannel", + "google.cloud.ces_v1.types.omnichannel_service", + "google.cloud.ces_v1.types.open_api_tool", + "google.cloud.ces_v1.types.open_api_toolset", + "google.cloud.ces_v1.types.python_function", + "google.cloud.ces_v1.types.schema", + "google.cloud.ces_v1.types.search_suggestions", + "google.cloud.ces_v1.types.security_settings", + "google.cloud.ces_v1.types.session_service", + "google.cloud.ces_v1.types.system_tool", + "google.cloud.ces_v1.types.tool", + "google.cloud.ces_v1.types.tool_service", + "google.cloud.ces_v1.types.toolset", + "google.cloud.ces_v1.types.toolset_tool", + "google.cloud.ces_v1.types.widget_service", + "google.cloud.ces_v1.types.widget_tool", +} + + from .services.agent_service import AgentServiceAsyncClient, AgentServiceClient from .services.session_service import SessionServiceAsyncClient, SessionServiceClient from .services.tool_service import ToolServiceAsyncClient, ToolServiceClient from .services.widget_service import WidgetServiceAsyncClient, WidgetServiceClient from .types.agent import Agent +from .types.agent_card import AgentCard, AgentInterface, AgentSkill, RemoteAgentTool from .types.agent_service import ( BatchDeleteConversationsRequest, BatchDeleteConversationsResponse, @@ -117,6 +174,7 @@ RedactionConfig, SynthesizeSpeechConfig, TimeZoneSettings, + VpcScSettings, ) from .types.app_version import AppSnapshot, AppVersion from .types.auth import ( @@ -146,7 +204,12 @@ from .types.conversation import Conversation from .types.data_store import DataStore from .types.data_store_tool import DataStoreTool -from .types.deployment import Deployment +from .types.deployment import ( + Deployment, + ExperimentConfig, + InstagramCredentials, + WhatsAppCredentials, +) from .types.example import ( AgentTransfer, Blob, @@ -162,7 +225,8 @@ from .types.google_search_tool import GoogleSearchTool from .types.guardrail import Guardrail from .types.mcp_tool import McpTool -from .types.mcp_toolset import McpToolset +from .types.mcp_toolset import McpToolDefinition, McpToolOverride, McpToolset +from .types.mocks import MockedToolCall from .types.omnichannel import Omnichannel, OmnichannelIntegrationConfig from .types.omnichannel_service import OmnichannelOperationMetadata from .types.open_api_tool import OpenApiTool @@ -181,6 +245,7 @@ GoAway, InputAudioConfig, InterruptionSignal, + MockConfig, OutputAudioConfig, RecognitionResult, RunSessionRequest, @@ -296,7 +361,10 @@ def _get_version(dependency_name): "WidgetServiceAsyncClient", "Action", "Agent", + "AgentCard", + "AgentInterface", "AgentServiceClient", + "AgentSkill", "AgentTool", "AgentTransfer", "AmbientSoundConfig", @@ -360,6 +428,7 @@ def _get_version(dependency_name): "ExecuteToolRequest", "ExecuteToolResponse", "ExecutionType", + "ExperimentConfig", "ExportAppRequest", "ExportAppResponse", "ExpressionCondition", @@ -384,6 +453,7 @@ def _get_version(dependency_name): "ImportAppRequest", "ImportAppResponse", "InputAudioConfig", + "InstagramCredentials", "InterruptionSignal", "LanguageSettings", "ListAgentsRequest", @@ -408,9 +478,13 @@ def _get_version(dependency_name): "ListToolsetsResponse", "LoggingSettings", "McpTool", + "McpToolDefinition", + "McpToolOverride", "McpToolset", "Message", "MetricAnalysisSettings", + "MockConfig", + "MockedToolCall", "ModelSettings", "OAuthConfig", "Omnichannel", @@ -424,6 +498,7 @@ def _get_version(dependency_name): "PythonFunction", "RecognitionResult", "RedactionConfig", + "RemoteAgentTool", "RestoreAppVersionRequest", "RestoreAppVersionResponse", "RetrieveToolSchemaRequest", @@ -464,7 +539,9 @@ def _get_version(dependency_name): "UpdateGuardrailRequest", "UpdateToolRequest", "UpdateToolsetRequest", + "VpcScSettings", "WebSearchQuery", + "WhatsAppCredentials", "WidgetServiceClient", "WidgetTool", ) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/async_client.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/async_client.py index fcbf7d6cae53..e1528005e6e0 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/async_client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/async_client.py @@ -46,6 +46,7 @@ import google.api_core.operation as operation # type: ignore import google.api_core.operation_async as operation_async # type: ignore +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore import google.protobuf.empty_pb2 as empty_pb2 # type: ignore import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore import google.protobuf.struct_pb2 as struct_pb2 # type: ignore @@ -56,6 +57,7 @@ from google.cloud.ces_v1.services.agent_service import pagers from google.cloud.ces_v1.types import ( agent, + agent_card, agent_service, agent_tool, agent_transfers, @@ -6602,9 +6604,7 @@ async def __aexit__(self, exc_type, exc, tb): DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("AgentServiceAsyncClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/client.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/client.py index 5a8ab01dc503..3300c0830ec7 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/client.py @@ -63,6 +63,7 @@ import google.api_core.operation as operation # type: ignore import google.api_core.operation_async as operation_async # type: ignore +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore import google.protobuf.empty_pb2 as empty_pb2 # type: ignore import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore import google.protobuf.struct_pb2 as struct_pb2 # type: ignore @@ -73,6 +74,7 @@ from google.cloud.ces_v1.services.agent_service import pagers from google.cloud.ces_v1.types import ( agent, + agent_card, agent_service, agent_tool, agent_transfers, @@ -7238,8 +7240,6 @@ def list_locations( DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("AgentServiceClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/transports/base.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/transports/base.py index 4c14a1768671..3f62b10f9994 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/transports/base.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/transports/base.py @@ -54,9 +54,7 @@ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class AgentServiceTransport(abc.ABC): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/transports/rest.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/transports/rest.py index 8ca9f09a14f6..6d0d50abe4fb 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/transports/rest.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/agent_service/transports/rest.py @@ -76,8 +76,7 @@ rest_version=f"requests@{requests_version}", ) -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class AgentServiceRestInterceptor: diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/async_client.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/async_client.py index 33fd5b5564b2..2aedf527c192 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/async_client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/async_client.py @@ -646,6 +646,13 @@ def request_generator(): self._client._transport.bidi_run_session ] + header_params: dict[str, str] = {} + + if header_params: + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata(header_params), + ) + # Validate the universe domain. self._client._validate_universe_domain() @@ -1025,9 +1032,7 @@ async def __aexit__(self, exc_type, exc, tb): DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("SessionServiceAsyncClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/client.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/client.py index 032079dcc649..c54a960cbe64 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/client.py @@ -1141,6 +1141,13 @@ def request_generator(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.bidi_run_session] + header_params: dict[str, str] = {} + + if header_params: + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata(header_params), + ) + # Validate the universe domain. self._validate_universe_domain() @@ -1543,8 +1550,6 @@ def list_locations( DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("SessionServiceClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/transports/base.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/transports/base.py index 9d2ab30a92da..8f61f6a172df 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/transports/base.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/transports/base.py @@ -33,9 +33,7 @@ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class SessionServiceTransport(abc.ABC): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/transports/rest.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/transports/rest.py index 084cac2facc5..34246bfe01c7 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/transports/rest.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/session_service/transports/rest.py @@ -55,8 +55,7 @@ rest_version=f"requests@{requests_version}", ) -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class SessionServiceRestInterceptor: diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/async_client.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/async_client.py index 3172e2e679bf..bb78609b04cb 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/async_client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/async_client.py @@ -48,7 +48,14 @@ from google.cloud.location import locations_pb2 # type: ignore from google.longrunning import operations_pb2 # type: ignore -from google.cloud.ces_v1.types import schema, tool, tool_service, toolset_tool +from google.cloud.ces_v1.types import ( + schema, + search_suggestions, + session_service, + tool, + tool_service, + toolset_tool, +) from .client import ToolServiceClient from .transports.base import DEFAULT_CLIENT_INFO, ToolServiceTransport @@ -931,9 +938,7 @@ async def __aexit__(self, exc_type, exc, tb): DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("ToolServiceAsyncClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/client.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/client.py index b51e82cb8e8b..2eb0fe4f7278 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/client.py @@ -65,7 +65,14 @@ from google.cloud.location import locations_pb2 # type: ignore from google.longrunning import operations_pb2 # type: ignore -from google.cloud.ces_v1.types import schema, tool, tool_service, toolset_tool +from google.cloud.ces_v1.types import ( + schema, + search_suggestions, + session_service, + tool, + tool_service, + toolset_tool, +) from .transports.base import DEFAULT_CLIENT_INFO, ToolServiceTransport from .transports.grpc import ToolServiceGrpcTransport @@ -1491,8 +1498,6 @@ def list_locations( DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("ToolServiceClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/transports/base.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/transports/base.py index b73a48545dc4..8d52aa19981e 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/transports/base.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/transports/base.py @@ -33,9 +33,7 @@ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class ToolServiceTransport(abc.ABC): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/transports/rest.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/transports/rest.py index d0da1330e1ae..5f52128fd9f0 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/transports/rest.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/tool_service/transports/rest.py @@ -55,8 +55,7 @@ rest_version=f"requests@{requests_version}", ) -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class ToolServiceRestInterceptor: diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/async_client.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/async_client.py index fbf8e4ef9e64..3498320e4507 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/async_client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/async_client.py @@ -751,9 +751,7 @@ async def __aexit__(self, exc_type, exc, tb): DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("WidgetServiceAsyncClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/client.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/client.py index 34f13fb92e7f..44565fea6c5e 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/client.py @@ -1230,8 +1230,6 @@ def list_locations( DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("WidgetServiceClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/transports/base.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/transports/base.py index 12bf8859c52e..9f68bd88ba05 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/transports/base.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/transports/base.py @@ -33,9 +33,7 @@ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class WidgetServiceTransport(abc.ABC): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/transports/rest.py b/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/transports/rest.py index 0be8c07e5199..30034f84fbeb 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/transports/rest.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/services/widget_service/transports/rest.py @@ -55,8 +55,7 @@ rest_version=f"requests@{requests_version}", ) -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class WidgetServiceRestInterceptor: diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/__init__.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/__init__.py index 60e96c1e18b5..c12d543fe27f 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/__init__.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/__init__.py @@ -16,6 +16,12 @@ from .agent import ( Agent, ) +from .agent_card import ( + AgentCard, + AgentInterface, + AgentSkill, + RemoteAgentTool, +) from .agent_service import ( BatchDeleteConversationsRequest, BatchDeleteConversationsResponse, @@ -107,6 +113,7 @@ RedactionConfig, SynthesizeSpeechConfig, TimeZoneSettings, + VpcScSettings, ) from .app_version import ( AppSnapshot, @@ -158,6 +165,9 @@ ) from .deployment import ( Deployment, + ExperimentConfig, + InstagramCredentials, + WhatsAppCredentials, ) from .example import ( AgentTransfer, @@ -186,8 +196,13 @@ McpTool, ) from .mcp_toolset import ( + McpToolDefinition, + McpToolOverride, McpToolset, ) +from .mocks import ( + MockedToolCall, +) from .omnichannel import ( Omnichannel, OmnichannelIntegrationConfig, @@ -225,6 +240,7 @@ GoAway, InputAudioConfig, InterruptionSignal, + MockConfig, OutputAudioConfig, RecognitionResult, RunSessionRequest, @@ -265,6 +281,10 @@ __all__ = ( "Agent", + "AgentCard", + "AgentInterface", + "AgentSkill", + "RemoteAgentTool", "BatchDeleteConversationsRequest", "BatchDeleteConversationsResponse", "CreateAgentRequest", @@ -349,6 +369,7 @@ "RedactionConfig", "SynthesizeSpeechConfig", "TimeZoneSettings", + "VpcScSettings", "AppSnapshot", "AppVersion", "ApiAuthentication", @@ -376,6 +397,9 @@ "DataStore", "DataStoreTool", "Deployment", + "ExperimentConfig", + "InstagramCredentials", + "WhatsAppCredentials", "AgentTransfer", "Blob", "Chunk", @@ -390,7 +414,10 @@ "GoogleSearchTool", "Guardrail", "McpTool", + "McpToolDefinition", + "McpToolOverride", "McpToolset", + "MockedToolCall", "Omnichannel", "OmnichannelIntegrationConfig", "OmnichannelOperationMetadata", @@ -410,6 +437,7 @@ "GoAway", "InputAudioConfig", "InterruptionSignal", + "MockConfig", "OutputAudioConfig", "RecognitionResult", "RunSessionRequest", diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/agent.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/agent.py index 13d0847096a6..5fe78851137c 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/agent.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/agent.py @@ -152,6 +152,9 @@ class Agent(proto.Message): Optional. Agent transfer rules. If multiple rules match, the first one in the list will be used. + validation_errors (MutableSequence[str]): + Output only. Misconfigurations or errors in + the agent that may affect agent quality. """ class LlmAgent(proto.Message): @@ -201,6 +204,12 @@ class RemoteDialogflowAgent(proto.Message): ```allow_playback_interruption`` `__ set to true will be interruptable, all other messages follow the app-level barge-in settings. + language_code_variable (str): + Optional. The name of the variable that + contains the language code to be used for the + Dialogflow session. If unspecified, the default + language code of the Dialogflow agent will be + used. """ agent: str = proto.Field( @@ -229,6 +238,10 @@ class RemoteDialogflowAgent(proto.Message): proto.BOOL, number=6, ) + language_code_variable: str = proto.Field( + proto.STRING, + number=7, + ) class AgentToolset(proto.Message): r"""A toolset with a selection of its tools. @@ -354,6 +367,10 @@ class AgentToolset(proto.Message): number=30, message=agent_transfers.TransferRule, ) + validation_errors: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=32, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/agent_card.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/agent_card.py new file mode 100644 index 000000000000..3504c1a05de5 --- /dev/null +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/agent_card.py @@ -0,0 +1,216 @@ +# -*- coding: utf-8 -*- +# 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. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +__protobuf__ = proto.module( + package="google.cloud.ces.v1", + manifest={ + "AgentCard", + "AgentInterface", + "AgentSkill", + "RemoteAgentTool", + }, +) + + +class AgentCard(proto.Message): + r"""AgentCard conveys key information about a remote agent. + It is a trimmed version of the AgentCard defined in the A2A + protocol + https://a2a-protocol.org/dev/specification/#441-agentcard + + Attributes: + name (str): + Required. A human-readable name for the + agent. + description (str): + Required. A description of the agent's domain + of action/solution space. + supported_interfaces (MutableSequence[google.cloud.ces_v1.types.AgentInterface]): + Required. Ordered list of supported + interfaces. The first entry is preferred. + version (str): + Required. The version of the agent. + skills (MutableSequence[google.cloud.ces_v1.types.AgentSkill]): + Required. Skills represent a unit of ability + an agent can perform. This may somewhat abstract + but represents a more focused set of actions + that the agent is highly likely to succeed at. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + description: str = proto.Field( + proto.STRING, + number=2, + ) + supported_interfaces: MutableSequence["AgentInterface"] = proto.RepeatedField( + proto.MESSAGE, + number=3, + message="AgentInterface", + ) + version: str = proto.Field( + proto.STRING, + number=5, + ) + skills: MutableSequence["AgentSkill"] = proto.RepeatedField( + proto.MESSAGE, + number=6, + message="AgentSkill", + ) + + +class AgentInterface(proto.Message): + r"""Declares a combination of a target URL, transport and + protocol version for interacting with the agent. This allows + agents to expose the same functionality over multiple protocol + binding mechanisms. + + Attributes: + url (str): + Required. The URL where this interface is + available. Must be a valid absolute HTTPS URL in + production. Example: + + "https://api.example.com/a2a/v1", + "https://grpc.example.com/a2a". + protocol_binding (str): + Required. The protocol binding supported at this URL. This + is an open form string, to be easily extended for other + protocol bindings. The core ones officially supported are + ``JSONRPC``, ``GRPC`` and ``HTTP+JSON``. + tenant (str): + Tenant ID to be used in the request when + calling the agent. + protocol_version (str): + Required. The version of the A2A protocol + this interface exposes. Use the latest supported + minor version per major version. Examples: + "0.3", "1.0". + """ + + url: str = proto.Field( + proto.STRING, + number=1, + ) + protocol_binding: str = proto.Field( + proto.STRING, + number=2, + ) + tenant: str = proto.Field( + proto.STRING, + number=3, + ) + protocol_version: str = proto.Field( + proto.STRING, + number=4, + ) + + +class AgentSkill(proto.Message): + r"""Represents a distinct capability or function that an agent + can perform. + + Attributes: + id (str): + Required. A unique identifier for the agent's + skill. + name (str): + Required. A human-readable name for the + skill. + description (str): + Required. A detailed description of the + skill. + tags (MutableSequence[str]): + Required. A set of keywords describing the + skill's capabilities. + examples (MutableSequence[str]): + Example prompts or scenarios that this skill + can handle. + input_modes (MutableSequence[str]): + The set of supported input media types for + this skill, overriding the agent's defaults. + output_modes (MutableSequence[str]): + The set of supported output media types for + this skill, overriding the agent's defaults. + """ + + id: str = proto.Field( + proto.STRING, + number=1, + ) + name: str = proto.Field( + proto.STRING, + number=2, + ) + description: str = proto.Field( + proto.STRING, + number=3, + ) + tags: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=4, + ) + examples: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=5, + ) + input_modes: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=6, + ) + output_modes: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=7, + ) + + +class RemoteAgentTool(proto.Message): + r"""Represents a tool that allows the agent to call another + remote agent. + + Attributes: + name (str): + Required. The name of the tool. + description (str): + Required. The description of the tool. + agent_card (google.cloud.ces_v1.types.AgentCard): + Required. The agent card of the remote agent + that this tool invokes. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + description: str = proto.Field( + proto.STRING, + number=2, + ) + agent_card: "AgentCard" = proto.Field( + proto.MESSAGE, + number=3, + message="AgentCard", + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/app.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/app.py index f69199e09dbb..bf3346fb7f5e 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/app.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/app.py @@ -39,6 +39,7 @@ "ErrorHandlingSettings", "EvaluationMetricsThresholds", "ClientCertificateSettings", + "VpcScSettings", "ConversationLoggingSettings", "CloudLoggingSettings", "AudioRecordingConfig", @@ -133,10 +134,15 @@ class App(proto.Message): client_certificate_settings (google.cloud.ces_v1.types.ClientCertificateSettings): Optional. The default client certificate settings for the app. + vpc_sc_settings (google.cloud.ces_v1.types.VpcScSettings): + Optional. VPC-SC settings for the app. locked (bool): Optional. Indicates whether the app is locked for changes. If the app is locked, modifications to the app resources will be rejected. + validation_errors (MutableSequence[str]): + Output only. Misconfigurations or warnings in + the app. """ class ToolExecutionMode(proto.Enum): @@ -309,10 +315,19 @@ class VariableDeclaration(proto.Message): number=25, message="ClientCertificateSettings", ) + vpc_sc_settings: "VpcScSettings" = proto.Field( + proto.MESSAGE, + number=26, + message="VpcScSettings", + ) locked: bool = proto.Field( proto.BOOL, number=29, ) + validation_errors: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=39, + ) class TimeZoneSettings(proto.Message): @@ -548,13 +563,13 @@ class BargeInConfig(proto.Message): Attributes: disable_barge_in (bool): - Optional. Disables user barge-in while the agent is - speaking. If true, user input during agent response playback - will be ignored. - - Deprecated: ``disable_barge_in`` is deprecated in favor of + Optional. Deprecated: ``disable_barge_in`` is deprecated in + favor of [``disable_barge_in_control``][google.cloud.ces.v1.ChannelProfile.disable_barge_in_control] in ChannelProfile. + + Disables user barge-in while the agent is speaking. If true, + user input during agent response playback will be ignored. barge_in_awareness (bool): Optional. If enabled, the agent will adapt its next response based on the assumption that @@ -587,21 +602,51 @@ class SynthesizeSpeechConfig(proto.Message): voices and languages `__ from Cloud Text-to-Speech. + voice_sample_gcs_uri (str): + Optional. The Cloud Storage URI to the audio sample for + voice cloning. The audio sample should be a mono-channel, + 24kHz WAV file. + + Note: Please make sure the CES service agent + ``service-@gcp-sa-ces.iam.gserviceaccount.com`` + has ``storage.objects.get`` permission to the Cloud Storage + object. speaking_rate (float): Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will return an error. + model (str): + Optional. The model used to synthesize audio. + Currently supported values: + + - "gemini-3.1-flash-tts-preview" + If empty, Chirp3-HD is used. + instruction (str): + Optional. The instruction used to synthesize + speech when using a generative model. """ voice: str = proto.Field( proto.STRING, number=1, ) + voice_sample_gcs_uri: str = proto.Field( + proto.STRING, + number=3, + ) speaking_rate: float = proto.Field( proto.DOUBLE, number=2, ) + model: str = proto.Field( + proto.STRING, + number=4, + ) + instruction: str = proto.Field( + proto.STRING, + number=5, + ) class MetricAnalysisSettings(proto.Message): @@ -631,13 +676,25 @@ class LoggingSettings(proto.Message): Optional. Configuration for how sensitive data should be redacted. audio_recording_config (google.cloud.ces_v1.types.AudioRecordingConfig): - Optional. Configuration for how audio - interactions should be recorded. + Optional. Configuration for how audio interactions should be + recorded. The audio is subject to redaction as configured in + [RedactionConfig][google.cloud.ces.v1.LoggingSettings.redaction_config]. + unredacted_audio_recording_config (google.cloud.ces_v1.types.AudioRecordingConfig): + Optional. Configures an additional recording of unredacted + audio. This can be used to maintain a raw audio copy when + audio redaction is + [enabled][google.cloud.ces.v1.RedactionConfig.enable_redaction], + typically for auditing or monitoring purposes. bigquery_export_settings (google.cloud.ces_v1.types.BigQueryExportSettings): - Optional. Settings to describe the BigQuery - export behaviors for the app. The conversation - data will be exported to BigQuery tables if it - is enabled. + Optional. Configures the BigQuery export behaviors for the + app. The conversation data is subject to redaction as + configured in + [RedactionConfig][google.cloud.ces.v1.LoggingSettings.redaction_config]. + unredacted_bigquery_export_settings (google.cloud.ces_v1.types.BigQueryExportSettings): + Optional. Configures the BigQuery export + behaviors for the app. The unredacted + conversation data will be exported to BigQuery + tables if it is enabled. cloud_logging_settings (google.cloud.ces_v1.types.CloudLoggingSettings): Optional. Settings to describe the Cloud Logging behaviors for the app. @@ -665,11 +722,23 @@ class LoggingSettings(proto.Message): number=2, message="AudioRecordingConfig", ) + unredacted_audio_recording_config: "AudioRecordingConfig" = proto.Field( + proto.MESSAGE, + number=8, + message="AudioRecordingConfig", + ) bigquery_export_settings: bigquery_export.BigQueryExportSettings = proto.Field( proto.MESSAGE, number=3, message=bigquery_export.BigQueryExportSettings, ) + unredacted_bigquery_export_settings: bigquery_export.BigQueryExportSettings = ( + proto.Field( + proto.MESSAGE, + number=9, + message=bigquery_export.BigQueryExportSettings, + ) + ) cloud_logging_settings: "CloudLoggingSettings" = proto.Field( proto.MESSAGE, number=4, @@ -699,6 +768,13 @@ class ErrorHandlingSettings(proto.Message): error_handling_strategy (google.cloud.ces_v1.types.ErrorHandlingSettings.ErrorHandlingStrategy): Optional. The strategy to use for error handling. + fallback_response_config (google.cloud.ces_v1.types.ErrorHandlingSettings.FallbackResponseConfig): + Optional. Configuration for handling fallback + responses. + end_session_config (google.cloud.ces_v1.types.ErrorHandlingSettings.EndSessionConfig): + Optional. Configuration for ending the + session in case of system errors (e.g. LLM + errors). """ class ErrorHandlingStrategy(proto.Enum): @@ -722,11 +798,71 @@ class ErrorHandlingStrategy(proto.Enum): FALLBACK_RESPONSE = 2 END_SESSION = 3 + class FallbackResponseConfig(proto.Message): + r"""Configuration for handling fallback responses. + + Attributes: + custom_fallback_messages (MutableMapping[str, str]): + Optional. The fallback messages in case of system errors + (e.g. LLM errors), mapped by `supported language + code `__. + max_fallback_attempts (int): + Optional. The maximum number of fallback attempts to make + before the agent emitting + [EndSession][google.cloud.ces.v1.EndSession] Signal. + """ + + custom_fallback_messages: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=1, + ) + max_fallback_attempts: int = proto.Field( + proto.INT32, + number=2, + ) + + class EndSessionConfig(proto.Message): + r"""Configuration for ending the session in case of system errors + (e.g. LLM errors). + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + escalate_session (bool): + Optional. Whether to escalate the session in + [EndSession][google.cloud.ces.v1.EndSession]. If session is + escalated, [metadata in + EndSession][google.cloud.ces.v1.EndSession.metadata] will + contain ``session_escalated = true``. See + https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/deploy/google-telephony-platform#transfer_a_call_to_a_human_agent + for details. + + This field is a member of `oneof`_ ``_escalate_session``. + """ + + escalate_session: bool = proto.Field( + proto.BOOL, + number=1, + optional=True, + ) + error_handling_strategy: ErrorHandlingStrategy = proto.Field( proto.ENUM, number=1, enum=ErrorHandlingStrategy, ) + fallback_response_config: FallbackResponseConfig = proto.Field( + proto.MESSAGE, + number=2, + message=FallbackResponseConfig, + ) + end_session_config: EndSessionConfig = proto.Field( + proto.MESSAGE, + number=3, + message=EndSessionConfig, + ) class EvaluationMetricsThresholds(proto.Message): @@ -972,6 +1108,28 @@ class ClientCertificateSettings(proto.Message): ) +class VpcScSettings(proto.Message): + r"""VPC-SC settings for the app. + + Attributes: + allowed_origins (MutableSequence[str]): + Optional. The allowed HTTP(s) origins that + OpenAPI tools in the App are able to directly + call when VPC Service Controls are enabled. + These strings must match the origin exactly, + including the port if specified. For example, + "https://example.com" or + "https://example.com:443". This list does not + yet apply to Python tools that may make direct + HTTP calls. + """ + + allowed_origins: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + class ConversationLoggingSettings(proto.Message): r"""Settings to describe the conversation logging behaviors for the app. @@ -980,12 +1138,21 @@ class ConversationLoggingSettings(proto.Message): disable_conversation_logging (bool): Optional. Whether to disable conversation logging for the sessions. + retention_window (google.protobuf.duration_pb2.Duration): + Optional. Controls the retention window for + the conversation. If not set, the conversation + will be retained for 365 days. """ disable_conversation_logging: bool = proto.Field( proto.BOOL, number=1, ) + retention_window: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=2, + message=duration_pb2.Duration, + ) class CloudLoggingSettings(proto.Message): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/common.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/common.py index 23491dda47e1..1b3314a3aaf2 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/common.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/common.py @@ -354,6 +354,12 @@ class ChannelProfile(proto.Message): Optional. The noise suppression level of the channel profile. Available values are "low", "moderate", "high", "very_high". + whatsapp_config (google.cloud.ces_v1.types.ChannelProfile.WhatsAppConfig): + Optional. Configuration specific to WhatsApp + deployments. + instagram_config (google.cloud.ces_v1.types.ChannelProfile.InstagramConfig): + Optional. Configuration specific to Instagram + deployments. """ class ChannelType(proto.Enum): @@ -372,11 +378,18 @@ class ChannelType(proto.Enum): Google Telephony Platform channel. CONTACT_CENTER_AS_A_SERVICE (6): Contact Center as a Service (CCaaS) channel. + CONTACT_CENTER_AS_A_SERVICE_CHAT (11): + Contact Center as a Service (CCaaS Chat) + channel. FIVE9 (7): Five9 channel. CONTACT_CENTER_INTEGRATION (8): Third party contact center integration channel. + WHATSAPP (9): + WhatsApp channel. + INSTAGRAM (10): + Instagram channel. """ UNKNOWN = 0 @@ -385,8 +398,11 @@ class ChannelType(proto.Enum): TWILIO = 4 GOOGLE_TELEPHONY_PLATFORM = 5 CONTACT_CENTER_AS_A_SERVICE = 6 + CONTACT_CENTER_AS_A_SERVICE_CHAT = 11 FIVE9 = 7 CONTACT_CENTER_INTEGRATION = 8 + WHATSAPP = 9 + INSTAGRAM = 10 class PersonaProperty(proto.Message): r"""Represents the persona property of a channel. @@ -539,6 +555,86 @@ class SecuritySettings(proto.Message): ) ) + class WhatsAppConfig(proto.Message): + r"""Configuration specific to WhatsApp deployments. + + Attributes: + waba_id (str): + Required. The WhatsApp Business Account ID. + phone_number_id (str): + Required. The Meta phone number ID. + phone_number (str): + Optional. The phone number in E.164 format. + display_name (str): + Output only. The fetched Meta business page + name. + thumbnail_url (str): + Output only. The fetched Meta business + profile thumbnail URL. + description (str): + Output only. The description of the Meta + business page or profile. + """ + + waba_id: str = proto.Field( + proto.STRING, + number=1, + ) + phone_number_id: str = proto.Field( + proto.STRING, + number=2, + ) + phone_number: str = proto.Field( + proto.STRING, + number=3, + ) + display_name: str = proto.Field( + proto.STRING, + number=4, + ) + thumbnail_url: str = proto.Field( + proto.STRING, + number=5, + ) + description: str = proto.Field( + proto.STRING, + number=6, + ) + + class InstagramConfig(proto.Message): + r"""Configuration specific to Instagram deployments. + + Attributes: + instagram_account_id (str): + Required. The Instagram Account ID. + display_name (str): + Output only. The fetched Meta business page + name. + thumbnail_url (str): + Output only. The fetched Meta business + profile thumbnail URL. + description (str): + Output only. The description of the Meta + business page or profile. + """ + + instagram_account_id: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + thumbnail_url: str = proto.Field( + proto.STRING, + number=3, + ) + description: str = proto.Field( + proto.STRING, + number=4, + ) + profile_id: str = proto.Field( proto.STRING, number=1, @@ -570,6 +666,16 @@ class SecuritySettings(proto.Message): proto.STRING, number=8, ) + whatsapp_config: WhatsAppConfig = proto.Field( + proto.MESSAGE, + number=9, + message=WhatsAppConfig, + ) + instagram_config: InstagramConfig = proto.Field( + proto.MESSAGE, + number=10, + message=InstagramConfig, + ) class Span(proto.Message): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/conversation.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/conversation.py index 4f8351eff1f7..143a9cb44c74 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/conversation.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/conversation.py @@ -114,12 +114,17 @@ class Source(proto.Enum): The conversation is from the simulator. EVAL (3): The conversation is from the evaluation. + AGENT_TOOL (4): + The conversation is from an agent tool. Agent + tool runs the agent in a separate session, which + is persisted for testing and debugging purposes. """ SOURCE_UNSPECIFIED = 0 LIVE = 1 SIMULATOR = 2 EVAL = 3 + AGENT_TOOL = 4 class InputType(proto.Enum): r"""Type of the input message. @@ -128,22 +133,24 @@ class InputType(proto.Enum): INPUT_TYPE_UNSPECIFIED (0): Unspecified input type. INPUT_TYPE_TEXT (1): - The input message is text. + Text input. + INPUT_TYPE_EVENT (7): + Event input. INPUT_TYPE_AUDIO (2): - The input message is audio. + Audio input. INPUT_TYPE_IMAGE (3): - The input message is image. + Image input. INPUT_TYPE_BLOB (4): - The input message is blob file. + Blob input. INPUT_TYPE_TOOL_RESPONSE (5): - The input message is client function tool - response. + Client function tool response input. INPUT_TYPE_VARIABLES (6): - The input message are variables. + Variables input. """ INPUT_TYPE_UNSPECIFIED = 0 INPUT_TYPE_TEXT = 1 + INPUT_TYPE_EVENT = 7 INPUT_TYPE_AUDIO = 2 INPUT_TYPE_IMAGE = 3 INPUT_TYPE_BLOB = 4 diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/deployment.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/deployment.py index e76c3cb06d02..d3702ed9b169 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/deployment.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/deployment.py @@ -25,11 +25,104 @@ __protobuf__ = proto.module( package="google.cloud.ces.v1", manifest={ + "ExperimentConfig", "Deployment", + "WhatsAppCredentials", + "InstagramCredentials", }, ) +class ExperimentConfig(proto.Message): + r"""Experiment for the deployment. + + Attributes: + version_release (google.cloud.ces_v1.types.ExperimentConfig.VersionRelease): + Optional. Version release for the experiment. + """ + + class State(proto.Enum): + r"""State of the experiment. + + Values: + STATE_UNSPECIFIED (0): + Unspecified state. + PENDING (1): + Deprecated: This state is no longer used. + RUNNING (2): + Running state. Experiment is running and + valid. + DONE (3): + Deprecated: This state is no longer used. + EXPIRED (4): + Deprecated: This state is no longer used. + """ + + STATE_UNSPECIFIED = 0 + PENDING = 1 + RUNNING = 2 + DONE = 3 + EXPIRED = 4 + + class VersionRelease(proto.Message): + r"""Version release for the experiment. + + Attributes: + state (google.cloud.ces_v1.types.ExperimentConfig.State): + Optional. State of the version release. + traffic_allocations (MutableSequence[google.cloud.ces_v1.types.ExperimentConfig.VersionRelease.TrafficAllocation]): + Optional. Traffic allocations for the version + release. + """ + + class TrafficAllocation(proto.Message): + r"""Traffic allocation for the version release. + + Attributes: + id (str): + Optional. Id of the traffic allocation. + Free format string, up to 128 characters. + traffic_percentage (int): + Optional. Traffic percentage of the traffic + allocation. Must be between 0 and 100. + app_version (str): + Optional. App version of the traffic allocation. Format: + ``projects/{project}/locations/{location}/apps/{app}/versions/{version}`` + """ + + id: str = proto.Field( + proto.STRING, + number=1, + ) + traffic_percentage: int = proto.Field( + proto.INT32, + number=2, + ) + app_version: str = proto.Field( + proto.STRING, + number=3, + ) + + state: "ExperimentConfig.State" = proto.Field( + proto.ENUM, + number=1, + enum="ExperimentConfig.State", + ) + traffic_allocations: MutableSequence[ + "ExperimentConfig.VersionRelease.TrafficAllocation" + ] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="ExperimentConfig.VersionRelease.TrafficAllocation", + ) + + version_release: VersionRelease = proto.Field( + proto.MESSAGE, + number=1, + message=VersionRelease, + ) + + class Deployment(proto.Message): r"""A deployment represents an immutable, queryable version of the app. It is used to deploy an app version with a specific @@ -62,6 +155,17 @@ class Deployment(proto.Message): hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes. + experiment_config (google.cloud.ces_v1.types.ExperimentConfig): + Optional. Experiment configuration for the + deployment. + whatsapp_credentials (google.cloud.ces_v1.types.WhatsAppCredentials): + Optional. Input only. Ephemeral WhatsApp + credentials required when configuring a WhatsApp + channel profile. + instagram_credentials (google.cloud.ces_v1.types.InstagramCredentials): + Optional. Input only. Ephemeral Instagram + credentials required when configuring a + Instagram channel profile. """ name: str = proto.Field( @@ -95,6 +199,92 @@ class Deployment(proto.Message): proto.STRING, number=7, ) + experiment_config: "ExperimentConfig" = proto.Field( + proto.MESSAGE, + number=9, + message="ExperimentConfig", + ) + whatsapp_credentials: "WhatsAppCredentials" = proto.Field( + proto.MESSAGE, + number=10, + message="WhatsAppCredentials", + ) + instagram_credentials: "InstagramCredentials" = proto.Field( + proto.MESSAGE, + number=11, + message="InstagramCredentials", + ) + + +class WhatsAppCredentials(proto.Message): + r"""Ephemeral Meta credentials for WhatsApp native integration. + + Attributes: + auth_code (str): + Required. The Meta auth code provided by the + embedded signup flow. + pin (str): + Required. The 6-digit PIN created by the user + for two-step verification. + phone_number (str): + Required. The phone number to register with + WhatsApp. + business_account_id (str): + Required. The Business Account ID to use for + the phone number. + waba_id (str): + Required. The WhatsApp Business Account ID. + conversation_profile_id (str): + Required. The Conversation Profile ID to use + for the deployment. + """ + + auth_code: str = proto.Field( + proto.STRING, + number=1, + ) + pin: str = proto.Field( + proto.STRING, + number=2, + ) + phone_number: str = proto.Field( + proto.STRING, + number=3, + ) + business_account_id: str = proto.Field( + proto.STRING, + number=4, + ) + waba_id: str = proto.Field( + proto.STRING, + number=5, + ) + conversation_profile_id: str = proto.Field( + proto.STRING, + number=6, + ) + + +class InstagramCredentials(proto.Message): + r"""Ephemeral Meta credentials for Instagram native integration. + + Attributes: + auth_code (str): + Required. The Meta auth code provided by the + embedded signup flow. + conversation_profile_id (str): + Required. The Conversation Profile ID to use + for the deployment. + """ + + auth_code: str = proto.Field( + proto.STRING, + number=1, + ) + conversation_profile_id: str = proto.Field( + proto.STRING, + number=2, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/mcp_tool.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/mcp_tool.py index 52075249be4c..57c26a50ae63 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/mcp_tool.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/mcp_tool.py @@ -38,6 +38,10 @@ class McpTool(proto.Message): Attributes: name (str): Required. The name of the MCP tool. + name_override (str): + Optional. The name override of the MCP tool. + This is populated if the name was overridden by + a Toolset override. description (str): Optional. The description of the MCP tool. input_schema (google.cloud.ces_v1.types.Schema): @@ -76,12 +80,41 @@ class McpTool(proto.Message): the session variables. See https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection for more details. + state (google.cloud.ces_v1.types.McpTool.State): + Output only. The dynamic availability state + of the tool on the external server. """ + class State(proto.Enum): + r"""Represents the dynamic availability state of the tool. + + Values: + STATE_UNSPECIFIED (0): + Default state. + ACTIVE (1): + The tool is available and actively offered by + the server. + INACTIVE (2): + The tool is configured or pinned, but + currently not offered by the server. + STALE (3): + The tool exists on the server, but does not + match the version on the server. + """ + + STATE_UNSPECIFIED = 0 + ACTIVE = 1 + INACTIVE = 2 + STALE = 3 + name: str = proto.Field( proto.STRING, number=1, ) + name_override: str = proto.Field( + proto.STRING, + number=13, + ) description: str = proto.Field( proto.STRING, number=2, @@ -120,6 +153,11 @@ class McpTool(proto.Message): proto.STRING, number=9, ) + state: State = proto.Field( + proto.ENUM, + number=12, + enum=State, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/mcp_toolset.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/mcp_toolset.py index c653e538cb51..60774ee1520f 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/mcp_toolset.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/mcp_toolset.py @@ -19,12 +19,14 @@ import proto # type: ignore -from google.cloud.ces_v1.types import auth, common +from google.cloud.ces_v1.types import auth, common, schema __protobuf__ = proto.module( package="google.cloud.ces.v1", manifest={ "McpToolset", + "McpToolOverride", + "McpToolDefinition", }, ) @@ -65,6 +67,12 @@ class McpToolset(proto.Message): the session variables. See https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection for more details. + tool_overrides (MutableSequence[google.cloud.ces_v1.types.McpToolOverride]): + Optional. Overrides for individual tools + within this toolset. This allows overriding + specific details like descriptions, names, or + pinning the tools' states so they aren't fully + dynamic. """ server_address: str = proto.Field( @@ -91,6 +99,89 @@ class McpToolset(proto.Message): proto.STRING, number=5, ) + tool_overrides: MutableSequence["McpToolOverride"] = proto.RepeatedField( + proto.MESSAGE, + number=6, + message="McpToolOverride", + ) + + +class McpToolOverride(proto.Message): + r"""Overrides associated with a given tool in a Toolset. + This enables "pinning" or "overriding" of tool definitions from + the external dynamic server. + + Attributes: + tool (str): + Required. The original name of the tool as it + is emitted by the MCP server. + name_override (str): + Optional. If present, this tool uses this + name in the Agent instead of the original name. + This is primarily used as an alias if the MCP + server offers poorly named tools. + description_override (str): + Optional. If present, this tool uses this + description instead of the original description + from the server. + snapshot (google.cloud.ces_v1.types.McpToolDefinition): + Output only. If present, this tool is + "Pinned" and uses the snapshot values as + fallbacks if the server becomes temporarily + unavailable or if no Override is present. + """ + + tool: str = proto.Field( + proto.STRING, + number=1, + ) + name_override: str = proto.Field( + proto.STRING, + number=2, + ) + description_override: str = proto.Field( + proto.STRING, + number=3, + ) + snapshot: "McpToolDefinition" = proto.Field( + proto.MESSAGE, + number=4, + message="McpToolDefinition", + ) + + +class McpToolDefinition(proto.Message): + r"""Container for a tool's core definition elements that are + snapshot. Schemas in the snapshot are used as-is and cannot be + overridden. + + Attributes: + description (str): + Output only. The description of the MCP tool. This can be + overridden by ``description_override`` in + ``McpToolOverride``. + input_schema (google.cloud.ces_v1.types.Schema): + Output only. The schema of the input + arguments of the MCP tool. + output_schema (google.cloud.ces_v1.types.Schema): + Output only. The schema of the output + arguments of the MCP tool. + """ + + description: str = proto.Field( + proto.STRING, + number=1, + ) + input_schema: schema.Schema = proto.Field( + proto.MESSAGE, + number=2, + message=schema.Schema, + ) + output_schema: schema.Schema = proto.Field( + proto.MESSAGE, + number=3, + message=schema.Schema, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/mocks.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/mocks.py new file mode 100644 index 000000000000..4ec31dc1c283 --- /dev/null +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/mocks.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8 -*- +# 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. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import proto # type: ignore + +from google.cloud.ces_v1.types import toolset_tool + +__protobuf__ = proto.module( + package="google.cloud.ces.v1", + manifest={ + "MockedToolCall", + }, +) + + +class MockedToolCall(proto.Message): + r"""A mocked tool call. + + Expresses the target tool + a pattern to match against that + tool's args / inputs. If the pattern matches, then the mock + response will be returned. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + tool_id (str): + Optional. The name of the tool to mock. Format: + ``projects/{project}/locations/{location}/apps/{app}/tools/{tool}`` + + This field is a member of `oneof`_ ``tool_identifier``. + toolset (google.cloud.ces_v1.types.ToolsetTool): + Optional. The toolset to mock. + + This field is a member of `oneof`_ ``tool_identifier``. + tool (str): + Optional. Deprecated. Use tool_identifier instead. + expected_args_pattern (google.protobuf.struct_pb2.Struct): + Required. A pattern to match against the args + / inputs of all dispatched tool calls. If the + tool call inputs match this pattern, then mock + output will be returned. + mock_response (google.protobuf.struct_pb2.Struct): + Optional. The mock response / output to + return if the tool call args / inputs match the + pattern. + """ + + tool_id: str = proto.Field( + proto.STRING, + number=4, + oneof="tool_identifier", + ) + toolset: toolset_tool.ToolsetTool = proto.Field( + proto.MESSAGE, + number=5, + oneof="tool_identifier", + message=toolset_tool.ToolsetTool, + ) + tool: str = proto.Field( + proto.STRING, + number=1, + ) + expected_args_pattern: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=2, + message=struct_pb2.Struct, + ) + mock_response: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=3, + message=struct_pb2.Struct, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/python_function.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/python_function.py index 8a133cb43766..3e026cb8370e 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/python_function.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/python_function.py @@ -19,6 +19,8 @@ import proto # type: ignore +from google.cloud.ces_v1.types import common + __protobuf__ = proto.module( package="google.cloud.ces.v1", manifest={ @@ -44,6 +46,9 @@ class PythonFunction(proto.Message): Output only. The description of the Python function, parsed from the python code's docstring. + service_directory_config (google.cloud.ces_v1.types.ServiceDirectoryConfig): + Optional. Service Directory configuration for + the tool. """ name: str = proto.Field( @@ -58,6 +63,11 @@ class PythonFunction(proto.Message): proto.STRING, number=3, ) + service_directory_config: common.ServiceDirectoryConfig = proto.Field( + proto.MESSAGE, + number=4, + message=common.ServiceDirectoryConfig, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/session_service.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/session_service.py index b91967e789f4..4728f31ad33e 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/session_service.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/session_service.py @@ -17,15 +17,17 @@ from typing import MutableMapping, MutableSequence +import google.protobuf.any_pb2 as any_pb2 # type: ignore import google.protobuf.struct_pb2 as struct_pb2 # type: ignore import proto # type: ignore -from google.cloud.ces_v1.types import common, example, search_suggestions +from google.cloud.ces_v1.types import common, example, mocks, search_suggestions __protobuf__ = proto.module( package="google.cloud.ces.v1", manifest={ "AudioEncoding", + "MockConfig", "InputAudioConfig", "OutputAudioConfig", "SessionConfig", @@ -69,6 +71,49 @@ class AudioEncoding(proto.Enum): ALAW = 3 +class MockConfig(proto.Message): + r"""Mock tool calls configuration for the session. + + Attributes: + mocked_tool_calls (MutableSequence[google.cloud.ces_v1.types.MockedToolCall]): + Optional. All tool calls to mock for the + duration of the session. + unmatched_tool_call_behavior (google.cloud.ces_v1.types.MockConfig.UnmatchedToolCallBehavior): + Required. Beavhior for tool calls that don't match any args + patterns in mocked_tool_calls. + """ + + class UnmatchedToolCallBehavior(proto.Enum): + r"""What to do when a tool call doesn't match any mocked tool + calls. + + Values: + UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED (0): + Default value. This value is unused. + FAIL (1): + Throw an error for any tool calls that don't + match a mock expected input pattern. + PASS_THROUGH (2): + For unmatched tool calls, pass the tool call + through to real tool. + """ + + UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED = 0 + FAIL = 1 + PASS_THROUGH = 2 + + mocked_tool_calls: MutableSequence[mocks.MockedToolCall] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=mocks.MockedToolCall, + ) + unmatched_tool_call_behavior: UnmatchedToolCallBehavior = proto.Field( + proto.ENUM, + number=2, + enum=UnmatchedToolCallBehavior, + ) + + class InputAudioConfig(proto.Message): r"""InputAudioConfig configures how the CES agent should interpret the incoming audio data. @@ -317,6 +362,9 @@ class CitedChunk(proto.Message): Title of the cited document. text (str): Text used for citation. + requires_attribution (bool): + Whether this citation requires attribution to + be shown to the end users. """ uri: str = proto.Field( @@ -331,6 +379,10 @@ class CitedChunk(proto.Message): proto.STRING, number=3, ) + requires_attribution: bool = proto.Field( + proto.BOOL, + number=4, + ) cited_chunks: MutableSequence[CitedChunk] = proto.RepeatedField( proto.MESSAGE, @@ -524,6 +576,9 @@ class SessionOutput(proto.Message): during the processing of the input. Only populated in the last SessionOutput (with ``turn_completed=true``) for each turn. + context (MutableSequence[google.protobuf.any_pb2.Any]): + Context messages for external supervision + guardrails. """ class DiagnosticInfo(proto.Message): @@ -604,6 +659,11 @@ class DiagnosticInfo(proto.Message): number=7, message=DiagnosticInfo, ) + context: MutableSequence[any_pb2.Any] = proto.RepeatedField( + proto.MESSAGE, + number=12, + message=any_pb2.Any, + ) class RecognitionResult(proto.Message): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/tool.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/tool.py index a854a39ecd37..5806e0f1e05a 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/tool.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/tool.py @@ -17,12 +17,13 @@ from typing import MutableMapping, MutableSequence +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore import proto # type: ignore +from google.cloud.ces_v1.types import agent_card, common, fakes from google.cloud.ces_v1.types import agent_tool as gcc_agent_tool from google.cloud.ces_v1.types import client_function as gcc_client_function -from google.cloud.ces_v1.types import common, fakes from google.cloud.ces_v1.types import connector_tool as gcc_connector_tool from google.cloud.ces_v1.types import data_store_tool as gcc_data_store_tool from google.cloud.ces_v1.types import file_search_tool as gcc_file_search_tool @@ -98,6 +99,10 @@ class Tool(proto.Message): widget_tool (google.cloud.ces_v1.types.WidgetTool): Optional. The widget tool. + This field is a member of `oneof`_ ``tool_type``. + remote_agent_tool (google.cloud.ces_v1.types.RemoteAgentTool): + Optional. The remote agent tool. + This field is a member of `oneof`_ ``tool_type``. name (str): Identifier. The resource name of the tool. Format: @@ -116,6 +121,10 @@ class Tool(proto.Message): ``name`` property. execution_type (google.cloud.ces_v1.types.ExecutionType): Optional. The execution type of the tool. + timeout (google.protobuf.duration_pb2.Duration): + Optional. The timeout for the tool execution. If not set, + the default timeout is 30 seconds for ``SYNCHRONOUS`` tools + and 60 seconds for ``ASYNCHRONOUS`` tools. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp when the tool was created. @@ -202,6 +211,12 @@ class Tool(proto.Message): oneof="tool_type", message=gcc_widget_tool.WidgetTool, ) + remote_agent_tool: agent_card.RemoteAgentTool = proto.Field( + proto.MESSAGE, + number=25, + oneof="tool_type", + message=agent_card.RemoteAgentTool, + ) name: str = proto.Field( proto.STRING, number=1, @@ -215,6 +230,11 @@ class Tool(proto.Message): number=12, enum=common.ExecutionType, ) + timeout: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=22, + message=duration_pb2.Duration, + ) create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=6, diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/tool_service.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/tool_service.py index c3636729995e..a32abe742c89 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/tool_service.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/tool_service.py @@ -20,7 +20,7 @@ import google.protobuf.struct_pb2 as struct_pb2 # type: ignore import proto # type: ignore -from google.cloud.ces_v1.types import schema +from google.cloud.ces_v1.types import schema, search_suggestions, session_service from google.cloud.ces_v1.types import tool as gcc_tool from google.cloud.ces_v1.types import toolset_tool as gcc_toolset_tool @@ -80,6 +80,11 @@ class ExecuteToolRequest(proto.Message): args (google.protobuf.struct_pb2.Struct): Optional. The input parameters and values for the tool in JSON object format. + mock_config (google.cloud.ces_v1.types.MockConfig): + Optional. Mock configuration for the tool + execution. If this field is set, tools that call + other tools will be mocked based on the provided + patterns and responses. """ tool: str = proto.Field( @@ -114,6 +119,11 @@ class ExecuteToolRequest(proto.Message): number=2, message=struct_pb2.Struct, ) + mock_config: session_service.MockConfig = proto.Field( + proto.MESSAGE, + number=7, + message=session_service.MockConfig, + ) class ExecuteToolResponse(proto.Message): @@ -147,6 +157,13 @@ class ExecuteToolResponse(proto.Message): variables (google.protobuf.struct_pb2.Struct): The variable values at the end of the tool execution. + citations (google.cloud.ces_v1.types.Citations): + Citations that provide the source information + for the tool's execution. + google_search_suggestions (google.cloud.ces_v1.types.GoogleSearchSuggestions): + The suggestions returned from Google Search + as a result of invoking the Google Search Tool + during the tool execution. """ tool: str = proto.Field( @@ -170,6 +187,16 @@ class ExecuteToolResponse(proto.Message): number=4, message=struct_pb2.Struct, ) + citations: session_service.Citations = proto.Field( + proto.MESSAGE, + number=5, + message=session_service.Citations, + ) + google_search_suggestions: search_suggestions.GoogleSearchSuggestions = proto.Field( + proto.MESSAGE, + number=6, + message=search_suggestions.GoogleSearchSuggestions, + ) class RetrieveToolSchemaRequest(proto.Message): @@ -284,6 +311,12 @@ class RetrieveToolsRequest(proto.Message): Optional. The identifiers of the tools to retrieve from the toolset. If empty, all tools in the toolset will be returned. + bypass_persistence_config (bool): + Optional. If true, the returned tools will + contain raw descriptions and schemas directly + from the server, bypassing any stored + persistence configurations + (overrides/snapshots). """ toolset: str = proto.Field( @@ -294,6 +327,10 @@ class RetrieveToolsRequest(proto.Message): proto.STRING, number=3, ) + bypass_persistence_config: bool = proto.Field( + proto.BOOL, + number=4, + ) class RetrieveToolsResponse(proto.Message): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/toolset.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/toolset.py index 3bf55bb29b56..cb9aa114f533 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/toolset.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/toolset.py @@ -17,6 +17,7 @@ from typing import MutableMapping, MutableSequence +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore import proto # type: ignore @@ -68,6 +69,10 @@ class Toolset(proto.Message): Must be unique within the same app. description (str): Optional. The description of the toolset. + timeout (google.protobuf.duration_pb2.Duration): + Optional. The timeout for the toolset execution. If not set, + the default timeout is 30 seconds for ``SYNCHRONOUS`` + toolsets and 60 seconds for ``ASYNCHRONOUS`` toolsets. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp when the toolset was created. @@ -117,6 +122,11 @@ class Toolset(proto.Message): proto.STRING, number=10, ) + timeout: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=12, + message=duration_pb2.Duration, + ) create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, diff --git a/packages/google-cloud-ces/google/cloud/ces_v1/types/widget_tool.py b/packages/google-cloud-ces/google/cloud/ces_v1/types/widget_tool.py index cc7cbf37907e..5d4de00cd6e0 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1/types/widget_tool.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1/types/widget_tool.py @@ -62,6 +62,9 @@ class WidgetTool(proto.Message): Optional. The mapping that defines how data from a source tool is mapped to the widget's input parameters. + text_response_config (google.cloud.ces_v1.types.WidgetTool.TextResponseConfig): + Optional. Configuration for always-included + text responses. """ class WidgetType(proto.Enum): @@ -111,6 +114,59 @@ class WidgetType(proto.Enum): APPOINTMENT_SCHEDULER = 11 CONTACT_FORM = 12 + class TextResponseConfig(proto.Message): + r"""Configuration for the text response returned with the widget. + + Attributes: + type_ (google.cloud.ces_v1.types.WidgetTool.TextResponseConfig.Type): + Optional. The strategy for providing the text + response. + static_text (str): + Optional. The static text response to return + when type is STATIC. + text_response_instruction (str): + Optional. Instruction for the LLM on how to generate the + text response. Used as the description for the text response + parameter if type is LLM_GENERATED. + """ + + class Type(proto.Enum): + r"""Defines how the text response is produced. + + Values: + TYPE_UNSPECIFIED (0): + Unspecified type. + NONE (1): + The LLM dynamically decides whether to + generate a text response alongside the widget + based on the conversation context. + LLM_GENERATED (2): + The LLM is explicitly required to generate a + text response. + STATIC (3): + A pre-defined static text response is always + used. + """ + + TYPE_UNSPECIFIED = 0 + NONE = 1 + LLM_GENERATED = 2 + STATIC = 3 + + type_: "WidgetTool.TextResponseConfig.Type" = proto.Field( + proto.ENUM, + number=1, + enum="WidgetTool.TextResponseConfig.Type", + ) + static_text: str = proto.Field( + proto.STRING, + number=2, + ) + text_response_instruction: str = proto.Field( + proto.STRING, + number=3, + ) + class DataMapping(proto.Message): r"""Configuration for mapping data from a source tool to the widget's input parameters. @@ -205,6 +261,11 @@ class Mode(proto.Enum): number=6, message=DataMapping, ) + text_response_config: TextResponseConfig = proto.Field( + proto.MESSAGE, + number=7, + message=TextResponseConfig, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/__init__.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/__init__.py index a1e1f7c5b676..63de93ea8bd4 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/__init__.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/__init__.py @@ -23,6 +23,68 @@ from importlib import metadata +# PEP 0810: Explicit Lazy Imports +# Python 3.15+ natively intercepts and defers these imports. +# Developers can disable this behavior and force eager imports. +# For more information, see: +# https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter +# Older Python versions safely ignore this variable. +__lazy_modules__ = { + "google.cloud.ces_v1beta.services.agent_service", + "google.cloud.ces_v1beta.services.evaluation_service", + "google.cloud.ces_v1beta.services.session_service", + "google.cloud.ces_v1beta.services.tool_service", + "google.cloud.ces_v1beta.services.widget_service", + "google.cloud.ces_v1beta.types.agent", + "google.cloud.ces_v1beta.types.agent_card", + "google.cloud.ces_v1beta.types.agent_service", + "google.cloud.ces_v1beta.types.agent_tool", + "google.cloud.ces_v1beta.types.agent_transfers", + "google.cloud.ces_v1beta.types.app", + "google.cloud.ces_v1beta.types.app_version", + "google.cloud.ces_v1beta.types.auth", + "google.cloud.ces_v1beta.types.bigquery_export", + "google.cloud.ces_v1beta.types.changelog", + "google.cloud.ces_v1beta.types.client_function", + "google.cloud.ces_v1beta.types.common", + "google.cloud.ces_v1beta.types.connector_tool", + "google.cloud.ces_v1beta.types.connector_toolset", + "google.cloud.ces_v1beta.types.conversation", + "google.cloud.ces_v1beta.types.data_store", + "google.cloud.ces_v1beta.types.data_store_tool", + "google.cloud.ces_v1beta.types.deployment", + "google.cloud.ces_v1beta.types.evaluation", + "google.cloud.ces_v1beta.types.evaluation_metrics_config", + "google.cloud.ces_v1beta.types.evaluation_service", + "google.cloud.ces_v1beta.types.example", + "google.cloud.ces_v1beta.types.fakes", + "google.cloud.ces_v1beta.types.file_context", + "google.cloud.ces_v1beta.types.file_search_tool", + "google.cloud.ces_v1beta.types.golden_run", + "google.cloud.ces_v1beta.types.google_search_tool", + "google.cloud.ces_v1beta.types.guardrail", + "google.cloud.ces_v1beta.types.mcp_tool", + "google.cloud.ces_v1beta.types.mcp_toolset", + "google.cloud.ces_v1beta.types.mocks", + "google.cloud.ces_v1beta.types.omnichannel", + "google.cloud.ces_v1beta.types.omnichannel_service", + "google.cloud.ces_v1beta.types.open_api_tool", + "google.cloud.ces_v1beta.types.open_api_toolset", + "google.cloud.ces_v1beta.types.python_function", + "google.cloud.ces_v1beta.types.schema", + "google.cloud.ces_v1beta.types.search_suggestions", + "google.cloud.ces_v1beta.types.security_settings", + "google.cloud.ces_v1beta.types.session_service", + "google.cloud.ces_v1beta.types.system_tool", + "google.cloud.ces_v1beta.types.tool", + "google.cloud.ces_v1beta.types.tool_service", + "google.cloud.ces_v1beta.types.toolset", + "google.cloud.ces_v1beta.types.toolset_tool", + "google.cloud.ces_v1beta.types.widget_service", + "google.cloud.ces_v1beta.types.widget_tool", +} + + from .services.agent_service import AgentServiceAsyncClient, AgentServiceClient from .services.evaluation_service import ( EvaluationServiceAsyncClient, @@ -148,6 +210,7 @@ from .types.common import ( Callback, ChannelProfile, + EvaluationRunCachingSettings, ExecutionType, ModelSettings, ServiceDirectoryConfig, @@ -160,7 +223,12 @@ from .types.conversation import Conversation from .types.data_store import DataStore from .types.data_store_tool import DataStoreTool -from .types.deployment import Deployment, ExperimentConfig +from .types.deployment import ( + Deployment, + ExperimentConfig, + InstagramCredentials, + WhatsAppCredentials, +) from .types.evaluation import ( AggregatedMetrics, Evaluation, @@ -472,6 +540,7 @@ def _get_version(dependency_name): "EvaluationPersona", "EvaluationResult", "EvaluationRun", + "EvaluationRunCachingSettings", "EvaluationServiceClient", "EvaluationSettings", "EvaluationToolCallBehaviour", @@ -531,6 +600,7 @@ def _get_version(dependency_name): "ImportEvaluationsRequest", "ImportEvaluationsResponse", "InputAudioConfig", + "InstagramCredentials", "InterruptionSignal", "LanguageSettings", "LatencyReport", @@ -650,6 +720,7 @@ def _get_version(dependency_name): "UploadEvaluationAudioResponse", "VpcScSettings", "WebSearchQuery", + "WhatsAppCredentials", "WidgetServiceClient", "WidgetTool", ) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/async_client.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/async_client.py index e6c75d744c9a..47403f8dc673 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/async_client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/async_client.py @@ -7002,9 +7002,7 @@ async def __aexit__(self, exc_type, exc, tb): DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("AgentServiceAsyncClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/client.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/client.py index f597780f2eb3..2b16b0197e25 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/client.py @@ -7767,8 +7767,6 @@ def list_locations( DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("AgentServiceClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/transports/base.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/transports/base.py index d66090c048b4..9dfc74f16ef5 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/transports/base.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/transports/base.py @@ -56,9 +56,7 @@ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class AgentServiceTransport(abc.ABC): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/transports/rest.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/transports/rest.py index eccc6e55a7ed..09543090b056 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/transports/rest.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/agent_service/transports/rest.py @@ -78,8 +78,7 @@ rest_version=f"requests@{requests_version}", ) -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class AgentServiceRestInterceptor: diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/async_client.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/async_client.py index 01b63e1822eb..0d7a6e4a4be0 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/async_client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/async_client.py @@ -5114,9 +5114,7 @@ async def __aexit__(self, exc_type, exc, tb): DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("EvaluationServiceAsyncClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/client.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/client.py index dfd9aa0e4880..8e72e04910c4 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/client.py @@ -5765,8 +5765,6 @@ def list_locations( DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("EvaluationServiceClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/transports/base.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/transports/base.py index 36d84279a696..79371be6ef37 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/transports/base.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/transports/base.py @@ -35,9 +35,7 @@ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class EvaluationServiceTransport(abc.ABC): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/transports/rest.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/transports/rest.py index 11f9cbdd0b05..e19edfb21785 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/transports/rest.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/evaluation_service/transports/rest.py @@ -57,8 +57,7 @@ rest_version=f"requests@{requests_version}", ) -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class EvaluationServiceRestInterceptor: diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/async_client.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/async_client.py index 4e3e7030aac6..35a56a9e8b45 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/async_client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/async_client.py @@ -646,6 +646,13 @@ def request_generator(): self._client._transport.bidi_run_session ] + header_params: dict[str, str] = {} + + if header_params: + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata(header_params), + ) + # Validate the universe domain. self._client._validate_universe_domain() @@ -1025,9 +1032,7 @@ async def __aexit__(self, exc_type, exc, tb): DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("SessionServiceAsyncClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/client.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/client.py index c6a663556892..69d19289e170 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/client.py @@ -1141,6 +1141,13 @@ def request_generator(): # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.bidi_run_session] + header_params: dict[str, str] = {} + + if header_params: + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata(header_params), + ) + # Validate the universe domain. self._validate_universe_domain() @@ -1543,8 +1550,6 @@ def list_locations( DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("SessionServiceClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/transports/base.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/transports/base.py index b90e13ae92b5..f8b593ce678e 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/transports/base.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/transports/base.py @@ -33,9 +33,7 @@ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class SessionServiceTransport(abc.ABC): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/transports/rest.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/transports/rest.py index b3abe59d3fb7..ee613f46de51 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/transports/rest.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/session_service/transports/rest.py @@ -55,8 +55,7 @@ rest_version=f"requests@{requests_version}", ) -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class SessionServiceRestInterceptor: diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/async_client.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/async_client.py index 667765374183..0bfa27ab8b0a 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/async_client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/async_client.py @@ -938,9 +938,7 @@ async def __aexit__(self, exc_type, exc, tb): DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("ToolServiceAsyncClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/client.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/client.py index 628bb214109e..e352fda9c04b 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/client.py @@ -1498,8 +1498,6 @@ def list_locations( DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("ToolServiceClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/transports/base.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/transports/base.py index b0550a8b7ada..01646ac086ec 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/transports/base.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/transports/base.py @@ -33,9 +33,7 @@ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class ToolServiceTransport(abc.ABC): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/transports/rest.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/transports/rest.py index e26b5b9bfc12..5650b03fdbcd 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/transports/rest.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/tool_service/transports/rest.py @@ -55,8 +55,7 @@ rest_version=f"requests@{requests_version}", ) -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class ToolServiceRestInterceptor: diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/async_client.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/async_client.py index e8418cab983c..5d5d58192996 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/async_client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/async_client.py @@ -751,9 +751,7 @@ async def __aexit__(self, exc_type, exc, tb): DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("WidgetServiceAsyncClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/client.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/client.py index 51f0e7693ae1..f6f9ad347194 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/client.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/client.py @@ -1230,8 +1230,6 @@ def list_locations( DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ __all__ = ("WidgetServiceClient",) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/transports/base.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/transports/base.py index c0b9a6e2696b..1d32c9c0b383 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/transports/base.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/transports/base.py @@ -33,9 +33,7 @@ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=package_version.__version__ ) - -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class WidgetServiceTransport(abc.ABC): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/transports/rest.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/transports/rest.py index b85f5ea98b83..6fde29619e62 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/transports/rest.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/services/widget_service/transports/rest.py @@ -55,8 +55,7 @@ rest_version=f"requests@{requests_version}", ) -if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER - DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ +DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ class WidgetServiceRestInterceptor: diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/__init__.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/__init__.py index 9be98ff2c10b..5e8a6f8cbd0f 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/__init__.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/__init__.py @@ -148,6 +148,7 @@ from .common import ( Callback, ChannelProfile, + EvaluationRunCachingSettings, ExecutionType, ModelSettings, ServiceDirectoryConfig, @@ -174,6 +175,8 @@ from .deployment import ( Deployment, ExperimentConfig, + InstagramCredentials, + WhatsAppCredentials, ) from .evaluation import ( AggregatedMetrics, @@ -481,6 +484,7 @@ "ClientFunction", "Callback", "ChannelProfile", + "EvaluationRunCachingSettings", "ModelSettings", "ServiceDirectoryConfig", "Span", @@ -495,6 +499,8 @@ "DataStoreTool", "Deployment", "ExperimentConfig", + "InstagramCredentials", + "WhatsAppCredentials", "AggregatedMetrics", "Evaluation", "EvaluationConfig", diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/agent_service.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/agent_service.py index 035e75b78496..747073c49d9c 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/agent_service.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/agent_service.py @@ -2399,12 +2399,38 @@ class QualityReportGenerationConfig(proto.Message): evaluation_run (str): Required. The evaluation run used to inform quality report analysis. + algorithm (google.cloud.ces_v1beta.types.GenerateAppResourceRequest.QualityReportGenerationConfig.LossAttributionAlgorithm): + Optional. The loss attribution algorithm to + use. """ + class LossAttributionAlgorithm(proto.Enum): + r"""The algorithm to use for loss attribution. + + Values: + LOSS_ATTRIBUTION_ALGORITHM_UNSPECIFIED (0): + Unspecified. + APP_CENTRIC (1): + App-centric loss attribution. Treats the app + as a single unit. + AGENT_CENTRIC (2): + Agent-centric loss attribution. Attributes + loss to individual agents. + """ + + LOSS_ATTRIBUTION_ALGORITHM_UNSPECIFIED = 0 + APP_CENTRIC = 1 + AGENT_CENTRIC = 2 + evaluation_run: str = proto.Field( proto.STRING, number=1, ) + algorithm: "GenerateAppResourceRequest.QualityReportGenerationConfig.LossAttributionAlgorithm" = proto.Field( + proto.ENUM, + number=2, + enum="GenerateAppResourceRequest.QualityReportGenerationConfig.LossAttributionAlgorithm", + ) class HillClimbingFixConfig(proto.Message): r"""The configuration to be used for hill climbing fixes. diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/app.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/app.py index ec727c8d5608..96f63b85aa38 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/app.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/app.py @@ -589,13 +589,13 @@ class BargeInConfig(proto.Message): Attributes: disable_barge_in (bool): - Optional. Disables user barge-in while the agent is - speaking. If true, user input during agent response playback - will be ignored. - - Deprecated: ``disable_barge_in`` is deprecated in favor of + Optional. Deprecated: ``disable_barge_in`` is deprecated in + favor of [``disable_barge_in_control``][google.cloud.ces.v1beta.ChannelProfile.disable_barge_in_control] in ChannelProfile. + + Disables user barge-in while the agent is speaking. If true, + user input during agent response playback will be ignored. barge_in_awareness (bool): Optional. If enabled, the agent will adapt its next response based on the assumption that @@ -628,21 +628,51 @@ class SynthesizeSpeechConfig(proto.Message): voices and languages `__ from Cloud Text-to-Speech. + voice_sample_gcs_uri (str): + Optional. The Cloud Storage URI to the audio sample for + voice cloning. The audio sample should be a mono-channel, + 24kHz WAV file. + + Note: Please make sure the CES service agent + ``service-@gcp-sa-ces.iam.gserviceaccount.com`` + has ``storage.objects.get`` permission to the Cloud Storage + object. speaking_rate (float): Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will return an error. + model (str): + Optional. The model used to synthesize audio. + Currently supported values: + + - "gemini-3.1-flash-tts-preview" + If empty, Chirp3-HD is used. + instruction (str): + Optional. The instruction used to synthesize + speech when using a generative model. """ voice: str = proto.Field( proto.STRING, number=1, ) + voice_sample_gcs_uri: str = proto.Field( + proto.STRING, + number=3, + ) speaking_rate: float = proto.Field( proto.DOUBLE, number=2, ) + model: str = proto.Field( + proto.STRING, + number=4, + ) + instruction: str = proto.Field( + proto.STRING, + number=5, + ) class MetricAnalysisSettings(proto.Message): @@ -686,6 +716,11 @@ class LoggingSettings(proto.Message): app. The conversation data is subject to redaction as configured in [RedactionConfig][google.cloud.ces.v1beta.LoggingSettings.redaction_config]. + unredacted_bigquery_export_settings (google.cloud.ces_v1beta.types.BigQueryExportSettings): + Optional. Configures the BigQuery export + behaviors for the app. The unredacted + conversation data will be exported to BigQuery + tables if it is enabled. cloud_logging_settings (google.cloud.ces_v1beta.types.CloudLoggingSettings): Optional. Settings to describe the Cloud Logging behaviors for the app. @@ -723,6 +758,13 @@ class LoggingSettings(proto.Message): number=3, message=bigquery_export.BigQueryExportSettings, ) + unredacted_bigquery_export_settings: bigquery_export.BigQueryExportSettings = ( + proto.Field( + proto.MESSAGE, + number=9, + message=bigquery_export.BigQueryExportSettings, + ) + ) cloud_logging_settings: "CloudLoggingSettings" = proto.Field( proto.MESSAGE, number=4, @@ -1080,6 +1122,9 @@ class EvaluationSettings(proto.Message): scenario_execution_mode (google.cloud.ces_v1beta.types.EvaluationSettings.ScenarioExecutionMode): Optional. The execution mode for scenario evaluations. If not provided, will default to QUALITY_OPTIMIZED. + evaluation_run_caching_settings (google.cloud.ces_v1beta.types.EvaluationRunCachingSettings): + Optional. The caching settings to use for the + evaluation run. """ class ScenarioConversationInitiator(proto.Enum): @@ -1149,6 +1194,11 @@ class ScenarioExecutionMode(proto.Enum): number=6, enum=ScenarioExecutionMode, ) + evaluation_run_caching_settings: common.EvaluationRunCachingSettings = proto.Field( + proto.MESSAGE, + number=7, + message=common.EvaluationRunCachingSettings, + ) class ClientCertificateSettings(proto.Message): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/common.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/common.py index 0dd6638b2648..f50cc1801f50 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/common.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/common.py @@ -33,6 +33,7 @@ "ServiceDirectoryConfig", "ChannelProfile", "Span", + "EvaluationRunCachingSettings", }, ) @@ -354,6 +355,12 @@ class ChannelProfile(proto.Message): Optional. The noise suppression level of the channel profile. Available values are "low", "moderate", "high", "very_high". + whatsapp_config (google.cloud.ces_v1beta.types.ChannelProfile.WhatsAppConfig): + Optional. Configuration specific to WhatsApp + deployments. + instagram_config (google.cloud.ces_v1beta.types.ChannelProfile.InstagramConfig): + Optional. Configuration specific to Instagram + deployments. """ class ChannelType(proto.Enum): @@ -372,11 +379,18 @@ class ChannelType(proto.Enum): Google Telephony Platform channel. CONTACT_CENTER_AS_A_SERVICE (6): Contact Center as a Service (CCaaS) channel. + CONTACT_CENTER_AS_A_SERVICE_CHAT (11): + Contact Center as a Service (CCaaS Chat) + channel. FIVE9 (7): Five9 channel. CONTACT_CENTER_INTEGRATION (8): Third party contact center integration channel. + WHATSAPP (9): + WhatsApp channel. + INSTAGRAM (10): + Instagram channel. """ UNKNOWN = 0 @@ -385,8 +399,11 @@ class ChannelType(proto.Enum): TWILIO = 4 GOOGLE_TELEPHONY_PLATFORM = 5 CONTACT_CENTER_AS_A_SERVICE = 6 + CONTACT_CENTER_AS_A_SERVICE_CHAT = 11 FIVE9 = 7 CONTACT_CENTER_INTEGRATION = 8 + WHATSAPP = 9 + INSTAGRAM = 10 class PersonaProperty(proto.Message): r"""Represents the persona property of a channel. @@ -539,6 +556,86 @@ class SecuritySettings(proto.Message): ) ) + class WhatsAppConfig(proto.Message): + r"""Configuration specific to WhatsApp deployments. + + Attributes: + waba_id (str): + Required. The WhatsApp Business Account ID. + phone_number_id (str): + Required. The Meta phone number ID. + phone_number (str): + Optional. The phone number in E.164 format. + display_name (str): + Output only. The fetched Meta business page + name. + thumbnail_url (str): + Output only. The fetched Meta business + profile thumbnail URL. + description (str): + Output only. The description of the Meta + business page or profile. + """ + + waba_id: str = proto.Field( + proto.STRING, + number=1, + ) + phone_number_id: str = proto.Field( + proto.STRING, + number=2, + ) + phone_number: str = proto.Field( + proto.STRING, + number=3, + ) + display_name: str = proto.Field( + proto.STRING, + number=4, + ) + thumbnail_url: str = proto.Field( + proto.STRING, + number=5, + ) + description: str = proto.Field( + proto.STRING, + number=6, + ) + + class InstagramConfig(proto.Message): + r"""Configuration specific to Instagram deployments. + + Attributes: + instagram_account_id (str): + Required. The Instagram Account ID. + display_name (str): + Output only. The fetched Meta business page + name. + thumbnail_url (str): + Output only. The fetched Meta business + profile thumbnail URL. + description (str): + Output only. The description of the Meta + business page or profile. + """ + + instagram_account_id: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + thumbnail_url: str = proto.Field( + proto.STRING, + number=3, + ) + description: str = proto.Field( + proto.STRING, + number=4, + ) + profile_id: str = proto.Field( proto.STRING, number=1, @@ -570,6 +667,16 @@ class SecuritySettings(proto.Message): proto.STRING, number=8, ) + whatsapp_config: WhatsAppConfig = proto.Field( + proto.MESSAGE, + number=9, + message=WhatsAppConfig, + ) + instagram_config: InstagramConfig = proto.Field( + proto.MESSAGE, + number=10, + message=InstagramConfig, + ) class Span(proto.Message): @@ -624,4 +731,41 @@ class Span(proto.Message): ) +class EvaluationRunCachingSettings(proto.Message): + r"""Settings for evaluation run caching. + + Attributes: + run_caching_mode (google.cloud.ces_v1beta.types.EvaluationRunCachingSettings.EvaluationRunCachingMode): + Optional. The caching mode to use for the evaluation run. If + not set, default to FORCE_RUN. + """ + + class EvaluationRunCachingMode(proto.Enum): + r"""The evaluation result caching behavior. Controls whether to + return the last completed evaluation result (if existing) or to + execute a new evaluation. + + Values: + EVALUATION_RUN_CACHING_MODE_UNSPECIFIED (0): + The run caching mode is unspecified. + FORCE_RUN (1): + Always execute a full live simulation + regardless of whether changelogs exist. + SKIP_IF_UNCHANGED (2): + Skip execution and copy previous verified + results if no dependencies have mutated, the + evaluation channel/run method are the same. + """ + + EVALUATION_RUN_CACHING_MODE_UNSPECIFIED = 0 + FORCE_RUN = 1 + SKIP_IF_UNCHANGED = 2 + + run_caching_mode: EvaluationRunCachingMode = proto.Field( + proto.ENUM, + number=1, + enum=EvaluationRunCachingMode, + ) + + __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/deployment.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/deployment.py index 4cedd0b6c297..5ea183e92ee6 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/deployment.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/deployment.py @@ -27,6 +27,8 @@ manifest={ "ExperimentConfig", "Deployment", + "WhatsAppCredentials", + "InstagramCredentials", }, ) @@ -46,17 +48,14 @@ class State(proto.Enum): STATE_UNSPECIFIED (0): Unspecified state. PENDING (1): - Pending state. Experiment is pending and not - valid. + Deprecated: This state is no longer used. RUNNING (2): Running state. Experiment is running and valid. DONE (3): - Done state. Experiment is done and no longer - valid. + Deprecated: This state is no longer used. EXPIRED (4): - Expired state. Experiment is expired and no - longer valid. + Deprecated: This state is no longer used. """ STATE_UNSPECIFIED = 0 @@ -159,6 +158,14 @@ class Deployment(proto.Message): experiment_config (google.cloud.ces_v1beta.types.ExperimentConfig): Optional. Experiment configuration for the deployment. + whatsapp_credentials (google.cloud.ces_v1beta.types.WhatsAppCredentials): + Optional. Input only. Ephemeral WhatsApp + credentials required when configuring a WhatsApp + channel profile. + instagram_credentials (google.cloud.ces_v1beta.types.InstagramCredentials): + Optional. Input only. Ephemeral Instagram + credentials required when configuring a + Instagram channel profile. """ name: str = proto.Field( @@ -197,6 +204,87 @@ class Deployment(proto.Message): number=9, message="ExperimentConfig", ) + whatsapp_credentials: "WhatsAppCredentials" = proto.Field( + proto.MESSAGE, + number=10, + message="WhatsAppCredentials", + ) + instagram_credentials: "InstagramCredentials" = proto.Field( + proto.MESSAGE, + number=11, + message="InstagramCredentials", + ) + + +class WhatsAppCredentials(proto.Message): + r"""Ephemeral Meta credentials for WhatsApp native integration. + + Attributes: + auth_code (str): + Required. The Meta auth code provided by the + embedded signup flow. + pin (str): + Required. The 6-digit PIN created by the user + for two-step verification. + phone_number (str): + Required. The phone number to register with + WhatsApp. + business_account_id (str): + Required. The Business Account ID to use for + the phone number. + waba_id (str): + Required. The WhatsApp Business Account ID. + conversation_profile_id (str): + Required. The Conversation Profile ID to use + for the deployment. + """ + + auth_code: str = proto.Field( + proto.STRING, + number=1, + ) + pin: str = proto.Field( + proto.STRING, + number=2, + ) + phone_number: str = proto.Field( + proto.STRING, + number=3, + ) + business_account_id: str = proto.Field( + proto.STRING, + number=4, + ) + waba_id: str = proto.Field( + proto.STRING, + number=5, + ) + conversation_profile_id: str = proto.Field( + proto.STRING, + number=6, + ) + + +class InstagramCredentials(proto.Message): + r"""Ephemeral Meta credentials for Instagram native integration. + + Attributes: + auth_code (str): + Required. The Meta auth code provided by the + embedded signup flow. + conversation_profile_id (str): + Required. The Conversation Profile ID to use + for the deployment. + """ + + auth_code: str = proto.Field( + proto.STRING, + number=1, + ) + conversation_profile_id: str = proto.Field( + proto.STRING, + number=2, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/evaluation.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/evaluation.py index 09894264d3b1..6e39545ee621 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/evaluation.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/evaluation.py @@ -2957,6 +2957,9 @@ class RunEvaluationRequest(proto.Message): generate_latency_report (bool): Optional. Whether to generate a latency report for the evaluation run. + evaluation_run_caching_settings (google.cloud.ces_v1beta.types.EvaluationRunCachingSettings): + Optional. The caching settings to use for the + evaluation run. """ app: str = proto.Field( @@ -3012,6 +3015,11 @@ class RunEvaluationRequest(proto.Message): proto.BOOL, number=14, ) + evaluation_run_caching_settings: common.EvaluationRunCachingSettings = proto.Field( + proto.MESSAGE, + number=15, + message=common.EvaluationRunCachingSettings, + ) class ScheduledEvaluationRun(proto.Message): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/evaluation_service.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/evaluation_service.py index 3a8f57b0d4a8..7f0ef776d39a 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/evaluation_service.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/evaluation_service.py @@ -254,8 +254,27 @@ class GenerateEvaluationRequest(proto.Message): Optional. Indicate the source of the conversation. If not set, all sources will be searched. + evaluation_type (google.cloud.ces_v1beta.types.GenerateEvaluationRequest.EvaluationType): + Optional. The type of evaluation to generate. + Defaults to GOLDEN if unspecified. """ + class EvaluationType(proto.Enum): + r"""The type of evaluation to generate. + + Values: + EVALUATION_TYPE_UNSPECIFIED (0): + Unspecified type. Defaults to GOLDEN. + GOLDEN (1): + Golden evaluation. + SCENARIO (2): + Scenario evaluation. + """ + + EVALUATION_TYPE_UNSPECIFIED = 0 + GOLDEN = 1 + SCENARIO = 2 + conversation: str = proto.Field( proto.STRING, number=1, @@ -265,6 +284,11 @@ class GenerateEvaluationRequest(proto.Message): number=2, enum=gcc_conversation.Conversation.Source, ) + evaluation_type: EvaluationType = proto.Field( + proto.ENUM, + number=3, + enum=EvaluationType, + ) class ImportEvaluationsRequest(proto.Message): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/session_service.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/session_service.py index bf4214dcd939..c6c8e0e78697 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/session_service.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/session_service.py @@ -17,6 +17,7 @@ from typing import MutableMapping, MutableSequence +import google.protobuf.any_pb2 as any_pb2 # type: ignore import google.protobuf.struct_pb2 as struct_pb2 # type: ignore import proto # type: ignore @@ -575,6 +576,9 @@ class SessionOutput(proto.Message): during the processing of the input. Only populated in the last SessionOutput (with ``turn_completed=true``) for each turn. + context (MutableSequence[google.protobuf.any_pb2.Any]): + Context messages for external supervision + guardrails. """ class DiagnosticInfo(proto.Message): @@ -655,6 +659,11 @@ class DiagnosticInfo(proto.Message): number=7, message=DiagnosticInfo, ) + context: MutableSequence[any_pb2.Any] = proto.RepeatedField( + proto.MESSAGE, + number=12, + message=any_pb2.Any, + ) class RecognitionResult(proto.Message): diff --git a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/toolset.py b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/toolset.py index f78f89489543..927be994ea69 100644 --- a/packages/google-cloud-ces/google/cloud/ces_v1beta/types/toolset.py +++ b/packages/google-cloud-ces/google/cloud/ces_v1beta/types/toolset.py @@ -17,6 +17,7 @@ from typing import MutableMapping, MutableSequence +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore import proto # type: ignore @@ -68,6 +69,10 @@ class Toolset(proto.Message): Must be unique within the same app. description (str): Optional. The description of the toolset. + timeout (google.protobuf.duration_pb2.Duration): + Optional. The timeout for the toolset execution. If not set, + the default timeout is 30 seconds for ``SYNCHRONOUS`` + toolsets and 60 seconds for ``ASYNCHRONOUS`` toolsets. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Timestamp when the toolset was created. @@ -117,6 +122,11 @@ class Toolset(proto.Message): proto.STRING, number=10, ) + timeout: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=12, + message=duration_pb2.Duration, + ) create_time: timestamp_pb2.Timestamp = proto.Field( proto.MESSAGE, number=3, diff --git a/packages/google-cloud-ces/mypy.ini b/packages/google-cloud-ces/mypy.ini deleted file mode 100644 index e0e0da2e9e40..000000000000 --- a/packages/google-cloud-ces/mypy.ini +++ /dev/null @@ -1,15 +0,0 @@ -[mypy] -python_version = 3.14 -namespace_packages = True -ignore_missing_imports = False - -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563): -# Dependencies that historically lacks py.typed markers -[mypy-google.iam.*] -ignore_missing_imports = True - -# Helps mypy navigate the 'google' namespace more reliably in 3.10+ -explicit_package_bases = True - -# Performance: reuse results from previous runs to speed up 'nox' -incremental = True diff --git a/packages/google-cloud-ces/noxfile.py b/packages/google-cloud-ces/noxfile.py index e52903354c45..8ec5c36d350f 100644 --- a/packages/google-cloud-ces/noxfile.py +++ b/packages/google-cloud-ces/noxfile.py @@ -36,16 +36,24 @@ "3.12", "3.13", "3.14", + "3.15", ] DEFAULT_PYTHON_VERSION = "3.14" -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): -# Switch this to Python 3.15 alpha1 -# https://peps.python.org/pep-0790/ -PREVIEW_PYTHON_VERSION = "3.14" +PREVIEW_PYTHON_VERSION = "3.15" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() +# Path to the centralized mypy configuration file at the repository root. +# Search upwards to support running nox from both monorepo packages and integration test goldens. +MYPY_CONFIG_FILE = next( + ( + str(p / "mypy.ini") + for p in CURRENT_DIRECTORY.parents + if (p / "mypy.ini").exists() + ), + str(CURRENT_DIRECTORY.parent.parent / "mypy.ini"), +) if (CURRENT_DIRECTORY / "testing").exists(): LOWER_BOUND_CONSTRAINTS_FILE = ( @@ -107,6 +115,7 @@ def mypy(session): session.install(".") session.run( "mypy", + f"--config-file={MYPY_CONFIG_FILE}", "-p", "google", "--check-untyped-defs", @@ -566,7 +575,7 @@ def prerelease_deps(session, protobuf_implementation): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/google-cloud-ces/setup.py b/packages/google-cloud-ces/setup.py index ae05fd05f157..5f389ddbd9be 100644 --- a/packages/google-cloud-ces/setup.py +++ b/packages/google-cloud-ces/setup.py @@ -42,7 +42,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.24.2, <3.0.0", + "google-api-core[grpc] >= 2.25.0, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", diff --git a/packages/google-cloud-ces/testing/constraints-3.10.txt b/packages/google-cloud-ces/testing/constraints-3.10.txt index 81605a716d32..d9d1cb25e696 100644 --- a/packages/google-cloud-ces/testing/constraints-3.10.txt +++ b/packages/google-cloud-ces/testing/constraints-3.10.txt @@ -4,7 +4,7 @@ # pinning their versions to their lower bounds. # For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", # then this file should have google-cloud-foo==1.14.0 -google-api-core==2.24.2 +google-api-core==2.25.0 google-auth==2.14.1 grpcio==1.59.0 proto-plus==1.26.1 diff --git a/packages/google-cloud-ces/testing/constraints-3.15.txt b/packages/google-cloud-ces/testing/constraints-3.15.txt new file mode 100644 index 000000000000..6bd7e1f5b03d --- /dev/null +++ b/packages/google-cloud-ces/testing/constraints-3.15.txt @@ -0,0 +1,12 @@ +# We use the constraints file for the latest Python version +# (currently this file) to check that the latest +# major versions of dependencies are supported in setup.py. +# List all library dependencies and extras in this file. +# Require the latest major version be installed for each dependency. +# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# Then this file should have google-cloud-foo>=1 +google-api-core>=2 +google-auth>=2 +grpcio>=1 +proto-plus>=1 +protobuf>=7 diff --git a/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_agent_service.py b/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_agent_service.py index dee5b0d37f20..c422bc6e5364 100644 --- a/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_agent_service.py +++ b/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_agent_service.py @@ -71,6 +71,7 @@ ) from google.cloud.ces_v1.types import ( agent, + agent_card, agent_service, agent_tool, agent_transfers, @@ -990,7 +991,14 @@ def test_agent_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): @@ -1037,7 +1045,14 @@ def test_agent_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): @@ -1737,6 +1752,9 @@ def test_list_apps_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, app.App) for i in results) @@ -1825,6 +1843,8 @@ async def test_list_apps_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -1910,6 +1930,7 @@ def test_get_app(request_type, transport: str = "grpc"): etag="etag_value", deployment_count=1737, locked=True, + validation_errors=["validation_errors_value"], ) response = client.get_app(request) @@ -1932,6 +1953,7 @@ def test_get_app(request_type, transport: str = "grpc"): assert response.etag == "etag_value" assert response.deployment_count == 1737 assert response.locked is True + assert response.validation_errors == ["validation_errors_value"] def test_get_app_non_empty_request_with_auto_populated_field(): @@ -2072,6 +2094,7 @@ async def test_get_app_async(request_type, transport: str = "grpc_asyncio"): etag="etag_value", deployment_count=1737, locked=True, + validation_errors=["validation_errors_value"], ) ) response = await client.get_app(request) @@ -2095,6 +2118,7 @@ async def test_get_app_async(request_type, transport: str = "grpc_asyncio"): assert response.etag == "etag_value" assert response.deployment_count == 1737 assert response.locked is True + assert response.validation_errors == ["validation_errors_value"] def test_get_app_field_headers(): @@ -2616,6 +2640,7 @@ def test_update_app(request_type, transport: str = "grpc"): etag="etag_value", deployment_count=1737, locked=True, + validation_errors=["validation_errors_value"], ) response = client.update_app(request) @@ -2638,6 +2663,7 @@ def test_update_app(request_type, transport: str = "grpc"): assert response.etag == "etag_value" assert response.deployment_count == 1737 assert response.locked is True + assert response.validation_errors == ["validation_errors_value"] def test_update_app_non_empty_request_with_auto_populated_field(): @@ -2774,6 +2800,7 @@ async def test_update_app_async(request_type, transport: str = "grpc_asyncio"): etag="etag_value", deployment_count=1737, locked=True, + validation_errors=["validation_errors_value"], ) ) response = await client.update_app(request) @@ -2797,6 +2824,7 @@ async def test_update_app_async(request_type, transport: str = "grpc_asyncio"): assert response.etag == "etag_value" assert response.deployment_count == 1737 assert response.locked is True + assert response.validation_errors == ["validation_errors_value"] def test_update_app_field_headers(): @@ -4337,6 +4365,9 @@ def test_list_agents_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, agent.Agent) for i in results) @@ -4425,6 +4456,8 @@ async def test_list_agents_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -4508,6 +4541,7 @@ def test_get_agent(request_type, transport: str = "grpc"): guardrails=["guardrails_value"], etag="etag_value", generated_summary="generated_summary_value", + validation_errors=["validation_errors_value"], ) response = client.get_agent(request) @@ -4528,6 +4562,7 @@ def test_get_agent(request_type, transport: str = "grpc"): assert response.guardrails == ["guardrails_value"] assert response.etag == "etag_value" assert response.generated_summary == "generated_summary_value" + assert response.validation_errors == ["validation_errors_value"] def test_get_agent_non_empty_request_with_auto_populated_field(): @@ -4666,6 +4701,7 @@ async def test_get_agent_async(request_type, transport: str = "grpc_asyncio"): guardrails=["guardrails_value"], etag="etag_value", generated_summary="generated_summary_value", + validation_errors=["validation_errors_value"], ) ) response = await client.get_agent(request) @@ -4687,6 +4723,7 @@ async def test_get_agent_async(request_type, transport: str = "grpc_asyncio"): assert response.guardrails == ["guardrails_value"] assert response.etag == "etag_value" assert response.generated_summary == "generated_summary_value" + assert response.validation_errors == ["validation_errors_value"] def test_get_agent_field_headers(): @@ -4858,6 +4895,7 @@ def test_create_agent(request_type, transport: str = "grpc"): guardrails=["guardrails_value"], etag="etag_value", generated_summary="generated_summary_value", + validation_errors=["validation_errors_value"], ) response = client.create_agent(request) @@ -4878,6 +4916,7 @@ def test_create_agent(request_type, transport: str = "grpc"): assert response.guardrails == ["guardrails_value"] assert response.etag == "etag_value" assert response.generated_summary == "generated_summary_value" + assert response.validation_errors == ["validation_errors_value"] def test_create_agent_non_empty_request_with_auto_populated_field(): @@ -5020,6 +5059,7 @@ async def test_create_agent_async(request_type, transport: str = "grpc_asyncio") guardrails=["guardrails_value"], etag="etag_value", generated_summary="generated_summary_value", + validation_errors=["validation_errors_value"], ) ) response = await client.create_agent(request) @@ -5041,6 +5081,7 @@ async def test_create_agent_async(request_type, transport: str = "grpc_asyncio") assert response.guardrails == ["guardrails_value"] assert response.etag == "etag_value" assert response.generated_summary == "generated_summary_value" + assert response.validation_errors == ["validation_errors_value"] def test_create_agent_field_headers(): @@ -5232,6 +5273,7 @@ def test_update_agent(request_type, transport: str = "grpc"): guardrails=["guardrails_value"], etag="etag_value", generated_summary="generated_summary_value", + validation_errors=["validation_errors_value"], ) response = client.update_agent(request) @@ -5252,6 +5294,7 @@ def test_update_agent(request_type, transport: str = "grpc"): assert response.guardrails == ["guardrails_value"] assert response.etag == "etag_value" assert response.generated_summary == "generated_summary_value" + assert response.validation_errors == ["validation_errors_value"] def test_update_agent_non_empty_request_with_auto_populated_field(): @@ -5388,6 +5431,7 @@ async def test_update_agent_async(request_type, transport: str = "grpc_asyncio") guardrails=["guardrails_value"], etag="etag_value", generated_summary="generated_summary_value", + validation_errors=["validation_errors_value"], ) ) response = await client.update_agent(request) @@ -5409,6 +5453,7 @@ async def test_update_agent_async(request_type, transport: str = "grpc_asyncio") assert response.guardrails == ["guardrails_value"] assert response.etag == "etag_value" assert response.generated_summary == "generated_summary_value" + assert response.validation_errors == ["validation_errors_value"] def test_update_agent_field_headers(): @@ -6253,6 +6298,9 @@ def test_list_examples_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, example.Example) for i in results) @@ -6341,6 +6389,8 @@ async def test_list_examples_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -8133,6 +8183,9 @@ def test_list_tools_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, tool.Tool) for i in results) @@ -8221,6 +8274,8 @@ async def test_list_tools_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -9005,6 +9060,9 @@ def test_list_conversations_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, conversation.Conversation) for i in results) @@ -9097,6 +9155,8 @@ async def test_list_conversations_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -11606,6 +11666,9 @@ def test_list_guardrails_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, guardrail.Guardrail) for i in results) @@ -11694,6 +11757,8 @@ async def test_list_guardrails_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -13538,6 +13603,9 @@ def test_list_deployments_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, deployment.Deployment) for i in results) @@ -13626,6 +13694,8 @@ async def test_list_deployments_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -15456,6 +15526,9 @@ def test_list_toolsets_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, toolset.Toolset) for i in results) @@ -15544,6 +15617,8 @@ async def test_list_toolsets_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -17384,6 +17459,9 @@ def test_list_app_versions_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, app_version.AppVersion) for i in results) @@ -17476,6 +17554,8 @@ async def test_list_app_versions_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -19308,6 +19388,9 @@ def test_list_changelogs_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, changelog.Changelog) for i in results) @@ -19396,6 +19479,8 @@ async def test_list_changelogs_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -20043,6 +20128,9 @@ def test_list_apps_rest_pager(transport: str = "rest"): pager = client.list_apps(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, app.App) for i in results) @@ -21380,6 +21468,9 @@ def test_list_agents_rest_pager(transport: str = "rest"): pager = client.list_agents(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, agent.Agent) for i in results) @@ -22383,6 +22474,9 @@ def test_list_examples_rest_pager(transport: str = "rest"): pager = client.list_examples(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, example.Example) for i in results) @@ -23369,6 +23463,9 @@ def test_list_tools_rest_pager(transport: str = "rest"): pager = client.list_tools(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, tool.Tool) for i in results) @@ -23813,6 +23910,9 @@ def test_list_conversations_rest_pager(transport: str = "rest"): pager = client.list_conversations(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, conversation.Conversation) for i in results) @@ -25200,6 +25300,9 @@ def test_list_guardrails_rest_pager(transport: str = "rest"): pager = client.list_guardrails(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, guardrail.Guardrail) for i in results) @@ -26227,6 +26330,9 @@ def test_list_deployments_rest_pager(transport: str = "rest"): pager = client.list_deployments(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, deployment.Deployment) for i in results) @@ -27225,6 +27331,9 @@ def test_list_toolsets_rest_pager(transport: str = "rest"): pager = client.list_toolsets(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, toolset.Toolset) for i in results) @@ -28246,6 +28355,9 @@ def test_list_app_versions_rest_pager(transport: str = "rest"): pager = client.list_app_versions(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, app_version.AppVersion) for i in results) @@ -29248,6 +29360,9 @@ def test_list_changelogs_rest_pager(transport: str = "rest"): pager = client.list_changelogs(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, changelog.Changelog) for i in results) @@ -30589,6 +30704,7 @@ async def test_get_app_empty_call_grpc_asyncio(): etag="etag_value", deployment_count=1737, locked=True, + validation_errors=["validation_errors_value"], ) ) await client.get_app(request=None) @@ -30649,6 +30765,7 @@ async def test_update_app_empty_call_grpc_asyncio(): etag="etag_value", deployment_count=1737, locked=True, + validation_errors=["validation_errors_value"], ) ) await client.update_app(request=None) @@ -30781,6 +30898,7 @@ async def test_get_agent_empty_call_grpc_asyncio(): guardrails=["guardrails_value"], etag="etag_value", generated_summary="generated_summary_value", + validation_errors=["validation_errors_value"], ) ) await client.get_agent(request=None) @@ -30815,6 +30933,7 @@ async def test_create_agent_empty_call_grpc_asyncio(): guardrails=["guardrails_value"], etag="etag_value", generated_summary="generated_summary_value", + validation_errors=["validation_errors_value"], ) ) await client.create_agent(request=None) @@ -30849,6 +30968,7 @@ async def test_update_agent_empty_call_grpc_asyncio(): guardrails=["guardrails_value"], etag="etag_value", generated_summary="generated_summary_value", + validation_errors=["validation_errors_value"], ) ) await client.update_agent(request=None) @@ -32081,6 +32201,7 @@ def test_get_app_rest_call_success(request_type): etag="etag_value", deployment_count=1737, locked=True, + validation_errors=["validation_errors_value"], ) # Wrap the value into a proper Response obj @@ -32108,6 +32229,7 @@ def test_get_app_rest_call_success(request_type): assert response.etag == "etag_value" assert response.deployment_count == 1737 assert response.locked is True + assert response.validation_errors == ["validation_errors_value"] @pytest.mark.parametrize("null_interceptor", [True, False]) @@ -32245,17 +32367,29 @@ def test_create_app_rest_call_success(request_type): "gcs_bucket": "gcs_bucket_value", "gcs_path_prefix": "gcs_path_prefix_value", }, + "unredacted_audio_recording_config": {}, "bigquery_export_settings": { "enabled": True, "project": "project_value", "dataset": "dataset_value", }, + "unredacted_bigquery_export_settings": {}, "cloud_logging_settings": {"enable_cloud_logging": True}, - "conversation_logging_settings": {"disable_conversation_logging": True}, + "conversation_logging_settings": { + "disable_conversation_logging": True, + "retention_window": {}, + }, "evaluation_audio_recording_config": {}, "metric_analysis_settings": {"llm_metrics_opted_out": True}, }, - "error_handling_settings": {"error_handling_strategy": 1}, + "error_handling_settings": { + "error_handling_strategy": 1, + "fallback_response_config": { + "custom_fallback_messages": {}, + "max_fallback_attempts": 2214, + }, + "end_session_config": {"escalate_session": True}, + }, "model_settings": {"model": "model_value", "temperature": 0.1198}, "tool_execution_mode": 1, "evaluation_metrics_thresholds": { @@ -32333,6 +32467,20 @@ def test_create_app_rest_call_success(request_type): }, }, "noise_suppression_level": "noise_suppression_level_value", + "whatsapp_config": { + "waba_id": "waba_id_value", + "phone_number_id": "phone_number_id_value", + "phone_number": "phone_number_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, + "instagram_config": { + "instagram_account_id": "instagram_account_id_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, }, "metadata": {}, "create_time": {"seconds": 751, "nanos": 543}, @@ -32344,7 +32492,11 @@ def test_create_app_rest_call_success(request_type): "private_key": "private_key_value", "passphrase": "passphrase_value", }, + "vpc_sc_settings": { + "allowed_origins": ["allowed_origins_value1", "allowed_origins_value2"] + }, "locked": True, + "validation_errors": ["validation_errors_value1", "validation_errors_value2"], } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -32571,17 +32723,29 @@ def test_update_app_rest_call_success(request_type): "gcs_bucket": "gcs_bucket_value", "gcs_path_prefix": "gcs_path_prefix_value", }, + "unredacted_audio_recording_config": {}, "bigquery_export_settings": { "enabled": True, "project": "project_value", "dataset": "dataset_value", }, + "unredacted_bigquery_export_settings": {}, "cloud_logging_settings": {"enable_cloud_logging": True}, - "conversation_logging_settings": {"disable_conversation_logging": True}, + "conversation_logging_settings": { + "disable_conversation_logging": True, + "retention_window": {}, + }, "evaluation_audio_recording_config": {}, "metric_analysis_settings": {"llm_metrics_opted_out": True}, }, - "error_handling_settings": {"error_handling_strategy": 1}, + "error_handling_settings": { + "error_handling_strategy": 1, + "fallback_response_config": { + "custom_fallback_messages": {}, + "max_fallback_attempts": 2214, + }, + "end_session_config": {"escalate_session": True}, + }, "model_settings": {"model": "model_value", "temperature": 0.1198}, "tool_execution_mode": 1, "evaluation_metrics_thresholds": { @@ -32659,6 +32823,20 @@ def test_update_app_rest_call_success(request_type): }, }, "noise_suppression_level": "noise_suppression_level_value", + "whatsapp_config": { + "waba_id": "waba_id_value", + "phone_number_id": "phone_number_id_value", + "phone_number": "phone_number_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, + "instagram_config": { + "instagram_account_id": "instagram_account_id_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, }, "metadata": {}, "create_time": {"seconds": 751, "nanos": 543}, @@ -32670,7 +32848,11 @@ def test_update_app_rest_call_success(request_type): "private_key": "private_key_value", "passphrase": "passphrase_value", }, + "vpc_sc_settings": { + "allowed_origins": ["allowed_origins_value1", "allowed_origins_value2"] + }, "locked": True, + "validation_errors": ["validation_errors_value1", "validation_errors_value2"], } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -32756,6 +32938,7 @@ def get_message_fields(field): etag="etag_value", deployment_count=1737, locked=True, + validation_errors=["validation_errors_value"], ) # Wrap the value into a proper Response obj @@ -32783,6 +32966,7 @@ def get_message_fields(field): assert response.etag == "etag_value" assert response.deployment_count == 1737 assert response.locked is True + assert response.validation_errors == ["validation_errors_value"] @pytest.mark.parametrize("null_interceptor", [True, False]) @@ -33397,6 +33581,7 @@ def test_get_agent_rest_call_success(request_type): guardrails=["guardrails_value"], etag="etag_value", generated_summary="generated_summary_value", + validation_errors=["validation_errors_value"], ) # Wrap the value into a proper Response obj @@ -33422,6 +33607,7 @@ def test_get_agent_rest_call_success(request_type): assert response.guardrails == ["guardrails_value"] assert response.etag == "etag_value" assert response.generated_summary == "generated_summary_value" + assert response.validation_errors == ["validation_errors_value"] @pytest.mark.parametrize("null_interceptor", [True, False]) @@ -33533,6 +33719,7 @@ def test_create_agent_rest_call_success(request_type): "input_variable_mapping": {}, "output_variable_mapping": {}, "respect_response_interruption_settings": True, + "language_code_variable": "language_code_variable_value", }, "name": "name_value", "display_name": "display_name_value", @@ -33576,6 +33763,7 @@ def test_create_agent_rest_call_success(request_type): "direction": 1, } ], + "validation_errors": ["validation_errors_value1", "validation_errors_value2"], } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -33659,6 +33847,7 @@ def get_message_fields(field): guardrails=["guardrails_value"], etag="etag_value", generated_summary="generated_summary_value", + validation_errors=["validation_errors_value"], ) # Wrap the value into a proper Response obj @@ -33684,6 +33873,7 @@ def get_message_fields(field): assert response.guardrails == ["guardrails_value"] assert response.etag == "etag_value" assert response.generated_summary == "generated_summary_value" + assert response.validation_errors == ["validation_errors_value"] @pytest.mark.parametrize("null_interceptor", [True, False]) @@ -33805,6 +33995,7 @@ def test_update_agent_rest_call_success(request_type): "input_variable_mapping": {}, "output_variable_mapping": {}, "respect_response_interruption_settings": True, + "language_code_variable": "language_code_variable_value", }, "name": "projects/sample1/locations/sample2/apps/sample3/agents/sample4", "display_name": "display_name_value", @@ -33848,6 +34039,7 @@ def test_update_agent_rest_call_success(request_type): "direction": 1, } ], + "validation_errors": ["validation_errors_value1", "validation_errors_value2"], } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -33931,6 +34123,7 @@ def get_message_fields(field): guardrails=["guardrails_value"], etag="etag_value", generated_summary="generated_summary_value", + validation_errors=["validation_errors_value"], ) # Wrap the value into a proper Response obj @@ -33956,6 +34149,7 @@ def get_message_fields(field): assert response.guardrails == ["guardrails_value"] assert response.etag == "etag_value" assert response.generated_summary == "generated_summary_value" + assert response.validation_errors == ["validation_errors_value"] @pytest.mark.parametrize("null_interceptor", [True, False]) @@ -36046,9 +36240,11 @@ def test_create_tool_rest_call_success(request_type): "name": "name_value", "python_code": "python_code_value", "description": "description_value", + "service_directory_config": {}, }, "mcp_tool": { "name": "name_value", + "name_override": "name_override_value", "description": "description_value", "input_schema": {}, "output_schema": {}, @@ -36057,6 +36253,7 @@ def test_create_tool_rest_call_success(request_type): "tls_config": {}, "service_directory_config": {}, "custom_headers": {}, + "state": 1, }, "file_search_tool": { "corpus_type": 1, @@ -36083,10 +36280,44 @@ def test_create_tool_rest_call_success(request_type): "mode": 1, "python_script": "python_script_value", }, + "text_response_config": { + "type_": 1, + "static_text": "static_text_value", + "text_response_instruction": "text_response_instruction_value", + }, + }, + "remote_agent_tool": { + "name": "name_value", + "description": "description_value", + "agent_card": { + "name": "name_value", + "description": "description_value", + "supported_interfaces": [ + { + "url": "url_value", + "protocol_binding": "protocol_binding_value", + "tenant": "tenant_value", + "protocol_version": "protocol_version_value", + } + ], + "version": "version_value", + "skills": [ + { + "id": "id_value", + "name": "name_value", + "description": "description_value", + "tags": ["tags_value1", "tags_value2"], + "examples": ["examples_value1", "examples_value2"], + "input_modes": ["input_modes_value1", "input_modes_value2"], + "output_modes": ["output_modes_value1", "output_modes_value2"], + } + ], + }, }, "name": "name_value", "display_name": "display_name_value", "execution_type": 1, + "timeout": {"seconds": 751, "nanos": 543}, "create_time": {}, "update_time": {}, "etag": "etag_value", @@ -36484,9 +36715,11 @@ def test_update_tool_rest_call_success(request_type): "name": "name_value", "python_code": "python_code_value", "description": "description_value", + "service_directory_config": {}, }, "mcp_tool": { "name": "name_value", + "name_override": "name_override_value", "description": "description_value", "input_schema": {}, "output_schema": {}, @@ -36495,6 +36728,7 @@ def test_update_tool_rest_call_success(request_type): "tls_config": {}, "service_directory_config": {}, "custom_headers": {}, + "state": 1, }, "file_search_tool": { "corpus_type": 1, @@ -36521,10 +36755,44 @@ def test_update_tool_rest_call_success(request_type): "mode": 1, "python_script": "python_script_value", }, + "text_response_config": { + "type_": 1, + "static_text": "static_text_value", + "text_response_instruction": "text_response_instruction_value", + }, + }, + "remote_agent_tool": { + "name": "name_value", + "description": "description_value", + "agent_card": { + "name": "name_value", + "description": "description_value", + "supported_interfaces": [ + { + "url": "url_value", + "protocol_binding": "protocol_binding_value", + "tenant": "tenant_value", + "protocol_version": "protocol_version_value", + } + ], + "version": "version_value", + "skills": [ + { + "id": "id_value", + "name": "name_value", + "description": "description_value", + "tags": ["tags_value1", "tags_value2"], + "examples": ["examples_value1", "examples_value2"], + "input_modes": ["input_modes_value1", "input_modes_value2"], + "output_modes": ["output_modes_value1", "output_modes_value2"], + } + ], + }, }, "name": "projects/sample1/locations/sample2/apps/sample3/tools/sample4", "display_name": "display_name_value", "execution_type": 1, + "timeout": {"seconds": 751, "nanos": 543}, "create_time": {}, "update_time": {}, "etag": "etag_value", @@ -38073,10 +38341,48 @@ def test_create_deployment_rest_call_success(request_type): }, }, "noise_suppression_level": "noise_suppression_level_value", + "whatsapp_config": { + "waba_id": "waba_id_value", + "phone_number_id": "phone_number_id_value", + "phone_number": "phone_number_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, + "instagram_config": { + "instagram_account_id": "instagram_account_id_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, }, "create_time": {"seconds": 751, "nanos": 543}, "update_time": {}, "etag": "etag_value", + "experiment_config": { + "version_release": { + "state": 1, + "traffic_allocations": [ + { + "id": "id_value", + "traffic_percentage": 1884, + "app_version": "app_version_value", + } + ], + } + }, + "whatsapp_credentials": { + "auth_code": "auth_code_value", + "pin": "pin_value", + "phone_number": "phone_number_value", + "business_account_id": "business_account_id_value", + "waba_id": "waba_id_value", + "conversation_profile_id": "conversation_profile_id_value", + }, + "instagram_credentials": { + "auth_code": "auth_code_value", + "conversation_profile_id": "conversation_profile_id_value", + }, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -38315,10 +38621,48 @@ def test_update_deployment_rest_call_success(request_type): }, }, "noise_suppression_level": "noise_suppression_level_value", + "whatsapp_config": { + "waba_id": "waba_id_value", + "phone_number_id": "phone_number_id_value", + "phone_number": "phone_number_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, + "instagram_config": { + "instagram_account_id": "instagram_account_id_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, }, "create_time": {"seconds": 751, "nanos": 543}, "update_time": {}, "etag": "etag_value", + "experiment_config": { + "version_release": { + "state": 1, + "traffic_allocations": [ + { + "id": "id_value", + "traffic_percentage": 1884, + "app_version": "app_version_value", + } + ], + } + }, + "whatsapp_credentials": { + "auth_code": "auth_code_value", + "pin": "pin_value", + "phone_number": "phone_number_value", + "business_account_id": "business_account_id_value", + "waba_id": "waba_id_value", + "conversation_profile_id": "conversation_profile_id_value", + }, + "instagram_credentials": { + "auth_code": "auth_code_value", + "conversation_profile_id": "conversation_profile_id_value", + }, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -38938,6 +39282,45 @@ def test_create_toolset_rest_call_success(request_type): ] }, "custom_headers": {}, + "tool_overrides": [ + { + "tool": "tool_value", + "name_override": "name_override_value", + "description_override": "description_override_value", + "snapshot": { + "description": "description_value", + "input_schema": { + "type_": 1, + "properties": {}, + "required": ["required_value1", "required_value2"], + "description": "description_value", + "items": {}, + "nullable": True, + "unique_items": True, + "prefix_items": {}, + "additional_properties": {}, + "any_of": {}, + "enum": ["enum_value1", "enum_value2"], + "default": { + "null_value": 0, + "number_value": 0.1285, + "string_value": "string_value_value", + "bool_value": True, + "struct_value": {"fields": {}}, + "list_value": {"values": {}}, + }, + "ref": "ref_value", + "defs": {}, + "title": "title_value", + "min_items": 965, + "max_items": 967, + "minimum": 0.764, + "maximum": 0.766, + }, + "output_schema": {}, + }, + } + ], }, "open_api_toolset": { "open_api_schema": "open_api_schema_value", @@ -38972,6 +39355,7 @@ def test_create_toolset_rest_call_success(request_type): "name": "name_value", "display_name": "display_name_value", "description": "description_value", + "timeout": {"seconds": 751, "nanos": 543}, "create_time": {"seconds": 751, "nanos": 543}, "update_time": {}, "etag": "etag_value", @@ -39224,6 +39608,45 @@ def test_update_toolset_rest_call_success(request_type): ] }, "custom_headers": {}, + "tool_overrides": [ + { + "tool": "tool_value", + "name_override": "name_override_value", + "description_override": "description_override_value", + "snapshot": { + "description": "description_value", + "input_schema": { + "type_": 1, + "properties": {}, + "required": ["required_value1", "required_value2"], + "description": "description_value", + "items": {}, + "nullable": True, + "unique_items": True, + "prefix_items": {}, + "additional_properties": {}, + "any_of": {}, + "enum": ["enum_value1", "enum_value2"], + "default": { + "null_value": 0, + "number_value": 0.1285, + "string_value": "string_value_value", + "bool_value": True, + "struct_value": {"fields": {}}, + "list_value": {"values": {}}, + }, + "ref": "ref_value", + "defs": {}, + "title": "title_value", + "min_items": 965, + "max_items": 967, + "minimum": 0.764, + "maximum": 0.766, + }, + "output_schema": {}, + }, + } + ], }, "open_api_toolset": { "open_api_schema": "open_api_schema_value", @@ -39258,6 +39681,7 @@ def test_update_toolset_rest_call_success(request_type): "name": "projects/sample1/locations/sample2/apps/sample3/toolsets/sample4", "display_name": "display_name_value", "description": "description_value", + "timeout": {"seconds": 751, "nanos": 543}, "create_time": {"seconds": 751, "nanos": 543}, "update_time": {}, "etag": "etag_value", @@ -39911,19 +40335,29 @@ def test_create_app_version_rest_call_success(request_type): "gcs_bucket": "gcs_bucket_value", "gcs_path_prefix": "gcs_path_prefix_value", }, + "unredacted_audio_recording_config": {}, "bigquery_export_settings": { "enabled": True, "project": "project_value", "dataset": "dataset_value", }, + "unredacted_bigquery_export_settings": {}, "cloud_logging_settings": {"enable_cloud_logging": True}, "conversation_logging_settings": { - "disable_conversation_logging": True + "disable_conversation_logging": True, + "retention_window": {}, }, "evaluation_audio_recording_config": {}, "metric_analysis_settings": {"llm_metrics_opted_out": True}, }, - "error_handling_settings": {"error_handling_strategy": 1}, + "error_handling_settings": { + "error_handling_strategy": 1, + "fallback_response_config": { + "custom_fallback_messages": {}, + "max_fallback_attempts": 2214, + }, + "end_session_config": {"escalate_session": True}, + }, "model_settings": {"model": "model_value", "temperature": 0.1198}, "tool_execution_mode": 1, "evaluation_metrics_thresholds": { @@ -40003,6 +40437,20 @@ def test_create_app_version_rest_call_success(request_type): }, }, "noise_suppression_level": "noise_suppression_level_value", + "whatsapp_config": { + "waba_id": "waba_id_value", + "phone_number_id": "phone_number_id_value", + "phone_number": "phone_number_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, + "instagram_config": { + "instagram_account_id": "instagram_account_id_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, }, "metadata": {}, "create_time": {}, @@ -40014,7 +40462,17 @@ def test_create_app_version_rest_call_success(request_type): "private_key": "private_key_value", "passphrase": "passphrase_value", }, + "vpc_sc_settings": { + "allowed_origins": [ + "allowed_origins_value1", + "allowed_origins_value2", + ] + }, "locked": True, + "validation_errors": [ + "validation_errors_value1", + "validation_errors_value2", + ], }, "agents": [ { @@ -40026,6 +40484,7 @@ def test_create_app_version_rest_call_success(request_type): "input_variable_mapping": {}, "output_variable_mapping": {}, "respect_response_interruption_settings": True, + "language_code_variable": "language_code_variable_value", }, "name": "name_value", "display_name": "display_name_value", @@ -40073,6 +40532,10 @@ def test_create_app_version_rest_call_success(request_type): "direction": 1, } ], + "validation_errors": [ + "validation_errors_value1", + "validation_errors_value2", + ], } ], "tools": [ @@ -40243,9 +40706,11 @@ def test_create_app_version_rest_call_success(request_type): "name": "name_value", "python_code": "python_code_value", "description": "description_value", + "service_directory_config": {}, }, "mcp_tool": { "name": "name_value", + "name_override": "name_override_value", "description": "description_value", "input_schema": {}, "output_schema": {}, @@ -40254,6 +40719,7 @@ def test_create_app_version_rest_call_success(request_type): "tls_config": {}, "service_directory_config": {}, "custom_headers": {}, + "state": 1, }, "file_search_tool": { "corpus_type": 1, @@ -40283,10 +40749,50 @@ def test_create_app_version_rest_call_success(request_type): "mode": 1, "python_script": "python_script_value", }, + "text_response_config": { + "type_": 1, + "static_text": "static_text_value", + "text_response_instruction": "text_response_instruction_value", + }, + }, + "remote_agent_tool": { + "name": "name_value", + "description": "description_value", + "agent_card": { + "name": "name_value", + "description": "description_value", + "supported_interfaces": [ + { + "url": "url_value", + "protocol_binding": "protocol_binding_value", + "tenant": "tenant_value", + "protocol_version": "protocol_version_value", + } + ], + "version": "version_value", + "skills": [ + { + "id": "id_value", + "name": "name_value", + "description": "description_value", + "tags": ["tags_value1", "tags_value2"], + "examples": ["examples_value1", "examples_value2"], + "input_modes": [ + "input_modes_value1", + "input_modes_value2", + ], + "output_modes": [ + "output_modes_value1", + "output_modes_value2", + ], + } + ], + }, }, "name": "name_value", "display_name": "display_name_value", "execution_type": 1, + "timeout": {}, "create_time": {}, "update_time": {}, "etag": "etag_value", @@ -40419,6 +40925,18 @@ def test_create_app_version_rest_call_success(request_type): "service_directory_config": {}, "tls_config": {}, "custom_headers": {}, + "tool_overrides": [ + { + "tool": "tool_value", + "name_override": "name_override_value", + "description_override": "description_override_value", + "snapshot": { + "description": "description_value", + "input_schema": {}, + "output_schema": {}, + }, + } + ], }, "open_api_toolset": { "open_api_schema": "open_api_schema_value", @@ -40436,6 +40954,7 @@ def test_create_app_version_rest_call_success(request_type): "name": "name_value", "display_name": "display_name_value", "description": "description_value", + "timeout": {}, "create_time": {}, "update_time": {}, "etag": "etag_value", diff --git a/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_session_service.py b/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_session_service.py index 6247be649eee..198e634ddea4 100644 --- a/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_session_service.py +++ b/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_session_service.py @@ -959,7 +959,14 @@ def test_session_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): @@ -1006,7 +1013,14 @@ def test_session_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): diff --git a/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_tool_service.py b/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_tool_service.py index d167580b969e..59f8b74bf50a 100644 --- a/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_tool_service.py +++ b/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_tool_service.py @@ -60,7 +60,15 @@ ToolServiceClient, transports, ) -from google.cloud.ces_v1.types import schema, tool, tool_service, toolset_tool +from google.cloud.ces_v1.types import ( + mocks, + schema, + search_suggestions, + session_service, + tool, + tool_service, + toolset_tool, +) CRED_INFO_JSON = { "credential_source": "/path/to/file", @@ -934,7 +942,14 @@ def test_tool_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): @@ -981,7 +996,14 @@ def test_tool_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): diff --git a/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_widget_service.py b/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_widget_service.py index c75a63a1f32b..9f64d3095bd0 100644 --- a/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_widget_service.py +++ b/packages/google-cloud-ces/tests/unit/gapic/ces_v1/test_widget_service.py @@ -954,7 +954,14 @@ def test_widget_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): @@ -1001,7 +1008,14 @@ def test_widget_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): diff --git a/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_agent_service.py b/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_agent_service.py index 501b21ad1dbf..2fd77088d35b 100644 --- a/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_agent_service.py +++ b/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_agent_service.py @@ -996,7 +996,14 @@ def test_agent_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): @@ -1043,7 +1050,14 @@ def test_agent_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): @@ -1743,6 +1757,9 @@ def test_list_apps_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, app.App) for i in results) @@ -1831,6 +1848,8 @@ async def test_list_apps_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -5055,6 +5074,9 @@ def test_list_agents_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, agent.Agent) for i in results) @@ -5143,6 +5165,8 @@ async def test_list_agents_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -6983,6 +7007,9 @@ def test_list_examples_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, example.Example) for i in results) @@ -7071,6 +7098,8 @@ async def test_list_examples_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -8863,6 +8892,9 @@ def test_list_tools_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, tool.Tool) for i in results) @@ -8951,6 +8983,8 @@ async def test_list_tools_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -9735,6 +9769,9 @@ def test_list_conversations_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, conversation.Conversation) for i in results) @@ -9827,6 +9864,8 @@ async def test_list_conversations_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -12336,6 +12375,9 @@ def test_list_guardrails_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, guardrail.Guardrail) for i in results) @@ -12424,6 +12466,8 @@ async def test_list_guardrails_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -14268,6 +14312,9 @@ def test_list_deployments_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, deployment.Deployment) for i in results) @@ -14356,6 +14403,8 @@ async def test_list_deployments_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -16186,6 +16235,9 @@ def test_list_toolsets_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, toolset.Toolset) for i in results) @@ -16274,6 +16326,8 @@ async def test_list_toolsets_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -18114,6 +18168,9 @@ def test_list_app_versions_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, app_version.AppVersion) for i in results) @@ -18206,6 +18263,8 @@ async def test_list_app_versions_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -20387,6 +20446,9 @@ def test_list_changelogs_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, changelog.Changelog) for i in results) @@ -20475,6 +20537,8 @@ async def test_list_changelogs_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -21122,6 +21186,9 @@ def test_list_apps_rest_pager(transport: str = "rest"): pager = client.list_apps(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, app.App) for i in results) @@ -22830,6 +22897,9 @@ def test_list_agents_rest_pager(transport: str = "rest"): pager = client.list_agents(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, agent.Agent) for i in results) @@ -23833,6 +23903,9 @@ def test_list_examples_rest_pager(transport: str = "rest"): pager = client.list_examples(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, example.Example) for i in results) @@ -24819,6 +24892,9 @@ def test_list_tools_rest_pager(transport: str = "rest"): pager = client.list_tools(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, tool.Tool) for i in results) @@ -25263,6 +25339,9 @@ def test_list_conversations_rest_pager(transport: str = "rest"): pager = client.list_conversations(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, conversation.Conversation) for i in results) @@ -26650,6 +26729,9 @@ def test_list_guardrails_rest_pager(transport: str = "rest"): pager = client.list_guardrails(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, guardrail.Guardrail) for i in results) @@ -27677,6 +27759,9 @@ def test_list_deployments_rest_pager(transport: str = "rest"): pager = client.list_deployments(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, deployment.Deployment) for i in results) @@ -28675,6 +28760,9 @@ def test_list_toolsets_rest_pager(transport: str = "rest"): pager = client.list_toolsets(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, toolset.Toolset) for i in results) @@ -29696,6 +29784,9 @@ def test_list_app_versions_rest_pager(transport: str = "rest"): pager = client.list_app_versions(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, app_version.AppVersion) for i in results) @@ -30881,6 +30972,9 @@ def test_list_changelogs_rest_pager(transport: str = "rest"): pager = client.list_changelogs(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, changelog.Changelog) for i in results) @@ -34041,6 +34135,7 @@ def test_create_app_rest_call_success(request_type): "project": "project_value", "dataset": "dataset_value", }, + "unredacted_bigquery_export_settings": {}, "cloud_logging_settings": {"enable_cloud_logging": True}, "conversation_logging_settings": { "disable_conversation_logging": True, @@ -34134,6 +34229,20 @@ def test_create_app_rest_call_success(request_type): }, }, "noise_suppression_level": "noise_suppression_level_value", + "whatsapp_config": { + "waba_id": "waba_id_value", + "phone_number_id": "phone_number_id_value", + "phone_number": "phone_number_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, + "instagram_config": { + "instagram_account_id": "instagram_account_id_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, }, "metadata": {}, "create_time": {"seconds": 751, "nanos": 543}, @@ -34187,6 +34296,7 @@ def test_create_app_rest_call_success(request_type): }, }, "scenario_execution_mode": 1, + "evaluation_run_caching_settings": {"run_caching_mode": 1}, }, "validation_errors": ["validation_errors_value1", "validation_errors_value2"], } @@ -34421,6 +34531,7 @@ def test_update_app_rest_call_success(request_type): "project": "project_value", "dataset": "dataset_value", }, + "unredacted_bigquery_export_settings": {}, "cloud_logging_settings": {"enable_cloud_logging": True}, "conversation_logging_settings": { "disable_conversation_logging": True, @@ -34514,6 +34625,20 @@ def test_update_app_rest_call_success(request_type): }, }, "noise_suppression_level": "noise_suppression_level_value", + "whatsapp_config": { + "waba_id": "waba_id_value", + "phone_number_id": "phone_number_id_value", + "phone_number": "phone_number_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, + "instagram_config": { + "instagram_account_id": "instagram_account_id_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, }, "metadata": {}, "create_time": {"seconds": 751, "nanos": 543}, @@ -34567,6 +34692,7 @@ def test_update_app_rest_call_success(request_type): }, }, "scenario_execution_mode": 1, + "evaluation_run_caching_settings": {"run_caching_mode": 1}, }, "validation_errors": ["validation_errors_value1", "validation_errors_value2"], } @@ -40417,6 +40543,20 @@ def test_create_deployment_rest_call_success(request_type): }, }, "noise_suppression_level": "noise_suppression_level_value", + "whatsapp_config": { + "waba_id": "waba_id_value", + "phone_number_id": "phone_number_id_value", + "phone_number": "phone_number_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, + "instagram_config": { + "instagram_account_id": "instagram_account_id_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, }, "create_time": {"seconds": 751, "nanos": 543}, "update_time": {}, @@ -40433,6 +40573,18 @@ def test_create_deployment_rest_call_success(request_type): ], } }, + "whatsapp_credentials": { + "auth_code": "auth_code_value", + "pin": "pin_value", + "phone_number": "phone_number_value", + "business_account_id": "business_account_id_value", + "waba_id": "waba_id_value", + "conversation_profile_id": "conversation_profile_id_value", + }, + "instagram_credentials": { + "auth_code": "auth_code_value", + "conversation_profile_id": "conversation_profile_id_value", + }, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -40671,6 +40823,20 @@ def test_update_deployment_rest_call_success(request_type): }, }, "noise_suppression_level": "noise_suppression_level_value", + "whatsapp_config": { + "waba_id": "waba_id_value", + "phone_number_id": "phone_number_id_value", + "phone_number": "phone_number_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, + "instagram_config": { + "instagram_account_id": "instagram_account_id_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, }, "create_time": {"seconds": 751, "nanos": 543}, "update_time": {}, @@ -40687,6 +40853,18 @@ def test_update_deployment_rest_call_success(request_type): ], } }, + "whatsapp_credentials": { + "auth_code": "auth_code_value", + "pin": "pin_value", + "phone_number": "phone_number_value", + "business_account_id": "business_account_id_value", + "waba_id": "waba_id_value", + "conversation_profile_id": "conversation_profile_id_value", + }, + "instagram_credentials": { + "auth_code": "auth_code_value", + "conversation_profile_id": "conversation_profile_id_value", + }, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -41379,6 +41557,7 @@ def test_create_toolset_rest_call_success(request_type): "name": "name_value", "display_name": "display_name_value", "description": "description_value", + "timeout": {"seconds": 751, "nanos": 543}, "create_time": {"seconds": 751, "nanos": 543}, "update_time": {}, "etag": "etag_value", @@ -41704,6 +41883,7 @@ def test_update_toolset_rest_call_success(request_type): "name": "projects/sample1/locations/sample2/apps/sample3/toolsets/sample4", "display_name": "display_name_value", "description": "description_value", + "timeout": {"seconds": 751, "nanos": 543}, "create_time": {"seconds": 751, "nanos": 543}, "update_time": {}, "etag": "etag_value", @@ -42363,6 +42543,7 @@ def test_create_app_version_rest_call_success(request_type): "project": "project_value", "dataset": "dataset_value", }, + "unredacted_bigquery_export_settings": {}, "cloud_logging_settings": {"enable_cloud_logging": True}, "conversation_logging_settings": { "disable_conversation_logging": True, @@ -42458,6 +42639,20 @@ def test_create_app_version_rest_call_success(request_type): }, }, "noise_suppression_level": "noise_suppression_level_value", + "whatsapp_config": { + "waba_id": "waba_id_value", + "phone_number_id": "phone_number_id_value", + "phone_number": "phone_number_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, + "instagram_config": { + "instagram_account_id": "instagram_account_id_value", + "display_name": "display_name_value", + "thumbnail_url": "thumbnail_url_value", + "description": "description_value", + }, }, "metadata": {}, "create_time": {}, @@ -42514,6 +42709,7 @@ def test_create_app_version_rest_call_success(request_type): }, }, "scenario_execution_mode": 1, + "evaluation_run_caching_settings": {"run_caching_mode": 1}, }, "validation_errors": [ "validation_errors_value1", @@ -43000,6 +43196,7 @@ def test_create_app_version_rest_call_success(request_type): "name": "name_value", "display_name": "display_name_value", "description": "description_value", + "timeout": {}, "create_time": {}, "update_time": {}, "etag": "etag_value", diff --git a/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_evaluation_service.py b/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_evaluation_service.py index ec4d158b24a6..ee8d8152bd29 100644 --- a/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_evaluation_service.py +++ b/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_evaluation_service.py @@ -1016,7 +1016,14 @@ def test_evaluation_service_client_get_mtls_endpoint_and_cert_source(client_clas config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): @@ -1063,7 +1070,14 @@ def test_evaluation_service_client_get_mtls_endpoint_and_cert_source(client_clas config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): @@ -7724,6 +7738,9 @@ def test_list_evaluations_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, evaluation.Evaluation) for i in results) @@ -7812,6 +7829,8 @@ async def test_list_evaluations_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -8267,6 +8286,9 @@ def test_list_evaluation_results_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, evaluation.EvaluationResult) for i in results) @@ -8359,6 +8381,8 @@ async def test_list_evaluation_results_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -8818,6 +8842,9 @@ def test_list_evaluation_datasets_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, evaluation.EvaluationDataset) for i in results) @@ -8910,6 +8937,8 @@ async def test_list_evaluation_datasets_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -9366,6 +9395,9 @@ def test_list_evaluation_runs_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, evaluation.EvaluationRun) for i in results) @@ -9458,6 +9490,8 @@ async def test_list_evaluation_runs_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -9917,6 +9951,9 @@ def test_list_evaluation_expectations_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, evaluation.EvaluationExpectation) for i in results) @@ -10009,6 +10046,8 @@ async def test_list_evaluation_expectations_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -12736,6 +12775,9 @@ def test_list_scheduled_evaluation_runs_pager(transport_name: str = "grpc"): assert pager._retry == retry assert pager._timeout == timeout + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, evaluation.ScheduledEvaluationRun) for i in results) @@ -12828,6 +12870,8 @@ async def test_list_scheduled_evaluation_runs_async_pager(): request={}, ) assert async_pager.next_page_token == "abc" + assert str(async_pager).startswith(f"{async_pager.__class__.__name__}<") + responses = [] async for response in async_pager: # pragma: no branch responses.append(response) @@ -18667,6 +18711,9 @@ def test_list_evaluations_rest_pager(transport: str = "rest"): pager = client.list_evaluations(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, evaluation.Evaluation) for i in results) @@ -18939,6 +18986,9 @@ def test_list_evaluation_results_rest_pager(transport: str = "rest"): pager = client.list_evaluation_results(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, evaluation.EvaluationResult) for i in results) @@ -19209,6 +19259,9 @@ def test_list_evaluation_datasets_rest_pager(transport: str = "rest"): pager = client.list_evaluation_datasets(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, evaluation.EvaluationDataset) for i in results) @@ -19475,6 +19528,9 @@ def test_list_evaluation_runs_rest_pager(transport: str = "rest"): pager = client.list_evaluation_runs(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, evaluation.EvaluationRun) for i in results) @@ -19745,6 +19801,9 @@ def test_list_evaluation_expectations_rest_pager(transport: str = "rest"): pager = client.list_evaluation_expectations(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, evaluation.EvaluationExpectation) for i in results) @@ -21180,6 +21239,9 @@ def test_list_scheduled_evaluation_runs_rest_pager(transport: str = "rest"): pager = client.list_scheduled_evaluation_runs(request=sample_request) + assert pager.next_page_token == "abc" + assert str(pager).startswith(f"{pager.__class__.__name__}<") + results = list(pager) assert len(results) == 6 assert all(isinstance(i, evaluation.ScheduledEvaluationRun) for i in results) @@ -29238,6 +29300,7 @@ def test_create_scheduled_evaluation_run_rest_call_success(request_type): "scheduled_evaluation_run": "scheduled_evaluation_run_value", "golden_run_method": 1, "generate_latency_report": True, + "evaluation_run_caching_settings": {"run_caching_mode": 1}, }, "description": "description_value", "scheduling_config": { @@ -29813,6 +29876,7 @@ def test_update_scheduled_evaluation_run_rest_call_success(request_type): "scheduled_evaluation_run": "scheduled_evaluation_run_value", "golden_run_method": 1, "generate_latency_report": True, + "evaluation_run_caching_settings": {"run_caching_mode": 1}, }, "description": "description_value", "scheduling_config": { diff --git a/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_session_service.py b/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_session_service.py index 7d83bb1ee630..35d960d9b670 100644 --- a/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_session_service.py +++ b/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_session_service.py @@ -959,7 +959,14 @@ def test_session_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): @@ -1006,7 +1013,14 @@ def test_session_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): diff --git a/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_tool_service.py b/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_tool_service.py index f689fda479f7..4177eedbce5e 100644 --- a/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_tool_service.py +++ b/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_tool_service.py @@ -942,7 +942,14 @@ def test_tool_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): @@ -989,7 +996,14 @@ def test_tool_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): diff --git a/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_widget_service.py b/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_widget_service.py index 126b752c9508..8598f85be7b1 100644 --- a/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_widget_service.py +++ b/packages/google-cloud-ces/tests/unit/gapic/ces_v1beta/test_widget_service.py @@ -954,7 +954,14 @@ def test_widget_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ): @@ -1001,7 +1008,14 @@ def test_widget_service_client_get_mtls_endpoint_and_cert_source(client_class): config_filename = "mock_certificate_config.json" config_file_content = json.dumps(config_data) m = mock.mock_open(read_data=config_file_content) - with mock.patch("builtins.open", m): + with ( + mock.patch("builtins.open", m), + mock.patch( + "os.path.exists", + side_effect=lambda path: os.path.basename(path) + == config_filename, + ), + ): with mock.patch.dict( os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename} ):