From 7bf592684b4d5df0cd1f66dd414efe2350d0461e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 25 Aug 2020 18:45:04 -0700 Subject: [PATCH] feat: add environments client (#217) --- LICENSE | 2 +- dialogflow_v2/__init__.py | 11 +- dialogflow_v2/gapic/agents_client.py | 164 +- dialogflow_v2/gapic/agents_client_config.py | 85 +- dialogflow_v2/gapic/contexts_client.py | 38 +- dialogflow_v2/gapic/contexts_client_config.py | 67 +- dialogflow_v2/gapic/entity_types_client.py | 148 +- .../gapic/entity_types_client_config.py | 83 +- dialogflow_v2/gapic/enums.py | 121 +- dialogflow_v2/gapic/environments_client.py | 307 +++ .../gapic/environments_client_config.py | 57 + dialogflow_v2/gapic/intents_client.py | 117 +- dialogflow_v2/gapic/intents_client_config.py | 71 +- .../gapic/session_entity_types_client.py | 33 +- .../session_entity_types_client_config.py | 63 +- dialogflow_v2/gapic/sessions_client.py | 21 +- dialogflow_v2/gapic/sessions_client_config.py | 51 +- .../gapic/transports/agents_grpc_transport.py | 46 +- .../transports/entity_types_grpc_transport.py | 4 +- .../transports/environments_grpc_transport.py | 124 + dialogflow_v2/proto/agent.proto | 458 ++++ dialogflow_v2/proto/agent_pb2.py | 468 ++-- dialogflow_v2/proto/agent_pb2_grpc.py | 382 ++- dialogflow_v2/proto/audio_config.proto | 351 +++ dialogflow_v2/proto/audio_config_pb2.py | 219 +- dialogflow_v2/proto/audio_config_pb2_grpc.py | 1 + dialogflow_v2/proto/context.proto | 288 +++ dialogflow_v2/proto/context_pb2.py | 322 +-- dialogflow_v2/proto/context_pb2_grpc.py | 231 +- dialogflow_v2/proto/entity_type.proto | 510 ++++ dialogflow_v2/proto/entity_type_pb2.py | 639 ++--- dialogflow_v2/proto/entity_type_pb2_grpc.py | 379 ++- dialogflow_v2/proto/environment.proto | 143 ++ dialogflow_v2/proto/environment_pb2.py | 486 ++++ dialogflow_v2/proto/environment_pb2_grpc.py | 83 + dialogflow_v2/proto/intent.proto | 1028 ++++++++ dialogflow_v2/proto/intent_pb2.py | 1635 +++++++------ dialogflow_v2/proto/intent_pb2_grpc.py | 290 ++- dialogflow_v2/proto/session.proto | 625 +++++ dialogflow_v2/proto/session_entity_type.proto | 277 +++ .../proto/session_entity_type_pb2.py | 271 ++- .../proto/session_entity_type_pb2_grpc.py | 232 +- dialogflow_v2/proto/session_pb2.py | 569 +++-- dialogflow_v2/proto/session_pb2_grpc.py | 104 +- dialogflow_v2/proto/validation_result.proto | 76 + dialogflow_v2/proto/validation_result_pb2.py | 84 +- .../proto/validation_result_pb2_grpc.py | 1 + dialogflow_v2/proto/webhook.proto | 145 ++ dialogflow_v2/proto/webhook_pb2.py | 184 +- dialogflow_v2/proto/webhook_pb2_grpc.py | 1 + dialogflow_v2/types.py | 4 + dialogflow_v2beta1/__init__.py | 11 +- dialogflow_v2beta1/gapic/agents_client.py | 180 +- .../gapic/agents_client_config.py | 95 +- dialogflow_v2beta1/gapic/contexts_client.py | 40 +- .../gapic/contexts_client_config.py | 77 +- dialogflow_v2beta1/gapic/documents_client.py | 56 +- .../gapic/documents_client_config.py | 77 +- .../gapic/entity_types_client.py | 175 +- .../gapic/entity_types_client_config.py | 93 +- dialogflow_v2beta1/gapic/enums.py | 116 +- .../gapic/environments_client.py | 299 +++ .../gapic/environments_client_config.py | 67 + dialogflow_v2beta1/gapic/intents_client.py | 128 +- .../gapic/intents_client_config.py | 81 +- .../gapic/knowledge_bases_client.py | 8 +- .../gapic/knowledge_bases_client_config.py | 73 +- .../gapic/session_entity_types_client.py | 41 +- .../session_entity_types_client_config.py | 73 +- dialogflow_v2beta1/gapic/sessions_client.py | 21 +- .../gapic/sessions_client_config.py | 61 +- .../gapic/transports/agents_grpc_transport.py | 56 +- .../transports/documents_grpc_transport.py | 22 +- .../transports/entity_types_grpc_transport.py | 10 +- .../transports/environments_grpc_transport.py | 124 + dialogflow_v2beta1/proto/agent.proto | 500 ++++ dialogflow_v2beta1/proto/agent_pb2.py | 492 ++-- dialogflow_v2beta1/proto/agent_pb2_grpc.py | 379 ++- dialogflow_v2beta1/proto/audio_config.proto | 352 +++ dialogflow_v2beta1/proto/audio_config_pb2.py | 317 +-- .../proto/audio_config_pb2_grpc.py | 1 + dialogflow_v2beta1/proto/context.proto | 329 +++ dialogflow_v2beta1/proto/context_pb2.py | 323 +-- dialogflow_v2beta1/proto/context_pb2_grpc.py | 231 +- dialogflow_v2beta1/proto/document.proto | 396 ++++ dialogflow_v2beta1/proto/document_pb2.py | 745 ++++-- dialogflow_v2beta1/proto/document_pb2_grpc.py | 237 +- dialogflow_v2beta1/proto/entity_type.proto | 545 +++++ dialogflow_v2beta1/proto/entity_type_pb2.py | 674 +++--- .../proto/entity_type_pb2_grpc.py | 381 ++- dialogflow_v2beta1/proto/environment.proto | 154 ++ dialogflow_v2beta1/proto/environment_pb2.py | 492 ++++ .../proto/environment_pb2_grpc.py | 83 + dialogflow_v2beta1/proto/gcs.proto | 36 + dialogflow_v2beta1/proto/gcs_pb2.py | 29 +- dialogflow_v2beta1/proto/gcs_pb2_grpc.py | 1 + dialogflow_v2beta1/proto/intent.proto | 1377 +++++++++++ dialogflow_v2beta1/proto/intent_pb2.py | 2077 ++++++++++------- dialogflow_v2beta1/proto/intent_pb2_grpc.py | 290 ++- dialogflow_v2beta1/proto/knowledge_base.proto | 229 ++ .../proto/knowledge_base_pb2.py | 259 +- .../proto/knowledge_base_pb2_grpc.py | 190 +- dialogflow_v2beta1/proto/session.proto | 752 ++++++ .../proto/session_entity_type.proto | 310 +++ .../proto/session_entity_type_pb2.py | 288 +-- .../proto/session_entity_type_pb2_grpc.py | 232 +- dialogflow_v2beta1/proto/session_pb2.py | 768 +++--- dialogflow_v2beta1/proto/session_pb2_grpc.py | 104 +- .../proto/validation_result.proto | 76 + .../proto/validation_result_pb2.py | 84 +- .../proto/validation_result_pb2_grpc.py | 1 + dialogflow_v2beta1/proto/webhook.proto | 153 ++ dialogflow_v2beta1/proto/webhook_pb2.py | 186 +- dialogflow_v2beta1/proto/webhook_pb2_grpc.py | 1 + dialogflow_v2beta1/types.py | 4 + noxfile.py | 1 - setup.cfg | 1 - synth.metadata | 20 +- synth.py | 193 ++ tests/unit/gapic/v2/test_agents_client_v2.py | 118 +- .../unit/gapic/v2/test_contexts_client_v2.py | 20 +- .../gapic/v2/test_entity_types_client_v2.py | 16 +- .../gapic/v2/test_environments_client_v2.py | 109 + tests/unit/gapic/v2/test_intents_client_v2.py | 16 +- .../v2/test_session_entity_types_client_v2.py | 24 +- .../unit/gapic/v2/test_sessions_client_v2.py | 4 +- .../v2beta1/test_agents_client_v2beta1.py | 104 +- .../v2beta1/test_contexts_client_v2beta1.py | 20 +- .../v2beta1/test_documents_client_v2beta1.py | 56 +- .../test_entity_types_client_v2beta1.py | 36 +- .../test_environments_client_v2beta1.py | 109 + .../v2beta1/test_intents_client_v2beta1.py | 24 +- ...est_session_entity_types_client_v2beta1.py | 24 +- .../v2beta1/test_sessions_client_v2beta1.py | 4 +- 134 files changed, 22294 insertions(+), 6766 deletions(-) create mode 100644 dialogflow_v2/gapic/environments_client.py create mode 100644 dialogflow_v2/gapic/environments_client_config.py create mode 100644 dialogflow_v2/gapic/transports/environments_grpc_transport.py create mode 100644 dialogflow_v2/proto/agent.proto create mode 100644 dialogflow_v2/proto/audio_config.proto create mode 100644 dialogflow_v2/proto/context.proto create mode 100644 dialogflow_v2/proto/entity_type.proto create mode 100644 dialogflow_v2/proto/environment.proto create mode 100644 dialogflow_v2/proto/environment_pb2.py create mode 100644 dialogflow_v2/proto/environment_pb2_grpc.py create mode 100644 dialogflow_v2/proto/intent.proto create mode 100644 dialogflow_v2/proto/session.proto create mode 100644 dialogflow_v2/proto/session_entity_type.proto create mode 100644 dialogflow_v2/proto/validation_result.proto create mode 100644 dialogflow_v2/proto/webhook.proto create mode 100644 dialogflow_v2beta1/gapic/environments_client.py create mode 100644 dialogflow_v2beta1/gapic/environments_client_config.py create mode 100644 dialogflow_v2beta1/gapic/transports/environments_grpc_transport.py create mode 100644 dialogflow_v2beta1/proto/agent.proto create mode 100644 dialogflow_v2beta1/proto/audio_config.proto create mode 100644 dialogflow_v2beta1/proto/context.proto create mode 100644 dialogflow_v2beta1/proto/document.proto create mode 100644 dialogflow_v2beta1/proto/entity_type.proto create mode 100644 dialogflow_v2beta1/proto/environment.proto create mode 100644 dialogflow_v2beta1/proto/environment_pb2.py create mode 100644 dialogflow_v2beta1/proto/environment_pb2_grpc.py create mode 100644 dialogflow_v2beta1/proto/gcs.proto create mode 100644 dialogflow_v2beta1/proto/intent.proto create mode 100644 dialogflow_v2beta1/proto/knowledge_base.proto create mode 100644 dialogflow_v2beta1/proto/session.proto create mode 100644 dialogflow_v2beta1/proto/session_entity_type.proto create mode 100644 dialogflow_v2beta1/proto/validation_result.proto create mode 100644 dialogflow_v2beta1/proto/webhook.proto create mode 100644 tests/unit/gapic/v2/test_environments_client_v2.py create mode 100644 tests/unit/gapic/v2beta1/test_environments_client_v2beta1.py diff --git a/LICENSE b/LICENSE index a8ee855de..20e4bd856 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ - Apache License + Apache License Version 2.0, January 2004 https://www.apache.org/licenses/ diff --git a/dialogflow_v2/__init__.py b/dialogflow_v2/__init__.py index 51b4739c3..2181eae23 100644 --- a/dialogflow_v2/__init__.py +++ b/dialogflow_v2/__init__.py @@ -24,6 +24,7 @@ from dialogflow_v2.gapic import contexts_client from dialogflow_v2.gapic import entity_types_client from dialogflow_v2.gapic import enums +from dialogflow_v2.gapic import environments_client from dialogflow_v2.gapic import intents_client from dialogflow_v2.gapic import session_entity_types_client from dialogflow_v2.gapic import sessions_client @@ -31,8 +32,8 @@ if sys.version_info[:2] == (2, 7): message = ( - "A future version of this library will drop support for Python 2.7." - "More details about Python 2 support for Google Cloud Client Libraries" + "A future version of this library will drop support for Python 2.7. " + "More details about Python 2 support for Google Cloud Client Libraries " "can be found at https://cloud.google.com/python/docs/python2-sunset/" ) warnings.warn(message, DeprecationWarning) @@ -53,6 +54,11 @@ class EntityTypesClient(entity_types_client.EntityTypesClient): enums = enums +class EnvironmentsClient(environments_client.EnvironmentsClient): + __doc__ = environments_client.EnvironmentsClient.__doc__ + enums = enums + + class IntentsClient(intents_client.IntentsClient): __doc__ = intents_client.IntentsClient.__doc__ enums = enums @@ -74,6 +80,7 @@ class SessionsClient(sessions_client.SessionsClient): "AgentsClient", "ContextsClient", "EntityTypesClient", + "EnvironmentsClient", "IntentsClient", "SessionEntityTypesClient", "SessionsClient", diff --git a/dialogflow_v2/gapic/agents_client.py b/dialogflow_v2/gapic/agents_client.py index 319a21355..b71ee653b 100644 --- a/dialogflow_v2/gapic/agents_client.py +++ b/dialogflow_v2/gapic/agents_client.py @@ -50,32 +50,7 @@ class AgentsClient(object): - """ - Agents are best described as Natural Language Understanding (NLU) - modules that transform user requests into actionable data. You can - include agents in your app, product, or service to determine user intent - and respond to the user in a natural way. - - After you create an agent, you can add ``Intents``, ``Contexts``, - ``Entity Types``, ``Webhooks``, and so on to manage the flow of a - conversation and match user input to predefined intents and actions. - - You can create an agent using both Dialogflow Standard Edition and - Dialogflow Enterprise Edition. For details, see `Dialogflow - Editions `__. - - You can save your agent for backup or versioning by exporting the agent - by using the ``ExportAgent`` method. You can import a saved agent by - using the ``ImportAgent`` method. - - Dialogflow provides several `prebuilt - agents `__ for - common conversation scenarios such as determining a date and time, - converting currency, and so on. - - For more information about agents, see the `Dialogflow - documentation `__. - """ + """Service for managing ``Agents``.""" SERVICE_ADDRESS = "dialogflow.googleapis.com:443" """The default address of the service.""" @@ -224,36 +199,28 @@ def __init__( self._inner_api_calls = {} # Service calls - def set_agent( + def get_agent( self, - agent, - update_mask=None, + parent, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates/updates the specified agent. + Retrieves the specified agent. Example: >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.AgentsClient() >>> - >>> # TODO: Initialize `agent`: - >>> agent = {} + >>> parent = client.project_path('[PROJECT]') >>> - >>> response = client.set_agent(agent) + >>> response = client.get_agent(parent) Args: - agent (Union[dict, ~google.cloud.dialogflow_v2.types.Agent]): Required. The agent to update. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.dialogflow_v2.types.Agent` - update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.dialogflow_v2.types.FieldMask` + parent (str): Required. The project that the agent to fetch is associated with. + Format: ``projects/``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -274,22 +241,22 @@ def set_agent( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "set_agent" not in self._inner_api_calls: + if "get_agent" not in self._inner_api_calls: self._inner_api_calls[ - "set_agent" + "get_agent" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.set_agent, - default_retry=self._method_configs["SetAgent"].retry, - default_timeout=self._method_configs["SetAgent"].timeout, + self.transport.get_agent, + default_retry=self._method_configs["GetAgent"].retry, + default_timeout=self._method_configs["GetAgent"].timeout, client_info=self._client_info, ) - request = agent_pb2.SetAgentRequest(agent=agent, update_mask=update_mask) + request = agent_pb2.GetAgentRequest(parent=parent) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("agent.parent", agent.parent)] + routing_header = [("parent", parent)] except AttributeError: pass else: @@ -298,32 +265,40 @@ def set_agent( ) metadata.append(routing_metadata) - return self._inner_api_calls["set_agent"]( + return self._inner_api_calls["get_agent"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def delete_agent( + def set_agent( self, - parent, + agent, + update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Deletes the specified agent. + Creates/updates the specified agent. Example: >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.AgentsClient() >>> - >>> parent = client.project_path('[PROJECT]') + >>> # TODO: Initialize `agent`: + >>> agent = {} >>> - >>> client.delete_agent(parent) + >>> response = client.set_agent(agent) Args: - parent (str): Required. The project that the agent to delete is associated with. - Format: ``projects/``. + agent (Union[dict, ~google.cloud.dialogflow_v2.types.Agent]): Required. The agent to update. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.dialogflow_v2.types.Agent` + update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.dialogflow_v2.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -333,6 +308,9 @@ def delete_agent( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. + Returns: + A :class:`~google.cloud.dialogflow_v2.types.Agent` instance. + Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -341,22 +319,22 @@ def delete_agent( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_agent" not in self._inner_api_calls: + if "set_agent" not in self._inner_api_calls: self._inner_api_calls[ - "delete_agent" + "set_agent" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_agent, - default_retry=self._method_configs["DeleteAgent"].retry, - default_timeout=self._method_configs["DeleteAgent"].timeout, + self.transport.set_agent, + default_retry=self._method_configs["SetAgent"].retry, + default_timeout=self._method_configs["SetAgent"].timeout, client_info=self._client_info, ) - request = agent_pb2.DeleteAgentRequest(parent=parent) + request = agent_pb2.SetAgentRequest(agent=agent, update_mask=update_mask) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [("agent.parent", agent.parent)] except AttributeError: pass else: @@ -365,11 +343,11 @@ def delete_agent( ) metadata.append(routing_metadata) - self._inner_api_calls["delete_agent"]( + return self._inner_api_calls["set_agent"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def get_agent( + def delete_agent( self, parent, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -377,7 +355,7 @@ def get_agent( metadata=None, ): """ - Retrieves the specified agent. + Deletes the specified agent. Example: >>> import dialogflow_v2 @@ -386,10 +364,10 @@ def get_agent( >>> >>> parent = client.project_path('[PROJECT]') >>> - >>> response = client.get_agent(parent) + >>> client.delete_agent(parent) Args: - parent (str): Required. The project that the agent to fetch is associated with. + parent (str): Required. The project that the agent to delete is associated with. Format: ``projects/``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -400,9 +378,6 @@ def get_agent( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. - Returns: - A :class:`~google.cloud.dialogflow_v2.types.Agent` instance. - Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -411,17 +386,17 @@ def get_agent( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_agent" not in self._inner_api_calls: + if "delete_agent" not in self._inner_api_calls: self._inner_api_calls[ - "get_agent" + "delete_agent" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_agent, - default_retry=self._method_configs["GetAgent"].retry, - default_timeout=self._method_configs["GetAgent"].timeout, + self.transport.delete_agent, + default_retry=self._method_configs["DeleteAgent"].retry, + default_timeout=self._method_configs["DeleteAgent"].timeout, client_info=self._client_info, ) - request = agent_pb2.GetAgentRequest(parent=parent) + request = agent_pb2.DeleteAgentRequest(parent=parent) if metadata is None: metadata = [] metadata = list(metadata) @@ -435,7 +410,7 @@ def get_agent( ) metadata.append(routing_metadata) - return self._inner_api_calls["get_agent"]( + self._inner_api_calls["delete_agent"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -654,7 +629,10 @@ def export_agent( >>> >>> parent = client.project_path('[PROJECT]') >>> - >>> response = client.export_agent(parent) + >>> # TODO: Initialize `agent_uri`: + >>> agent_uri = '' + >>> + >>> response = client.export_agent(parent, agent_uri) >>> >>> def callback(operation_future): ... # Handle result. @@ -741,9 +719,15 @@ def import_agent( Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new - versions from ImportAgentRequest. + versions from ``ImportAgentRequest``. After the import, the imported + draft agent will be trained automatically (unless disabled in agent + settings). However, once the import is done, training may not be + completed yet. Please call ``TrainAgent`` and wait for the operation it + returns in order to train explicitly. - Operation + Operation An operation which + tracks when importing is complete. It only tracks when the draft agent + is updated not when it is done training. Example: >>> import dialogflow_v2 @@ -844,9 +828,15 @@ def restore_agent( Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and - entity types in the older version are deleted. + entity types in the older version are deleted. After the restore, the + restored draft agent will be trained automatically (unless disabled in + agent settings). However, once the restore is done, training may not be + completed yet. Please call ``TrainAgent`` and wait for the operation it + returns in order to train explicitly. - Operation + Operation An operation which + tracks when restoring is complete. It only tracks when the draft agent + is updated not when it is done training. Example: >>> import dialogflow_v2 @@ -951,13 +941,15 @@ def get_validation_result( >>> >>> client = dialogflow_v2.AgentsClient() >>> - >>> response = client.get_validation_result() + >>> parent = client.project_path('[PROJECT]') + >>> + >>> response = client.get_validation_result(parent) Args: parent (str): Required. The project that the agent is associated with. Format: ``projects/``. - language_code (str): Optional. The language for which you want a validation result. If not - specified, the agent's default language is used. `Many + language_code (str): Optional. The language for which you want a validation result. If + not specified, the agent's default language is used. `Many languages `__ are supported. Note: languages must be enabled in the agent before they can be used. diff --git a/dialogflow_v2/gapic/agents_client_config.py b/dialogflow_v2/gapic/agents_client_config.py index 425f1066b..69aa6b3e0 100644 --- a/dialogflow_v2/gapic/agents_client_config.py +++ b/dialogflow_v2/gapic/agents_client_config.py @@ -2,65 +2,94 @@ "interfaces": { "google.cloud.dialogflow.v2.Agents": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { - "SetAgent": { + "GetAgent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, - "DeleteAgent": { + "SetAgent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, - "GetAgent": { + "DeleteAgent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "SearchAgents": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "TrainAgent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "ExportAgent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "ImportAgent": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "RestoreAgent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetValidationResult": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/dialogflow_v2/gapic/contexts_client.py b/dialogflow_v2/gapic/contexts_client.py index c4425f1a1..c0592c94a 100644 --- a/dialogflow_v2/gapic/contexts_client.py +++ b/dialogflow_v2/gapic/contexts_client.py @@ -49,24 +49,7 @@ class ContextsClient(object): - """ - A context represents additional information included with user input or - with an intent returned by the Dialogflow API. Contexts are helpful for - differentiating user input which may be vague or have a different - meaning depending on additional details from your application such as - user setting and preferences, previous user input, where the user is in - your application, geographic location, and so on. - - You can include contexts as input parameters of a ``DetectIntent`` (or - ``StreamingDetectIntent``) request, or as output contexts included in - the returned intent. Contexts expire when an intent is matched, after - the number of ``DetectIntent`` requests specified by the - ``lifespan_count`` parameter, or after 20 minutes if no intents are - matched for a ``DetectIntent`` request. - - For more information about contexts, see the `Dialogflow - documentation `__. - """ + """Service for managing ``Contexts``.""" SERVICE_ADDRESS = "dialogflow.googleapis.com:443" """The default address of the service.""" @@ -243,7 +226,8 @@ def list_contexts( >>> >>> client = dialogflow_v2.ContextsClient() >>> - >>> parent = client.session_path('[PROJECT]', '[SESSION]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # Iterate over all results >>> for element in client.list_contexts(parent): @@ -348,7 +332,8 @@ def get_context( >>> >>> client = dialogflow_v2.ContextsClient() >>> - >>> name = client.context_path('[PROJECT]', '[SESSION]', '[CONTEXT]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> response = client.get_context(name) @@ -426,7 +411,8 @@ def create_context( >>> >>> client = dialogflow_v2.ContextsClient() >>> - >>> parent = client.session_path('[PROJECT]', '[SESSION]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # TODO: Initialize `context`: >>> context = {} @@ -587,7 +573,8 @@ def delete_context( >>> >>> client = dialogflow_v2.ContextsClient() >>> - >>> name = client.context_path('[PROJECT]', '[SESSION]', '[CONTEXT]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> client.delete_context(name) @@ -659,13 +646,14 @@ def delete_all_contexts( >>> >>> client = dialogflow_v2.ContextsClient() >>> - >>> parent = client.session_path('[PROJECT]', '[SESSION]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> client.delete_all_contexts(parent) Args: - parent (str): Required. The name of the session to delete all contexts from. Format: - ``projects//agent/sessions/`` or + parent (str): Required. The name of the session to delete all contexts from. + Format: ``projects//agent/sessions/`` or ``projects//agent/environments//users//sessions/``. If ``Environment ID`` is not specified we assume default 'draft' environment. If ``User ID`` is not specified, we assume default '-' diff --git a/dialogflow_v2/gapic/contexts_client_config.py b/dialogflow_v2/gapic/contexts_client_config.py index a76c4394e..76d84ffba 100644 --- a/dialogflow_v2/gapic/contexts_client_config.py +++ b/dialogflow_v2/gapic/contexts_client_config.py @@ -2,50 +2,79 @@ "interfaces": { "google.cloud.dialogflow.v2.Contexts": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { "ListContexts": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetContext": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "CreateContext": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "UpdateContext": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteContext": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteAllContexts": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/dialogflow_v2/gapic/entity_types_client.py b/dialogflow_v2/gapic/entity_types_client.py index 4efa3ead2..fe8f0d29d 100644 --- a/dialogflow_v2/gapic/entity_types_client.py +++ b/dialogflow_v2/gapic/entity_types_client.py @@ -54,35 +54,7 @@ class EntityTypesClient(object): - """ - Entities are extracted from user input and represent parameters that are - meaningful to your application. For example, a date range, a proper name - such as a geographic location or landmark, and so on. Entities represent - actionable data for your application. - - When you define an entity, you can also include synonyms that all map to - that entity. For example, "soft drink", "soda", "pop", and so on. - - There are three types of entities: - - - **System** - entities that are defined by the Dialogflow API for - common data types such as date, time, currency, and so on. A system - entity is represented by the ``EntityType`` type. - - - **Custom** - entities that are defined by you that represent - actionable data that is meaningful to your application. For example, - you could define a ``pizza.sauce`` entity for red or white pizza - sauce, a ``pizza.cheese`` entity for the different types of cheese on - a pizza, a ``pizza.topping`` entity for different toppings, and so - on. A custom entity is represented by the ``EntityType`` type. - - - **User** - entities that are built for an individual user such as - favorites, preferences, playlists, and so on. A user entity is - represented by the ``SessionEntityType`` type. - - For more information about entity types, see the `Dialogflow - documentation `__. - """ + """Service for managing ``EntityTypes``.""" SERVICE_ADDRESS = "dialogflow.googleapis.com:443" """The default address of the service.""" @@ -112,21 +84,28 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def entity_type_path(cls, project, entity_type): - """Return a fully-qualified entity_type string.""" + def project_agent_path(cls, project): + """Return a fully-qualified project_agent string.""" return google.api_core.path_template.expand( - "projects/{project}/agent/entityTypes/{entity_type}", - project=project, - entity_type=entity_type, + "projects/{project}/agent", project=project ) @classmethod - def project_agent_path(cls, project): - """Return a fully-qualified project_agent string.""" + def agent_path(cls, project): + """Return a fully-qualified agent string.""" return google.api_core.path_template.expand( "projects/{project}/agent", project=project ) + @classmethod + def entity_type_path(cls, project, entity_type): + """Return a fully-qualified entity_type string.""" + return google.api_core.path_template.expand( + "projects/{project}/agent/entityTypes/{entity_type}", + project=project, + entity_type=entity_type, + ) + def __init__( self, transport=None, @@ -257,7 +236,7 @@ def list_entity_types( >>> >>> client = dialogflow_v2.EntityTypesClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> parent = client.agent_path('[PROJECT]') >>> >>> # Iterate over all results >>> for element in client.list_entity_types(parent): @@ -276,11 +255,10 @@ def list_entity_types( Args: parent (str): Required. The agent to list all entity types from. Format: ``projects//agent``. - language_code (str): Optional. The language to list entity synonyms for. If not specified, - the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. page_size (int): The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page @@ -373,11 +351,10 @@ def get_entity_type( Args: name (str): Required. The name of the entity type. Format: ``projects//agent/entityTypes/``. - language_code (str): Optional. The language to retrieve entity synonyms for. If not - specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -445,7 +422,7 @@ def create_entity_type( >>> >>> client = dialogflow_v2.EntityTypesClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> parent = client.agent_path('[PROJECT]') >>> >>> # TODO: Initialize `entity_type`: >>> entity_type = {} @@ -459,11 +436,10 @@ def create_entity_type( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.EntityType` - language_code (str): Optional. The language of entity synonyms defined in ``entity_type``. If - not specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -541,11 +517,10 @@ def update_entity_type( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.EntityType` - language_code (str): Optional. The language of entity synonyms defined in ``entity_type``. If - not specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated. If a dict is provided, it must be of the same form as the protobuf @@ -690,7 +665,7 @@ def batch_update_entity_types( >>> >>> client = dialogflow_v2.EntityTypesClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> parent = client.agent_path('[PROJECT]') >>> >>> response = client.batch_update_entity_types(parent) >>> @@ -714,11 +689,10 @@ def batch_update_entity_types( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.EntityTypeBatch` - language_code (str): Optional. The language of entity synonyms defined in ``entity_types``. - If not specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated. If a dict is provided, it must be of the same form as the protobuf @@ -808,7 +782,7 @@ def batch_delete_entity_types( >>> >>> client = dialogflow_v2.EntityTypesClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> parent = client.agent_path('[PROJECT]') >>> >>> # TODO: Initialize `entity_type_names`: >>> entity_type_names = [] @@ -827,8 +801,8 @@ def batch_delete_entity_types( Args: parent (str): Required. The name of the agent to delete all entities types for. Format: ``projects//agent``. - entity_type_names (list[str]): Required. The names entity types to delete. All names must point to the - same agent as ``parent``. + entity_type_names (list[str]): Required. The names entity types to delete. All names must point to + the same agent as ``parent``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -927,11 +901,10 @@ def batch_create_entities( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.Entity` - language_code (str): Optional. The language of entity synonyms defined in ``entities``. If - not specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -999,8 +972,8 @@ def batch_update_entities( metadata=None, ): """ - Updates or creates multiple entities in the specified entity type. This - method does not affect entities in the entity type that aren't + Updates or creates multiple entities in the specified entity type. + This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation @@ -1027,17 +1000,17 @@ def batch_update_entities( >>> metadata = response.metadata() Args: - parent (str): Required. The name of the entity type to update or create entities in. - Format: ``projects//agent/entityTypes/``. + parent (str): Required. The name of the entity type to update or create entities + in. Format: + ``projects//agent/entityTypes/``. entities (list[Union[dict, ~google.cloud.dialogflow_v2.types.Entity]]): Required. The entities to update or create. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.Entity` - language_code (str): Optional. The language of entity synonyms defined in ``entities``. If - not specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated. If a dict is provided, it must be of the same form as the protobuf @@ -1139,14 +1112,13 @@ def batch_delete_entities( Args: parent (str): Required. The name of the entity type to delete entries for. Format: ``projects//agent/entityTypes/``. - entity_values (list[str]): Required. The reference ``values`` of the entities to delete. Note that - these are not fully-qualified names, i.e. they don't start with + entity_values (list[str]): Required. The reference ``values`` of the entities to delete. Note + that these are not fully-qualified names, i.e. they don't start with ``projects/``. - language_code (str): Optional. The language of entity synonyms defined in ``entities``. If - not specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. diff --git a/dialogflow_v2/gapic/entity_types_client_config.py b/dialogflow_v2/gapic/entity_types_client_config.py index 6a00c789e..095a292f5 100644 --- a/dialogflow_v2/gapic/entity_types_client_config.py +++ b/dialogflow_v2/gapic/entity_types_client_config.py @@ -2,70 +2,99 @@ "interfaces": { "google.cloud.dialogflow.v2.EntityTypes": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { "ListEntityTypes": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetEntityType": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "CreateEntityType": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "UpdateEntityType": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteEntityType": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchUpdateEntityTypes": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchDeleteEntityTypes": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchCreateEntities": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchUpdateEntities": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchDeleteEntities": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/dialogflow_v2/gapic/enums.py b/dialogflow_v2/gapic/enums.py index 10f193ac9..d7d342fb3 100644 --- a/dialogflow_v2/gapic/enums.py +++ b/dialogflow_v2/gapic/enums.py @@ -29,8 +29,8 @@ class AudioEncoding(enum.IntEnum): Attributes: AUDIO_ENCODING_UNSPECIFIED (int): Not specified. AUDIO_ENCODING_LINEAR_16 (int): Uncompressed 16-bit signed little-endian samples (Linear PCM). - AUDIO_ENCODING_FLAC (int): ```FLAC`` `__ (Free Lossless - Audio Codec) is the recommended encoding because it is lossless + AUDIO_ENCODING_FLAC (int): ```FLAC`` `__ (Free + Lossless Audio Codec) is the recommended encoding because it is lossless (therefore recognition is not compromised) and requires only about half the bandwidth of ``LINEAR16``. ``FLAC`` stream encoding supports 16-bit and 24-bit samples, however, not all fields in ``STREAMINFO`` are @@ -38,12 +38,13 @@ class AudioEncoding(enum.IntEnum): AUDIO_ENCODING_MULAW (int): 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. AUDIO_ENCODING_AMR (int): Adaptive Multi-Rate Narrowband codec. ``sample_rate_hertz`` must be 8000. - AUDIO_ENCODING_AMR_WB (int): Adaptive Multi-Rate Wideband codec. ``sample_rate_hertz`` must be 16000. + AUDIO_ENCODING_AMR_WB (int): Adaptive Multi-Rate Wideband codec. ``sample_rate_hertz`` must be + 16000. AUDIO_ENCODING_OGG_OPUS (int): Opus encoded audio frames in Ogg container (`OggOpus `__). ``sample_rate_hertz`` must be 16000. - AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE (int): Although the use of lossy encodings is not recommended, if a very low - bitrate encoding is required, ``OGG_OPUS`` is highly preferred over + AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE (int): Although the use of lossy encodings is not recommended, if a very + low bitrate encoding is required, ``OGG_OPUS`` is highly preferred over Speex encoding. The `Speex `__ encoding supported by Dialogflow API has a header byte in each block, as in MIME type ``audio/x-speex-with-header-byte``. It is a variant of the RTP Speex @@ -83,8 +84,8 @@ class IntentView(enum.IntEnum): class NullValue(enum.IntEnum): """ - ``NullValue`` is a singleton enumeration to represent the null value for - the ``Value`` type union. + ``NullValue`` is a singleton enumeration to represent the null value + for the ``Value`` type union. The JSON representation for ``NullValue`` is JSON ``null``. @@ -122,22 +123,22 @@ class SpeechModelVariant(enum.IntEnum): See the `Cloud Speech documentation `__ - for which models have different variants. For example, the "phone\_call" + for which models have different variants. For example, the "phone_call" model has both a standard and an enhanced variant. When you use an enhanced model, you will generally receive higher quality results than for a standard model. Attributes: SPEECH_MODEL_VARIANT_UNSPECIFIED (int): No model variant specified. In this case Dialogflow defaults to - USE\_BEST\_AVAILABLE. - USE_BEST_AVAILABLE (int): Use the best available variant of the ``Speech model`` that the caller - is eligible for. + USE_BEST_AVAILABLE. + USE_BEST_AVAILABLE (int): Use the best available variant of the ``Speech model`` that the + caller is eligible for. Please see the `Dialogflow docs `__ for how to make your project eligible for enhanced models. - USE_STANDARD (int): Use standard model variant even if an enhanced model is available. See - the `Cloud Speech + USE_STANDARD (int): Use standard model variant even if an enhanced model is available. + See the `Cloud Speech documentation `__ for details about enhanced models. USE_ENHANCED (int): Use an enhanced model variant: @@ -267,6 +268,28 @@ class Kind(enum.IntEnum): KIND_REGEXP = 3 +class Environment(object): + class State(enum.IntEnum): + """ + Represents an environment state. When an environment is pointed to a + new agent version, the environment is temporarily set to the ``LOADING`` + state. During that time, the environment keeps on serving the previous + version of the agent. After the new agent version is done loading, the + environment is set back to the ``RUNNING`` state. + + Attributes: + STATE_UNSPECIFIED (int): Not specified. This value is not used. + STOPPED (int): Stopped. + LOADING (int): Loading. + RUNNING (int): Running. + """ + + STATE_UNSPECIFIED = 0 + STOPPED = 1 + LOADING = 2 + RUNNING = 3 + + class Intent(object): class WebhookState(enum.IntEnum): """ @@ -307,10 +330,11 @@ class Type(enum.IntEnum): class Message(object): class Platform(enum.IntEnum): """ - Represents different platforms that a rich message can be intended for. + The rich response message integration platform. See + `Integrations `__. Attributes: - PLATFORM_UNSPECIFIED (int): Not specified. + PLATFORM_UNSPECIFIED (int): Default platform. FACEBOOK (int): Facebook. SLACK (int): Slack. TELEGRAM (int): Telegram. @@ -318,67 +342,8 @@ class Platform(enum.IntEnum): SKYPE (int): Skype. LINE (int): Line. VIBER (int): Viber. - ACTIONS_ON_GOOGLE (int): Actions on Google. When using Actions on Google, you can choose one of - the specific Intent.Message types that mention support for Actions on - Google, or you can use the advanced Intent.Message.payload field. The - payload field provides access to AoG features not available in the - specific message types. If using the Intent.Message.payload field, it - should have a structure similar to the JSON message shown here. For more - information, see `Actions on Google Webhook - Format `__ - - .. raw:: html -
{
-                    "expectUserResponse": true,
-                    "isSsml": false,
-                    "noInputPrompts": [],
-                    "richResponse": {
-                      "items": [
-                        {
-                          "simpleResponse": {
-                            "displayText": "hi",
-                            "textToSpeech": "hello"
-                          }
-                        }
-                      ],
-                      "suggestions": [
-                        {
-                          "title": "Say this"
-                        },
-                        {
-                          "title": "or this"
-                        }
-                      ]
-                    },
-                    "systemIntent": {
-                      "data": {
-                        "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
-                        "listSelect": {
-                          "items": [
-                            {
-                              "optionInfo": {
-                                "key": "key1",
-                                "synonyms": [
-                                  "key one"
-                                ]
-                              },
-                              "title": "must not be empty, but unique"
-                            },
-                            {
-                              "optionInfo": {
-                                "key": "key2",
-                                "synonyms": [
-                                  "key two"
-                                ]
-                              },
-                              "title": "must not be empty, but unique"
-                            }
-                          ]
-                        }
-                      },
-                      "intent": "actions.intent.OPTION"
-                    }
-                  }
+ ACTIONS_ON_GOOGLE (int): Google Assistant See `Dialogflow webhook + format `__ GOOGLE_HANGOUTS (int): Google Hangouts. """ @@ -480,8 +445,8 @@ class EntityOverrideMode(enum.IntEnum): ENTITY_OVERRIDE_MODE_UNSPECIFIED (int): Not specified. This value should be never used. ENTITY_OVERRIDE_MODE_OVERRIDE (int): The collection of session entities overrides the collection of entities in the corresponding custom entity type. - ENTITY_OVERRIDE_MODE_SUPPLEMENT (int): The collection of session entities extends the collection of entities in - the corresponding custom entity type. + ENTITY_OVERRIDE_MODE_SUPPLEMENT (int): The collection of session entities extends the collection of + entities in the corresponding custom entity type. Note: Even in this override mode calls to ``ListSessionEntityTypes``, ``GetSessionEntityType``, ``CreateSessionEntityType`` and diff --git a/dialogflow_v2/gapic/environments_client.py b/dialogflow_v2/gapic/environments_client.py new file mode 100644 index 000000000..393d5958f --- /dev/null +++ b/dialogflow_v2/gapic/environments_client.py @@ -0,0 +1,307 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Accesses the google.cloud.dialogflow.v2 Environments API.""" + +import functools +import pkg_resources +import warnings + +from google.oauth2 import service_account +import google.api_core.client_options +import google.api_core.gapic_v1.client_info +import google.api_core.gapic_v1.config +import google.api_core.gapic_v1.method +import google.api_core.gapic_v1.routing_header +import google.api_core.grpc_helpers +import google.api_core.page_iterator +import google.api_core.path_template +import grpc + +from dialogflow_v2.gapic import enums +from dialogflow_v2.gapic import environments_client_config +from dialogflow_v2.gapic.transports import environments_grpc_transport +from dialogflow_v2.proto import agent_pb2 +from dialogflow_v2.proto import agent_pb2_grpc +from dialogflow_v2.proto import context_pb2 +from dialogflow_v2.proto import context_pb2_grpc +from dialogflow_v2.proto import entity_type_pb2 +from dialogflow_v2.proto import entity_type_pb2_grpc +from dialogflow_v2.proto import environment_pb2 +from dialogflow_v2.proto import environment_pb2_grpc +from dialogflow_v2.proto import validation_result_pb2 +from google.longrunning import operations_pb2 +from google.protobuf import empty_pb2 +from google.protobuf import field_mask_pb2 +from google.protobuf import struct_pb2 + + +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version + + +class EnvironmentsClient(object): + """Service for managing ``Environments``.""" + + SERVICE_ADDRESS = "dialogflow.googleapis.com:443" + """The default address of the service.""" + + # The name of the interface for this client. This is the key used to + # find the method configuration in the client_config dictionary. + _INTERFACE_NAME = "google.cloud.dialogflow.v2.Environments" + + @classmethod + def from_service_account_file(cls, filename, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + dialogflow_v2.EnvironmentsClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @classmethod + def agent_path(cls, project): + """Return a fully-qualified agent string.""" + return google.api_core.path_template.expand( + "projects/{project}/agent", project=project + ) + + def __init__( + self, + transport=None, + channel=None, + credentials=None, + client_config=None, + client_info=None, + client_options=None, + ): + """Constructor. + + Args: + transport (Union[~.EnvironmentsGrpcTransport, + Callable[[~.Credentials, type], ~.EnvironmentsGrpcTransport]): A transport + instance, responsible for actually making the API calls. + The default transport uses the gRPC protocol. + This argument may also be a callable which returns a + transport instance. Callables will be sent the credentials + as the first argument and the default transport class as + the second argument. + channel (grpc.Channel): DEPRECATED. A ``Channel`` instance + through which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. + credentials (google.auth.credentials.Credentials): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If none + are specified, the client will attempt to ascertain the + credentials from the environment. + This argument is mutually exclusive with providing a + transport instance to ``transport``; doing so will raise + an exception. + client_config (dict): DEPRECATED. A dictionary of call options for + each method. If not specified, the default configuration is used. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + client_options (Union[dict, google.api_core.client_options.ClientOptions]): + Client options used to set user options on the client. API Endpoint + should be set through client_options. + """ + # Raise deprecation warnings for things we want to go away. + if client_config is not None: + warnings.warn( + "The `client_config` argument is deprecated.", + PendingDeprecationWarning, + stacklevel=2, + ) + else: + client_config = environments_client_config.config + + if channel: + warnings.warn( + "The `channel` argument is deprecated; use " "`transport` instead.", + PendingDeprecationWarning, + stacklevel=2, + ) + + api_endpoint = self.SERVICE_ADDRESS + if client_options: + if type(client_options) == dict: + client_options = google.api_core.client_options.from_dict( + client_options + ) + if client_options.api_endpoint: + api_endpoint = client_options.api_endpoint + + # Instantiate the transport. + # The transport is responsible for handling serialization and + # deserialization and actually sending data to the service. + if transport: + if callable(transport): + self.transport = transport( + credentials=credentials, + default_class=environments_grpc_transport.EnvironmentsGrpcTransport, + address=api_endpoint, + ) + else: + if credentials: + raise ValueError( + "Received both a transport instance and " + "credentials; these are mutually exclusive." + ) + self.transport = transport + else: + self.transport = environments_grpc_transport.EnvironmentsGrpcTransport( + address=api_endpoint, channel=channel, credentials=credentials + ) + + if client_info is None: + client_info = google.api_core.gapic_v1.client_info.ClientInfo( + gapic_version=_GAPIC_LIBRARY_VERSION + ) + else: + client_info.gapic_version = _GAPIC_LIBRARY_VERSION + self._client_info = client_info + + # Parse out the default settings for retry and timeout for each RPC + # from the client configuration. + # (Ordinarily, these are the defaults specified in the `*_config.py` + # file next to this one.) + self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( + client_config["interfaces"][self._INTERFACE_NAME] + ) + + # Save a dictionary of cached API call functions. + # These are the actual callables which invoke the proper + # transport methods, wrapped with `wrap_method` to add retry, + # timeout, and the like. + self._inner_api_calls = {} + + # Service calls + def list_environments( + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Returns the list of all non-draft environments of the specified agent. + + Example: + >>> import dialogflow_v2 + >>> + >>> client = dialogflow_v2.EnvironmentsClient() + >>> + >>> parent = client.agent_path('[PROJECT]') + >>> + >>> # Iterate over all results + >>> for element in client.list_environments(parent): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_environments(parent).pages: + ... for element in page: + ... # process element + ... pass + + Args: + parent (str): Required. The agent to list all environments from. Format: + ``projects//agent``. + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2.types.Environment` instances. + You can also iterate over the pages of the response + using its `pages` property. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "list_environments" not in self._inner_api_calls: + self._inner_api_calls[ + "list_environments" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.list_environments, + default_retry=self._method_configs["ListEnvironments"].retry, + default_timeout=self._method_configs["ListEnvironments"].timeout, + client_info=self._client_info, + ) + + request = environment_pb2.ListEnvironmentsRequest( + parent=parent, page_size=page_size + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_environments"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="environments", + request_token_field="page_token", + response_token_field="next_page_token", + ) + return iterator diff --git a/dialogflow_v2/gapic/environments_client_config.py b/dialogflow_v2/gapic/environments_client_config.py new file mode 100644 index 000000000..7ffc98679 --- /dev/null +++ b/dialogflow_v2/gapic/environments_client_config.py @@ -0,0 +1,57 @@ +config = { + "interfaces": { + "google.cloud.dialogflow.v2.Environments": { + "retry_codes": { + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], + }, + "retry_params": { + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + }, + "methods": { + "ListEnvironments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + } + }, + } + } +} diff --git a/dialogflow_v2/gapic/intents_client.py b/dialogflow_v2/gapic/intents_client.py index 4f4e092fd..0d3188689 100644 --- a/dialogflow_v2/gapic/intents_client.py +++ b/dialogflow_v2/gapic/intents_client.py @@ -43,6 +43,8 @@ from dialogflow_v2.proto import context_pb2_grpc from dialogflow_v2.proto import entity_type_pb2 from dialogflow_v2.proto import entity_type_pb2_grpc +from dialogflow_v2.proto import environment_pb2 +from dialogflow_v2.proto import environment_pb2_grpc from dialogflow_v2.proto import intent_pb2 from dialogflow_v2.proto import intent_pb2_grpc from dialogflow_v2.proto import validation_result_pb2 @@ -56,38 +58,7 @@ class IntentsClient(object): - """ - An intent represents a mapping between input from a user and an action - to be taken by your application. When you pass user input to the - ``DetectIntent`` (or ``StreamingDetectIntent``) method, the Dialogflow - API analyzes the input and searches for a matching intent. If no match - is found, the Dialogflow API returns a fallback intent (``is_fallback`` - = true). - - You can provide additional information for the Dialogflow API to use to - match user input to an intent by adding the following to your intent. - - - **Contexts** - provide additional context for intent analysis. For - example, if an intent is related to an object in your application - that plays music, you can provide a context to determine when to - match the intent if the user input is "turn it off". You can include - a context that matches the intent when there is previous user input - of "play music", and not when there is previous user input of "turn - on the light". - - - **Events** - allow for matching an intent by using an event name - instead of user input. Your application can provide an event name and - related parameters to the Dialogflow API to match an intent. For - example, when your application starts, you can send a welcome event - with a user name parameter to the Dialogflow API to match an intent - with a personalized welcome message for the user. - - - **Training phrases** - provide examples of user input to train the - Dialogflow API agent to better match intents. - - For more information about intents, see the `Dialogflow - documentation `__. - """ + """Service for managing ``Intents``.""" SERVICE_ADDRESS = "dialogflow.googleapis.com:443" """The default address of the service.""" @@ -124,17 +95,17 @@ def agent_path(cls, project, agent): ) @classmethod - def intent_path(cls, project, intent): - """Return a fully-qualified intent string.""" + def project_agent_path(cls, project): + """Return a fully-qualified project_agent string.""" return google.api_core.path_template.expand( - "projects/{project}/agent/intents/{intent}", project=project, intent=intent + "projects/{project}/agent", project=project ) @classmethod - def project_agent_path(cls, project): - """Return a fully-qualified project_agent string.""" + def intent_path(cls, project, intent): + """Return a fully-qualified intent string.""" return google.api_core.path_template.expand( - "projects/{project}/agent", project=project + "projects/{project}/agent/intents/{intent}", project=project, intent=intent ) def __init__( @@ -268,7 +239,7 @@ def list_intents( >>> >>> client = dialogflow_v2.IntentsClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> parent = client.agent_path('[PROJECT]') >>> >>> # Iterate over all results >>> for element in client.list_intents(parent): @@ -287,12 +258,10 @@ def list_intents( Args: parent (str): Required. The agent to list all intents from. Format: ``projects//agent``. - language_code (str): Optional. The language to list training phrases, parameters and rich - messages for. If not specified, the agent's default language is used. - `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. intent_view (~google.cloud.dialogflow_v2.types.IntentView): Optional. The resource view to apply to the returned intent. page_size (int): The maximum number of resources contained in the underlying API response. If page streaming is performed per- @@ -390,12 +359,10 @@ def get_intent( Args: name (str): Required. The name of the intent. Format: ``projects//agent/intents/``. - language_code (str): Optional. The language to retrieve training phrases, parameters and rich - messages for. If not specified, the agent's default language is used. - `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. intent_view (~google.cloud.dialogflow_v2.types.IntentView): Optional. The resource view to apply to the returned intent. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -465,7 +432,7 @@ def create_intent( >>> >>> client = dialogflow_v2.IntentsClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> parent = client.agent_path('[PROJECT]') >>> >>> # TODO: Initialize `intent`: >>> intent = {} @@ -479,12 +446,10 @@ def create_intent( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.Intent` - language_code (str): Optional. The language of training phrases, parameters and rich messages - defined in ``intent``. If not specified, the agent's default language is - used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. intent_view (~google.cloud.dialogflow_v2.types.IntentView): Optional. The resource view to apply to the returned intent. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -567,12 +532,10 @@ def update_intent( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.Intent` - language_code (str): Optional. The language of training phrases, parameters and rich messages - defined in ``intent``. If not specified, the agent's default language is - used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated. If a dict is provided, it must be of the same form as the protobuf @@ -651,8 +614,8 @@ def delete_intent( >>> client.delete_intent(name) Args: - name (str): Required. The name of the intent to delete. If this intent has direct or - indirect followup intents, we also delete them. Format: + name (str): Required. The name of the intent to delete. If this intent has + direct or indirect followup intents, we also delete them. Format: ``projects//agent/intents/``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -721,7 +684,7 @@ def batch_update_intents( >>> >>> client = dialogflow_v2.IntentsClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> parent = client.agent_path('[PROJECT]') >>> >>> response = client.batch_update_intents(parent) >>> @@ -735,8 +698,8 @@ def batch_update_intents( >>> metadata = response.metadata() Args: - parent (str): Required. The name of the agent to update or create intents in. Format: - ``projects//agent``. + parent (str): Required. The name of the agent to update or create intents in. + Format: ``projects//agent``. intent_batch_uri (str): The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must start with "gs://". @@ -744,12 +707,10 @@ def batch_update_intents( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.IntentBatch` - language_code (str): Optional. The language of training phrases, parameters and rich messages - defined in ``intents``. If not specified, the agent's default language - is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated. If a dict is provided, it must be of the same form as the protobuf @@ -840,7 +801,7 @@ def batch_delete_intents( >>> >>> client = dialogflow_v2.IntentsClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> parent = client.agent_path('[PROJECT]') >>> >>> # TODO: Initialize `intents`: >>> intents = [] @@ -859,8 +820,8 @@ def batch_delete_intents( Args: parent (str): Required. The name of the agent to delete all entities types for. Format: ``projects//agent``. - intents (list[Union[dict, ~google.cloud.dialogflow_v2.types.Intent]]): Required. The collection of intents to delete. Only intent ``name`` must - be filled in. + intents (list[Union[dict, ~google.cloud.dialogflow_v2.types.Intent]]): Required. The collection of intents to delete. Only intent ``name`` + must be filled in. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.Intent` diff --git a/dialogflow_v2/gapic/intents_client_config.py b/dialogflow_v2/gapic/intents_client_config.py index a1b19ea87..91532198c 100644 --- a/dialogflow_v2/gapic/intents_client_config.py +++ b/dialogflow_v2/gapic/intents_client_config.py @@ -2,55 +2,84 @@ "interfaces": { "google.cloud.dialogflow.v2.Intents": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { "ListIntents": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetIntent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "CreateIntent": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "UpdateIntent": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteIntent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchUpdateIntents": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchDeleteIntents": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/dialogflow_v2/gapic/session_entity_types_client.py b/dialogflow_v2/gapic/session_entity_types_client.py index 27f21c1fd..dd207c1dc 100644 --- a/dialogflow_v2/gapic/session_entity_types_client.py +++ b/dialogflow_v2/gapic/session_entity_types_client.py @@ -40,6 +40,8 @@ from dialogflow_v2.proto import context_pb2_grpc from dialogflow_v2.proto import entity_type_pb2 from dialogflow_v2.proto import entity_type_pb2_grpc +from dialogflow_v2.proto import environment_pb2 +from dialogflow_v2.proto import environment_pb2_grpc from dialogflow_v2.proto import intent_pb2 from dialogflow_v2.proto import intent_pb2_grpc from dialogflow_v2.proto import session_entity_type_pb2 @@ -55,24 +57,7 @@ class SessionEntityTypesClient(object): - """ - Entities are extracted from user input and represent parameters that are - meaningful to your application. For example, a date range, a proper name - such as a geographic location or landmark, and so on. Entities represent - actionable data for your application. - - Session entity types are referred to as **User** entity types and are - entities that are built for an individual user such as favorites, - preferences, playlists, and so on. You can redefine a session entity - type at the session level. - - Session entity methods do not work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities with - Google Assistant integration. - - For more information about entity types, see the `Dialogflow - documentation `__. - """ + """Service for managing ``SessionEntityTypes``.""" SERVICE_ADDRESS = "dialogflow.googleapis.com:443" """The default address of the service.""" @@ -253,7 +238,8 @@ def list_session_entity_types( >>> >>> client = dialogflow_v2.SessionEntityTypesClient() >>> - >>> parent = client.session_path('[PROJECT]', '[SESSION]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # Iterate over all results >>> for element in client.list_session_entity_types(parent): @@ -364,7 +350,8 @@ def get_session_entity_type( >>> >>> client = dialogflow_v2.SessionEntityTypesClient() >>> - >>> name = client.session_entity_type_path('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> response = client.get_session_entity_type(name) @@ -447,7 +434,8 @@ def create_session_entity_type( >>> >>> client = dialogflow_v2.SessionEntityTypesClient() >>> - >>> parent = client.session_path('[PROJECT]', '[SESSION]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # TODO: Initialize `session_entity_type`: >>> session_entity_type = {} @@ -618,7 +606,8 @@ def delete_session_entity_type( >>> >>> client = dialogflow_v2.SessionEntityTypesClient() >>> - >>> name = client.session_entity_type_path('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> client.delete_session_entity_type(name) diff --git a/dialogflow_v2/gapic/session_entity_types_client_config.py b/dialogflow_v2/gapic/session_entity_types_client_config.py index b626ed74e..d034682e5 100644 --- a/dialogflow_v2/gapic/session_entity_types_client_config.py +++ b/dialogflow_v2/gapic/session_entity_types_client_config.py @@ -2,45 +2,74 @@ "interfaces": { "google.cloud.dialogflow.v2.SessionEntityTypes": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { "ListSessionEntityTypes": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetSessionEntityType": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "CreateSessionEntityType": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "UpdateSessionEntityType": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteSessionEntityType": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/dialogflow_v2/gapic/sessions_client.py b/dialogflow_v2/gapic/sessions_client.py index c0b62e2ed..4d75bc8af 100644 --- a/dialogflow_v2/gapic/sessions_client.py +++ b/dialogflow_v2/gapic/sessions_client.py @@ -39,6 +39,8 @@ from dialogflow_v2.proto import context_pb2_grpc from dialogflow_v2.proto import entity_type_pb2 from dialogflow_v2.proto import entity_type_pb2_grpc +from dialogflow_v2.proto import environment_pb2 +from dialogflow_v2.proto import environment_pb2_grpc from dialogflow_v2.proto import intent_pb2 from dialogflow_v2.proto import intent_pb2_grpc from dialogflow_v2.proto import session_entity_type_pb2 @@ -57,9 +59,10 @@ class SessionsClient(object): """ - A session represents an interaction with a user. You retrieve user input - and pass it to the ``DetectIntent`` (or ``StreamingDetectIntent``) - method to determine user intent and respond. + A service used for session interactions. + + For more information, see the `API interactions + guide `__. """ SERVICE_ADDRESS = "dialogflow.googleapis.com:443" @@ -234,7 +237,8 @@ def detect_intent( >>> >>> client = dialogflow_v2.SessionsClient() >>> - >>> session = client.session_path('[PROJECT]', '[SESSION]') + >>> # TODO: Initialize `session`: + >>> session = '' >>> >>> # TODO: Initialize `query_input`: >>> query_input = {} @@ -251,6 +255,9 @@ def detect_intent( ``User Id``. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the ``Session ID`` and ``User ID`` must not exceed 36 characters. + + For more information, see the `API interactions + guide `__. query_input (Union[dict, ~google.cloud.dialogflow_v2.types.QueryInput]): Required. The input specification. It can be set to: 1. an audio config @@ -281,9 +288,9 @@ def detect_intent( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.FieldMask` - input_audio (bytes): The natural language speech audio to be processed. This field should be - populated iff ``query_input`` is set to an input audio config. A single - request can contain up to 1 minute of speech audio data. + input_audio (bytes): The natural language speech audio to be processed. This field should + be populated iff ``query_input`` is set to an input audio config. A + single request can contain up to 1 minute of speech audio data. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. diff --git a/dialogflow_v2/gapic/sessions_client_config.py b/dialogflow_v2/gapic/sessions_client_config.py index b7a53bf38..23bcd56dd 100644 --- a/dialogflow_v2/gapic/sessions_client_config.py +++ b/dialogflow_v2/gapic/sessions_client_config.py @@ -2,30 +2,59 @@ "interfaces": { "google.cloud.dialogflow.v2.Sessions": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { "DetectIntent": { "timeout_millis": 220000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "StreamingDetectIntent": { "timeout_millis": 220000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, }, } diff --git a/dialogflow_v2/gapic/transports/agents_grpc_transport.py b/dialogflow_v2/gapic/transports/agents_grpc_transport.py index c3783f96a..51018751f 100644 --- a/dialogflow_v2/gapic/transports/agents_grpc_transport.py +++ b/dialogflow_v2/gapic/transports/agents_grpc_transport.py @@ -117,43 +117,43 @@ def channel(self): return self._channel @property - def set_agent(self): - """Return the gRPC stub for :meth:`AgentsClient.set_agent`. + def get_agent(self): + """Return the gRPC stub for :meth:`AgentsClient.get_agent`. - Creates/updates the specified agent. + Retrieves the specified agent. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["agents_stub"].SetAgent + return self._stubs["agents_stub"].GetAgent @property - def delete_agent(self): - """Return the gRPC stub for :meth:`AgentsClient.delete_agent`. + def set_agent(self): + """Return the gRPC stub for :meth:`AgentsClient.set_agent`. - Deletes the specified agent. + Creates/updates the specified agent. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["agents_stub"].DeleteAgent + return self._stubs["agents_stub"].SetAgent @property - def get_agent(self): - """Return the gRPC stub for :meth:`AgentsClient.get_agent`. + def delete_agent(self): + """Return the gRPC stub for :meth:`AgentsClient.delete_agent`. - Retrieves the specified agent. + Deletes the specified agent. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["agents_stub"].GetAgent + return self._stubs["agents_stub"].DeleteAgent @property def search_agents(self): @@ -212,9 +212,15 @@ def import_agent(self): Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new - versions from ImportAgentRequest. + versions from ``ImportAgentRequest``. After the import, the imported + draft agent will be trained automatically (unless disabled in agent + settings). However, once the import is done, training may not be + completed yet. Please call ``TrainAgent`` and wait for the operation it + returns in order to train explicitly. - Operation + Operation An operation which + tracks when importing is complete. It only tracks when the draft agent + is updated not when it is done training. Returns: Callable: A callable which accepts the appropriate @@ -230,9 +236,15 @@ def restore_agent(self): Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and - entity types in the older version are deleted. - - Operation + entity types in the older version are deleted. After the restore, the + restored draft agent will be trained automatically (unless disabled in + agent settings). However, once the restore is done, training may not be + completed yet. Please call ``TrainAgent`` and wait for the operation it + returns in order to train explicitly. + + Operation An operation which + tracks when restoring is complete. It only tracks when the draft agent + is updated not when it is done training. Returns: Callable: A callable which accepts the appropriate diff --git a/dialogflow_v2/gapic/transports/entity_types_grpc_transport.py b/dialogflow_v2/gapic/transports/entity_types_grpc_transport.py index f99c74d1c..a60504564 100644 --- a/dialogflow_v2/gapic/transports/entity_types_grpc_transport.py +++ b/dialogflow_v2/gapic/transports/entity_types_grpc_transport.py @@ -232,8 +232,8 @@ def batch_create_entities(self): def batch_update_entities(self): """Return the gRPC stub for :meth:`EntityTypesClient.batch_update_entities`. - Updates or creates multiple entities in the specified entity type. This - method does not affect entities in the entity type that aren't + Updates or creates multiple entities in the specified entity type. + This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation diff --git a/dialogflow_v2/gapic/transports/environments_grpc_transport.py b/dialogflow_v2/gapic/transports/environments_grpc_transport.py new file mode 100644 index 000000000..e9ea3719b --- /dev/null +++ b/dialogflow_v2/gapic/transports/environments_grpc_transport.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import google.api_core.grpc_helpers + +from dialogflow_v2.proto import environment_pb2_grpc + + +class EnvironmentsGrpcTransport(object): + """gRPC transport class providing stubs for + google.cloud.dialogflow.v2 Environments API. + + The transport provides access to the raw gRPC stubs, + which can be used to take advantage of advanced + features of gRPC. + """ + + # The scopes needed to make gRPC calls to all of the methods defined + # in this service. + _OAUTH_SCOPES = ( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow", + ) + + def __init__( + self, channel=None, credentials=None, address="dialogflow.googleapis.com:443" + ): + """Instantiate the transport class. + + Args: + channel (grpc.Channel): A ``Channel`` instance through + which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. + credentials (google.auth.credentials.Credentials): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If none + are specified, the client will attempt to ascertain the + credentials from the environment. + address (str): The address where the service is hosted. + """ + # If both `channel` and `credentials` are specified, raise an + # exception (channels come with credentials baked in already). + if channel is not None and credentials is not None: + raise ValueError( + "The `channel` and `credentials` arguments are mutually " "exclusive." + ) + + # Create the channel. + if channel is None: + channel = self.create_channel( + address=address, + credentials=credentials, + options={ + "grpc.max_send_message_length": -1, + "grpc.max_receive_message_length": -1, + }.items(), + ) + + self._channel = channel + + # gRPC uses objects called "stubs" that are bound to the + # channel and provide a basic method for each RPC. + self._stubs = { + "environments_stub": environment_pb2_grpc.EnvironmentsStub(channel) + } + + @classmethod + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): + """Create and return a gRPC channel object. + + Args: + address (str): The host for the channel to use. + credentials (~.Credentials): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If + none are specified, the client will attempt to ascertain + the credentials from the environment. + kwargs (dict): Keyword arguments, which are passed to the + channel creation. + + Returns: + grpc.Channel: A gRPC channel object. + """ + return google.api_core.grpc_helpers.create_channel( + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs + ) + + @property + def channel(self): + """The gRPC channel used by the transport. + + Returns: + grpc.Channel: A gRPC channel object. + """ + return self._channel + + @property + def list_environments(self): + """Return the gRPC stub for :meth:`EnvironmentsClient.list_environments`. + + Returns the list of all non-draft environments of the specified agent. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["environments_stub"].ListEnvironments diff --git a/dialogflow_v2/proto/agent.proto b/dialogflow_v2/proto/agent.proto new file mode 100644 index 000000000..1ce271736 --- /dev/null +++ b/dialogflow_v2/proto/agent.proto @@ -0,0 +1,458 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2/validation_result.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "AgentProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; + +// Service for managing [Agents][google.cloud.dialogflow.v2.Agent]. +service Agents { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Retrieves the specified agent. + rpc GetAgent(GetAgentRequest) returns (Agent) { + option (google.api.http) = { + get: "/v2/{parent=projects/*}/agent" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates/updates the specified agent. + rpc SetAgent(SetAgentRequest) returns (Agent) { + option (google.api.http) = { + post: "/v2/{agent.parent=projects/*}/agent" + body: "agent" + }; + option (google.api.method_signature) = "agent"; + } + + // Deletes the specified agent. + rpc DeleteAgent(DeleteAgentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{parent=projects/*}/agent" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the list of agents. + // + // Since there is at most one conversational agent per project, this method is + // useful primarily for listing all agents across projects the caller has + // access to. One can achieve that with a wildcard project collection id "-". + // Refer to [List + // Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). + rpc SearchAgents(SearchAgentsRequest) returns (SearchAgentsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*}/agent:search" + }; + option (google.api.method_signature) = "parent"; + } + + // Trains the specified agent. + // + // Operation + rpc TrainAgent(TrainAgentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/agent:train" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Exports the specified agent to a ZIP file. + // + // Operation + rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/agent:export" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.dialogflow.v2.ExportAgentResponse" + metadata_type: "google.protobuf.Struct" + }; + } + + // Imports the specified agent from a ZIP file. + // + // Uploads new intents and entity types without deleting the existing ones. + // Intents and entity types with the same name are replaced with the new + // versions from [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After the import, the imported draft + // agent will be trained automatically (unless disabled in agent settings). + // However, once the import is done, training may not be completed yet. Please + // call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train + // explicitly. + // + // Operation + // An operation which tracks when importing is complete. It only tracks + // when the draft agent is updated not when it is done training. + rpc ImportAgent(ImportAgentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/agent:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Restores the specified agent from a ZIP file. + // + // Replaces the current agent version with a new one. All the intents and + // entity types in the older version are deleted. After the restore, the + // restored draft agent will be trained automatically (unless disabled in + // agent settings). However, once the restore is done, training may not be + // completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it + // returns in order to train explicitly. + // + // Operation + // An operation which tracks when restoring is complete. It only tracks + // when the draft agent is updated not when it is done training. + rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/agent:restore" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Gets agent validation result. Agent validation is performed during + // training time and is updated automatically when training is completed. + rpc GetValidationResult(GetValidationResultRequest) returns (ValidationResult) { + option (google.api.http) = { + get: "/v2/{parent=projects/*}/agent/validationResult" + }; + } +} + +// A Dialogflow agent is a virtual agent that handles conversations with your +// end-users. It is a natural language understanding module that understands the +// nuances of human language. Dialogflow translates end-user text or audio +// during a conversation to structured data that your apps and services can +// understand. You design and build a Dialogflow agent to handle the types of +// conversations required for your system. +// +// For more information about agents, see the +// [Agent guide](https://cloud.google.com/dialogflow/docs/agents-overview). +message Agent { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Agent" + pattern: "projects/{project}/agent" + }; + + // Match mode determines how intents are detected from user queries. + enum MatchMode { + // Not specified. + MATCH_MODE_UNSPECIFIED = 0; + + // Best for agents with a small number of examples in intents and/or wide + // use of templates syntax and composite entities. + MATCH_MODE_HYBRID = 1; + + // Can be used for agents with a large number of examples in intents, + // especially the ones using @sys.any or very large custom entities. + MATCH_MODE_ML_ONLY = 2; + } + + // API version for the agent. + enum ApiVersion { + // Not specified. + API_VERSION_UNSPECIFIED = 0; + + // Legacy V1 API. + API_VERSION_V1 = 1; + + // V2 API. + API_VERSION_V2 = 2; + + // V2beta1 API. + API_VERSION_V2_BETA_1 = 3; + } + + // Represents the agent tier. + enum Tier { + // Not specified. This value should never be used. + TIER_UNSPECIFIED = 0; + + // Standard tier. + TIER_STANDARD = 1; + + // Enterprise tier (Essentials). + TIER_ENTERPRISE = 2; + + // Enterprise tier (Plus). + TIER_ENTERPRISE_PLUS = 3; + } + + // Required. The project of this agent. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The name of this agent. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The default language of the agent as a language tag. See + // [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // for a list of the currently supported language codes. This field cannot be + // set by the `Update` method. + string default_language_code = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of all languages supported by this agent (except for the + // `default_language_code`). + repeated string supported_language_codes = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The time zone of this agent from the + // [time zone database](https://www.iana.org/time-zones), e.g., + // America/New_York, Europe/Paris. + string time_zone = 5 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The description of this agent. + // The maximum length is 500 characters. If exceeded, the request is rejected. + string description = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The URI of the agent's avatar. + // Avatars are used throughout the Dialogflow console and in the self-hosted + // [Web + // Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) + // integration. + string avatar_uri = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Determines whether this agent should log conversation queries. + bool enable_logging = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Determines how intents are detected from user queries. + MatchMode match_mode = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. To filter out false positive results and still get variety in + // matched natural language inputs for your agent, you can tune the machine + // learning classification threshold. If the returned score value is less than + // the threshold value, then a fallback intent will be triggered or, if there + // are no fallback intents defined, no intent will be triggered. The score + // values range from 0.0 (completely uncertain) to 1.0 (completely certain). + // If set to 0.0, the default of 0.3 is used. + float classification_threshold = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. API version displayed in Dialogflow console. If not specified, + // V2 API is assumed. Clients are free to query different service endpoints + // for different API versions. However, bots connectors and webhook calls will + // follow the specified API version. + ApiVersion api_version = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The agent tier. If not specified, TIER_STANDARD is assumed. + Tier tier = 15 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent]. +message GetAgentRequest { + // Required. The project that the agent to fetch is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; +} + +// The request message for [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent]. +message SetAgentRequest { + // Required. The agent to update. + Agent agent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v2.Agents.DeleteAgent]. +message DeleteAgentRequest { + // Required. The project that the agent to delete is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; +} + +// The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. +message SearchAgentsRequest { + // Required. The project to list agents from. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. +message SearchAgentsResponse { + // The list of agents. There will be a maximum number of items returned based + // on the page_size field in the request. + repeated Agent agents = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent]. +message TrainAgentRequest { + // Required. The project that the agent to train is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; +} + +// The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]. +message ExportAgentRequest { + // Required. The project that the agent to export is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Required. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) + // URI to export the agent to. + // The format of this URI must be `gs:///`. + // If left unspecified, the serialized agent is returned inline. + string agent_uri = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]. +message ExportAgentResponse { + // The exported agent. + oneof agent { + // The URI to a file containing the exported agent. This field is populated + // only if `agent_uri` is specified in `ExportAgentRequest`. + string agent_uri = 1; + + // Zip compressed raw byte content for agent. + bytes agent_content = 2; + } +} + +// The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent]. +message ImportAgentRequest { + // Required. The project that the agent to import is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Required. The agent to import. + oneof agent { + // The URI to a Google Cloud Storage file containing the agent to import. + // Note: The URI must start with "gs://". + string agent_uri = 2; + + // Zip compressed raw byte content for agent. + bytes agent_content = 3; + } +} + +// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent]. +message RestoreAgentRequest { + // Required. The project that the agent to restore is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Required. The agent to restore. + oneof agent { + // The URI to a Google Cloud Storage file containing the agent to restore. + // Note: The URI must start with "gs://". + string agent_uri = 2; + + // Zip compressed raw byte content for agent. + bytes agent_content = 3; + } +} + +// The request message for [Agents.GetValidationResult][google.cloud.dialogflow.v2.Agents.GetValidationResult]. +message GetValidationResultRequest { + // Required. The project that the agent is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Optional. The language for which you want a validation result. If not + // specified, the agent's default language is used. [Many + // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // are supported. Note: languages must be enabled in the agent before they can + // be used. + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/dialogflow_v2/proto/agent_pb2.py b/dialogflow_v2/proto/agent_pb2.py index 3a79368d6..0fe9c9f82 100644 --- a/dialogflow_v2/proto/agent_pb2.py +++ b/dialogflow_v2/proto/agent_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/agent.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -33,12 +30,9 @@ name="google/cloud/dialogflow_v2/proto/agent.proto", package="google.cloud.dialogflow.v2", syntax="proto3", - serialized_options=_b( - "\n\036com.google.cloud.dialogflow.v2B\nAgentProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2" - ), - serialized_pb=_b( - '\n,google/cloud/dialogflow_v2/proto/agent.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/dialogflow_v2/proto/validation_result.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\xf0\x06\n\x05\x41gent\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12"\n\x15\x64\x65\x66\x61ult_language_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12%\n\x18supported_language_codes\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\navatar_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65nable_logging\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\nmatch_mode\x18\t \x01(\x0e\x32+.google.cloud.dialogflow.v2.Agent.MatchModeB\x03\xe0\x41\x01\x12%\n\x18\x63lassification_threshold\x18\n \x01(\x02\x42\x03\xe0\x41\x01\x12\x46\n\x0b\x61pi_version\x18\x0e \x01(\x0e\x32,.google.cloud.dialogflow.v2.Agent.ApiVersionB\x03\xe0\x41\x01\x12\x39\n\x04tier\x18\x0f \x01(\x0e\x32&.google.cloud.dialogflow.v2.Agent.TierB\x03\xe0\x41\x01"V\n\tMatchMode\x12\x1a\n\x16MATCH_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11MATCH_MODE_HYBRID\x10\x01\x12\x16\n\x12MATCH_MODE_ML_ONLY\x10\x02"l\n\nApiVersion\x12\x1b\n\x17\x41PI_VERSION_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x41PI_VERSION_V1\x10\x01\x12\x12\n\x0e\x41PI_VERSION_V2\x10\x02\x12\x19\n\x15\x41PI_VERSION_V2_BETA_1\x10\x03"^\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x11\n\rTIER_STANDARD\x10\x01\x12\x13\n\x0fTIER_ENTERPRISE\x10\x02\x12\x18\n\x14TIER_ENTERPRISE_PLUS\x10\x03:>\xea\x41;\n\x1f\x64ialogflow.googleapis.com/Agent\x12\x18projects/{project}/agent"V\n\x0fGetAgentRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project"~\n\x0fSetAgentRequest\x12\x35\n\x05\x61gent\x18\x01 \x01(\x0b\x32!.google.cloud.dialogflow.v2.AgentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"Y\n\x12\x44\x65leteAgentRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project"\x86\x01\n\x13SearchAgentsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x12\n\npage_token\x18\x03 \x01(\t"b\n\x14SearchAgentsResponse\x12\x31\n\x06\x61gents\x18\x01 \x03(\x0b\x32!.google.cloud.dialogflow.v2.Agent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"X\n\x11TrainAgentRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project"q\n\x12\x45xportAgentRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tagent_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02"L\n\x13\x45xportAgentResponse\x12\x13\n\tagent_uri\x18\x01 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x02 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"\x90\x01\n\x12ImportAgentRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x13\n\tagent_uri\x18\x02 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x03 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"\x91\x01\n\x13RestoreAgentRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x13\n\tagent_uri\x18\x02 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x03 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"}\n\x1aGetValidationResultRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x32\xc5\r\n\x06\x41gents\x12\x8a\x01\n\x08GetAgent\x12+.google.cloud.dialogflow.v2.GetAgentRequest\x1a!.google.cloud.dialogflow.v2.Agent".\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v2/{parent=projects/*}/agent\xda\x41\x06parent\x12\x96\x01\n\x08SetAgent\x12+.google.cloud.dialogflow.v2.SetAgentRequest\x1a!.google.cloud.dialogflow.v2.Agent":\x82\xd3\xe4\x93\x02,"#/v2/{agent.parent=projects/*}/agent:\x05\x61gent\xda\x41\x05\x61gent\x12\x85\x01\n\x0b\x44\x65leteAgent\x12..google.cloud.dialogflow.v2.DeleteAgentRequest\x1a\x16.google.protobuf.Empty".\x82\xd3\xe4\x93\x02\x1f*\x1d/v2/{parent=projects/*}/agent\xda\x41\x06parent\x12\xa8\x01\n\x0cSearchAgents\x12/.google.cloud.dialogflow.v2.SearchAgentsRequest\x1a\x30.google.cloud.dialogflow.v2.SearchAgentsResponse"5\x82\xd3\xe4\x93\x02&\x12$/v2/{parent=projects/*}/agent:search\xda\x41\x06parent\x12\xc5\x01\n\nTrainAgent\x12-.google.cloud.dialogflow.v2.TrainAgentRequest\x1a\x1d.google.longrunning.Operation"i\x82\xd3\xe4\x93\x02("#/v2/{parent=projects/*}/agent:train:\x01*\xda\x41\x06parent\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xe2\x01\n\x0b\x45xportAgent\x12..google.cloud.dialogflow.v2.ExportAgentRequest\x1a\x1d.google.longrunning.Operation"\x83\x01\x82\xd3\xe4\x93\x02)"$/v2/{parent=projects/*}/agent:export:\x01*\xda\x41\x06parent\xca\x41H\n.google.cloud.dialogflow.v2.ExportAgentResponse\x12\x16google.protobuf.Struct\x12\xbf\x01\n\x0bImportAgent\x12..google.cloud.dialogflow.v2.ImportAgentRequest\x1a\x1d.google.longrunning.Operation"a\x82\xd3\xe4\x93\x02)"$/v2/{parent=projects/*}/agent:import:\x01*\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xc2\x01\n\x0cRestoreAgent\x12/.google.cloud.dialogflow.v2.RestoreAgentRequest\x1a\x1d.google.longrunning.Operation"b\x82\xd3\xe4\x93\x02*"%/v2/{parent=projects/*}/agent:restore:\x01*\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xb3\x01\n\x13GetValidationResult\x12\x36.google.cloud.dialogflow.v2.GetValidationResultRequest\x1a,.google.cloud.dialogflow.v2.ValidationResult"6\x82\xd3\xe4\x93\x02\x30\x12./v2/{parent=projects/*}/agent/validationResult\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x99\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\nAgentProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3' - ), + serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\nAgentProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n,google/cloud/dialogflow_v2/proto/agent.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/dialogflow_v2/proto/validation_result.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\xf0\x06\n\x05\x41gent\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12"\n\x15\x64\x65\x66\x61ult_language_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12%\n\x18supported_language_codes\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\navatar_uri\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65nable_logging\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\x44\n\nmatch_mode\x18\t \x01(\x0e\x32+.google.cloud.dialogflow.v2.Agent.MatchModeB\x03\xe0\x41\x01\x12%\n\x18\x63lassification_threshold\x18\n \x01(\x02\x42\x03\xe0\x41\x01\x12\x46\n\x0b\x61pi_version\x18\x0e \x01(\x0e\x32,.google.cloud.dialogflow.v2.Agent.ApiVersionB\x03\xe0\x41\x01\x12\x39\n\x04tier\x18\x0f \x01(\x0e\x32&.google.cloud.dialogflow.v2.Agent.TierB\x03\xe0\x41\x01"V\n\tMatchMode\x12\x1a\n\x16MATCH_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11MATCH_MODE_HYBRID\x10\x01\x12\x16\n\x12MATCH_MODE_ML_ONLY\x10\x02"l\n\nApiVersion\x12\x1b\n\x17\x41PI_VERSION_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x41PI_VERSION_V1\x10\x01\x12\x12\n\x0e\x41PI_VERSION_V2\x10\x02\x12\x19\n\x15\x41PI_VERSION_V2_BETA_1\x10\x03"^\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x11\n\rTIER_STANDARD\x10\x01\x12\x13\n\x0fTIER_ENTERPRISE\x10\x02\x12\x18\n\x14TIER_ENTERPRISE_PLUS\x10\x03:>\xea\x41;\n\x1f\x64ialogflow.googleapis.com/Agent\x12\x18projects/{project}/agent"J\n\x0fGetAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent"~\n\x0fSetAgentRequest\x12\x35\n\x05\x61gent\x18\x01 \x01(\x0b\x32!.google.cloud.dialogflow.v2.AgentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"M\n\x12\x44\x65leteAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent"z\n\x13SearchAgentsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x12\n\npage_token\x18\x03 \x01(\t"b\n\x14SearchAgentsResponse\x12\x31\n\x06\x61gents\x18\x01 \x03(\x0b\x32!.google.cloud.dialogflow.v2.Agent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"L\n\x11TrainAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent"e\n\x12\x45xportAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x16\n\tagent_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02"L\n\x13\x45xportAgentResponse\x12\x13\n\tagent_uri\x18\x01 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x02 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"\x84\x01\n\x12ImportAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x13\n\tagent_uri\x18\x02 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x03 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"\x85\x01\n\x13RestoreAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x13\n\tagent_uri\x18\x02 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x03 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"q\n\x1aGetValidationResultRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x32\xc5\r\n\x06\x41gents\x12\x8a\x01\n\x08GetAgent\x12+.google.cloud.dialogflow.v2.GetAgentRequest\x1a!.google.cloud.dialogflow.v2.Agent".\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v2/{parent=projects/*}/agent\xda\x41\x06parent\x12\x96\x01\n\x08SetAgent\x12+.google.cloud.dialogflow.v2.SetAgentRequest\x1a!.google.cloud.dialogflow.v2.Agent":\x82\xd3\xe4\x93\x02,"#/v2/{agent.parent=projects/*}/agent:\x05\x61gent\xda\x41\x05\x61gent\x12\x85\x01\n\x0b\x44\x65leteAgent\x12..google.cloud.dialogflow.v2.DeleteAgentRequest\x1a\x16.google.protobuf.Empty".\x82\xd3\xe4\x93\x02\x1f*\x1d/v2/{parent=projects/*}/agent\xda\x41\x06parent\x12\xa8\x01\n\x0cSearchAgents\x12/.google.cloud.dialogflow.v2.SearchAgentsRequest\x1a\x30.google.cloud.dialogflow.v2.SearchAgentsResponse"5\x82\xd3\xe4\x93\x02&\x12$/v2/{parent=projects/*}/agent:search\xda\x41\x06parent\x12\xc5\x01\n\nTrainAgent\x12-.google.cloud.dialogflow.v2.TrainAgentRequest\x1a\x1d.google.longrunning.Operation"i\x82\xd3\xe4\x93\x02("#/v2/{parent=projects/*}/agent:train:\x01*\xda\x41\x06parent\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xe2\x01\n\x0b\x45xportAgent\x12..google.cloud.dialogflow.v2.ExportAgentRequest\x1a\x1d.google.longrunning.Operation"\x83\x01\x82\xd3\xe4\x93\x02)"$/v2/{parent=projects/*}/agent:export:\x01*\xda\x41\x06parent\xca\x41H\n.google.cloud.dialogflow.v2.ExportAgentResponse\x12\x16google.protobuf.Struct\x12\xbf\x01\n\x0bImportAgent\x12..google.cloud.dialogflow.v2.ImportAgentRequest\x1a\x1d.google.longrunning.Operation"a\x82\xd3\xe4\x93\x02)"$/v2/{parent=projects/*}/agent:import:\x01*\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xc2\x01\n\x0cRestoreAgent\x12/.google.cloud.dialogflow.v2.RestoreAgentRequest\x1a\x1d.google.longrunning.Operation"b\x82\xd3\xe4\x93\x02*"%/v2/{parent=projects/*}/agent:restore:\x01*\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xb3\x01\n\x13GetValidationResult\x12\x36.google.cloud.dialogflow.v2.GetValidationResultRequest\x1a,.google.cloud.dialogflow.v2.ValidationResult"6\x82\xd3\xe4\x93\x02\x30\x12./v2/{parent=projects/*}/agent/validationResult\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x99\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\nAgentProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -57,6 +51,7 @@ full_name="google.cloud.dialogflow.v2.Agent.MatchMode", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="MATCH_MODE_UNSPECIFIED", @@ -64,6 +59,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="MATCH_MODE_HYBRID", @@ -71,6 +67,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="MATCH_MODE_ML_ONLY", @@ -78,6 +75,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -92,6 +90,7 @@ full_name="google.cloud.dialogflow.v2.Agent.ApiVersion", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="API_VERSION_UNSPECIFIED", @@ -99,12 +98,23 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="API_VERSION_V1", index=1, number=1, serialized_options=None, type=None + name="API_VERSION_V1", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="API_VERSION_V2", index=2, number=2, serialized_options=None, type=None + name="API_VERSION_V2", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="API_VERSION_V2_BETA_1", @@ -112,6 +122,7 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -126,6 +137,7 @@ full_name="google.cloud.dialogflow.v2.Agent.Tier", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="TIER_UNSPECIFIED", @@ -133,9 +145,15 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TIER_STANDARD", index=1, number=1, serialized_options=None, type=None + name="TIER_STANDARD", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="TIER_ENTERPRISE", @@ -143,6 +161,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="TIER_ENTERPRISE_PLUS", @@ -150,6 +169,7 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -166,6 +186,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -176,16 +197,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" - ), + serialized_options=b"\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -196,14 +216,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="default_language_code", @@ -214,14 +235,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="supported_language_codes", @@ -238,8 +260,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="time_zone", @@ -250,14 +273,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -268,14 +292,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="avatar_uri", @@ -286,14 +311,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="enable_logging", @@ -310,8 +336,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="match_mode", @@ -328,8 +355,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="classification_threshold", @@ -346,8 +374,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="api_version", @@ -364,8 +393,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="tier", @@ -382,16 +412,15 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[_AGENT_MATCHMODE, _AGENT_APIVERSION, _AGENT_TIER], - serialized_options=_b( - "\352A;\n\037dialogflow.googleapis.com/Agent\022\030projects/{project}/agent" - ), + serialized_options=b"\352A;\n\037dialogflow.googleapis.com/Agent\022\030projects/{project}/agent", is_extendable=False, syntax="proto3", extension_ranges=[], @@ -407,6 +436,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -417,16 +447,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" - ), + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -438,7 +467,7 @@ extension_ranges=[], oneofs=[], serialized_start=1232, - serialized_end=1318, + serialized_end=1306, ) @@ -448,6 +477,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="agent", @@ -464,8 +494,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -482,8 +513,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -494,8 +526,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1320, - serialized_end=1446, + serialized_start=1308, + serialized_end=1434, ) @@ -505,6 +537,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -515,16 +548,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" - ), + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -535,8 +567,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1448, - serialized_end=1537, + serialized_start=1436, + serialized_end=1513, ) @@ -546,6 +578,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -556,16 +589,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" - ), + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -582,8 +614,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -594,7 +627,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -602,6 +635,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -612,8 +646,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1540, - serialized_end=1674, + serialized_start=1515, + serialized_end=1637, ) @@ -623,6 +657,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="agents", @@ -641,6 +676,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -651,7 +687,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -659,6 +695,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -669,8 +706,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1676, - serialized_end=1774, + serialized_start=1639, + serialized_end=1737, ) @@ -680,6 +717,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -690,16 +728,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" - ), + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -710,8 +747,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1776, - serialized_end=1864, + serialized_start=1739, + serialized_end=1815, ) @@ -721,6 +758,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -731,16 +769,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" - ), + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="agent_uri", @@ -751,14 +788,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -769,8 +807,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1866, - serialized_end=1979, + serialized_start=1817, + serialized_end=1918, ) @@ -780,6 +818,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="agent_uri", @@ -790,7 +829,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -798,6 +837,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="agent_content", @@ -808,7 +848,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -816,6 +856,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -831,11 +872,12 @@ full_name="google.cloud.dialogflow.v2.ExportAgentResponse.agent", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=1981, - serialized_end=2057, + serialized_start=1920, + serialized_end=1996, ) @@ -845,6 +887,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -855,16 +898,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" - ), + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="agent_uri", @@ -875,7 +917,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -883,6 +925,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="agent_content", @@ -893,7 +936,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -901,6 +944,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -916,11 +960,12 @@ full_name="google.cloud.dialogflow.v2.ImportAgentRequest.agent", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=2060, - serialized_end=2204, + serialized_start=1999, + serialized_end=2131, ) @@ -930,6 +975,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -940,16 +986,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" - ), + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="agent_uri", @@ -960,7 +1005,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -968,6 +1013,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="agent_content", @@ -978,7 +1024,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -986,6 +1032,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1001,11 +1048,12 @@ full_name="google.cloud.dialogflow.v2.RestoreAgentRequest.agent", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=2207, - serialized_end=2352, + serialized_start=2134, + serialized_end=2267, ) @@ -1015,6 +1063,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1025,16 +1074,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" - ), + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -1045,14 +1093,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1063,8 +1112,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2354, - serialized_end=2479, + serialized_start=2269, + serialized_end=2382, ) _AGENT.fields_by_name["match_mode"].enum_type = _AGENT_MATCHMODE @@ -1133,11 +1182,17 @@ Agent = _reflection.GeneratedProtocolMessageType( "Agent", (_message.Message,), - dict( - DESCRIPTOR=_AGENT, - __module__="google.cloud.dialogflow_v2.proto.agent_pb2", - __doc__="""Represents a conversational agent. - + { + "DESCRIPTOR": _AGENT, + "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2", + "__doc__": """A Dialogflow agent is a virtual agent that handles conversations with + your end-users. It is a natural language understanding module that + understands the nuances of human language. Dialogflow translates end- + user text or audio during a conversation to structured data that your + apps and services can understand. You design and build a Dialogflow + agent to handle the types of conversations required for your system. + For more information about agents, see the `Agent guide + `__. Attributes: parent: @@ -1157,12 +1212,12 @@ time_zone: Required. The time zone of this agent from the `time zone database `__, e.g., - America/New\_York, Europe/Paris. + America/New_York, Europe/Paris. description: Optional. The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected. avatar_uri: - Optional. The URI of the agent's avatar. Avatars are used + Optional. The URI of the agent’s avatar. Avatars are used throughout the Dialogflow console and in the self-hosted `Web Demo ``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.GetAgentRequest) - ), + }, ) _sym_db.RegisterMessage(GetAgentRequest) SetAgentRequest = _reflection.GeneratedProtocolMessageType( "SetAgentRequest", (_message.Message,), - dict( - DESCRIPTOR=_SETAGENTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.agent_pb2", - __doc__="""The request message for + { + "DESCRIPTOR": _SETAGENTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2", + "__doc__": """The request message for [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent]. - Attributes: agent: Required. The agent to update. @@ -1234,40 +1287,38 @@ Optional. The mask to control which fields get updated. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SetAgentRequest) - ), + }, ) _sym_db.RegisterMessage(SetAgentRequest) DeleteAgentRequest = _reflection.GeneratedProtocolMessageType( "DeleteAgentRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEAGENTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.agent_pb2", - __doc__="""The request message for + { + "DESCRIPTOR": _DELETEAGENTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2", + "__doc__": """The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v2.Agents.DeleteAgent]. - Attributes: parent: Required. The project that the agent to delete is associated with. Format: ``projects/``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.DeleteAgentRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteAgentRequest) SearchAgentsRequest = _reflection.GeneratedProtocolMessageType( "SearchAgentsRequest", (_message.Message,), - dict( - DESCRIPTOR=_SEARCHAGENTSREQUEST, - __module__="google.cloud.dialogflow_v2.proto.agent_pb2", - __doc__="""The request message for + { + "DESCRIPTOR": _SEARCHAGENTSREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2", + "__doc__": """The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. - Attributes: parent: Required. The project to list agents from. Format: @@ -1276,67 +1327,64 @@ Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. page_token: - The next\_page\_token value returned from a previous list + The next_page_token value returned from a previous list request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SearchAgentsRequest) - ), + }, ) _sym_db.RegisterMessage(SearchAgentsRequest) SearchAgentsResponse = _reflection.GeneratedProtocolMessageType( "SearchAgentsResponse", (_message.Message,), - dict( - DESCRIPTOR=_SEARCHAGENTSRESPONSE, - __module__="google.cloud.dialogflow_v2.proto.agent_pb2", - __doc__="""The response message for + { + "DESCRIPTOR": _SEARCHAGENTSRESPONSE, + "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2", + "__doc__": """The response message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. - Attributes: agents: The list of agents. There will be a maximum number of items - returned based on the page\_size field in the request. + returned based on the page_size field in the request. next_page_token: Token to retrieve the next page of results, or empty if there are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SearchAgentsResponse) - ), + }, ) _sym_db.RegisterMessage(SearchAgentsResponse) TrainAgentRequest = _reflection.GeneratedProtocolMessageType( "TrainAgentRequest", (_message.Message,), - dict( - DESCRIPTOR=_TRAINAGENTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.agent_pb2", - __doc__="""The request message for + { + "DESCRIPTOR": _TRAINAGENTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2", + "__doc__": """The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent]. - Attributes: parent: Required. The project that the agent to train is associated with. Format: ``projects/``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.TrainAgentRequest) - ), + }, ) _sym_db.RegisterMessage(TrainAgentRequest) ExportAgentRequest = _reflection.GeneratedProtocolMessageType( "ExportAgentRequest", (_message.Message,), - dict( - DESCRIPTOR=_EXPORTAGENTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.agent_pb2", - __doc__="""The request message for + { + "DESCRIPTOR": _EXPORTAGENTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2", + "__doc__": """The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]. - Attributes: parent: Required. The project that the agent to export is associated @@ -1349,20 +1397,19 @@ agent is returned inline. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ExportAgentRequest) - ), + }, ) _sym_db.RegisterMessage(ExportAgentRequest) ExportAgentResponse = _reflection.GeneratedProtocolMessageType( "ExportAgentResponse", (_message.Message,), - dict( - DESCRIPTOR=_EXPORTAGENTRESPONSE, - __module__="google.cloud.dialogflow_v2.proto.agent_pb2", - __doc__="""The response message for + { + "DESCRIPTOR": _EXPORTAGENTRESPONSE, + "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2", + "__doc__": """The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]. - Attributes: agent: The exported agent. @@ -1374,20 +1421,19 @@ Zip compressed raw byte content for agent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ExportAgentResponse) - ), + }, ) _sym_db.RegisterMessage(ExportAgentResponse) ImportAgentRequest = _reflection.GeneratedProtocolMessageType( "ImportAgentRequest", (_message.Message,), - dict( - DESCRIPTOR=_IMPORTAGENTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.agent_pb2", - __doc__="""The request message for + { + "DESCRIPTOR": _IMPORTAGENTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2", + "__doc__": """The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent]. - Attributes: parent: Required. The project that the agent to import is associated @@ -1396,25 +1442,24 @@ Required. The agent to import. agent_uri: The URI to a Google Cloud Storage file containing the agent to - import. Note: The URI must start with "gs://". + import. Note: The URI must start with “gs://”. agent_content: Zip compressed raw byte content for agent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ImportAgentRequest) - ), + }, ) _sym_db.RegisterMessage(ImportAgentRequest) RestoreAgentRequest = _reflection.GeneratedProtocolMessageType( "RestoreAgentRequest", (_message.Message,), - dict( - DESCRIPTOR=_RESTOREAGENTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.agent_pb2", - __doc__="""The request message for + { + "DESCRIPTOR": _RESTOREAGENTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2", + "__doc__": """The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent]. - Attributes: parent: Required. The project that the agent to restore is associated @@ -1423,24 +1468,23 @@ Required. The agent to restore. agent_uri: The URI to a Google Cloud Storage file containing the agent to - restore. Note: The URI must start with "gs://". + restore. Note: The URI must start with “gs://”. agent_content: Zip compressed raw byte content for agent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.RestoreAgentRequest) - ), + }, ) _sym_db.RegisterMessage(RestoreAgentRequest) GetValidationResultRequest = _reflection.GeneratedProtocolMessageType( "GetValidationResultRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETVALIDATIONRESULTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.agent_pb2", - __doc__="""The request message for - [Agents.GetValidationResult][google.cloud.dialogflow.v2.Agents.GetValidationResult]. - + { + "DESCRIPTOR": _GETVALIDATIONRESULTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.agent_pb2", + "__doc__": """The request message for [Agents.GetValidationResult][google.cloud.dial + ogflow.v2.Agents.GetValidationResult]. Attributes: parent: @@ -1448,13 +1492,13 @@ Format: ``projects/``. language_code: Optional. The language for which you want a validation result. - If not specified, the agent's default language is used. `Many + If not specified, the agent’s default language is used. `Many languages `__ are supported. Note: languages must be enabled in the agent before they can be used. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.GetValidationResultRequest) - ), + }, ) _sym_db.RegisterMessage(GetValidationResultRequest) @@ -1492,11 +1536,10 @@ full_name="google.cloud.dialogflow.v2.Agents", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), - serialized_start=2482, - serialized_end=4215, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=2385, + serialized_end=4118, methods=[ _descriptor.MethodDescriptor( name="GetAgent", @@ -1505,9 +1548,8 @@ containing_service=None, input_type=_GETAGENTREQUEST, output_type=_AGENT, - serialized_options=_b( - "\202\323\344\223\002\037\022\035/v2/{parent=projects/*}/agent\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002\037\022\035/v2/{parent=projects/*}/agent\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="SetAgent", @@ -1516,9 +1558,8 @@ containing_service=None, input_type=_SETAGENTREQUEST, output_type=_AGENT, - serialized_options=_b( - '\202\323\344\223\002,"#/v2/{agent.parent=projects/*}/agent:\005agent\332A\005agent' - ), + serialized_options=b'\202\323\344\223\002,"#/v2/{agent.parent=projects/*}/agent:\005agent\332A\005agent', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteAgent", @@ -1527,9 +1568,8 @@ containing_service=None, input_type=_DELETEAGENTREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002\037*\035/v2/{parent=projects/*}/agent\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002\037*\035/v2/{parent=projects/*}/agent\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="SearchAgents", @@ -1538,9 +1578,8 @@ containing_service=None, input_type=_SEARCHAGENTSREQUEST, output_type=_SEARCHAGENTSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002&\022$/v2/{parent=projects/*}/agent:search\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002&\022$/v2/{parent=projects/*}/agent:search\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="TrainAgent", @@ -1549,9 +1588,8 @@ containing_service=None, input_type=_TRAINAGENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002("#/v2/{parent=projects/*}/agent:train:\001*\332A\006parent\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct' - ), + serialized_options=b'\202\323\344\223\002("#/v2/{parent=projects/*}/agent:train:\001*\332A\006parent\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ExportAgent", @@ -1560,9 +1598,8 @@ containing_service=None, input_type=_EXPORTAGENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002)"$/v2/{parent=projects/*}/agent:export:\001*\332A\006parent\312AH\n.google.cloud.dialogflow.v2.ExportAgentResponse\022\026google.protobuf.Struct' - ), + serialized_options=b'\202\323\344\223\002)"$/v2/{parent=projects/*}/agent:export:\001*\332A\006parent\312AH\n.google.cloud.dialogflow.v2.ExportAgentResponse\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ImportAgent", @@ -1571,9 +1608,8 @@ containing_service=None, input_type=_IMPORTAGENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002)"$/v2/{parent=projects/*}/agent:import:\001*\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct' - ), + serialized_options=b'\202\323\344\223\002)"$/v2/{parent=projects/*}/agent:import:\001*\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="RestoreAgent", @@ -1582,9 +1618,8 @@ containing_service=None, input_type=_RESTOREAGENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002*"%/v2/{parent=projects/*}/agent:restore:\001*\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct' - ), + serialized_options=b'\202\323\344\223\002*"%/v2/{parent=projects/*}/agent:restore:\001*\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetValidationResult", @@ -1593,9 +1628,8 @@ containing_service=None, input_type=_GETVALIDATIONRESULTREQUEST, output_type=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_validation__result__pb2._VALIDATIONRESULT, - serialized_options=_b( - "\202\323\344\223\0020\022./v2/{parent=projects/*}/agent/validationResult" - ), + serialized_options=b"\202\323\344\223\0020\022./v2/{parent=projects/*}/agent/validationResult", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2/proto/agent_pb2_grpc.py b/dialogflow_v2/proto/agent_pb2_grpc.py index afffcd76f..7daf4105f 100644 --- a/dialogflow_v2/proto/agent_pb2_grpc.py +++ b/dialogflow_v2/proto/agent_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2.proto import ( @@ -14,42 +15,15 @@ class AgentsStub(object): - """Agents are best described as Natural Language Understanding (NLU) modules - that transform user requests into actionable data. You can include agents - in your app, product, or service to determine user intent and respond to the - user in a natural way. - - After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents], [Contexts][google.cloud.dialogflow.v2.Contexts], - [Entity Types][google.cloud.dialogflow.v2.EntityTypes], [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to - manage the flow of a conversation and match user input to predefined intents - and actions. - - You can create an agent using both Dialogflow Standard Edition and - Dialogflow Enterprise Edition. For details, see - [Dialogflow - Editions](https://cloud.google.com/dialogflow/docs/editions). - - You can save your agent for backup or versioning by exporting the agent by - using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved - agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method. - - Dialogflow provides several - [prebuilt - agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt) - for common conversation scenarios such as determining a date and time, - converting currency, and so on. - - For more information about agents, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/agents-overview). - """ + """Service for managing [Agents][google.cloud.dialogflow.v2.Agent]. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.GetAgent = channel.unary_unary( "/google.cloud.dialogflow.v2.Agents/GetAgent", request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.GetAgentRequest.SerializeToString, @@ -98,53 +72,26 @@ def __init__(self, channel): class AgentsServicer(object): - """Agents are best described as Natural Language Understanding (NLU) modules - that transform user requests into actionable data. You can include agents - in your app, product, or service to determine user intent and respond to the - user in a natural way. - - After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents], [Contexts][google.cloud.dialogflow.v2.Contexts], - [Entity Types][google.cloud.dialogflow.v2.EntityTypes], [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to - manage the flow of a conversation and match user input to predefined intents - and actions. - - You can create an agent using both Dialogflow Standard Edition and - Dialogflow Enterprise Edition. For details, see - [Dialogflow - Editions](https://cloud.google.com/dialogflow/docs/editions). - - You can save your agent for backup or versioning by exporting the agent by - using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved - agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method. - - Dialogflow provides several - [prebuilt - agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt) - for common conversation scenarios such as determining a date and time, - converting currency, and so on. - - For more information about agents, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/agents-overview). - """ + """Service for managing [Agents][google.cloud.dialogflow.v2.Agent]. + """ def GetAgent(self, request, context): """Retrieves the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def SetAgent(self, request, context): """Creates/updates the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteAgent(self, request, context): """Deletes the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -152,12 +99,12 @@ def DeleteAgent(self, request, context): def SearchAgents(self, request, context): """Returns the list of agents. - Since there is at most one conversational agent per project, this method is - useful primarily for listing all agents across projects the caller has - access to. One can achieve that with a wildcard project collection id "-". - Refer to [List - Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). - """ + Since there is at most one conversational agent per project, this method is + useful primarily for listing all agents across projects the caller has + access to. One can achieve that with a wildcard project collection id "-". + Refer to [List + Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -165,8 +112,8 @@ def SearchAgents(self, request, context): def TrainAgent(self, request, context): """Trains the specified agent. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -174,8 +121,8 @@ def TrainAgent(self, request, context): def ExportAgent(self, request, context): """Exports the specified agent to a ZIP file. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -183,12 +130,18 @@ def ExportAgent(self, request, context): def ImportAgent(self, request, context): """Imports the specified agent from a ZIP file. - Uploads new intents and entity types without deleting the existing ones. - Intents and entity types with the same name are replaced with the new - versions from ImportAgentRequest. - - Operation - """ + Uploads new intents and entity types without deleting the existing ones. + Intents and entity types with the same name are replaced with the new + versions from [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After the import, the imported draft + agent will be trained automatically (unless disabled in agent settings). + However, once the import is done, training may not be completed yet. Please + call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train + explicitly. + + Operation + An operation which tracks when importing is complete. It only tracks + when the draft agent is updated not when it is done training. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -196,19 +149,25 @@ def ImportAgent(self, request, context): def RestoreAgent(self, request, context): """Restores the specified agent from a ZIP file. - Replaces the current agent version with a new one. All the intents and - entity types in the older version are deleted. - - Operation - """ + Replaces the current agent version with a new one. All the intents and + entity types in the older version are deleted. After the restore, the + restored draft agent will be trained automatically (unless disabled in + agent settings). However, once the restore is done, training may not be + completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it + returns in order to train explicitly. + + Operation + An operation which tracks when restoring is complete. It only tracks + when the draft agent is updated not when it is done training. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetValidationResult(self, request, context): """Gets agent validation result. Agent validation is performed during - training time and is updated automatically when training is completed. - """ + training time and is updated automatically when training is completed. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -266,3 +225,252 @@ def add_AgentsServicer_to_server(servicer, server): "google.cloud.dialogflow.v2.Agents", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Agents(object): + """Service for managing [Agents][google.cloud.dialogflow.v2.Agent]. + """ + + @staticmethod + def GetAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Agents/GetAgent", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.GetAgentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.Agent.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def SetAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Agents/SetAgent", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SetAgentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.Agent.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Agents/DeleteAgent", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.DeleteAgentRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def SearchAgents( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Agents/SearchAgents", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SearchAgentsRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SearchAgentsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def TrainAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Agents/TrainAgent", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.TrainAgentRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ExportAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Agents/ExportAgent", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.ExportAgentRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ImportAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Agents/ImportAgent", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.ImportAgentRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def RestoreAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Agents/RestoreAgent", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.RestoreAgentRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetValidationResult( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Agents/GetValidationResult", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.GetValidationResultRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_validation__result__pb2.ValidationResult.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2/proto/audio_config.proto b/dialogflow_v2/proto/audio_config.proto new file mode 100644 index 000000000..19b1e09b9 --- /dev/null +++ b/dialogflow_v2/proto/audio_config.proto @@ -0,0 +1,351 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "AudioConfigProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; + +// Audio encoding of the audio content sent in the conversational query request. +// Refer to the +// [Cloud Speech API +// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more +// details. +enum AudioEncoding { + // Not specified. + AUDIO_ENCODING_UNSPECIFIED = 0; + + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + AUDIO_ENCODING_LINEAR_16 = 1; + + // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio + // Codec) is the recommended encoding because it is lossless (therefore + // recognition is not compromised) and requires only about half the + // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and + // 24-bit samples, however, not all fields in `STREAMINFO` are supported. + AUDIO_ENCODING_FLAC = 2; + + // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + AUDIO_ENCODING_MULAW = 3; + + // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. + AUDIO_ENCODING_AMR = 4; + + // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. + AUDIO_ENCODING_AMR_WB = 5; + + // Opus encoded audio frames in Ogg container + // ([OggOpus](https://wiki.xiph.org/OggOpus)). + // `sample_rate_hertz` must be 16000. + AUDIO_ENCODING_OGG_OPUS = 6; + + // Although the use of lossy encodings is not recommended, if a very low + // bitrate encoding is required, `OGG_OPUS` is highly preferred over + // Speex encoding. The [Speex](https://speex.org/) encoding supported by + // Dialogflow API has a header byte in each block, as in MIME type + // `audio/x-speex-with-header-byte`. + // It is a variant of the RTP Speex encoding defined in + // [RFC 5574](https://tools.ietf.org/html/rfc5574). + // The stream is a sequence of blocks, one block per RTP packet. Each block + // starts with a byte containing the length of the block, in bytes, followed + // by one or more frames of Speex data, padded to an integral number of + // bytes (octets) as specified in RFC 5574. In other words, each RTP header + // is replaced with a single byte containing the block length. Only Speex + // wideband is supported. `sample_rate_hertz` must be 16000. + AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; +} + +// Hints for the speech recognizer to help with recognition in a specific +// conversation state. +message SpeechContext { + // Optional. A list of strings containing words and phrases that the speech + // recognizer should recognize with higher likelihood. + // + // This list can be used to: + // + // * improve accuracy for words and phrases you expect the user to say, + // e.g. typical commands for your Dialogflow agent + // * add additional words to the speech recognizer vocabulary + // * ... + // + // See the [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/quotas) for usage + // limits. + repeated string phrases = 1; + + // Optional. Boost for this context compared to other contexts: + // + // * If the boost is positive, Dialogflow will increase the probability that + // the phrases in this context are recognized over similar sounding phrases. + // * If the boost is unspecified or non-positive, Dialogflow will not apply + // any boost. + // + // Dialogflow recommends that you use boosts in the range (0, 20] and that you + // find a value that fits your use case with binary search. + float boost = 2; +} + +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // Time offset relative to the beginning of the audio that corresponds to the + // start of the spoken word. This is an experimental feature and the accuracy + // of the time offset can vary. + google.protobuf.Duration start_offset = 1; + + // Time offset relative to the beginning of the audio that corresponds to the + // end of the spoken word. This is an experimental feature and the accuracy of + // the time offset can vary. + google.protobuf.Duration end_offset = 2; + + // The Speech confidence between 0.0 and 1.0 for this word. A higher number + // indicates an estimated greater likelihood that the recognized word is + // correct. The default of 0.0 is a sentinel value indicating that confidence + // was not set. + // + // This field is not guaranteed to be fully stable over time for the same + // audio input. Users should also not rely on it to always be provided. + float confidence = 4; +} + +// Variant of the specified [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. +// +// See the [Cloud Speech +// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) +// for which models have different variants. For example, the "phone_call" model +// has both a standard and an enhanced variant. When you use an enhanced model, +// you will generally receive higher quality results than for a standard model. +enum SpeechModelVariant { + // No model variant specified. In this case Dialogflow defaults to + // USE_BEST_AVAILABLE. + SPEECH_MODEL_VARIANT_UNSPECIFIED = 0; + + // Use the best available variant of the [Speech + // model][InputAudioConfig.model] that the caller is eligible for. + // + // Please see the [Dialogflow + // docs](https://cloud.google.com/dialogflow/docs/data-logging) for + // how to make your project eligible for enhanced models. + USE_BEST_AVAILABLE = 1; + + // Use standard model variant even if an enhanced model is available. See the + // [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + // for details about enhanced models. + USE_STANDARD = 2; + + // Use an enhanced model variant: + // + // * If an enhanced variant does not exist for the given + // [model][google.cloud.dialogflow.v2.InputAudioConfig.model] and request language, Dialogflow falls + // back to the standard variant. + // + // The [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + // describes which models have enhanced variants. + // + // * If the API caller isn't eligible for enhanced models, Dialogflow returns + // an error. Please see the [Dialogflow + // docs](https://cloud.google.com/dialogflow/docs/data-logging) + // for how to make your project eligible. + USE_ENHANCED = 3; +} + +// Instructs the speech recognizer how to process the audio content. +message InputAudioConfig { + // Required. Audio encoding of the audio content to process. + AudioEncoding audio_encoding = 1; + + // Required. Sample rate (in Hertz) of the audio content sent in the query. + // Refer to + // [Cloud Speech API + // documentation](https://cloud.google.com/speech-to-text/docs/basics) for + // more details. + int32 sample_rate_hertz = 2; + + // Required. The language of the supplied audio. Dialogflow does not do + // translations. See [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // for a list of the currently supported language codes. Note that queries in + // the same session do not necessarily need to specify the same language. + string language_code = 3; + + // If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in + // [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] with information about the recognized speech + // words, e.g. start and end time offsets. If false or unspecified, Speech + // doesn't return any word-level information. + bool enable_word_info = 13; + + // A list of strings containing words and phrases that the speech + // recognizer should recognize with higher likelihood. + // + // See [the Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + // for more details. + // + // This field is deprecated. Please use [speech_contexts]() instead. If you + // specify both [phrase_hints]() and [speech_contexts](), Dialogflow will + // treat the [phrase_hints]() as a single additional [SpeechContext](). + repeated string phrase_hints = 4 [deprecated = true]; + + // Context information to assist speech recognition. + // + // See [the Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + // for more details. + repeated SpeechContext speech_contexts = 11; + + // Which Speech model to select for the given request. Select the + // model best suited to your domain to get best results. If a model is not + // explicitly specified, then we auto-select a model based on the parameters + // in the InputAudioConfig. + // If enhanced speech model is enabled for the agent and an enhanced + // version of the specified model for the language does not exist, then the + // speech is recognized using the standard version of the specified model. + // Refer to + // [Cloud Speech API + // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) + // for more details. + string model = 7; + + // Which variant of the [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use. + SpeechModelVariant model_variant = 10; + + // If `false` (default), recognition does not cease until the + // client closes the stream. + // If `true`, the recognizer will detect a single spoken utterance in input + // audio. Recognition ceases when it detects the audio's voice has + // stopped or paused. In this case, once a detected intent is received, the + // client should close the stream and start a new request with a new stream as + // needed. + // Note: This setting is relevant only for streaming methods. + // Note: When specified, InputAudioConfig.single_utterance takes precedence + // over StreamingDetectIntentRequest.single_utterance. + bool single_utterance = 8; +} + +// Description of which voice to use for speech synthesis. +message VoiceSelectionParams { + // Optional. The name of the voice. If not set, the service will choose a + // voice based on the other parameters such as language_code and + // [ssml_gender][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender]. + string name = 1; + + // Optional. The preferred gender of the voice. If not set, the service will + // choose a voice based on the other parameters such as language_code and + // [name][google.cloud.dialogflow.v2.VoiceSelectionParams.name]. Note that this is only a preference, not requirement. If a + // voice of the appropriate gender is not available, the synthesizer should + // substitute a voice with a different gender rather than failing the request. + SsmlVoiceGender ssml_gender = 2; +} + +// Gender of the voice as described in +// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). +enum SsmlVoiceGender { + // An unspecified gender, which means that the client doesn't care which + // gender the selected voice will have. + SSML_VOICE_GENDER_UNSPECIFIED = 0; + + // A male voice. + SSML_VOICE_GENDER_MALE = 1; + + // A female voice. + SSML_VOICE_GENDER_FEMALE = 2; + + // A gender-neutral voice. + SSML_VOICE_GENDER_NEUTRAL = 3; +} + +// Configuration of how speech should be synthesized. +message SynthesizeSpeechConfig { + // Optional. Speaking rate/speed, in the range [0.25, 4.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. If unset(0.0), defaults to the native 1.0 speed. Any + // other values < 0.25 or > 4.0 will return an error. + double speaking_rate = 1; + + // Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 + // semitones from the original pitch. -20 means decrease 20 semitones from the + // original pitch. + double pitch = 2; + + // Optional. Volume gain (in dB) of the normal native volume supported by the + // specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of + // 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) + // will play at approximately half the amplitude of the normal native signal + // amplitude. A value of +6.0 (dB) will play at approximately twice the + // amplitude of the normal native signal amplitude. We strongly recommend not + // to exceed +10 (dB) as there's usually no effective increase in loudness for + // any value greater than that. + double volume_gain_db = 3; + + // Optional. An identifier which selects 'audio effects' profiles that are + // applied on (post synthesized) text to speech. Effects are applied on top of + // each other in the order they are given. + repeated string effects_profile_id = 5; + + // Optional. The desired voice of the synthesized audio. + VoiceSelectionParams voice = 4; +} + +// Instructs the speech synthesizer on how to generate the output audio content. +// If this audio config is supplied in a request, it overrides all existing +// text-to-speech settings applied to the agent. +message OutputAudioConfig { + // Required. Audio encoding of the synthesized audio content. + OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; + + // The synthesis sample rate (in hertz) for this audio. If not + // provided, then the synthesizer will use the default sample rate based on + // the audio encoding. If this is different from the voice's natural sample + // rate, then the synthesizer will honor this request by converting to the + // desired sample rate (which might result in worse audio quality). + int32 sample_rate_hertz = 2; + + // Configuration of how speech should be synthesized. + SynthesizeSpeechConfig synthesize_speech_config = 3; +} + +// Audio encoding of the output audio format in Text-To-Speech. +enum OutputAudioEncoding { + // Not specified. + OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0; + + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + // Audio content returned as LINEAR16 also contains a WAV header. + OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; + + // MP3 audio at 32kbps. + OUTPUT_AUDIO_ENCODING_MP3 = 2; + + // Opus encoded audio wrapped in an ogg container. The result will be a + // file which can be played natively on Android, and in browsers (at least + // Chrome and Firefox). The quality of the encoding is considerably higher + // than MP3 while using approximately the same bitrate. + OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3; +} diff --git a/dialogflow_v2/proto/audio_config_pb2.py b/dialogflow_v2/proto/audio_config_pb2.py index 7b3a05634..4341cd28e 100644 --- a/dialogflow_v2/proto/audio_config_pb2.py +++ b/dialogflow_v2/proto/audio_config_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/audio_config.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -26,12 +23,9 @@ name="google/cloud/dialogflow_v2/proto/audio_config.proto", package="google.cloud.dialogflow.v2", syntax="proto3", - serialized_options=_b( - "\n\036com.google.cloud.dialogflow.v2B\020AudioConfigProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2" - ), - serialized_pb=_b( - '\n3google/cloud/dialogflow_v2/proto/audio_config.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/api/annotations.proto"/\n\rSpeechContext\x12\x0f\n\x07phrases\x18\x01 \x03(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02"\x92\x01\n\x0eSpeechWordInfo\x12\x0c\n\x04word\x18\x03 \x01(\t\x12/\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xef\x02\n\x10InputAudioConfig\x12\x41\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32).google.cloud.dialogflow.v2.AudioEncoding\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\x12\x18\n\x10\x65nable_word_info\x18\r \x01(\x08\x12\x18\n\x0cphrase_hints\x18\x04 \x03(\tB\x02\x18\x01\x12\x42\n\x0fspeech_contexts\x18\x0b \x03(\x0b\x32).google.cloud.dialogflow.v2.SpeechContext\x12\r\n\x05model\x18\x07 \x01(\t\x12\x45\n\rmodel_variant\x18\n \x01(\x0e\x32..google.cloud.dialogflow.v2.SpeechModelVariant\x12\x18\n\x10single_utterance\x18\x08 \x01(\x08"f\n\x14VoiceSelectionParams\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x0bssml_gender\x18\x02 \x01(\x0e\x32+.google.cloud.dialogflow.v2.SsmlVoiceGender"\xb3\x01\n\x16SynthesizeSpeechConfig\x12\x15\n\rspeaking_rate\x18\x01 \x01(\x01\x12\r\n\x05pitch\x18\x02 \x01(\x01\x12\x16\n\x0evolume_gain_db\x18\x03 \x01(\x01\x12\x1a\n\x12\x65\x66\x66\x65\x63ts_profile_id\x18\x05 \x03(\t\x12?\n\x05voice\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.VoiceSelectionParams"\xd2\x01\n\x11OutputAudioConfig\x12L\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32/.google.cloud.dialogflow.v2.OutputAudioEncodingB\x03\xe0\x41\x02\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12T\n\x18synthesize_speech_config\x18\x03 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2.SynthesizeSpeechConfig*\xfb\x01\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41UDIO_ENCODING_LINEAR_16\x10\x01\x12\x17\n\x13\x41UDIO_ENCODING_FLAC\x10\x02\x12\x18\n\x14\x41UDIO_ENCODING_MULAW\x10\x03\x12\x16\n\x12\x41UDIO_ENCODING_AMR\x10\x04\x12\x19\n\x15\x41UDIO_ENCODING_AMR_WB\x10\x05\x12\x1b\n\x17\x41UDIO_ENCODING_OGG_OPUS\x10\x06\x12)\n%AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE\x10\x07*v\n\x12SpeechModelVariant\x12$\n SPEECH_MODEL_VARIANT_UNSPECIFIED\x10\x00\x12\x16\n\x12USE_BEST_AVAILABLE\x10\x01\x12\x10\n\x0cUSE_STANDARD\x10\x02\x12\x10\n\x0cUSE_ENHANCED\x10\x03*\x8d\x01\n\x0fSsmlVoiceGender\x12!\n\x1dSSML_VOICE_GENDER_UNSPECIFIED\x10\x00\x12\x1a\n\x16SSML_VOICE_GENDER_MALE\x10\x01\x12\x1c\n\x18SSML_VOICE_GENDER_FEMALE\x10\x02\x12\x1d\n\x19SSML_VOICE_GENDER_NEUTRAL\x10\x03*\xa4\x01\n\x13OutputAudioEncoding\x12%\n!OUTPUT_AUDIO_ENCODING_UNSPECIFIED\x10\x00\x12#\n\x1fOUTPUT_AUDIO_ENCODING_LINEAR_16\x10\x01\x12\x1d\n\x19OUTPUT_AUDIO_ENCODING_MP3\x10\x02\x12"\n\x1eOUTPUT_AUDIO_ENCODING_OGG_OPUS\x10\x03\x42\x9f\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x10\x41udioConfigProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3' - ), + serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\020AudioConfigProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n3google/cloud/dialogflow_v2/proto/audio_config.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/api/annotations.proto"/\n\rSpeechContext\x12\x0f\n\x07phrases\x18\x01 \x03(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02"\x92\x01\n\x0eSpeechWordInfo\x12\x0c\n\x04word\x18\x03 \x01(\t\x12/\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xef\x02\n\x10InputAudioConfig\x12\x41\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32).google.cloud.dialogflow.v2.AudioEncoding\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\x12\x18\n\x10\x65nable_word_info\x18\r \x01(\x08\x12\x18\n\x0cphrase_hints\x18\x04 \x03(\tB\x02\x18\x01\x12\x42\n\x0fspeech_contexts\x18\x0b \x03(\x0b\x32).google.cloud.dialogflow.v2.SpeechContext\x12\r\n\x05model\x18\x07 \x01(\t\x12\x45\n\rmodel_variant\x18\n \x01(\x0e\x32..google.cloud.dialogflow.v2.SpeechModelVariant\x12\x18\n\x10single_utterance\x18\x08 \x01(\x08"f\n\x14VoiceSelectionParams\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x0bssml_gender\x18\x02 \x01(\x0e\x32+.google.cloud.dialogflow.v2.SsmlVoiceGender"\xb3\x01\n\x16SynthesizeSpeechConfig\x12\x15\n\rspeaking_rate\x18\x01 \x01(\x01\x12\r\n\x05pitch\x18\x02 \x01(\x01\x12\x16\n\x0evolume_gain_db\x18\x03 \x01(\x01\x12\x1a\n\x12\x65\x66\x66\x65\x63ts_profile_id\x18\x05 \x03(\t\x12?\n\x05voice\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.VoiceSelectionParams"\xd2\x01\n\x11OutputAudioConfig\x12L\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32/.google.cloud.dialogflow.v2.OutputAudioEncodingB\x03\xe0\x41\x02\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12T\n\x18synthesize_speech_config\x18\x03 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2.SynthesizeSpeechConfig*\xfb\x01\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41UDIO_ENCODING_LINEAR_16\x10\x01\x12\x17\n\x13\x41UDIO_ENCODING_FLAC\x10\x02\x12\x18\n\x14\x41UDIO_ENCODING_MULAW\x10\x03\x12\x16\n\x12\x41UDIO_ENCODING_AMR\x10\x04\x12\x19\n\x15\x41UDIO_ENCODING_AMR_WB\x10\x05\x12\x1b\n\x17\x41UDIO_ENCODING_OGG_OPUS\x10\x06\x12)\n%AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE\x10\x07*v\n\x12SpeechModelVariant\x12$\n SPEECH_MODEL_VARIANT_UNSPECIFIED\x10\x00\x12\x16\n\x12USE_BEST_AVAILABLE\x10\x01\x12\x10\n\x0cUSE_STANDARD\x10\x02\x12\x10\n\x0cUSE_ENHANCED\x10\x03*\x8d\x01\n\x0fSsmlVoiceGender\x12!\n\x1dSSML_VOICE_GENDER_UNSPECIFIED\x10\x00\x12\x1a\n\x16SSML_VOICE_GENDER_MALE\x10\x01\x12\x1c\n\x18SSML_VOICE_GENDER_FEMALE\x10\x02\x12\x1d\n\x19SSML_VOICE_GENDER_NEUTRAL\x10\x03*\xa4\x01\n\x13OutputAudioEncoding\x12%\n!OUTPUT_AUDIO_ENCODING_UNSPECIFIED\x10\x00\x12#\n\x1fOUTPUT_AUDIO_ENCODING_LINEAR_16\x10\x01\x12\x1d\n\x19OUTPUT_AUDIO_ENCODING_MP3\x10\x02\x12"\n\x1eOUTPUT_AUDIO_ENCODING_OGG_OPUS\x10\x03\x42\x9f\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x10\x41udioConfigProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3', dependencies=[ google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, @@ -45,6 +39,7 @@ full_name="google.cloud.dialogflow.v2.AudioEncoding", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_UNSPECIFIED", @@ -52,6 +47,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_LINEAR_16", @@ -59,6 +55,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_FLAC", @@ -66,6 +63,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_MULAW", @@ -73,6 +71,7 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_AMR", @@ -80,6 +79,7 @@ number=4, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_AMR_WB", @@ -87,6 +87,7 @@ number=5, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_OGG_OPUS", @@ -94,6 +95,7 @@ number=6, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE", @@ -101,6 +103,7 @@ number=7, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -116,6 +119,7 @@ full_name="google.cloud.dialogflow.v2.SpeechModelVariant", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="SPEECH_MODEL_VARIANT_UNSPECIFIED", @@ -123,6 +127,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="USE_BEST_AVAILABLE", @@ -130,12 +135,23 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="USE_STANDARD", index=2, number=2, serialized_options=None, type=None + name="USE_STANDARD", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="USE_ENHANCED", index=3, number=3, serialized_options=None, type=None + name="USE_ENHANCED", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -151,6 +167,7 @@ full_name="google.cloud.dialogflow.v2.SsmlVoiceGender", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="SSML_VOICE_GENDER_UNSPECIFIED", @@ -158,6 +175,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="SSML_VOICE_GENDER_MALE", @@ -165,6 +183,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="SSML_VOICE_GENDER_FEMALE", @@ -172,6 +191,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="SSML_VOICE_GENDER_NEUTRAL", @@ -179,6 +199,7 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -194,6 +215,7 @@ full_name="google.cloud.dialogflow.v2.OutputAudioEncoding", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="OUTPUT_AUDIO_ENCODING_UNSPECIFIED", @@ -201,6 +223,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="OUTPUT_AUDIO_ENCODING_LINEAR_16", @@ -208,6 +231,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="OUTPUT_AUDIO_ENCODING_MP3", @@ -215,6 +239,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="OUTPUT_AUDIO_ENCODING_OGG_OPUS", @@ -222,6 +247,7 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -260,6 +286,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="phrases", @@ -278,6 +305,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="boost", @@ -296,6 +324,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -317,6 +346,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="word", @@ -327,7 +357,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -335,6 +365,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="start_offset", @@ -353,6 +384,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="end_offset", @@ -371,6 +403,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -389,6 +422,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -410,6 +444,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="audio_encoding", @@ -428,6 +463,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sample_rate_hertz", @@ -446,6 +482,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -456,7 +493,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -464,6 +501,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="enable_word_info", @@ -482,6 +520,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="phrase_hints", @@ -498,8 +537,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\030\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="speech_contexts", @@ -518,6 +558,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -528,7 +569,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -536,6 +577,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model_variant", @@ -554,6 +596,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="single_utterance", @@ -572,6 +615,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -593,6 +637,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -603,7 +648,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -611,6 +656,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="ssml_gender", @@ -629,6 +675,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -650,6 +697,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="speaking_rate", @@ -668,6 +716,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pitch", @@ -686,6 +735,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="volume_gain_db", @@ -704,6 +754,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="effects_profile_id", @@ -722,6 +773,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="voice", @@ -740,6 +792,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -761,6 +814,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="audio_encoding", @@ -777,8 +831,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sample_rate_hertz", @@ -797,6 +852,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="synthesize_speech_config", @@ -815,6 +871,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -859,47 +916,44 @@ SpeechContext = _reflection.GeneratedProtocolMessageType( "SpeechContext", (_message.Message,), - dict( - DESCRIPTOR=_SPEECHCONTEXT, - __module__="google.cloud.dialogflow_v2.proto.audio_config_pb2", - __doc__="""Hints for the speech recognizer to help with recognition - in a specific conversation state. - + { + "DESCRIPTOR": _SPEECHCONTEXT, + "__module__": "google.cloud.dialogflow_v2.proto.audio_config_pb2", + "__doc__": """Hints for the speech recognizer to help with recognition in a specific + conversation state. Attributes: phrases: Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. - This list can be used to: \* improve accuracy for words and - phrases you expect the user to say, e.g. typical commands for - your Dialogflow agent \* add additional words to the speech - recognizer vocabulary \* ... See the `Cloud Speech + This list can be used to: - improve accuracy for words and + phrases you expect the user to say, e.g. typical commands + for your Dialogflow agent - add additional words to the + speech recognizer vocabulary - … See the `Cloud Speech documentation `__ for usage limits. boost: Optional. Boost for this context compared to other contexts: - \* If the boost is positive, Dialogflow will increase the - probability that the phrases in this context are recognized - over similar sounding phrases. \* If the boost is unspecified - or non-positive, Dialogflow will not apply any boost. - Dialogflow recommends that you use boosts in the range (0, 20] - and that you find a value that fits your use case with binary - search. + - If the boost is positive, Dialogflow will increase the + probability that the phrases in this context are recognized + over similar sounding phrases. - If the boost is + unspecified or non-positive, Dialogflow will not apply any + boost. Dialogflow recommends that you use boosts in the range + (0, 20] and that you find a value that fits your use case with + binary search. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SpeechContext) - ), + }, ) _sym_db.RegisterMessage(SpeechContext) SpeechWordInfo = _reflection.GeneratedProtocolMessageType( "SpeechWordInfo", (_message.Message,), - dict( - DESCRIPTOR=_SPEECHWORDINFO, - __module__="google.cloud.dialogflow_v2.proto.audio_config_pb2", - __doc__="""Information for a word recognized by the speech - recognizer. - + { + "DESCRIPTOR": _SPEECHWORDINFO, + "__module__": "google.cloud.dialogflow_v2.proto.audio_config_pb2", + "__doc__": """Information for a word recognized by the speech recognizer. Attributes: word: @@ -924,19 +978,17 @@ be provided. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SpeechWordInfo) - ), + }, ) _sym_db.RegisterMessage(SpeechWordInfo) InputAudioConfig = _reflection.GeneratedProtocolMessageType( "InputAudioConfig", (_message.Message,), - dict( - DESCRIPTOR=_INPUTAUDIOCONFIG, - __module__="google.cloud.dialogflow_v2.proto.audio_config_pb2", - __doc__="""Instructs the speech recognizer how to process the audio - content. - + { + "DESCRIPTOR": _INPUTAUDIOCONFIG, + "__module__": "google.cloud.dialogflow_v2.proto.audio_config_pb2", + "__doc__": """Instructs the speech recognizer how to process the audio content. Attributes: audio_encoding: @@ -958,17 +1010,17 @@ [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in [StreamingRecognitionResult][google.cloud.dialogflow.v2.Stream ingRecognitionResult] with information about the recognized - speech words, e.g. start and end time offsets. If false or - unspecified, Speech doesn't return any word-level information. + speech words, e.g. start and end time offsets. If false or + unspecified, Speech doesn’t return any word-level information. phrase_hints: A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. See `the Cloud Speech documentation `__ for more details. This - field is deprecated. Please use `speech\_contexts` - instead. If you specify both `phrase\_hints` and - `speech\_contexts`, Dialogflow will treat the - `phrase\_hints` as a single additional `SpeechContext`. + field is deprecated. Please use `speech_contexts` + instead. If you specify both `phrase_hints` and + `speech_contexts`, Dialogflow will treat the + `phrase_hints` as a single additional `SpeechContext`. speech_contexts: Context information to assist speech recognition. See `the Cloud Speech documentation /agent/sessions//contexts/`, + // or `projects//agent/environments//users//sessions//contexts/`. + // + // The `Context ID` is always converted to lowercase, may only contain + // characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + // + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + // + // The following context names are reserved for internal use by Dialogflow. + // You should not use these contexts or create contexts with these names: + // + // * `__system_counters__` + // * `*_id_dialog_context` + // * `*_dialog_params_size` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The number of conversational query requests after which the + // context expires. The default is `0`. If set to `0`, the context expires + // immediately. Contexts expire automatically after 20 minutes if there + // are no matching queries. + int32 lifespan_count = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of parameters associated with this context. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value + google.protobuf.Struct parameters = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts]. +message ListContextsRequest { + // Required. The session to list all contexts from. + // Format: `projects//agent/sessions/` or + // `projects//agent/environments//users//sessions/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Context" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts]. +message ListContextsResponse { + // The list of contexts. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated Context contexts = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext]. +message GetContextRequest { + // Required. The name of the context. Format: + // `projects//agent/sessions//contexts/` + // or `projects//agent/environments//users//sessions//contexts/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Context" + } + ]; +} + +// The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2.Contexts.CreateContext]. +message CreateContextRequest { + // Required. The session to create a context for. + // Format: `projects//agent/sessions/` or + // `projects//agent/environments//users//sessions/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Context" + } + ]; + + // Required. The context to create. + Context context = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2.Contexts.UpdateContext]. +message UpdateContextRequest { + // Required. The context to update. + Context context = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2.Contexts.DeleteContext]. +message DeleteContextRequest { + // Required. The name of the context to delete. Format: + // `projects//agent/sessions//contexts/` + // or `projects//agent/environments//users//sessions//contexts/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Context" + } + ]; +} + +// The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2.Contexts.DeleteAllContexts]. +message DeleteAllContextsRequest { + // Required. The name of the session to delete all contexts from. Format: + // `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. + // If `Environment ID` is not specified we assume default 'draft' environment. + // If `User ID` is not specified, we assume default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Context" + } + ]; +} diff --git a/dialogflow_v2/proto/context_pb2.py b/dialogflow_v2/proto/context_pb2.py index bc8e0d8cb..511270c37 100644 --- a/dialogflow_v2/proto/context_pb2.py +++ b/dialogflow_v2/proto/context_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/context.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -28,12 +25,9 @@ name="google/cloud/dialogflow_v2/proto/context.proto", package="google.cloud.dialogflow.v2", syntax="proto3", - serialized_options=_b( - "\n\036com.google.cloud.dialogflow.v2B\014ContextProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2" - ), - serialized_pb=_b( - '\n.google/cloud/dialogflow_v2/proto/context.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto"\xd3\x01\n\x07\x43ontext\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0elifespan_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x30\n\nparameters\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01:f\xea\x41\x63\n!dialogflow.googleapis.com/Context\x12>projects/{project}/agent/sessions/{session}/contexts/{context}"[\n\x13ListContextsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01"f\n\x14ListContextsResponse\x12\x35\n\x08\x63ontexts\x18\x01 \x03(\x0b\x32#.google.cloud.dialogflow.v2.Context\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"L\n\x11GetContextRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Context"\x8c\x01\n\x14\x43reateContextRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Context\x12\x39\n\x07\x63ontext\x18\x02 \x01(\x0b\x32#.google.cloud.dialogflow.v2.ContextB\x03\xe0\x41\x02"\x87\x01\n\x14UpdateContextRequest\x12\x39\n\x07\x63ontext\x18\x01 \x01(\x0b\x32#.google.cloud.dialogflow.v2.ContextB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"O\n\x14\x44\x65leteContextRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Context"U\n\x18\x44\x65leteAllContextsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Context2\x9a\r\n\x08\x43ontexts\x12\x82\x02\n\x0cListContexts\x12/.google.cloud.dialogflow.v2.ListContextsRequest\x1a\x30.google.cloud.dialogflow.v2.ListContextsResponse"\x8e\x01\x82\xd3\xe4\x93\x02\x7f\x12\x31/v2/{parent=projects/*/agent/sessions/*}/contextsZJ\x12H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts\xda\x41\x06parent\x12\xef\x01\n\nGetContext\x12-.google.cloud.dialogflow.v2.GetContextRequest\x1a#.google.cloud.dialogflow.v2.Context"\x8c\x01\x82\xd3\xe4\x93\x02\x7f\x12\x31/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ\x12H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\xda\x41\x04name\x12\x92\x02\n\rCreateContext\x12\x30.google.cloud.dialogflow.v2.CreateContextRequest\x1a#.google.cloud.dialogflow.v2.Context"\xa9\x01\x82\xd3\xe4\x93\x02\x91\x01"1/v2/{parent=projects/*/agent/sessions/*}/contexts:\x07\x63ontextZS"H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:\x07\x63ontext\xda\x41\x0eparent,context\x12\xa7\x02\n\rUpdateContext\x12\x30.google.cloud.dialogflow.v2.UpdateContextRequest\x1a#.google.cloud.dialogflow.v2.Context"\xbe\x01\x82\xd3\xe4\x93\x02\xa1\x01\x32\x39/v2/{context.name=projects/*/agent/sessions/*/contexts/*}:\x07\x63ontextZ[2P/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:\x07\x63ontext\xda\x41\x13\x63ontext,update_mask\x12\xe8\x01\n\rDeleteContext\x12\x30.google.cloud.dialogflow.v2.DeleteContextRequest\x1a\x16.google.protobuf.Empty"\x8c\x01\x82\xd3\xe4\x93\x02\x7f*1/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ*H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\xda\x41\x04name\x12\xf2\x01\n\x11\x44\x65leteAllContexts\x12\x34.google.cloud.dialogflow.v2.DeleteAllContextsRequest\x1a\x16.google.protobuf.Empty"\x8e\x01\x82\xd3\xe4\x93\x02\x7f*1/v2/{parent=projects/*/agent/sessions/*}/contextsZJ*H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts\xda\x41\x06parent\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x9b\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x0c\x43ontextProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3' - ), + serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\014ContextProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n.google/cloud/dialogflow_v2/proto/context.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto"\xbd\x02\n\x07\x43ontext\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0elifespan_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x30\n\nparameters\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01:\xcf\x01\xea\x41\xcb\x01\n!dialogflow.googleapis.com/Context\x12>projects/{project}/agent/sessions/{session}/contexts/{context}\x12\x66projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}"\x81\x01\n\x13ListContextsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Context\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01"f\n\x14ListContextsResponse\x12\x35\n\x08\x63ontexts\x18\x01 \x03(\x0b\x32#.google.cloud.dialogflow.v2.Context\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"L\n\x11GetContextRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Context"\x8c\x01\n\x14\x43reateContextRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Context\x12\x39\n\x07\x63ontext\x18\x02 \x01(\x0b\x32#.google.cloud.dialogflow.v2.ContextB\x03\xe0\x41\x02"\x87\x01\n\x14UpdateContextRequest\x12\x39\n\x07\x63ontext\x18\x01 \x01(\x0b\x32#.google.cloud.dialogflow.v2.ContextB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"O\n\x14\x44\x65leteContextRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Context"U\n\x18\x44\x65leteAllContextsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Context2\x9a\r\n\x08\x43ontexts\x12\x82\x02\n\x0cListContexts\x12/.google.cloud.dialogflow.v2.ListContextsRequest\x1a\x30.google.cloud.dialogflow.v2.ListContextsResponse"\x8e\x01\x82\xd3\xe4\x93\x02\x7f\x12\x31/v2/{parent=projects/*/agent/sessions/*}/contextsZJ\x12H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts\xda\x41\x06parent\x12\xef\x01\n\nGetContext\x12-.google.cloud.dialogflow.v2.GetContextRequest\x1a#.google.cloud.dialogflow.v2.Context"\x8c\x01\x82\xd3\xe4\x93\x02\x7f\x12\x31/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ\x12H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\xda\x41\x04name\x12\x92\x02\n\rCreateContext\x12\x30.google.cloud.dialogflow.v2.CreateContextRequest\x1a#.google.cloud.dialogflow.v2.Context"\xa9\x01\x82\xd3\xe4\x93\x02\x91\x01"1/v2/{parent=projects/*/agent/sessions/*}/contexts:\x07\x63ontextZS"H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:\x07\x63ontext\xda\x41\x0eparent,context\x12\xa7\x02\n\rUpdateContext\x12\x30.google.cloud.dialogflow.v2.UpdateContextRequest\x1a#.google.cloud.dialogflow.v2.Context"\xbe\x01\x82\xd3\xe4\x93\x02\xa1\x01\x32\x39/v2/{context.name=projects/*/agent/sessions/*/contexts/*}:\x07\x63ontextZ[2P/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:\x07\x63ontext\xda\x41\x13\x63ontext,update_mask\x12\xe8\x01\n\rDeleteContext\x12\x30.google.cloud.dialogflow.v2.DeleteContextRequest\x1a\x16.google.protobuf.Empty"\x8c\x01\x82\xd3\xe4\x93\x02\x7f*1/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ*H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\xda\x41\x04name\x12\xf2\x01\n\x11\x44\x65leteAllContexts\x12\x34.google.cloud.dialogflow.v2.DeleteAllContextsRequest\x1a\x16.google.protobuf.Empty"\x8e\x01\x82\xd3\xe4\x93\x02\x7f*1/v2/{parent=projects/*/agent/sessions/*}/contextsZJ*H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts\xda\x41\x06parent\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x9b\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x0c\x43ontextProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -52,6 +46,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -62,14 +57,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="lifespan_count", @@ -86,8 +82,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parameters", @@ -104,22 +101,21 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b( - "\352Ac\n!dialogflow.googleapis.com/Context\022>projects/{project}/agent/sessions/{session}/contexts/{context}" - ), + serialized_options=b"\352A\313\001\n!dialogflow.googleapis.com/Context\022>projects/{project}/agent/sessions/{session}/contexts/{context}\022fprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], serialized_start=287, - serialized_end=498, + serialized_end=604, ) @@ -129,6 +125,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -139,14 +136,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002\372A#\022!dialogflow.googleapis.com/Context", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -163,8 +161,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -175,14 +174,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -193,8 +193,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=500, - serialized_end=591, + serialized_start=607, + serialized_end=736, ) @@ -204,6 +204,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="contexts", @@ -222,6 +223,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -232,7 +234,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -240,6 +242,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -250,8 +253,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=593, - serialized_end=695, + serialized_start=738, + serialized_end=840, ) @@ -261,6 +264,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -271,16 +275,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!dialogflow.googleapis.com/Context" - ), + serialized_options=b"\340A\002\372A#\n!dialogflow.googleapis.com/Context", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -291,8 +294,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=697, - serialized_end=773, + serialized_start=842, + serialized_end=918, ) @@ -302,6 +305,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -312,16 +316,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\022!dialogflow.googleapis.com/Context" - ), + serialized_options=b"\340A\002\372A#\022!dialogflow.googleapis.com/Context", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="context", @@ -338,8 +341,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -350,8 +354,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=776, - serialized_end=916, + serialized_start=921, + serialized_end=1061, ) @@ -361,6 +365,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="context", @@ -377,8 +382,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -395,8 +401,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -407,8 +414,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=919, - serialized_end=1054, + serialized_start=1064, + serialized_end=1199, ) @@ -418,6 +425,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -428,16 +436,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!dialogflow.googleapis.com/Context" - ), + serialized_options=b"\340A\002\372A#\n!dialogflow.googleapis.com/Context", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -448,8 +455,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1056, - serialized_end=1135, + serialized_start=1201, + serialized_end=1280, ) @@ -459,6 +466,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -469,16 +477,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\022!dialogflow.googleapis.com/Context" - ), + serialized_options=b"\340A\002\372A#\022!dialogflow.googleapis.com/Context", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -489,8 +496,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1137, - serialized_end=1222, + serialized_start=1282, + serialized_end=1367, ) _CONTEXT.fields_by_name[ @@ -515,11 +522,22 @@ Context = _reflection.GeneratedProtocolMessageType( "Context", (_message.Message,), - dict( - DESCRIPTOR=_CONTEXT, - __module__="google.cloud.dialogflow_v2.proto.context_pb2", - __doc__="""Represents a context. - + { + "DESCRIPTOR": _CONTEXT, + "__module__": "google.cloud.dialogflow_v2.proto.context_pb2", + "__doc__": """Dialogflow contexts are similar to natural language context. If a + person says to you “they are orange”, you need context in order to + understand what “they” is referring to. Similarly, for Dialogflow to + handle an end-user expression like that, it needs to be provided with + context in order to correctly match an intent. Using contexts, you + can control the flow of a conversation. You can configure contexts for + an intent by setting input and output contexts, which are identified + by string names. When an intent is matched, any configured output + contexts for that intent become active. While any contexts are active, + Dialogflow is more likely to match intents that are configured with + input contexts that correspond to the currently active contexts. For + more information about context, see the `Contexts guide + `__. Attributes: name: @@ -529,39 +547,46 @@ ID>/agent/environments//users//sessions//contexts/``. The ``Context ID`` is always converted to lowercase, may only - contain characters in a-zA-Z0-9\_-% and may be at most 250 + contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If ``Environment ID`` is not specified, we assume - default 'draft' environment. If ``User ID`` is not specified, - we assume default '-' user. The following context names are + default ‘draft’ environment. If ``User ID`` is not specified, + we assume default ‘-’ user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: - ``__system_counters__`` - ``*_id_dialog_context`` - ``*_dialog_params_size`` lifespan_count: Optional. The number of conversational query requests after - which the context expires. If set to ``0`` (the default) the - context expires immediately. Contexts expire automatically - after 20 minutes if there are no matching queries. + which the context expires. The default is ``0``. If set to + ``0``, the context expires immediately. Contexts expire + automatically after 20 minutes if there are no matching + queries. parameters: Optional. The collection of parameters associated with this - context. Refer to `this doc - `__ for syntax. + context. Depending on your protocol or client library + language, this is a map, associative array, symbol table, + dictionary, or JSON object composed of a collection of + (MapKey, MapValue) pairs: - MapKey type: string - MapKey + value: parameter name - MapValue type: - If parameter’s + entity type is a composite entity: map - Else: string or + number, depending on parameter value type - MapValue value: + - If parameter’s entity type is a composite entity: map from + composite entity property names to property values - Else: + parameter value """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Context) - ), + }, ) _sym_db.RegisterMessage(Context) ListContextsRequest = _reflection.GeneratedProtocolMessageType( "ListContextsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTCONTEXTSREQUEST, - __module__="google.cloud.dialogflow_v2.proto.context_pb2", - __doc__="""The request message for - [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts]. - + { + "DESCRIPTOR": _LISTCONTEXTSREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.context_pb2", + "__doc__": """The request message for [Contexts.ListContexts][google.cloud.dialogflo + w.v2.Contexts.ListContexts]. Attributes: parent: @@ -569,53 +594,51 @@ ``projects//agent/sessions/`` or ``projects//agent/environments//users//sessions/``. If ``Environment - ID`` is not specified, we assume default 'draft' environment. - If ``User ID`` is not specified, we assume default '-' user. + ID`` is not specified, we assume default ‘draft’ environment. + If ``User ID`` is not specified, we assume default ‘-’ user. page_size: Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. page_token: - Optional. The next\_page\_token value returned from a previous + Optional. The next_page_token value returned from a previous list request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListContextsRequest) - ), + }, ) _sym_db.RegisterMessage(ListContextsRequest) ListContextsResponse = _reflection.GeneratedProtocolMessageType( "ListContextsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTCONTEXTSRESPONSE, - __module__="google.cloud.dialogflow_v2.proto.context_pb2", - __doc__="""The response message for - [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts]. - + { + "DESCRIPTOR": _LISTCONTEXTSRESPONSE, + "__module__": "google.cloud.dialogflow_v2.proto.context_pb2", + "__doc__": """The response message for [Contexts.ListContexts][google.cloud.dialogfl + ow.v2.Contexts.ListContexts]. Attributes: contexts: The list of contexts. There will be a maximum number of items - returned based on the page\_size field in the request. + returned based on the page_size field in the request. next_page_token: Token to retrieve the next page of results, or empty if there are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListContextsResponse) - ), + }, ) _sym_db.RegisterMessage(ListContextsResponse) GetContextRequest = _reflection.GeneratedProtocolMessageType( "GetContextRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETCONTEXTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.context_pb2", - __doc__="""The request message for + { + "DESCRIPTOR": _GETCONTEXTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.context_pb2", + "__doc__": """The request message for [Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext]. - Attributes: name: Required. The name of the context. Format: ``projects//agent/environments//users//sessions//contexts/``. If ``Environment ID`` is not specified, we assume - default 'draft' environment. If ``User ID`` is not specified, - we assume default '-' user. + default ‘draft’ environment. If ``User ID`` is not specified, + we assume default ‘-’ user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.GetContextRequest) - ), + }, ) _sym_db.RegisterMessage(GetContextRequest) CreateContextRequest = _reflection.GeneratedProtocolMessageType( "CreateContextRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATECONTEXTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.context_pb2", - __doc__="""The request message for - [Contexts.CreateContext][google.cloud.dialogflow.v2.Contexts.CreateContext]. - + { + "DESCRIPTOR": _CREATECONTEXTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.context_pb2", + "__doc__": """The request message for [Contexts.CreateContext][google.cloud.dialogfl + ow.v2.Contexts.CreateContext]. Attributes: parent: @@ -647,25 +669,24 @@ ``projects//agent/sessions/`` or ``projects//agent/environments//users//sessions/``. If ``Environment - ID`` is not specified, we assume default 'draft' environment. - If ``User ID`` is not specified, we assume default '-' user. + ID`` is not specified, we assume default ‘draft’ environment. + If ``User ID`` is not specified, we assume default ‘-’ user. context: Required. The context to create. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.CreateContextRequest) - ), + }, ) _sym_db.RegisterMessage(CreateContextRequest) UpdateContextRequest = _reflection.GeneratedProtocolMessageType( "UpdateContextRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATECONTEXTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.context_pb2", - __doc__="""The request message for - [Contexts.UpdateContext][google.cloud.dialogflow.v2.Contexts.UpdateContext]. - + { + "DESCRIPTOR": _UPDATECONTEXTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.context_pb2", + "__doc__": """The request message for [Contexts.UpdateContext][google.cloud.dialogfl + ow.v2.Contexts.UpdateContext]. Attributes: context: @@ -674,19 +695,18 @@ Optional. The mask to control which fields get updated. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.UpdateContextRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateContextRequest) DeleteContextRequest = _reflection.GeneratedProtocolMessageType( "DeleteContextRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETECONTEXTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.context_pb2", - __doc__="""The request message for - [Contexts.DeleteContext][google.cloud.dialogflow.v2.Contexts.DeleteContext]. - + { + "DESCRIPTOR": _DELETECONTEXTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.context_pb2", + "__doc__": """The request message for [Contexts.DeleteContext][google.cloud.dialogfl + ow.v2.Contexts.DeleteContext]. Attributes: name: @@ -695,24 +715,23 @@ ID>/contexts/`` or ``projects//agent/environments//users//sessions//contexts/``. If - ``Environment ID`` is not specified, we assume default 'draft' + ``Environment ID`` is not specified, we assume default ‘draft’ environment. If ``User ID`` is not specified, we assume - default '-' user. + default ‘-’ user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.DeleteContextRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteContextRequest) DeleteAllContextsRequest = _reflection.GeneratedProtocolMessageType( "DeleteAllContextsRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEALLCONTEXTSREQUEST, - __module__="google.cloud.dialogflow_v2.proto.context_pb2", - __doc__="""The request message for - [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2.Contexts.DeleteAllContexts]. - + { + "DESCRIPTOR": _DELETEALLCONTEXTSREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.context_pb2", + "__doc__": """The request message for [Contexts.DeleteAllContexts][google.cloud.dial + ogflow.v2.Contexts.DeleteAllContexts]. Attributes: parent: @@ -720,11 +739,11 @@ Format: ``projects//agent/sessions/`` or ``projects//agent/environments//users//sessions/``. If ``Environment - ID`` is not specified we assume default 'draft' environment. - If ``User ID`` is not specified, we assume default '-' user. + ID`` is not specified we assume default ‘draft’ environment. + If ``User ID`` is not specified, we assume default ‘-’ user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.DeleteAllContextsRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteAllContextsRequest) @@ -750,11 +769,10 @@ full_name="google.cloud.dialogflow.v2.Contexts", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), - serialized_start=1225, - serialized_end=2915, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=1370, + serialized_end=3060, methods=[ _descriptor.MethodDescriptor( name="ListContexts", @@ -763,9 +781,8 @@ containing_service=None, input_type=_LISTCONTEXTSREQUEST, output_type=_LISTCONTEXTSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002\177\0221/v2/{parent=projects/*/agent/sessions/*}/contextsZJ\022H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002\177\0221/v2/{parent=projects/*/agent/sessions/*}/contextsZJ\022H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetContext", @@ -774,9 +791,8 @@ containing_service=None, input_type=_GETCONTEXTREQUEST, output_type=_CONTEXT, - serialized_options=_b( - "\202\323\344\223\002\177\0221/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ\022H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002\177\0221/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ\022H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateContext", @@ -785,9 +801,8 @@ containing_service=None, input_type=_CREATECONTEXTREQUEST, output_type=_CONTEXT, - serialized_options=_b( - '\202\323\344\223\002\221\001"1/v2/{parent=projects/*/agent/sessions/*}/contexts:\007contextZS"H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:\007context\332A\016parent,context' - ), + serialized_options=b'\202\323\344\223\002\221\001"1/v2/{parent=projects/*/agent/sessions/*}/contexts:\007contextZS"H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:\007context\332A\016parent,context', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateContext", @@ -796,9 +811,8 @@ containing_service=None, input_type=_UPDATECONTEXTREQUEST, output_type=_CONTEXT, - serialized_options=_b( - "\202\323\344\223\002\241\00129/v2/{context.name=projects/*/agent/sessions/*/contexts/*}:\007contextZ[2P/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:\007context\332A\023context,update_mask" - ), + serialized_options=b"\202\323\344\223\002\241\00129/v2/{context.name=projects/*/agent/sessions/*/contexts/*}:\007contextZ[2P/v2/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:\007context\332A\023context,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteContext", @@ -807,9 +821,8 @@ containing_service=None, input_type=_DELETECONTEXTREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002\177*1/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ*H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002\177*1/v2/{name=projects/*/agent/sessions/*/contexts/*}ZJ*H/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteAllContexts", @@ -818,9 +831,8 @@ containing_service=None, input_type=_DELETEALLCONTEXTSREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002\177*1/v2/{parent=projects/*/agent/sessions/*}/contextsZJ*H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002\177*1/v2/{parent=projects/*/agent/sessions/*}/contextsZJ*H/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts\332A\006parent", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2/proto/context_pb2_grpc.py b/dialogflow_v2/proto/context_pb2_grpc.py index 3e07a998f..0e91897f2 100644 --- a/dialogflow_v2/proto/context_pb2_grpc.py +++ b/dialogflow_v2/proto/context_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2.proto import ( @@ -8,32 +9,15 @@ class ContextsStub(object): - """A context represents additional information included with user input or with - an intent returned by the Dialogflow API. Contexts are helpful for - differentiating user input which may be vague or have a different meaning - depending on additional details from your application such as user setting - and preferences, previous user input, where the user is in your application, - geographic location, and so on. - - You can include contexts as input parameters of a - [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or - [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) request, - or as output contexts included in the returned intent. - Contexts expire when an intent is matched, after the number of `DetectIntent` - requests specified by the `lifespan_count` parameter, or after 20 minutes - if no intents are matched for a `DetectIntent` request. - - For more information about contexts, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/contexts-overview). - """ + """Service for managing [Contexts][google.cloud.dialogflow.v2.Context]. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.ListContexts = channel.unary_unary( "/google.cloud.dialogflow.v2.Contexts/ListContexts", request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.ListContextsRequest.SerializeToString, @@ -67,36 +51,19 @@ def __init__(self, channel): class ContextsServicer(object): - """A context represents additional information included with user input or with - an intent returned by the Dialogflow API. Contexts are helpful for - differentiating user input which may be vague or have a different meaning - depending on additional details from your application such as user setting - and preferences, previous user input, where the user is in your application, - geographic location, and so on. - - You can include contexts as input parameters of a - [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or - [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) request, - or as output contexts included in the returned intent. - Contexts expire when an intent is matched, after the number of `DetectIntent` - requests specified by the `lifespan_count` parameter, or after 20 minutes - if no intents are matched for a `DetectIntent` request. - - For more information about contexts, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/contexts-overview). - """ + """Service for managing [Contexts][google.cloud.dialogflow.v2.Context]. + """ def ListContexts(self, request, context): """Returns the list of all contexts in the specified session. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetContext(self, request, context): """Retrieves the specified context. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -104,29 +71,29 @@ def GetContext(self, request, context): def CreateContext(self, request, context): """Creates a context. - If the specified context already exists, overrides the context. - """ + If the specified context already exists, overrides the context. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateContext(self, request, context): """Updates the specified context. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteContext(self, request, context): """Deletes the specified context. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteAllContexts(self, request, context): """Deletes all active contexts in the specified session. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -169,3 +136,171 @@ def add_ContextsServicer_to_server(servicer, server): "google.cloud.dialogflow.v2.Contexts", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Contexts(object): + """Service for managing [Contexts][google.cloud.dialogflow.v2.Context]. + """ + + @staticmethod + def ListContexts( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Contexts/ListContexts", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.ListContextsRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.ListContextsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetContext( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Contexts/GetContext", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.GetContextRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.Context.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateContext( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Contexts/CreateContext", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.CreateContextRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.Context.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateContext( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Contexts/UpdateContext", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.UpdateContextRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.Context.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteContext( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Contexts/DeleteContext", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.DeleteContextRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteAllContexts( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Contexts/DeleteAllContexts", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.DeleteAllContextsRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2/proto/entity_type.proto b/dialogflow_v2/proto/entity_type.proto new file mode 100644 index 000000000..13fcdb050 --- /dev/null +++ b/dialogflow_v2/proto/entity_type.proto @@ -0,0 +1,510 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "EntityTypeProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; + +// Service for managing [EntityTypes][google.cloud.dialogflow.v2.EntityType]. +service EntityTypes { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all entity types in the specified agent. + rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/agent}/entityTypes" + }; + option (google.api.method_signature) = "parent"; + option (google.api.method_signature) = "parent,language_code"; + } + + // Retrieves the specified entity type. + rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) { + option (google.api.http) = { + get: "/v2/{name=projects/*/agent/entityTypes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,language_code"; + } + + // Creates an entity type in the specified agent. + rpc CreateEntityType(CreateEntityTypeRequest) returns (EntityType) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/agent}/entityTypes" + body: "entity_type" + }; + option (google.api.method_signature) = "parent,entity_type"; + option (google.api.method_signature) = "parent,entity_type,language_code"; + } + + // Updates the specified entity type. + rpc UpdateEntityType(UpdateEntityTypeRequest) returns (EntityType) { + option (google.api.http) = { + patch: "/v2/{entity_type.name=projects/*/agent/entityTypes/*}" + body: "entity_type" + }; + option (google.api.method_signature) = "entity_type"; + option (google.api.method_signature) = "entity_type,language_code"; + } + + // Deletes the specified entity type. + rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/agent/entityTypes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates/Creates multiple entity types in the specified agent. + // + // Operation + rpc BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/agent}/entityTypes:batchUpdate" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse" + metadata_type: "google.protobuf.Struct" + }; + } + + // Deletes entity types in the specified agent. + // + // Operation + rpc BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/agent}/entityTypes:batchDelete" + body: "*" + }; + option (google.api.method_signature) = "parent,entity_type_names"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Creates multiple new entities in the specified entity type. + // + // Operation + rpc BatchCreateEntities(BatchCreateEntitiesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate" + body: "*" + }; + option (google.api.method_signature) = "parent,entities"; + option (google.api.method_signature) = "parent,entities,language_code"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Updates or creates multiple entities in the specified entity type. This + // method does not affect entities in the entity type that aren't explicitly + // specified in the request. + // + // + // Operation + rpc BatchUpdateEntities(BatchUpdateEntitiesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate" + body: "*" + }; + option (google.api.method_signature) = "parent,entities"; + option (google.api.method_signature) = "parent,entities,language_code"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Deletes entities in the specified entity type. + // + // + // Operation + rpc BatchDeleteEntities(BatchDeleteEntitiesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete" + body: "*" + }; + option (google.api.method_signature) = "parent,entity_values"; + option (google.api.method_signature) = "parent,entity_values,language_code"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } +} + +// Each intent parameter has a type, called the entity type, which dictates +// exactly how data from an end-user expression is extracted. +// +// Dialogflow provides predefined system entities that can match many common +// types of data. For example, there are system entities for matching dates, +// times, colors, email addresses, and so on. You can also create your own +// custom entities for matching custom data. For example, you could define a +// vegetable entity that can match the types of vegetables available for +// purchase with a grocery store agent. +// +// For more information, see the +// [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview). +message EntityType { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/EntityType" + pattern: "projects/{project}/agent/entityTypes/{entity_type}" + }; + + // An **entity entry** for an associated entity type. + message Entity { + // Required. The primary value associated with this entity entry. + // For example, if the entity type is *vegetable*, the value could be + // *scallions*. + // + // For `KIND_MAP` entity types: + // + // * A reference value to be used in place of synonyms. + // + // For `KIND_LIST` entity types: + // + // * A string that can contain references to other entity types (with or + // without aliases). + string value = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A collection of value synonyms. For example, if the entity type + // is *vegetable*, and `value` is *scallions*, a synonym could be *green + // onions*. + // + // For `KIND_LIST` entity types: + // + // * This collection must contain exactly one synonym equal to `value`. + repeated string synonyms = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Represents kinds of entities. + enum Kind { + // Not specified. This value should be never used. + KIND_UNSPECIFIED = 0; + + // Map entity types allow mapping of a group of synonyms to a reference + // value. + KIND_MAP = 1; + + // List entity types contain a set of entries that do not map to reference + // values. However, list entity types can contain references to other entity + // types (with or without aliases). + KIND_LIST = 2; + + // Regexp entity types allow to specify regular expressions in entries + // values. + KIND_REGEXP = 3; + } + + // Represents different entity type expansion modes. Automated expansion + // allows an agent to recognize values that have not been explicitly listed in + // the entity (for example, new kinds of shopping list items). + enum AutoExpansionMode { + // Auto expansion disabled for the entity. + AUTO_EXPANSION_MODE_UNSPECIFIED = 0; + + // Allows an agent to recognize values that have not been explicitly + // listed in the entity. + AUTO_EXPANSION_MODE_DEFAULT = 1; + } + + // The unique identifier of the entity type. + // Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] and + // [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] methods. + // Format: `projects//agent/entityTypes/`. + string name = 1; + + // Required. The name of the entity type. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Indicates the kind of entity type. + Kind kind = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates whether the entity type can be automatically + // expanded. + AutoExpansionMode auto_expansion_mode = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of entity entries associated with the entity type. + repeated Entity entities = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Enables fuzzy entity extraction during classification. + bool enable_fuzzy_extraction = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes]. +message ListEntityTypesRequest { + // Required. The agent to list all entity types from. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes]. +message ListEntityTypesResponse { + // The list of agent entity types. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated EntityType entity_types = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType]. +message GetEntityTypeRequest { + // Required. The name of the entity type. + // Format: `projects//agent/entityTypes/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2.EntityTypes.CreateEntityType]. +message CreateEntityTypeRequest { + // Required. The agent to create a entity type for. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The entity type to create. + EntityType entity_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]. +message UpdateEntityTypeRequest { + // Required. The entity type to update. + EntityType entity_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2.EntityTypes.DeleteEntityType]. +message DeleteEntityTypeRequest { + // Required. The name of the entity type to delete. + // Format: `projects//agent/entityTypes/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; +} + +// The request message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. +message BatchUpdateEntityTypesRequest { + // Required. The name of the agent to update or create entity types in. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // The source of the entity type batch. + // + // For each entity type in the batch: + // + // * If `name` is specified, we update an existing entity type. + // * If `name` is not specified, we create a new entity type. + oneof entity_type_batch { + // The URI to a Google Cloud Storage file containing entity types to update + // or create. The file format can either be a serialized proto (of + // EntityBatch type) or a JSON object. Note: The URI must start with + // "gs://". + string entity_type_batch_uri = 2; + + // The collection of entity types to update or create. + EntityTypeBatch entity_type_batch_inline = 3; + } + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. +message BatchUpdateEntityTypesResponse { + // The collection of updated or created entity types. + repeated EntityType entity_types = 1; +} + +// The request message for [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes]. +message BatchDeleteEntityTypesRequest { + // Required. The name of the agent to delete all entities types for. Format: + // `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The names entity types to delete. All names must point to the + // same agent as `parent`. + repeated string entity_type_names = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities]. +message BatchCreateEntitiesRequest { + // Required. The name of the entity type to create entities in. Format: + // `projects//agent/entityTypes/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The entities to create. + repeated EntityType.Entity entities = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities]. +message BatchUpdateEntitiesRequest { + // Required. The name of the entity type to update or create entities in. + // Format: `projects//agent/entityTypes/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The entities to update or create. + repeated EntityType.Entity entities = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntities]. +message BatchDeleteEntitiesRequest { + // Required. The name of the entity type to delete entries for. Format: + // `projects//agent/entityTypes/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The reference `values` of the entities to delete. Note that + // these are not fully-qualified names, i.e. they don't start with + // `projects/`. + repeated string entity_values = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// This message is a wrapper around a collection of entity types. +message EntityTypeBatch { + // A collection of entity types. + repeated EntityType entity_types = 1; +} diff --git a/dialogflow_v2/proto/entity_type_pb2.py b/dialogflow_v2/proto/entity_type_pb2.py index cf5462e84..5c145b9da 100644 --- a/dialogflow_v2/proto/entity_type_pb2.py +++ b/dialogflow_v2/proto/entity_type_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/entity_type.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -30,12 +27,9 @@ name="google/cloud/dialogflow_v2/proto/entity_type.proto", package="google.cloud.dialogflow.v2", syntax="proto3", - serialized_options=_b( - "\n\036com.google.cloud.dialogflow.v2B\017EntityTypeProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2" - ), - serialized_pb=_b( - '\n2google/cloud/dialogflow_v2/proto/entity_type.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\xf8\x04\n\nEntityType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x04kind\x18\x03 \x01(\x0e\x32+.google.cloud.dialogflow.v2.EntityType.KindB\x03\xe0\x41\x02\x12Z\n\x13\x61uto_expansion_mode\x18\x04 \x01(\x0e\x32\x38.google.cloud.dialogflow.v2.EntityType.AutoExpansionModeB\x03\xe0\x41\x01\x12\x44\n\x08\x65ntities\x18\x06 \x03(\x0b\x32-.google.cloud.dialogflow.v2.EntityType.EntityB\x03\xe0\x41\x01\x12$\n\x17\x65nable_fuzzy_extraction\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x33\n\x06\x45ntity\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08synonyms\x18\x02 \x03(\tB\x03\xe0\x41\x02"J\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x0c\n\x08KIND_MAP\x10\x01\x12\r\n\tKIND_LIST\x10\x02\x12\x0f\n\x0bKIND_REGEXP\x10\x03"Y\n\x11\x41utoExpansionMode\x12#\n\x1f\x41UTO_EXPANSION_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x41UTO_EXPANSION_MODE_DEFAULT\x10\x01:]\xea\x41Z\n$dialogflow.googleapis.com/EntityType\x12\x32projects/{project}/agent/entityTypes/{entity_type}"\x9e\x01\n\x16ListEntityTypesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64ialogflow.googleapis.com/Agent\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01"p\n\x17ListEntityTypesResponse\x12<\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32&.google.cloud.dialogflow.v2.EntityType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"n\n\x14GetEntityTypeRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01"\xb0\x01\n\x17\x43reateEntityTypeRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64ialogflow.googleapis.com/Agent\x12@\n\x0b\x65ntity_type\x18\x02 \x01(\x0b\x32&.google.cloud.dialogflow.v2.EntityTypeB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01"\xad\x01\n\x17UpdateEntityTypeRequest\x12@\n\x0b\x65ntity_type\x18\x01 \x01(\x0b\x32&.google.cloud.dialogflow.v2.EntityTypeB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"U\n\x17\x44\x65leteEntityTypeRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType"\xb1\x02\n\x1d\x42\x61tchUpdateEntityTypesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64ialogflow.googleapis.com/Agent\x12\x1f\n\x15\x65ntity_type_batch_uri\x18\x02 \x01(\tH\x00\x12O\n\x18\x65ntity_type_batch_inline\x18\x03 \x01(\x0b\x32+.google.cloud.dialogflow.v2.EntityTypeBatchH\x00\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x42\x13\n\x11\x65ntity_type_batch"^\n\x1e\x42\x61tchUpdateEntityTypesResponse\x12<\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32&.google.cloud.dialogflow.v2.EntityType"x\n\x1d\x42\x61tchDeleteEntityTypesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64ialogflow.googleapis.com/Agent\x12\x1e\n\x11\x65ntity_type_names\x18\x02 \x03(\tB\x03\xe0\x41\x02"\xbc\x01\n\x1a\x42\x61tchCreateEntitiesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x44\n\x08\x65ntities\x18\x02 \x03(\x0b\x32-.google.cloud.dialogflow.v2.EntityType.EntityB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01"\xf2\x01\n\x1a\x42\x61tchUpdateEntitiesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x44\n\x08\x65ntities\x18\x02 \x03(\x0b\x32-.google.cloud.dialogflow.v2.EntityType.EntityB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"\x92\x01\n\x1a\x42\x61tchDeleteEntitiesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x1a\n\rentity_values\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01"O\n\x0f\x45ntityTypeBatch\x12<\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32&.google.cloud.dialogflow.v2.EntityType2\x80\x14\n\x0b\x45ntityTypes\x12\xcd\x01\n\x0fListEntityTypes\x12\x32.google.cloud.dialogflow.v2.ListEntityTypesRequest\x1a\x33.google.cloud.dialogflow.v2.ListEntityTypesResponse"Q\x82\xd3\xe4\x93\x02+\x12)/v2/{parent=projects/*/agent}/entityTypes\xda\x41\x06parent\xda\x41\x14parent,language_code\x12\xb8\x01\n\rGetEntityType\x12\x30.google.cloud.dialogflow.v2.GetEntityTypeRequest\x1a&.google.cloud.dialogflow.v2.EntityType"M\x82\xd3\xe4\x93\x02+\x12)/v2/{name=projects/*/agent/entityTypes/*}\xda\x41\x04name\xda\x41\x12name,language_code\x12\xe7\x01\n\x10\x43reateEntityType\x12\x33.google.cloud.dialogflow.v2.CreateEntityTypeRequest\x1a&.google.cloud.dialogflow.v2.EntityType"v\x82\xd3\xe4\x93\x02\x38")/v2/{parent=projects/*/agent}/entityTypes:\x0b\x65ntity_type\xda\x41\x12parent,entity_type\xda\x41 parent,entity_type,language_code\x12\xe5\x01\n\x10UpdateEntityType\x12\x33.google.cloud.dialogflow.v2.UpdateEntityTypeRequest\x1a&.google.cloud.dialogflow.v2.EntityType"t\x82\xd3\xe4\x93\x02\x44\x32\x35/v2/{entity_type.name=projects/*/agent/entityTypes/*}:\x0b\x65ntity_type\xda\x41\x0b\x65ntity_type\xda\x41\x19\x65ntity_type,language_code\x12\x99\x01\n\x10\x44\x65leteEntityType\x12\x33.google.cloud.dialogflow.v2.DeleteEntityTypeRequest\x1a\x16.google.protobuf.Empty"8\x82\xd3\xe4\x93\x02+*)/v2/{name=projects/*/agent/entityTypes/*}\xda\x41\x04name\x12\x8b\x02\n\x16\x42\x61tchUpdateEntityTypes\x12\x39.google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest\x1a\x1d.google.longrunning.Operation"\x96\x01\x82\xd3\xe4\x93\x02:"5/v2/{parent=projects/*/agent}/entityTypes:batchUpdate:\x01*\xca\x41S\n9google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse\x12\x16google.protobuf.Struct\x12\x82\x02\n\x16\x42\x61tchDeleteEntityTypes\x12\x39.google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest\x1a\x1d.google.longrunning.Operation"\x8d\x01\x82\xd3\xe4\x93\x02:"5/v2/{parent=projects/*/agent}/entityTypes:batchDelete:\x01*\xda\x41\x18parent,entity_type_names\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\x9e\x02\n\x13\x42\x61tchCreateEntities\x12\x36.google.cloud.dialogflow.v2.BatchCreateEntitiesRequest\x1a\x1d.google.longrunning.Operation"\xaf\x01\x82\xd3\xe4\x93\x02\x45"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate:\x01*\xda\x41\x0fparent,entities\xda\x41\x1dparent,entities,language_code\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\x9e\x02\n\x13\x42\x61tchUpdateEntities\x12\x36.google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest\x1a\x1d.google.longrunning.Operation"\xaf\x01\x82\xd3\xe4\x93\x02\x45"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\x01*\xda\x41\x0fparent,entities\xda\x41\x1dparent,entities,language_code\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xa8\x02\n\x13\x42\x61tchDeleteEntities\x12\x36.google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest\x1a\x1d.google.longrunning.Operation"\xb9\x01\x82\xd3\xe4\x93\x02\x45"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\x01*\xda\x41\x14parent,entity_values\xda\x41"parent,entity_values,language_code\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x9e\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x0f\x45ntityTypeProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3' - ), + serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\017EntityTypeProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n2google/cloud/dialogflow_v2/proto/entity_type.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\xf8\x04\n\nEntityType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x04kind\x18\x03 \x01(\x0e\x32+.google.cloud.dialogflow.v2.EntityType.KindB\x03\xe0\x41\x02\x12Z\n\x13\x61uto_expansion_mode\x18\x04 \x01(\x0e\x32\x38.google.cloud.dialogflow.v2.EntityType.AutoExpansionModeB\x03\xe0\x41\x01\x12\x44\n\x08\x65ntities\x18\x06 \x03(\x0b\x32-.google.cloud.dialogflow.v2.EntityType.EntityB\x03\xe0\x41\x01\x12$\n\x17\x65nable_fuzzy_extraction\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x33\n\x06\x45ntity\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08synonyms\x18\x02 \x03(\tB\x03\xe0\x41\x02"J\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x0c\n\x08KIND_MAP\x10\x01\x12\r\n\tKIND_LIST\x10\x02\x12\x0f\n\x0bKIND_REGEXP\x10\x03"Y\n\x11\x41utoExpansionMode\x12#\n\x1f\x41UTO_EXPANSION_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x41UTO_EXPANSION_MODE_DEFAULT\x10\x01:]\xea\x41Z\n$dialogflow.googleapis.com/EntityType\x12\x32projects/{project}/agent/entityTypes/{entity_type}"\xa3\x01\n\x16ListEntityTypesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dialogflow.googleapis.com/EntityType\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01"p\n\x17ListEntityTypesResponse\x12<\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32&.google.cloud.dialogflow.v2.EntityType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"n\n\x14GetEntityTypeRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01"\xb5\x01\n\x17\x43reateEntityTypeRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dialogflow.googleapis.com/EntityType\x12@\n\x0b\x65ntity_type\x18\x02 \x01(\x0b\x32&.google.cloud.dialogflow.v2.EntityTypeB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01"\xad\x01\n\x17UpdateEntityTypeRequest\x12@\n\x0b\x65ntity_type\x18\x01 \x01(\x0b\x32&.google.cloud.dialogflow.v2.EntityTypeB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"U\n\x17\x44\x65leteEntityTypeRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType"\xb6\x02\n\x1d\x42\x61tchUpdateEntityTypesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dialogflow.googleapis.com/EntityType\x12\x1f\n\x15\x65ntity_type_batch_uri\x18\x02 \x01(\tH\x00\x12O\n\x18\x65ntity_type_batch_inline\x18\x03 \x01(\x0b\x32+.google.cloud.dialogflow.v2.EntityTypeBatchH\x00\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x42\x13\n\x11\x65ntity_type_batch"^\n\x1e\x42\x61tchUpdateEntityTypesResponse\x12<\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32&.google.cloud.dialogflow.v2.EntityType"}\n\x1d\x42\x61tchDeleteEntityTypesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dialogflow.googleapis.com/EntityType\x12\x1e\n\x11\x65ntity_type_names\x18\x02 \x03(\tB\x03\xe0\x41\x02"\xbc\x01\n\x1a\x42\x61tchCreateEntitiesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x44\n\x08\x65ntities\x18\x02 \x03(\x0b\x32-.google.cloud.dialogflow.v2.EntityType.EntityB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01"\xf2\x01\n\x1a\x42\x61tchUpdateEntitiesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x44\n\x08\x65ntities\x18\x02 \x03(\x0b\x32-.google.cloud.dialogflow.v2.EntityType.EntityB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"\x92\x01\n\x1a\x42\x61tchDeleteEntitiesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x1a\n\rentity_values\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01"O\n\x0f\x45ntityTypeBatch\x12<\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32&.google.cloud.dialogflow.v2.EntityType2\x80\x14\n\x0b\x45ntityTypes\x12\xcd\x01\n\x0fListEntityTypes\x12\x32.google.cloud.dialogflow.v2.ListEntityTypesRequest\x1a\x33.google.cloud.dialogflow.v2.ListEntityTypesResponse"Q\x82\xd3\xe4\x93\x02+\x12)/v2/{parent=projects/*/agent}/entityTypes\xda\x41\x06parent\xda\x41\x14parent,language_code\x12\xb8\x01\n\rGetEntityType\x12\x30.google.cloud.dialogflow.v2.GetEntityTypeRequest\x1a&.google.cloud.dialogflow.v2.EntityType"M\x82\xd3\xe4\x93\x02+\x12)/v2/{name=projects/*/agent/entityTypes/*}\xda\x41\x04name\xda\x41\x12name,language_code\x12\xe7\x01\n\x10\x43reateEntityType\x12\x33.google.cloud.dialogflow.v2.CreateEntityTypeRequest\x1a&.google.cloud.dialogflow.v2.EntityType"v\x82\xd3\xe4\x93\x02\x38")/v2/{parent=projects/*/agent}/entityTypes:\x0b\x65ntity_type\xda\x41\x12parent,entity_type\xda\x41 parent,entity_type,language_code\x12\xe5\x01\n\x10UpdateEntityType\x12\x33.google.cloud.dialogflow.v2.UpdateEntityTypeRequest\x1a&.google.cloud.dialogflow.v2.EntityType"t\x82\xd3\xe4\x93\x02\x44\x32\x35/v2/{entity_type.name=projects/*/agent/entityTypes/*}:\x0b\x65ntity_type\xda\x41\x0b\x65ntity_type\xda\x41\x19\x65ntity_type,language_code\x12\x99\x01\n\x10\x44\x65leteEntityType\x12\x33.google.cloud.dialogflow.v2.DeleteEntityTypeRequest\x1a\x16.google.protobuf.Empty"8\x82\xd3\xe4\x93\x02+*)/v2/{name=projects/*/agent/entityTypes/*}\xda\x41\x04name\x12\x8b\x02\n\x16\x42\x61tchUpdateEntityTypes\x12\x39.google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest\x1a\x1d.google.longrunning.Operation"\x96\x01\x82\xd3\xe4\x93\x02:"5/v2/{parent=projects/*/agent}/entityTypes:batchUpdate:\x01*\xca\x41S\n9google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse\x12\x16google.protobuf.Struct\x12\x82\x02\n\x16\x42\x61tchDeleteEntityTypes\x12\x39.google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest\x1a\x1d.google.longrunning.Operation"\x8d\x01\x82\xd3\xe4\x93\x02:"5/v2/{parent=projects/*/agent}/entityTypes:batchDelete:\x01*\xda\x41\x18parent,entity_type_names\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\x9e\x02\n\x13\x42\x61tchCreateEntities\x12\x36.google.cloud.dialogflow.v2.BatchCreateEntitiesRequest\x1a\x1d.google.longrunning.Operation"\xaf\x01\x82\xd3\xe4\x93\x02\x45"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate:\x01*\xda\x41\x0fparent,entities\xda\x41\x1dparent,entities,language_code\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\x9e\x02\n\x13\x42\x61tchUpdateEntities\x12\x36.google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest\x1a\x1d.google.longrunning.Operation"\xaf\x01\x82\xd3\xe4\x93\x02\x45"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\x01*\xda\x41\x0fparent,entities\xda\x41\x1dparent,entities,language_code\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xa8\x02\n\x13\x42\x61tchDeleteEntities\x12\x36.google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest\x1a\x1d.google.longrunning.Operation"\xb9\x01\x82\xd3\xe4\x93\x02\x45"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\x01*\xda\x41\x14parent,entity_values\xda\x41"parent,entity_values,language_code\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x9e\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x0f\x45ntityTypeProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -53,6 +47,7 @@ full_name="google.cloud.dialogflow.v2.EntityType.Kind", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="KIND_UNSPECIFIED", @@ -60,15 +55,31 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="KIND_MAP", index=1, number=1, serialized_options=None, type=None + name="KIND_MAP", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="KIND_LIST", index=2, number=2, serialized_options=None, type=None + name="KIND_LIST", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="KIND_REGEXP", index=3, number=3, serialized_options=None, type=None + name="KIND_REGEXP", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -83,6 +94,7 @@ full_name="google.cloud.dialogflow.v2.EntityType.AutoExpansionMode", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="AUTO_EXPANSION_MODE_UNSPECIFIED", @@ -90,6 +102,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUTO_EXPANSION_MODE_DEFAULT", @@ -97,6 +110,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -113,6 +127,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="value", @@ -123,14 +138,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="synonyms", @@ -147,8 +163,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -169,6 +186,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -179,7 +197,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -187,6 +205,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -197,14 +216,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="kind", @@ -221,8 +241,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="auto_expansion_mode", @@ -239,8 +260,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entities", @@ -257,8 +279,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="enable_fuzzy_extraction", @@ -275,16 +298,15 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[_ENTITYTYPE_ENTITY], enum_types=[_ENTITYTYPE_KIND, _ENTITYTYPE_AUTOEXPANSIONMODE], - serialized_options=_b( - "\352AZ\n$dialogflow.googleapis.com/EntityType\0222projects/{project}/agent/entityTypes/{entity_type}" - ), + serialized_options=b"\352AZ\n$dialogflow.googleapis.com/EntityType\0222projects/{project}/agent/entityTypes/{entity_type}", is_extendable=False, syntax="proto3", extension_ranges=[], @@ -300,6 +322,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -310,16 +333,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" - ), + serialized_options=b"\340A\002\372A&\022$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -330,14 +352,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -354,8 +377,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -366,14 +390,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -385,7 +410,7 @@ extension_ranges=[], oneofs=[], serialized_start=933, - serialized_end=1091, + serialized_end=1096, ) @@ -395,6 +420,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entity_types", @@ -413,6 +439,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -423,7 +450,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -431,6 +458,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -441,8 +469,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1093, - serialized_end=1205, + serialized_start=1098, + serialized_end=1210, ) @@ -452,6 +480,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -462,16 +491,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A&\n$dialogflow.googleapis.com/EntityType" - ), + serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -482,14 +510,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -500,8 +529,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1207, - serialized_end=1317, + serialized_start=1212, + serialized_end=1322, ) @@ -511,6 +540,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -521,16 +551,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" - ), + serialized_options=b"\340A\002\372A&\022$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_type", @@ -547,8 +576,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -559,14 +589,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -577,8 +608,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1320, - serialized_end=1496, + serialized_start=1325, + serialized_end=1506, ) @@ -588,6 +619,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entity_type", @@ -604,8 +636,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -616,14 +649,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -640,8 +674,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -652,8 +687,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1499, - serialized_end=1672, + serialized_start=1509, + serialized_end=1682, ) @@ -663,6 +698,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -673,16 +709,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A&\n$dialogflow.googleapis.com/EntityType" - ), + serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -693,8 +728,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1674, - serialized_end=1759, + serialized_start=1684, + serialized_end=1769, ) @@ -704,6 +739,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -714,16 +750,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" - ), + serialized_options=b"\340A\002\372A&\022$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_type_batch_uri", @@ -734,7 +769,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -742,6 +777,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_type_batch_inline", @@ -760,6 +796,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -770,14 +807,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -794,8 +832,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -811,11 +850,12 @@ full_name="google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest.entity_type_batch", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=1762, - serialized_end=2067, + serialized_start=1772, + serialized_end=2082, ) @@ -825,6 +865,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entity_types", @@ -843,6 +884,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -853,8 +895,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2069, - serialized_end=2163, + serialized_start=2084, + serialized_end=2178, ) @@ -864,6 +906,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -874,16 +917,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" - ), + serialized_options=b"\340A\002\372A&\022$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_type_names", @@ -900,8 +942,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -912,8 +955,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2165, - serialized_end=2285, + serialized_start=2180, + serialized_end=2305, ) @@ -923,6 +966,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -933,16 +977,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A&\n$dialogflow.googleapis.com/EntityType" - ), + serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entities", @@ -959,8 +1002,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -971,14 +1015,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -989,8 +1034,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2288, - serialized_end=2476, + serialized_start=2308, + serialized_end=2496, ) @@ -1000,6 +1045,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1010,16 +1056,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A&\n$dialogflow.googleapis.com/EntityType" - ), + serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entities", @@ -1036,8 +1081,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -1048,14 +1094,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1072,8 +1119,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1084,8 +1132,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2479, - serialized_end=2721, + serialized_start=2499, + serialized_end=2741, ) @@ -1095,6 +1143,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1105,16 +1154,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A&\n$dialogflow.googleapis.com/EntityType" - ), + serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_values", @@ -1131,8 +1179,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -1143,14 +1192,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1161,8 +1211,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2724, - serialized_end=2870, + serialized_start=2744, + serialized_end=2890, ) @@ -1172,6 +1222,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entity_types", @@ -1190,6 +1241,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1200,8 +1252,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2872, - serialized_end=2951, + serialized_start=2892, + serialized_end=2971, ) _ENTITYTYPE_ENTITY.containing_type = _ENTITYTYPE @@ -1276,15 +1328,14 @@ EntityType = _reflection.GeneratedProtocolMessageType( "EntityType", (_message.Message,), - dict( - Entity=_reflection.GeneratedProtocolMessageType( + { + "Entity": _reflection.GeneratedProtocolMessageType( "Entity", (_message.Message,), - dict( - DESCRIPTOR=_ENTITYTYPE_ENTITY, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""An **entity entry** for an associated entity type. - + { + "DESCRIPTOR": _ENTITYTYPE_ENTITY, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """An **entity entry** for an associated entity type. Attributes: value: @@ -1302,13 +1353,20 @@ equal to ``value``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.EntityType.Entity) - ), + }, ), - DESCRIPTOR=_ENTITYTYPE, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""Represents an entity type. Entity types serve as a tool - for extracting parameter values from natural language queries. - + "DESCRIPTOR": _ENTITYTYPE, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """Each intent parameter has a type, called the entity type, which + dictates exactly how data from an end-user expression is extracted. + Dialogflow provides predefined system entities that can match many + common types of data. For example, there are system entities for + matching dates, times, colors, email addresses, and so on. You can + also create your own custom entities for matching custom data. For + example, you could define a vegetable entity that can match the types + of vegetables available for purchase with a grocery store agent. For + more information, see the `Entity guide + `__. Attributes: name: @@ -1333,7 +1391,7 @@ classification. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.EntityType) - ), + }, ) _sym_db.RegisterMessage(EntityType) _sym_db.RegisterMessage(EntityType.Entity) @@ -1341,94 +1399,89 @@ ListEntityTypesRequest = _reflection.GeneratedProtocolMessageType( "ListEntityTypesRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTENTITYTYPESREQUEST, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes]. - + { + "DESCRIPTOR": _LISTENTITYTYPESREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.ListEntityTypes][google.cloud.dia + logflow.v2.EntityTypes.ListEntityTypes]. Attributes: parent: Required. The agent to list all entity types from. Format: ``projects//agent``. language_code: - Optional. The language to list entity synonyms for. If not - specified, the agent's default language is used. `Many - languages `__ are supported. Note: languages must be enabled in - the agent before they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. page_size: Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. page_token: - Optional. The next\_page\_token value returned from a previous + Optional. The next_page_token value returned from a previous list request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListEntityTypesRequest) - ), + }, ) _sym_db.RegisterMessage(ListEntityTypesRequest) ListEntityTypesResponse = _reflection.GeneratedProtocolMessageType( "ListEntityTypesResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTENTITYTYPESRESPONSE, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""The response message for - [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes]. - + { + "DESCRIPTOR": _LISTENTITYTYPESRESPONSE, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """The response message for [EntityTypes.ListEntityTypes][google.cloud.di + alogflow.v2.EntityTypes.ListEntityTypes]. Attributes: entity_types: The list of agent entity types. There will be a maximum number - of items returned based on the page\_size field in the - request. + of items returned based on the page_size field in the request. next_page_token: Token to retrieve the next page of results, or empty if there are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListEntityTypesResponse) - ), + }, ) _sym_db.RegisterMessage(ListEntityTypesResponse) GetEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "GetEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType]. - + { + "DESCRIPTOR": _GETENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.GetEntityType][google.cloud.dialo + gflow.v2.EntityTypes.GetEntityType]. Attributes: name: Required. The name of the entity type. Format: ``projects//agent/entityTypes/``. language_code: - Optional. The language to retrieve entity synonyms for. If not - specified, the agent's default language is used. `Many - languages `__ are supported. Note: languages must be enabled in - the agent before they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.GetEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(GetEntityTypeRequest) CreateEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "CreateEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2.EntityTypes.CreateEntityType]. - + { + "DESCRIPTOR": _CREATEENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.CreateEntityType][google.cloud.di + alogflow.v2.EntityTypes.CreateEntityType]. Attributes: parent: @@ -1437,55 +1490,51 @@ entity_type: Required. The entity type to create. language_code: - Optional. The language of entity synonyms defined in - ``entity_type``. If not specified, the agent's default - language is used. `Many languages `__ are supported. Note: - languages must be enabled in the agent before they can be - used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.CreateEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(CreateEntityTypeRequest) UpdateEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "UpdateEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATEENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]. - + { + "DESCRIPTOR": _UPDATEENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.UpdateEntityType][google.cloud.di + alogflow.v2.EntityTypes.UpdateEntityType]. Attributes: entity_type: Required. The entity type to update. language_code: - Optional. The language of entity synonyms defined in - ``entity_type``. If not specified, the agent's default - language is used. `Many languages `__ are supported. Note: - languages must be enabled in the agent before they can be - used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. update_mask: Optional. The mask to control which fields get updated. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.UpdateEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateEntityTypeRequest) DeleteEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "DeleteEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2.EntityTypes.DeleteEntityType]. - + { + "DESCRIPTOR": _DELETEENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.DeleteEntityType][google.cloud.di + alogflow.v2.EntityTypes.DeleteEntityType]. Attributes: name: @@ -1493,19 +1542,18 @@ ``projects//agent/entityTypes/``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.DeleteEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteEntityTypeRequest) BatchUpdateEntityTypesRequest = _reflection.GeneratedProtocolMessageType( "BatchUpdateEntityTypesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHUPDATEENTITYTYPESREQUEST, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. - + { + "DESCRIPTOR": _BATCHUPDATEENTITYTYPESREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.BatchUpdateEntityTypes][google.cl + oud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. Attributes: parent: @@ -1520,52 +1568,49 @@ The URI to a Google Cloud Storage file containing entity types to update or create. The file format can either be a serialized proto (of EntityBatch type) or a JSON object. Note: - The URI must start with "gs://". + The URI must start with “gs://”. entity_type_batch_inline: The collection of entity types to update or create. language_code: - Optional. The language of entity synonyms defined in - ``entity_types``. If not specified, the agent's default - language is used. `Many languages `__ are supported. Note: - languages must be enabled in the agent before they can be - used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. update_mask: Optional. The mask to control which fields get updated. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchUpdateEntityTypesRequest) BatchUpdateEntityTypesResponse = _reflection.GeneratedProtocolMessageType( "BatchUpdateEntityTypesResponse", (_message.Message,), - dict( - DESCRIPTOR=_BATCHUPDATEENTITYTYPESRESPONSE, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""The response message for - [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. - + { + "DESCRIPTOR": _BATCHUPDATEENTITYTYPESRESPONSE, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """The response message for [EntityTypes.BatchUpdateEntityTypes][google.c + loud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]. Attributes: entity_types: The collection of updated or created entity types. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse) - ), + }, ) _sym_db.RegisterMessage(BatchUpdateEntityTypesResponse) BatchDeleteEntityTypesRequest = _reflection.GeneratedProtocolMessageType( "BatchDeleteEntityTypesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHDELETEENTITYTYPESREQUEST, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes]. - + { + "DESCRIPTOR": _BATCHDELETEENTITYTYPESREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.BatchDeleteEntityTypes][google.cl + oud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes]. Attributes: parent: @@ -1576,19 +1621,18 @@ point to the same agent as ``parent``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchDeleteEntityTypesRequest) BatchCreateEntitiesRequest = _reflection.GeneratedProtocolMessageType( "BatchCreateEntitiesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHCREATEENTITIESREQUEST, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities]. - + { + "DESCRIPTOR": _BATCHCREATEENTITIESREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.BatchCreateEntities][google.cloud + .dialogflow.v2.EntityTypes.BatchCreateEntities]. Attributes: parent: @@ -1598,26 +1642,25 @@ entities: Required. The entities to create. language_code: - Optional. The language of entity synonyms defined in - ``entities``. If not specified, the agent's default language - is used. `Many languages `__ are supported. Note: languages - must be enabled in the agent before they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchCreateEntitiesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchCreateEntitiesRequest) BatchUpdateEntitiesRequest = _reflection.GeneratedProtocolMessageType( "BatchUpdateEntitiesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHUPDATEENTITIESREQUEST, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities]. - + { + "DESCRIPTOR": _BATCHUPDATEENTITIESREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.BatchUpdateEntities][google.cloud + .dialogflow.v2.EntityTypes.BatchUpdateEntities]. Attributes: parent: @@ -1627,28 +1670,27 @@ entities: Required. The entities to update or create. language_code: - Optional. The language of entity synonyms defined in - ``entities``. If not specified, the agent's default language - is used. `Many languages `__ are supported. Note: languages - must be enabled in the agent before they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. update_mask: Optional. The mask to control which fields get updated. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchUpdateEntitiesRequest) BatchDeleteEntitiesRequest = _reflection.GeneratedProtocolMessageType( "BatchDeleteEntitiesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHDELETEENTITIESREQUEST, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntities]. - + { + "DESCRIPTOR": _BATCHDELETEENTITIESREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.BatchDeleteEntities][google.cloud + .dialogflow.v2.EntityTypes.BatchDeleteEntities]. Attributes: parent: @@ -1657,36 +1699,34 @@ ID>``. entity_values: Required. The reference ``values`` of the entities to delete. - Note that these are not fully-qualified names, i.e. they don't + Note that these are not fully-qualified names, i.e. they don’t start with ``projects/``. language_code: - Optional. The language of entity synonyms defined in - ``entities``. If not specified, the agent's default language - is used. `Many languages `__ are supported. Note: languages - must be enabled in the agent before they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchDeleteEntitiesRequest) EntityTypeBatch = _reflection.GeneratedProtocolMessageType( "EntityTypeBatch", (_message.Message,), - dict( - DESCRIPTOR=_ENTITYTYPEBATCH, - __module__="google.cloud.dialogflow_v2.proto.entity_type_pb2", - __doc__="""This message is a wrapper around a collection of entity - types. - + { + "DESCRIPTOR": _ENTITYTYPEBATCH, + "__module__": "google.cloud.dialogflow_v2.proto.entity_type_pb2", + "__doc__": """This message is a wrapper around a collection of entity types. Attributes: entity_types: A collection of entity types. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.EntityTypeBatch) - ), + }, ) _sym_db.RegisterMessage(EntityTypeBatch) @@ -1734,11 +1774,10 @@ full_name="google.cloud.dialogflow.v2.EntityTypes", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), - serialized_start=2954, - serialized_end=5514, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=2974, + serialized_end=5534, methods=[ _descriptor.MethodDescriptor( name="ListEntityTypes", @@ -1747,9 +1786,8 @@ containing_service=None, input_type=_LISTENTITYTYPESREQUEST, output_type=_LISTENTITYTYPESRESPONSE, - serialized_options=_b( - "\202\323\344\223\002+\022)/v2/{parent=projects/*/agent}/entityTypes\332A\006parent\332A\024parent,language_code" - ), + serialized_options=b"\202\323\344\223\002+\022)/v2/{parent=projects/*/agent}/entityTypes\332A\006parent\332A\024parent,language_code", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetEntityType", @@ -1758,9 +1796,8 @@ containing_service=None, input_type=_GETENTITYTYPEREQUEST, output_type=_ENTITYTYPE, - serialized_options=_b( - "\202\323\344\223\002+\022)/v2/{name=projects/*/agent/entityTypes/*}\332A\004name\332A\022name,language_code" - ), + serialized_options=b"\202\323\344\223\002+\022)/v2/{name=projects/*/agent/entityTypes/*}\332A\004name\332A\022name,language_code", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateEntityType", @@ -1769,9 +1806,8 @@ containing_service=None, input_type=_CREATEENTITYTYPEREQUEST, output_type=_ENTITYTYPE, - serialized_options=_b( - '\202\323\344\223\0028")/v2/{parent=projects/*/agent}/entityTypes:\013entity_type\332A\022parent,entity_type\332A parent,entity_type,language_code' - ), + serialized_options=b'\202\323\344\223\0028")/v2/{parent=projects/*/agent}/entityTypes:\013entity_type\332A\022parent,entity_type\332A parent,entity_type,language_code', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateEntityType", @@ -1780,9 +1816,8 @@ containing_service=None, input_type=_UPDATEENTITYTYPEREQUEST, output_type=_ENTITYTYPE, - serialized_options=_b( - "\202\323\344\223\002D25/v2/{entity_type.name=projects/*/agent/entityTypes/*}:\013entity_type\332A\013entity_type\332A\031entity_type,language_code" - ), + serialized_options=b"\202\323\344\223\002D25/v2/{entity_type.name=projects/*/agent/entityTypes/*}:\013entity_type\332A\013entity_type\332A\031entity_type,language_code", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteEntityType", @@ -1791,9 +1826,8 @@ containing_service=None, input_type=_DELETEENTITYTYPEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002+*)/v2/{name=projects/*/agent/entityTypes/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002+*)/v2/{name=projects/*/agent/entityTypes/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchUpdateEntityTypes", @@ -1802,9 +1836,8 @@ containing_service=None, input_type=_BATCHUPDATEENTITYTYPESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002:"5/v2/{parent=projects/*/agent}/entityTypes:batchUpdate:\001*\312AS\n9google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse\022\026google.protobuf.Struct' - ), + serialized_options=b'\202\323\344\223\002:"5/v2/{parent=projects/*/agent}/entityTypes:batchUpdate:\001*\312AS\n9google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchDeleteEntityTypes", @@ -1813,9 +1846,8 @@ containing_service=None, input_type=_BATCHDELETEENTITYTYPESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002:"5/v2/{parent=projects/*/agent}/entityTypes:batchDelete:\001*\332A\030parent,entity_type_names\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct' - ), + serialized_options=b'\202\323\344\223\002:"5/v2/{parent=projects/*/agent}/entityTypes:batchDelete:\001*\332A\030parent,entity_type_names\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchCreateEntities", @@ -1824,9 +1856,8 @@ containing_service=None, input_type=_BATCHCREATEENTITIESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002E"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate:\001*\332A\017parent,entities\332A\035parent,entities,language_code\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct' - ), + serialized_options=b'\202\323\344\223\002E"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate:\001*\332A\017parent,entities\332A\035parent,entities,language_code\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchUpdateEntities", @@ -1835,9 +1866,8 @@ containing_service=None, input_type=_BATCHUPDATEENTITIESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002E"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\001*\332A\017parent,entities\332A\035parent,entities,language_code\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct' - ), + serialized_options=b'\202\323\344\223\002E"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\001*\332A\017parent,entities\332A\035parent,entities,language_code\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchDeleteEntities", @@ -1846,9 +1876,8 @@ containing_service=None, input_type=_BATCHDELETEENTITIESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002E"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\001*\332A\024parent,entity_values\332A"parent,entity_values,language_code\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct' - ), + serialized_options=b'\202\323\344\223\002E"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\001*\332A\024parent,entity_values\332A"parent,entity_values,language_code\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2/proto/entity_type_pb2_grpc.py b/dialogflow_v2/proto/entity_type_pb2_grpc.py index bc46abafb..8b525da51 100644 --- a/dialogflow_v2/proto/entity_type_pb2_grpc.py +++ b/dialogflow_v2/proto/entity_type_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2.proto import ( @@ -11,42 +12,15 @@ class EntityTypesStub(object): - """Entities are extracted from user input and represent parameters that are - meaningful to your application. For example, a date range, a proper name - such as a geographic location or landmark, and so on. Entities represent - actionable data for your application. - - When you define an entity, you can also include synonyms that all map to - that entity. For example, "soft drink", "soda", "pop", and so on. - - There are three types of entities: - - * **System** - entities that are defined by the Dialogflow API for common - data types such as date, time, currency, and so on. A system entity is - represented by the `EntityType` type. - - * **Custom** - entities that are defined by you that represent - actionable data that is meaningful to your application. For example, - you could define a `pizza.sauce` entity for red or white pizza sauce, - a `pizza.cheese` entity for the different types of cheese on a pizza, - a `pizza.topping` entity for different toppings, and so on. A custom - entity is represented by the `EntityType` type. - - * **User** - entities that are built for an individual user such as - favorites, preferences, playlists, and so on. A user entity is - represented by the [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] type. - - For more information about entity types, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/entities-overview). - """ + """Service for managing [EntityTypes][google.cloud.dialogflow.v2.EntityType]. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.ListEntityTypes = channel.unary_unary( "/google.cloud.dialogflow.v2.EntityTypes/ListEntityTypes", request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.ListEntityTypesRequest.SerializeToString, @@ -100,67 +74,40 @@ def __init__(self, channel): class EntityTypesServicer(object): - """Entities are extracted from user input and represent parameters that are - meaningful to your application. For example, a date range, a proper name - such as a geographic location or landmark, and so on. Entities represent - actionable data for your application. - - When you define an entity, you can also include synonyms that all map to - that entity. For example, "soft drink", "soda", "pop", and so on. - - There are three types of entities: - - * **System** - entities that are defined by the Dialogflow API for common - data types such as date, time, currency, and so on. A system entity is - represented by the `EntityType` type. - - * **Custom** - entities that are defined by you that represent - actionable data that is meaningful to your application. For example, - you could define a `pizza.sauce` entity for red or white pizza sauce, - a `pizza.cheese` entity for the different types of cheese on a pizza, - a `pizza.topping` entity for different toppings, and so on. A custom - entity is represented by the `EntityType` type. - - * **User** - entities that are built for an individual user such as - favorites, preferences, playlists, and so on. A user entity is - represented by the [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] type. - - For more information about entity types, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/entities-overview). - """ + """Service for managing [EntityTypes][google.cloud.dialogflow.v2.EntityType]. + """ def ListEntityTypes(self, request, context): """Returns the list of all entity types in the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetEntityType(self, request, context): """Retrieves the specified entity type. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def CreateEntityType(self, request, context): """Creates an entity type in the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateEntityType(self, request, context): """Updates the specified entity type. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteEntityType(self, request, context): """Deletes the specified entity type. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -168,8 +115,8 @@ def DeleteEntityType(self, request, context): def BatchUpdateEntityTypes(self, request, context): """Updates/Creates multiple entity types in the specified agent. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -177,8 +124,8 @@ def BatchUpdateEntityTypes(self, request, context): def BatchDeleteEntityTypes(self, request, context): """Deletes entity types in the specified agent. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -186,20 +133,20 @@ def BatchDeleteEntityTypes(self, request, context): def BatchCreateEntities(self, request, context): """Creates multiple new entities in the specified entity type. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def BatchUpdateEntities(self, request, context): """Updates or creates multiple entities in the specified entity type. This - method does not affect entities in the entity type that aren't explicitly - specified in the request. + method does not affect entities in the entity type that aren't explicitly + specified in the request. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -208,8 +155,8 @@ def BatchDeleteEntities(self, request, context): """Deletes entities in the specified entity type. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -272,3 +219,279 @@ def add_EntityTypesServicer_to_server(servicer, server): "google.cloud.dialogflow.v2.EntityTypes", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class EntityTypes(object): + """Service for managing [EntityTypes][google.cloud.dialogflow.v2.EntityType]. + """ + + @staticmethod + def ListEntityTypes( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.EntityTypes/ListEntityTypes", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.ListEntityTypesRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.ListEntityTypesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.EntityTypes/GetEntityType", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.GetEntityTypeRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.EntityType.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.EntityTypes/CreateEntityType", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.CreateEntityTypeRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.EntityType.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.EntityTypes/UpdateEntityType", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.UpdateEntityTypeRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.EntityType.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.EntityTypes/DeleteEntityType", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.DeleteEntityTypeRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchUpdateEntityTypes( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.EntityTypes/BatchUpdateEntityTypes", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.BatchUpdateEntityTypesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchDeleteEntityTypes( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.EntityTypes/BatchDeleteEntityTypes", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.BatchDeleteEntityTypesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchCreateEntities( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.EntityTypes/BatchCreateEntities", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.BatchCreateEntitiesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchUpdateEntities( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.EntityTypes/BatchUpdateEntities", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.BatchUpdateEntitiesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchDeleteEntities( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.EntityTypes/BatchDeleteEntities", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.BatchDeleteEntitiesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2/proto/environment.proto b/dialogflow_v2/proto/environment.proto new file mode 100644 index 000000000..d48c210fc --- /dev/null +++ b/dialogflow_v2/proto/environment.proto @@ -0,0 +1,143 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "EnvironmentProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; + +// Service for managing [Environments][google.cloud.dialogflow.v2.Environment]. +service Environments { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all non-draft environments of the specified agent. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/agent}/environments" + }; + } +} + +// You can create multiple versions of your agent and publish them to separate +// environments. +// +// When you edit an agent, you are editing the draft agent. At any point, you +// can save the draft agent as an agent version, which is an immutable snapshot +// of your agent. +// +// When you save the draft agent, it is published to the default environment. +// When you create agent versions, you can publish them to custom environments. +// You can create a variety of custom environments for: +// +// - testing +// - development +// - production +// - etc. +// +// For more information, see the [versions and environments +// guide](https://cloud.google.com/dialogflow/docs/agents-versions). +message Environment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Environment" + pattern: "projects/{project}/agent/environments/{environment}" + }; + + // Represents an environment state. When an environment is pointed to a new + // agent version, the environment is temporarily set to the `LOADING` state. + // During that time, the environment keeps on serving the previous version of + // the agent. After the new agent version is done loading, the environment is + // set back to the `RUNNING` state. + enum State { + // Not specified. This value is not used. + STATE_UNSPECIFIED = 0; + + // Stopped. + STOPPED = 1; + + // Loading. + LOADING = 2; + + // Running. + RUNNING = 3; + } + + // Output only. The unique identifier of this agent environment. + // Format: `projects//agent/environments/`. + // For Environment ID, "-" is reserved for 'draft' environment. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The developer-provided description for this environment. + // The maximum length is 500 characters. If exceeded, the request is rejected. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The agent version loaded into this environment. + // Format: `projects//agent/versions/`. + string agent_version = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The state of this environment. This field is read-only, i.e., it cannot be + // set by create and update methods. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time of this environment. This field is read-only, i.e., it + // cannot be set by create and update methods. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. +message ListEnvironmentsRequest { + // Required. The agent to list all environments from. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Environment" + } + ]; + + // Optional. The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. +message ListEnvironmentsResponse { + // The list of agent environments. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated Environment environments = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} diff --git a/dialogflow_v2/proto/environment_pb2.py b/dialogflow_v2/proto/environment_pb2.py new file mode 100644 index 000000000..fedb92683 --- /dev/null +++ b/dialogflow_v2/proto/environment_pb2.py @@ -0,0 +1,486 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dialogflow_v2/proto/environment.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name="google/cloud/dialogflow_v2/proto/environment.proto", + package="google.cloud.dialogflow.v2", + syntax="proto3", + serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\020EnvironmentProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n2google/cloud/dialogflow_v2/proto/environment.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/api/client.proto"\xf7\x02\n\x0b\x45nvironment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\ragent_version\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x05state\x18\x04 \x01(\x0e\x32-.google.cloud.dialogflow.v2.Environment.StateB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STOPPED\x10\x01\x12\x0b\n\x07LOADING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03:_\xea\x41\\\n%dialogflow.googleapis.com/Environment\x12\x33projects/{project}/agent/environments/{environment}"\x89\x01\n\x17ListEnvironmentsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dialogflow.googleapis.com/Environment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01"r\n\x18ListEnvironmentsResponse\x12=\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32\'.google.cloud.dialogflow.v2.Environment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xbc\x02\n\x0c\x45nvironments\x12\xb1\x01\n\x10ListEnvironments\x12\x33.google.cloud.dialogflow.v2.ListEnvironmentsRequest\x1a\x34.google.cloud.dialogflow.v2.ListEnvironmentsResponse"2\x82\xd3\xe4\x93\x02,\x12*/v2/{parent=projects/*/agent}/environments\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x9f\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x10\x45nvironmentProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3', + dependencies=[ + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, + google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, + google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, + google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + ], +) + + +_ENVIRONMENT_STATE = _descriptor.EnumDescriptor( + name="State", + full_name="google.cloud.dialogflow.v2.Environment.State", + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name="STATE_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="STOPPED", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="LOADING", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="RUNNING", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=503, + serialized_end=572, +) +_sym_db.RegisterEnumDescriptor(_ENVIRONMENT_STATE) + + +_ENVIRONMENT = _descriptor.Descriptor( + name="Environment", + full_name="google.cloud.dialogflow.v2.Environment", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.cloud.dialogflow.v2.Environment.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.cloud.dialogflow.v2.Environment.description", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="agent_version", + full_name="google.cloud.dialogflow.v2.Environment.agent_version", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="state", + full_name="google.cloud.dialogflow.v2.Environment.state", + index=3, + number=4, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="update_time", + full_name="google.cloud.dialogflow.v2.Environment.update_time", + index=4, + number=5, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[_ENVIRONMENT_STATE], + serialized_options=b"\352A\\\n%dialogflow.googleapis.com/Environment\0223projects/{project}/agent/environments/{environment}", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=294, + serialized_end=669, +) + + +_LISTENVIRONMENTSREQUEST = _descriptor.Descriptor( + name="ListEnvironmentsRequest", + full_name="google.cloud.dialogflow.v2.ListEnvironmentsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.cloud.dialogflow.v2.ListEnvironmentsRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A'\022%dialogflow.googleapis.com/Environment", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.cloud.dialogflow.v2.ListEnvironmentsRequest.page_size", + index=1, + number=2, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.cloud.dialogflow.v2.ListEnvironmentsRequest.page_token", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=672, + serialized_end=809, +) + + +_LISTENVIRONMENTSRESPONSE = _descriptor.Descriptor( + name="ListEnvironmentsResponse", + full_name="google.cloud.dialogflow.v2.ListEnvironmentsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="environments", + full_name="google.cloud.dialogflow.v2.ListEnvironmentsResponse.environments", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.cloud.dialogflow.v2.ListEnvironmentsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=811, + serialized_end=925, +) + +_ENVIRONMENT.fields_by_name["state"].enum_type = _ENVIRONMENT_STATE +_ENVIRONMENT.fields_by_name[ + "update_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_ENVIRONMENT_STATE.containing_type = _ENVIRONMENT +_LISTENVIRONMENTSRESPONSE.fields_by_name["environments"].message_type = _ENVIRONMENT +DESCRIPTOR.message_types_by_name["Environment"] = _ENVIRONMENT +DESCRIPTOR.message_types_by_name["ListEnvironmentsRequest"] = _LISTENVIRONMENTSREQUEST +DESCRIPTOR.message_types_by_name["ListEnvironmentsResponse"] = _LISTENVIRONMENTSRESPONSE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Environment = _reflection.GeneratedProtocolMessageType( + "Environment", + (_message.Message,), + { + "DESCRIPTOR": _ENVIRONMENT, + "__module__": "google.cloud.dialogflow_v2.proto.environment_pb2", + "__doc__": """You can create multiple versions of your agent and publish them to + separate environments. When you edit an agent, you are editing the + draft agent. At any point, you can save the draft agent as an agent + version, which is an immutable snapshot of your agent. When you save + the draft agent, it is published to the default environment. When you + create agent versions, you can publish them to custom environments. + You can create a variety of custom environments for: - testing - + development - production - etc. For more information, see the + `versions and environments guide + `__. + + Attributes: + name: + Output only. The unique identifier of this agent environment. + Format: ``projects//agent/environments/``. For Environment ID, + “-” is reserved for ‘draft’ environment. + description: + Optional. The developer-provided description for this + environment. The maximum length is 500 characters. If + exceeded, the request is rejected. + agent_version: + Optional. The agent version loaded into this environment. + Format: ``projects//agent/versions/``. + state: + Output only. The state of this environment. This field is + read-only, i.e., it cannot be set by create and update + methods. + update_time: + Output only. The last update time of this environment. This + field is read-only, i.e., it cannot be set by create and + update methods. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Environment) + }, +) +_sym_db.RegisterMessage(Environment) + +ListEnvironmentsRequest = _reflection.GeneratedProtocolMessageType( + "ListEnvironmentsRequest", + (_message.Message,), + { + "DESCRIPTOR": _LISTENVIRONMENTSREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.environment_pb2", + "__doc__": """The request message for [Environments.ListEnvironments][google.cloud.d + ialogflow.v2.Environments.ListEnvironments]. + + Attributes: + parent: + Required. The agent to list all environments from. Format: + ``projects//agent``. + page_size: + Optional. The maximum number of items to return in a single + page. By default 100 and at most 1000. + page_token: + Optional. The next_page_token value returned from a previous + list request. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListEnvironmentsRequest) + }, +) +_sym_db.RegisterMessage(ListEnvironmentsRequest) + +ListEnvironmentsResponse = _reflection.GeneratedProtocolMessageType( + "ListEnvironmentsResponse", + (_message.Message,), + { + "DESCRIPTOR": _LISTENVIRONMENTSRESPONSE, + "__module__": "google.cloud.dialogflow_v2.proto.environment_pb2", + "__doc__": """The response message for [Environments.ListEnvironments][google.cloud. + dialogflow.v2.Environments.ListEnvironments]. + + Attributes: + environments: + The list of agent environments. There will be a maximum number + of items returned based on the page_size field in the request. + next_page_token: + Token to retrieve the next page of results, or empty if there + are no more results in the list. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListEnvironmentsResponse) + }, +) +_sym_db.RegisterMessage(ListEnvironmentsResponse) + + +DESCRIPTOR._options = None +_ENVIRONMENT.fields_by_name["name"]._options = None +_ENVIRONMENT.fields_by_name["description"]._options = None +_ENVIRONMENT.fields_by_name["agent_version"]._options = None +_ENVIRONMENT.fields_by_name["state"]._options = None +_ENVIRONMENT.fields_by_name["update_time"]._options = None +_ENVIRONMENT._options = None +_LISTENVIRONMENTSREQUEST.fields_by_name["parent"]._options = None +_LISTENVIRONMENTSREQUEST.fields_by_name["page_size"]._options = None +_LISTENVIRONMENTSREQUEST.fields_by_name["page_token"]._options = None + +_ENVIRONMENTS = _descriptor.ServiceDescriptor( + name="Environments", + full_name="google.cloud.dialogflow.v2.Environments", + file=DESCRIPTOR, + index=0, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=928, + serialized_end=1244, + methods=[ + _descriptor.MethodDescriptor( + name="ListEnvironments", + full_name="google.cloud.dialogflow.v2.Environments.ListEnvironments", + index=0, + containing_service=None, + input_type=_LISTENVIRONMENTSREQUEST, + output_type=_LISTENVIRONMENTSRESPONSE, + serialized_options=b"\202\323\344\223\002,\022*/v2/{parent=projects/*/agent}/environments", + create_key=_descriptor._internal_create_key, + ) + ], +) +_sym_db.RegisterServiceDescriptor(_ENVIRONMENTS) + +DESCRIPTOR.services_by_name["Environments"] = _ENVIRONMENTS + +# @@protoc_insertion_point(module_scope) diff --git a/dialogflow_v2/proto/environment_pb2_grpc.py b/dialogflow_v2/proto/environment_pb2_grpc.py new file mode 100644 index 000000000..83ede9765 --- /dev/null +++ b/dialogflow_v2/proto/environment_pb2_grpc.py @@ -0,0 +1,83 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from dialogflow_v2.proto import ( + environment_pb2 as google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_environment__pb2, +) + + +class EnvironmentsStub(object): + """Service for managing [Environments][google.cloud.dialogflow.v2.Environment]. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListEnvironments = channel.unary_unary( + "/google.cloud.dialogflow.v2.Environments/ListEnvironments", + request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_environment__pb2.ListEnvironmentsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_environment__pb2.ListEnvironmentsResponse.FromString, + ) + + +class EnvironmentsServicer(object): + """Service for managing [Environments][google.cloud.dialogflow.v2.Environment]. + """ + + def ListEnvironments(self, request, context): + """Returns the list of all non-draft environments of the specified agent. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + +def add_EnvironmentsServicer_to_server(servicer, server): + rpc_method_handlers = { + "ListEnvironments": grpc.unary_unary_rpc_method_handler( + servicer.ListEnvironments, + request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_environment__pb2.ListEnvironmentsRequest.FromString, + response_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_environment__pb2.ListEnvironmentsResponse.SerializeToString, + ) + } + generic_handler = grpc.method_handlers_generic_handler( + "google.cloud.dialogflow.v2.Environments", rpc_method_handlers + ) + server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Environments(object): + """Service for managing [Environments][google.cloud.dialogflow.v2.Environment]. + """ + + @staticmethod + def ListEnvironments( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Environments/ListEnvironments", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_environment__pb2.ListEnvironmentsRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_environment__pb2.ListEnvironmentsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2/proto/intent.proto b/dialogflow_v2/proto/intent.proto new file mode 100644 index 000000000..f4f78acad --- /dev/null +++ b/dialogflow_v2/proto/intent.proto @@ -0,0 +1,1028 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2/audio_config.proto"; +import "google/cloud/dialogflow/v2/context.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "IntentProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; + +// Service for managing [Intents][google.cloud.dialogflow.v2.Intent]. +service Intents { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all intents in the specified agent. + rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/agent}/intents" + }; + option (google.api.method_signature) = "parent"; + option (google.api.method_signature) = "parent,language_code"; + } + + // Retrieves the specified intent. + rpc GetIntent(GetIntentRequest) returns (Intent) { + option (google.api.http) = { + get: "/v2/{name=projects/*/agent/intents/*}" + }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,language_code"; + } + + // Creates an intent in the specified agent. + rpc CreateIntent(CreateIntentRequest) returns (Intent) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/agent}/intents" + body: "intent" + }; + option (google.api.method_signature) = "parent,intent"; + option (google.api.method_signature) = "parent,intent,language_code"; + } + + // Updates the specified intent. + rpc UpdateIntent(UpdateIntentRequest) returns (Intent) { + option (google.api.http) = { + patch: "/v2/{intent.name=projects/*/agent/intents/*}" + body: "intent" + }; + option (google.api.method_signature) = "intent,language_code"; + option (google.api.method_signature) = "intent,language_code,update_mask"; + } + + // Deletes the specified intent and its direct or indirect followup intents. + rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/agent/intents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates/Creates multiple intents in the specified agent. + // + // Operation + rpc BatchUpdateIntents(BatchUpdateIntentsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/agent}/intents:batchUpdate" + body: "*" + }; + option (google.api.method_signature) = "parent,intent_batch_uri"; + option (google.api.method_signature) = "parent,intent_batch_inline"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.dialogflow.v2.BatchUpdateIntentsResponse" + metadata_type: "google.protobuf.Struct" + }; + } + + // Deletes intents in the specified agent. + // + // Operation + rpc BatchDeleteIntents(BatchDeleteIntentsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/agent}/intents:batchDelete" + body: "*" + }; + option (google.api.method_signature) = "parent,intents"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } +} + +// An intent categorizes an end-user's intention for one conversation turn. For +// each agent, you define many intents, where your combined intents can handle a +// complete conversation. When an end-user writes or says something, referred to +// as an end-user expression or end-user input, Dialogflow matches the end-user +// input to the best intent in your agent. Matching an intent is also known as +// intent classification. +// +// For more information, see the [intent +// guide](https://cloud.google.com/dialogflow/docs/intents-overview). +message Intent { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Intent" + pattern: "projects/{project}/agent/intents/{intent}" + }; + + // Represents an example that the agent is trained on. + message TrainingPhrase { + // Represents a part of a training phrase. + message Part { + // Required. The text for this part. + string text = 1; + + // Optional. The entity type name prefixed with `@`. + // This field is required for annotated parts of the training phrase. + string entity_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The parameter name for the value extracted from the + // annotated part of the example. + // This field is required for annotated parts of the training phrase. + string alias = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether the text was manually annotated. + // This field is set to true when the Dialogflow Console is used to + // manually annotate the part. When creating an annotated part with the + // API, you must set this to true. + bool user_defined = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents different types of training phrases. + enum Type { + // Not specified. This value should never be used. + TYPE_UNSPECIFIED = 0; + + // Examples do not contain @-prefixed entity type names, but example parts + // can be annotated with entity types. + EXAMPLE = 1; + + // Templates are not annotated with entity types, but they can contain + // @-prefixed entity type names as substrings. + // Template mode has been deprecated. Example mode is the only supported + // way to create new training phrases. If you have existing training + // phrases that you've created in template mode, those will continue to + // work. + TEMPLATE = 2 [deprecated = true]; + } + + // Output only. The unique identifier of this training phrase. + string name = 1; + + // Required. The type of the training phrase. + Type type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ordered list of training phrase parts. + // The parts are concatenated in order to form the training phrase. + // + // Note: The API does not automatically annotate training phrases like the + // Dialogflow Console does. + // + // Note: Do not forget to include whitespace at part boundaries, + // so the training phrase is well formatted when the parts are concatenated. + // + // If the training phrase does not need to be annotated with parameters, + // you just need a single part with only the [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] field set. + // + // If you want to annotate the training phrase, you must create multiple + // parts, where the fields of each part are populated in one of two ways: + // + // - `Part.text` is set to a part of the phrase that has no parameters. + // - `Part.text` is set to a part of the phrase that you want to annotate, + // and the `entity_type`, `alias`, and `user_defined` fields are all + // set. + repeated Part parts = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates how many times this example was added to + // the intent. Each time a developer adds an existing sample by editing an + // intent or training, this counter is increased. + int32 times_added_count = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents intent parameters. + message Parameter { + // The unique identifier of this parameter. + string name = 1; + + // Required. The name of the parameter. + string display_name = 2; + + // Optional. The definition of the parameter value. It can be: + // + // - a constant string, + // - a parameter value defined as `$parameter_name`, + // - an original parameter value defined as `$parameter_name.original`, + // - a parameter value from some context defined as + // `#context_name.parameter_name`. + string value = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The default value to use when the `value` yields an empty + // result. + // Default values can be extracted from contexts by using the following + // syntax: `#context_name.parameter_name`. + string default_value = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the entity type, prefixed with `@`, that + // describes values of the parameter. If the parameter is + // required, this must be provided. + string entity_type_display_name = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether the parameter is required. That is, + // whether the intent cannot be completed without collecting the parameter + // value. + bool mandatory = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of prompts that the agent can present to the + // user in order to collect a value for the parameter. + repeated string prompts = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether the parameter represents a list of values. + bool is_list = 8 [(google.api.field_behavior) = OPTIONAL]; + } + + // A rich response message. + // Corresponds to the intent `Response` field in the Dialogflow console. + // For more information, see + // [Rich response + // messages](https://cloud.google.com/dialogflow/docs/intents-rich-messages). + message Message { + // The text response message. + message Text { + // Optional. The collection of the agent's responses. + repeated string text = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // The image response message. + message Image { + // Optional. The public URI to an image file. + string image_uri = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A text description of the image to be used for accessibility, + // e.g., screen readers. + string accessibility_text = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // The quick replies response message. + message QuickReplies { + // Optional. The title of the collection of quick replies. + string title = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of quick replies. + repeated string quick_replies = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // The card response message. + message Card { + // Contains information about a button. + message Button { + // Optional. The text to show on the button. + string text = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The text to send back to the Dialogflow API or a URI to + // open. + string postback = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The title of the card. + string title = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The subtitle of the card. + string subtitle = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The public URI to an image file for the card. + string image_uri = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of card buttons. + repeated Button buttons = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // The simple response message containing speech or text. + message SimpleResponse { + // One of text_to_speech or ssml must be provided. The plain text of the + // speech output. Mutually exclusive with ssml. + string text_to_speech = 1; + + // One of text_to_speech or ssml must be provided. Structured spoken + // response to the user in the SSML format. Mutually exclusive with + // text_to_speech. + string ssml = 2; + + // Optional. The text to display. + string display_text = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // The collection of simple response candidates. + // This message in `QueryResult.fulfillment_messages` and + // `WebhookResponse.fulfillment_messages` should contain only one + // `SimpleResponse`. + message SimpleResponses { + // Required. The list of simple responses. + repeated SimpleResponse simple_responses = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The basic card message. Useful for displaying information. + message BasicCard { + // The button object that appears at the bottom of a card. + message Button { + // Opens the given URI. + message OpenUriAction { + // Required. The HTTP or HTTPS scheme URI. + string uri = 1; + } + + // Required. The title of the button. + string title = 1; + + // Required. Action to take when a user taps on the button. + OpenUriAction open_uri_action = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Optional. The title of the card. + string title = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The subtitle of the card. + string subtitle = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required, unless image is present. The body text of the card. + string formatted_text = 3; + + // Optional. The image for the card. + Image image = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of card buttons. + repeated Button buttons = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // The suggestion chip message that the user can tap to quickly post a reply + // to the conversation. + message Suggestion { + // Required. The text shown the in the suggestion chip. + string title = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The collection of suggestions. + message Suggestions { + // Required. The list of suggested replies. + repeated Suggestion suggestions = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The suggestion chip message that allows the user to jump out to the app + // or website associated with this agent. + message LinkOutSuggestion { + // Required. The name of the app or site this chip is linking to. + string destination_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The URI of the app or site to open when the user taps the + // suggestion chip. + string uri = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // The card for presenting a list of options to select from. + message ListSelect { + // An item in the list. + message Item { + // Required. Additional information about this option. + SelectItemInfo info = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The title of the list item. + string title = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The main text describing the item. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The image to display. + Image image = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The overall title of the list. + string title = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. List items. + repeated Item items = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Subtitle of the list. + string subtitle = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // The card for presenting a carousel of options to select from. + message CarouselSelect { + // An item in the carousel. + message Item { + // Required. Additional info about the option item. + SelectItemInfo info = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Title of the carousel item. + string title = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The body text of the card. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The image to display. + Image image = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Carousel items. + repeated Item items = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Additional info about the select item for when it is triggered in a + // dialog. + message SelectItemInfo { + // Required. A unique key that will be sent back to the agent if this + // response is given. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A list of synonyms that can also be used to trigger this + // item in dialog. + repeated string synonyms = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // The media content card for Actions on Google. + message MediaContent { + // Response media object for media content card. + message ResponseMediaObject { + // Required. Name of media card. + string name = 1; + + // Optional. Description of media card. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Image to show with the media card. + oneof image { + // Optional. Image to display above media content. + Image large_image = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Icon to display above media content. + Image icon = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Url where the media is stored. + string content_url = 5; + } + + // Format of response media type. + enum ResponseMediaType { + // Unspecified. + RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0; + + // Response media type is audio. + AUDIO = 1; + } + + // Optional. What type of media is the content (ie "audio"). + ResponseMediaType media_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. List of media objects. + repeated ResponseMediaObject media_objects = 2; + } + + // Browse Carousel Card for Actions on Google. + // https://developers.google.com/actions/assistant/responses#browsing_carousel + message BrowseCarouselCard { + // Browsing carousel tile + message BrowseCarouselCardItem { + // Actions on Google action to open a given url. + message OpenUrlAction { + // Type of the URI. + enum UrlTypeHint { + // Unspecified + URL_TYPE_HINT_UNSPECIFIED = 0; + + // Url would be an amp action + AMP_ACTION = 1; + + // URL that points directly to AMP content, or to a canonical URL + // which refers to AMP content via . + AMP_CONTENT = 2; + } + + // Required. URL + string url = 1; + + // Optional. Specifies the type of viewer that is used when opening + // the URL. Defaults to opening via web browser. + UrlTypeHint url_type_hint = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Action to present to the user. + OpenUrlAction open_uri_action = 1; + + // Required. Title of the carousel item. Maximum of two lines of text. + string title = 2; + + // Optional. Description of the carousel item. Maximum of four lines of + // text. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hero image for the carousel item. + Image image = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Text that appears at the bottom of the Browse Carousel + // Card. Maximum of one line of text. + string footer = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Image display options for Actions on Google. This should be used for + // when the image's aspect ratio does not match the image container's + // aspect ratio. + enum ImageDisplayOptions { + // Fill the gaps between the image and the image container with gray + // bars. + IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0; + + // Fill the gaps between the image and the image container with gray + // bars. + GRAY = 1; + + // Fill the gaps between the image and the image container with white + // bars. + WHITE = 2; + + // Image is scaled such that the image width and height match or exceed + // the container dimensions. This may crop the top and bottom of the + // image if the scaled image height is greater than the container + // height, or crop the left and right of the image if the scaled image + // width is greater than the container width. This is similar to "Zoom + // Mode" on a widescreen TV when playing a 4:3 video. + CROPPED = 3; + + // Pad the gaps between image and image frame with a blurred copy of the + // same image. + BLURRED_BACKGROUND = 4; + } + + // Required. List of items in the Browse Carousel Card. Minimum of two + // items, maximum of ten. + repeated BrowseCarouselCardItem items = 1; + + // Optional. Settings for displaying the image. Applies to every image in + // [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items]. + ImageDisplayOptions image_display_options = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Table card for Actions on Google. + message TableCard { + // Required. Title of the card. + string title = 1; + + // Optional. Subtitle to the title. + string subtitle = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Image which should be displayed on the card. + Image image = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Display properties for the columns in this table. + repeated ColumnProperties column_properties = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Rows in this table of data. + repeated TableCardRow rows = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of buttons for the card. + repeated BasicCard.Button buttons = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Column properties for [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard]. + message ColumnProperties { + // Text alignments within a cell. + enum HorizontalAlignment { + // Text is aligned to the leading edge of the column. + HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; + + // Text is aligned to the leading edge of the column. + LEADING = 1; + + // Text is centered in the column. + CENTER = 2; + + // Text is aligned to the trailing edge of the column. + TRAILING = 3; + } + + // Required. Column heading. + string header = 1; + + // Optional. Defines text alignment for all cells in this column. + HorizontalAlignment horizontal_alignment = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Row of [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard]. + message TableCardRow { + // Optional. List of cells that make up this row. + repeated TableCardCell cells = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to add a visual divider after this row. + bool divider_after = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Cell of [TableCardRow][google.cloud.dialogflow.v2.Intent.Message.TableCardRow]. + message TableCardCell { + // Required. Text in this cell. + string text = 1; + } + + // The rich response message integration platform. See + // [Integrations](https://cloud.google.com/dialogflow/docs/integrations). + enum Platform { + // Default platform. + PLATFORM_UNSPECIFIED = 0; + + // Facebook. + FACEBOOK = 1; + + // Slack. + SLACK = 2; + + // Telegram. + TELEGRAM = 3; + + // Kik. + KIK = 4; + + // Skype. + SKYPE = 5; + + // Line. + LINE = 6; + + // Viber. + VIBER = 7; + + // Google Assistant + // See [Dialogflow webhook + // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) + ACTIONS_ON_GOOGLE = 8; + + // Google Hangouts. + GOOGLE_HANGOUTS = 11; + } + + // Required. The rich response message. + oneof message { + // The text response. + Text text = 1; + + // The image response. + Image image = 2; + + // The quick replies response. + QuickReplies quick_replies = 3; + + // The card response. + Card card = 4; + + // A custom platform-specific response. + google.protobuf.Struct payload = 5; + + // The voice and text-only responses for Actions on Google. + SimpleResponses simple_responses = 7; + + // The basic card response for Actions on Google. + BasicCard basic_card = 8; + + // The suggestion chips for Actions on Google. + Suggestions suggestions = 9; + + // The link out suggestion chip for Actions on Google. + LinkOutSuggestion link_out_suggestion = 10; + + // The list card response for Actions on Google. + ListSelect list_select = 11; + + // The carousel card response for Actions on Google. + CarouselSelect carousel_select = 12; + + // Browse carousel card for Actions on Google. + BrowseCarouselCard browse_carousel_card = 22; + + // Table card for Actions on Google. + TableCard table_card = 23; + + // The media content card for Actions on Google. + MediaContent media_content = 24; + } + + // Optional. The platform that this message is intended for. + Platform platform = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents a single followup intent in the chain. + message FollowupIntentInfo { + // The unique identifier of the followup intent. + // Format: `projects//agent/intents/`. + string followup_intent_name = 1; + + // The unique identifier of the followup intent's parent. + // Format: `projects//agent/intents/`. + string parent_followup_intent_name = 2; + } + + // Represents the different states that webhooks can be in. + enum WebhookState { + // Webhook is disabled in the agent and in the intent. + WEBHOOK_STATE_UNSPECIFIED = 0; + + // Webhook is enabled in the agent and in the intent. + WEBHOOK_STATE_ENABLED = 1; + + // Webhook is enabled in the agent and in the intent. Also, each slot + // filling prompt is forwarded to the webhook. + WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; + } + + // Optional. The unique identifier of this intent. + // Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] + // methods. + // Format: `projects//agent/intents/`. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The name of this intent. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates whether webhooks are enabled for the intent. + WebhookState webhook_state = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The priority of this intent. Higher numbers represent higher + // priorities. + // + // - If the supplied value is unspecified or 0, the service + // translates the value to 500,000, which corresponds to the + // `Normal` priority in the console. + // - If the supplied value is negative, the intent is ignored + // in runtime detect intent requests. + int32 priority = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether this is a fallback intent. + bool is_fallback = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether Machine Learning is disabled for the intent. + // Note: If `ml_disabled` setting is set to true, then this intent is not + // taken into account during inference in `ML ONLY` match mode. Also, + // auto-markup in the UI is turned off. + bool ml_disabled = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of context names required for this intent to be + // triggered. + // Format: `projects//agent/sessions/-/contexts/`. + repeated string input_context_names = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of event names that trigger the intent. + // If the collection of input contexts is not empty, all of the contexts must + // be present in the active user session for an event to trigger this intent. + // Event names are limited to 150 characters. + repeated string events = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of examples that the agent is + // trained on. + repeated TrainingPhrase training_phrases = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the action associated with the intent. + // Note: The action name must not contain whitespaces. + string action = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of contexts that are activated when the intent + // is matched. Context messages in this collection should not set the + // parameters field. Setting the `lifespan_count` to 0 will reset the context + // when the intent is matched. + // Format: `projects//agent/sessions/-/contexts/`. + repeated Context output_contexts = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether to delete all contexts in the current + // session when this intent is matched. + bool reset_contexts = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of parameters associated with the intent. + repeated Parameter parameters = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of rich messages corresponding to the + // `Response` field in the Dialogflow console. + repeated Message messages = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of platforms for which the first responses will be + // copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + repeated Message.Platform default_response_platforms = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Read-only. The unique identifier of the root intent in the chain of + // followup intents. It identifies the correct followup intents chain for + // this intent. We populate this field only in the output. + // + // Format: `projects//agent/intents/`. + string root_followup_intent_name = 16; + + // Read-only after creation. The unique identifier of the parent intent in the + // chain of followup intents. You can set this field when creating an intent, + // for example with [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or + // [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], in order to make this + // intent a followup intent. + // + // It identifies the parent followup intent. + // Format: `projects//agent/intents/`. + string parent_followup_intent_name = 17; + + // Read-only. Information about all followup intents that have this intent as + // a direct or indirect parent. We populate this field only in the output. + repeated FollowupIntentInfo followup_intent_info = 18; +} + +// The request message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents]. +message ListIntentsRequest { + // Required. The agent to list all intents from. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource view to apply to the returned intent. + IntentView intent_view = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents]. +message ListIntentsResponse { + // The list of agent intents. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated Intent intents = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [Intents.GetIntent][google.cloud.dialogflow.v2.Intents.GetIntent]. +message GetIntentRequest { + // Required. The name of the intent. + // Format: `projects//agent/intents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Intent" + } + ]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource view to apply to the returned intent. + IntentView intent_view = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent]. +message CreateIntentRequest { + // Required. The agent to create a intent for. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; + + // Required. The intent to create. + Intent intent = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource view to apply to the returned intent. + IntentView intent_view = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent]. +message UpdateIntentRequest { + // Required. The intent to update. + Intent intent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource view to apply to the returned intent. + IntentView intent_view = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent]. +message DeleteIntentRequest { + // Required. The name of the intent to delete. If this intent has direct or + // indirect followup intents, we also delete them. + // Format: `projects//agent/intents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Intent" + } + ]; +} + +message BatchUpdateIntentsRequest { + // Required. The name of the agent to update or create intents in. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; + + // The source of the intent batch. + oneof intent_batch { + // The URI to a Google Cloud Storage file containing intents to update or + // create. The file format can either be a serialized proto (of IntentBatch + // type) or JSON object. Note: The URI must start with "gs://". + string intent_batch_uri = 2; + + // The collection of intents to update or create. + IntentBatch intent_batch_inline = 3; + } + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource view to apply to the returned intent. + IntentView intent_view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents]. +message BatchUpdateIntentsResponse { + // The collection of updated or created intents. + repeated Intent intents = 1; +} + +// The request message for [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2.Intents.BatchDeleteIntents]. +message BatchDeleteIntentsRequest { + // Required. The name of the agent to delete all entities types for. Format: + // `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; + + // Required. The collection of intents to delete. Only intent `name` must be + // filled in. + repeated Intent intents = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// This message is a wrapper around a collection of intents. +message IntentBatch { + // A collection of intents. + repeated Intent intents = 1; +} + +// Represents the options for views of an intent. +// An intent can be a sizable object. Therefore, we provide a resource view that +// does not return training phrases in the response by default. +enum IntentView { + // Training phrases field is not populated in the response. + INTENT_VIEW_UNSPECIFIED = 0; + + // All fields are populated. + INTENT_VIEW_FULL = 1; +} diff --git a/dialogflow_v2/proto/intent_pb2.py b/dialogflow_v2/proto/intent_pb2.py index ea0d72d55..ea77470de 100644 --- a/dialogflow_v2/proto/intent_pb2.py +++ b/dialogflow_v2/proto/intent_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/intent.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -39,12 +36,9 @@ name="google/cloud/dialogflow_v2/proto/intent.proto", package="google.cloud.dialogflow.v2", syntax="proto3", - serialized_options=_b( - "\n\036com.google.cloud.dialogflow.v2B\013IntentProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2" - ), - serialized_pb=_b( - '\n-google/cloud/dialogflow_v2/proto/intent.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/dialogflow_v2/proto/audio_config.proto\x1a.google/cloud/dialogflow_v2/proto/context.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto"\xc7\x37\n\x06Intent\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12K\n\rwebhook_state\x18\x06 \x01(\x0e\x32/.google.cloud.dialogflow.v2.Intent.WebhookStateB\x03\xe0\x41\x01\x12\x15\n\x08priority\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bis_fallback\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bml_disabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13input_context_names\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x65vents\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12P\n\x10training_phrases\x18\t \x03(\x0b\x32\x31.google.cloud.dialogflow.v2.Intent.TrainingPhraseB\x03\xe0\x41\x01\x12\x13\n\x06\x61\x63tion\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0foutput_contexts\x18\x0b \x03(\x0b\x32#.google.cloud.dialogflow.v2.ContextB\x03\xe0\x41\x01\x12\x1b\n\x0ereset_contexts\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12\x45\n\nparameters\x18\r \x03(\x0b\x32,.google.cloud.dialogflow.v2.Intent.ParameterB\x03\xe0\x41\x01\x12\x41\n\x08messages\x18\x0e \x03(\x0b\x32*.google.cloud.dialogflow.v2.Intent.MessageB\x03\xe0\x41\x01\x12\\\n\x1a\x64\x65\x66\x61ult_response_platforms\x18\x0f \x03(\x0e\x32\x33.google.cloud.dialogflow.v2.Intent.Message.PlatformB\x03\xe0\x41\x01\x12!\n\x19root_followup_intent_name\x18\x10 \x01(\t\x12#\n\x1bparent_followup_intent_name\x18\x11 \x01(\t\x12S\n\x14\x66ollowup_intent_info\x18\x12 \x03(\x0b\x32\x35.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo\x1a\xf1\x02\n\x0eTrainingPhrase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12I\n\x04type\x18\x02 \x01(\x0e\x32\x36.google.cloud.dialogflow.v2.Intent.TrainingPhrase.TypeB\x03\xe0\x41\x02\x12J\n\x05parts\x18\x03 \x03(\x0b\x32\x36.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartB\x03\xe0\x41\x02\x12\x1e\n\x11times_added_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x1a]\n\x04Part\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x18\n\x0b\x65ntity_type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x61lias\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cuser_defined\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01";\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45XAMPLE\x10\x01\x12\x10\n\x08TEMPLATE\x10\x02\x1a\x02\x08\x01\x1a\xca\x01\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\x05value\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdefault_value\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x65ntity_type_display_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmandatory\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07prompts\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07is_list\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x96*\n\x07Message\x12?\n\x04text\x18\x01 \x01(\x0b\x32/.google.cloud.dialogflow.v2.Intent.Message.TextH\x00\x12\x41\n\x05image\x18\x02 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageH\x00\x12P\n\rquick_replies\x18\x03 \x01(\x0b\x32\x37.google.cloud.dialogflow.v2.Intent.Message.QuickRepliesH\x00\x12?\n\x04\x63\x61rd\x18\x04 \x01(\x0b\x32/.google.cloud.dialogflow.v2.Intent.Message.CardH\x00\x12*\n\x07payload\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12V\n\x10simple_responses\x18\x07 \x01(\x0b\x32:.google.cloud.dialogflow.v2.Intent.Message.SimpleResponsesH\x00\x12J\n\nbasic_card\x18\x08 \x01(\x0b\x32\x34.google.cloud.dialogflow.v2.Intent.Message.BasicCardH\x00\x12M\n\x0bsuggestions\x18\t \x01(\x0b\x32\x36.google.cloud.dialogflow.v2.Intent.Message.SuggestionsH\x00\x12[\n\x13link_out_suggestion\x18\n \x01(\x0b\x32<.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestionH\x00\x12L\n\x0blist_select\x18\x0b \x01(\x0b\x32\x35.google.cloud.dialogflow.v2.Intent.Message.ListSelectH\x00\x12T\n\x0f\x63\x61rousel_select\x18\x0c \x01(\x0b\x32\x39.google.cloud.dialogflow.v2.Intent.Message.CarouselSelectH\x00\x12]\n\x14\x62rowse_carousel_card\x18\x16 \x01(\x0b\x32=.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCardH\x00\x12J\n\ntable_card\x18\x17 \x01(\x0b\x32\x34.google.cloud.dialogflow.v2.Intent.Message.TableCardH\x00\x12P\n\rmedia_content\x18\x18 \x01(\x0b\x32\x37.google.cloud.dialogflow.v2.Intent.Message.MediaContentH\x00\x12J\n\x08platform\x18\x06 \x01(\x0e\x32\x33.google.cloud.dialogflow.v2.Intent.Message.PlatformB\x03\xe0\x41\x01\x1a\x19\n\x04Text\x12\x11\n\x04text\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a@\n\x05Image\x12\x16\n\timage_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x61\x63\x63\x65ssibility_text\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a>\n\x0cQuickReplies\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rquick_replies\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\xcb\x01\n\x04\x43\x61rd\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08subtitle\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\timage_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12L\n\x07\x62uttons\x18\x04 \x03(\x0b\x32\x36.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonB\x03\xe0\x41\x01\x1a\x32\n\x06\x42utton\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08postback\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1aQ\n\x0eSimpleResponse\x12\x16\n\x0etext_to_speech\x18\x01 \x01(\t\x12\x0c\n\x04ssml\x18\x02 \x01(\t\x12\x19\n\x0c\x64isplay_text\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1ak\n\x0fSimpleResponses\x12X\n\x10simple_responses\x18\x01 \x03(\x0b\x32\x39.google.cloud.dialogflow.v2.Intent.Message.SimpleResponseB\x03\xe0\x41\x02\x1a\x88\x03\n\tBasicCard\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08subtitle\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\x0e\x66ormatted_text\x18\x03 \x01(\t\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01\x12Q\n\x07\x62uttons\x18\x05 \x03(\x0b\x32;.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonB\x03\xe0\x41\x01\x1a\x9e\x01\n\x06\x42utton\x12\r\n\x05title\x18\x01 \x01(\t\x12g\n\x0fopen_uri_action\x18\x02 \x01(\x0b\x32I.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriActionB\x03\xe0\x41\x02\x1a\x1c\n\rOpenUriAction\x12\x0b\n\x03uri\x18\x01 \x01(\t\x1a \n\nSuggestion\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a^\n\x0bSuggestions\x12O\n\x0bsuggestions\x18\x01 \x03(\x0b\x32\x35.google.cloud.dialogflow.v2.Intent.Message.SuggestionB\x03\xe0\x41\x02\x1a\x44\n\x11LinkOutSuggestion\x12\x1d\n\x10\x64\x65stination_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\xd2\x02\n\nListSelect\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12N\n\x05items\x18\x02 \x03(\x0b\x32:.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemB\x03\xe0\x41\x02\x12\x15\n\x08subtitle\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\xc8\x01\n\x04Item\x12L\n\x04info\x18\x01 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoB\x03\xe0\x41\x02\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01\x1a\xaf\x02\n\x0e\x43\x61rouselSelect\x12R\n\x05items\x18\x01 \x03(\x0b\x32>.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.ItemB\x03\xe0\x41\x02\x1a\xc8\x01\n\x04Item\x12L\n\x04info\x18\x01 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoB\x03\xe0\x41\x02\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01\x1a\x39\n\x0eSelectItemInfo\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08synonyms\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x8e\x04\n\x0cMediaContent\x12\x62\n\nmedia_type\x18\x01 \x01(\x0e\x32I.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaTypeB\x03\xe0\x41\x01\x12\x62\n\rmedia_objects\x18\x02 \x03(\x0b\x32K.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject\x1a\xf0\x01\n\x13ResponseMediaObject\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12L\n\x0blarge_image\x18\x03 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01H\x00\x12\x45\n\x04icon\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01H\x00\x12\x13\n\x0b\x63ontent_url\x18\x05 \x01(\tB\x07\n\x05image"C\n\x11ResponseMediaType\x12#\n\x1fRESPONSE_MEDIA_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41UDIO\x10\x01\x1a\xff\x06\n\x12\x42rowseCarouselCard\x12\x63\n\x05items\x18\x01 \x03(\x0b\x32T.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem\x12u\n\x15image_display_options\x18\x02 \x01(\x0e\x32Q.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptionsB\x03\xe0\x41\x01\x1a\x94\x04\n\x16\x42rowseCarouselCardItem\x12{\n\x0fopen_uri_action\x18\x01 \x01(\x0b\x32\x62.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction\x12\r\n\x05title\x18\x02 \x01(\t\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01\x12\x13\n\x06\x66ooter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\xf8\x01\n\rOpenUrlAction\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x8a\x01\n\rurl_type_hint\x18\x03 \x01(\x0e\x32n.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHintB\x03\xe0\x41\x01"M\n\x0bUrlTypeHint\x12\x1d\n\x19URL_TYPE_HINT_UNSPECIFIED\x10\x00\x12\x0e\n\nAMP_ACTION\x10\x01\x12\x0f\n\x0b\x41MP_CONTENT\x10\x02"v\n\x13ImageDisplayOptions\x12%\n!IMAGE_DISPLAY_OPTIONS_UNSPECIFIED\x10\x00\x12\x08\n\x04GRAY\x10\x01\x12\t\n\x05WHITE\x10\x02\x12\x0b\n\x07\x43ROPPED\x10\x03\x12\x16\n\x12\x42LURRED_BACKGROUND\x10\x04\x1a\xf3\x02\n\tTableCard\x12\r\n\x05title\x18\x01 \x01(\t\x12\x15\n\x08subtitle\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x05image\x18\x03 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01\x12[\n\x11\x63olumn_properties\x18\x04 \x03(\x0b\x32;.google.cloud.dialogflow.v2.Intent.Message.ColumnPropertiesB\x03\xe0\x41\x01\x12J\n\x04rows\x18\x05 \x03(\x0b\x32\x37.google.cloud.dialogflow.v2.Intent.Message.TableCardRowB\x03\xe0\x41\x01\x12Q\n\x07\x62uttons\x18\x06 \x03(\x0b\x32;.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonB\x03\xe0\x41\x01\x1a\xfa\x01\n\x10\x43olumnProperties\x12\x0e\n\x06header\x18\x01 \x01(\t\x12r\n\x14horizontal_alignment\x18\x02 \x01(\x0e\x32O.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignmentB\x03\xe0\x41\x01"b\n\x13HorizontalAlignment\x12$\n HORIZONTAL_ALIGNMENT_UNSPECIFIED\x10\x00\x12\x0b\n\x07LEADING\x10\x01\x12\n\n\x06\x43\x45NTER\x10\x02\x12\x0c\n\x08TRAILING\x10\x03\x1ax\n\x0cTableCardRow\x12L\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32\x38.google.cloud.dialogflow.v2.Intent.Message.TableCardCellB\x03\xe0\x41\x01\x12\x1a\n\rdivider_after\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x1d\n\rTableCardCell\x12\x0c\n\x04text\x18\x01 \x01(\t"\xa0\x01\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x46\x41\x43\x45\x42OOK\x10\x01\x12\t\n\x05SLACK\x10\x02\x12\x0c\n\x08TELEGRAM\x10\x03\x12\x07\n\x03KIK\x10\x04\x12\t\n\x05SKYPE\x10\x05\x12\x08\n\x04LINE\x10\x06\x12\t\n\x05VIBER\x10\x07\x12\x15\n\x11\x41\x43TIONS_ON_GOOGLE\x10\x08\x12\x13\n\x0fGOOGLE_HANGOUTS\x10\x0b\x42\t\n\x07message\x1aW\n\x12\x46ollowupIntentInfo\x12\x1c\n\x14\x66ollowup_intent_name\x18\x01 \x01(\t\x12#\n\x1bparent_followup_intent_name\x18\x02 \x01(\t"t\n\x0cWebhookState\x12\x1d\n\x19WEBHOOK_STATE_UNSPECIFIED\x10\x00\x12\x19\n\x15WEBHOOK_STATE_ENABLED\x10\x01\x12*\n&WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING\x10\x02:P\xea\x41M\n dialogflow.googleapis.com/Intent\x12)projects/{project}/agent/intents/{intent}"\xdc\x01\n\x12ListIntentsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64ialogflow.googleapis.com/Agent\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12@\n\x0bintent_view\x18\x03 \x01(\x0e\x32&.google.cloud.dialogflow.v2.IntentViewB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"c\n\x13ListIntentsResponse\x12\x33\n\x07intents\x18\x01 \x03(\x0b\x32".google.cloud.dialogflow.v2.Intent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xa8\x01\n\x10GetIntentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n dialogflow.googleapis.com/Intent\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12@\n\x0bintent_view\x18\x03 \x01(\x0e\x32&.google.cloud.dialogflow.v2.IntentViewB\x03\xe0\x41\x01"\xe5\x01\n\x13\x43reateIntentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64ialogflow.googleapis.com/Agent\x12\x37\n\x06intent\x18\x02 \x01(\x0b\x32".google.cloud.dialogflow.v2.IntentB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12@\n\x0bintent_view\x18\x04 \x01(\x0e\x32&.google.cloud.dialogflow.v2.IntentViewB\x03\xe0\x41\x01"\xe2\x01\n\x13UpdateIntentRequest\x12\x37\n\x06intent\x18\x01 \x01(\x0b\x32".google.cloud.dialogflow.v2.IntentB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12@\n\x0bintent_view\x18\x04 \x01(\x0e\x32&.google.cloud.dialogflow.v2.IntentViewB\x03\xe0\x41\x01"M\n\x13\x44\x65leteIntentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n dialogflow.googleapis.com/Intent"\xdc\x02\n\x19\x42\x61tchUpdateIntentsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64ialogflow.googleapis.com/Agent\x12\x1a\n\x10intent_batch_uri\x18\x02 \x01(\tH\x00\x12\x46\n\x13intent_batch_inline\x18\x03 \x01(\x0b\x32\'.google.cloud.dialogflow.v2.IntentBatchH\x00\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12@\n\x0bintent_view\x18\x06 \x01(\x0e\x32&.google.cloud.dialogflow.v2.IntentViewB\x03\xe0\x41\x01\x42\x0e\n\x0cintent_batch"Q\n\x1a\x42\x61tchUpdateIntentsResponse\x12\x33\n\x07intents\x18\x01 \x03(\x0b\x32".google.cloud.dialogflow.v2.Intent"\x8e\x01\n\x19\x42\x61tchDeleteIntentsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64ialogflow.googleapis.com/Agent\x12\x38\n\x07intents\x18\x02 \x03(\x0b\x32".google.cloud.dialogflow.v2.IntentB\x03\xe0\x41\x02"B\n\x0bIntentBatch\x12\x33\n\x07intents\x18\x01 \x03(\x0b\x32".google.cloud.dialogflow.v2.Intent*?\n\nIntentView\x12\x1b\n\x17INTENT_VIEW_UNSPECIFIED\x10\x00\x12\x14\n\x10INTENT_VIEW_FULL\x10\x01\x32\x93\x0c\n\x07Intents\x12\xbd\x01\n\x0bListIntents\x12..google.cloud.dialogflow.v2.ListIntentsRequest\x1a/.google.cloud.dialogflow.v2.ListIntentsResponse"M\x82\xd3\xe4\x93\x02\'\x12%/v2/{parent=projects/*/agent}/intents\xda\x41\x06parent\xda\x41\x14parent,language_code\x12\xa8\x01\n\tGetIntent\x12,.google.cloud.dialogflow.v2.GetIntentRequest\x1a".google.cloud.dialogflow.v2.Intent"I\x82\xd3\xe4\x93\x02\'\x12%/v2/{name=projects/*/agent/intents/*}\xda\x41\x04name\xda\x41\x12name,language_code\x12\xc8\x01\n\x0c\x43reateIntent\x12/.google.cloud.dialogflow.v2.CreateIntentRequest\x1a".google.cloud.dialogflow.v2.Intent"c\x82\xd3\xe4\x93\x02/"%/v2/{parent=projects/*/agent}/intents:\x06intent\xda\x41\rparent,intent\xda\x41\x1bparent,intent,language_code\x12\xdb\x01\n\x0cUpdateIntent\x12/.google.cloud.dialogflow.v2.UpdateIntentRequest\x1a".google.cloud.dialogflow.v2.Intent"v\x82\xd3\xe4\x93\x02\x36\x32,/v2/{intent.name=projects/*/agent/intents/*}:\x06intent\xda\x41\x14intent,language_code\xda\x41 intent,language_code,update_mask\x12\x8d\x01\n\x0c\x44\x65leteIntent\x12/.google.cloud.dialogflow.v2.DeleteIntentRequest\x1a\x16.google.protobuf.Empty"4\x82\xd3\xe4\x93\x02\'*%/v2/{name=projects/*/agent/intents/*}\xda\x41\x04name\x12\xfb\x01\n\x12\x42\x61tchUpdateIntents\x12\x35.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest\x1a\x1d.google.longrunning.Operation"\x8e\x01\x82\xd3\xe4\x93\x02\x36"1/v2/{parent=projects/*/agent}/intents:batchUpdate:\x01*\xca\x41O\n5google.cloud.dialogflow.v2.BatchUpdateIntentsResponse\x12\x16google.protobuf.Struct\x12\xeb\x01\n\x12\x42\x61tchDeleteIntents\x12\x35.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest\x1a\x1d.google.longrunning.Operation"\x7f\x82\xd3\xe4\x93\x02\x36"1/v2/{parent=projects/*/agent}/intents:batchDelete:\x01*\xda\x41\x0eparent,intents\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x9a\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x0bIntentProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3' - ), + serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\013IntentProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n-google/cloud/dialogflow_v2/proto/intent.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/dialogflow_v2/proto/audio_config.proto\x1a.google/cloud/dialogflow_v2/proto/context.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto"\xcc\x37\n\x06Intent\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12K\n\rwebhook_state\x18\x06 \x01(\x0e\x32/.google.cloud.dialogflow.v2.Intent.WebhookStateB\x03\xe0\x41\x01\x12\x15\n\x08priority\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bis_fallback\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bml_disabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13input_context_names\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x65vents\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12P\n\x10training_phrases\x18\t \x03(\x0b\x32\x31.google.cloud.dialogflow.v2.Intent.TrainingPhraseB\x03\xe0\x41\x01\x12\x13\n\x06\x61\x63tion\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0foutput_contexts\x18\x0b \x03(\x0b\x32#.google.cloud.dialogflow.v2.ContextB\x03\xe0\x41\x01\x12\x1b\n\x0ereset_contexts\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12\x45\n\nparameters\x18\r \x03(\x0b\x32,.google.cloud.dialogflow.v2.Intent.ParameterB\x03\xe0\x41\x01\x12\x41\n\x08messages\x18\x0e \x03(\x0b\x32*.google.cloud.dialogflow.v2.Intent.MessageB\x03\xe0\x41\x01\x12\\\n\x1a\x64\x65\x66\x61ult_response_platforms\x18\x0f \x03(\x0e\x32\x33.google.cloud.dialogflow.v2.Intent.Message.PlatformB\x03\xe0\x41\x01\x12!\n\x19root_followup_intent_name\x18\x10 \x01(\t\x12#\n\x1bparent_followup_intent_name\x18\x11 \x01(\t\x12S\n\x14\x66ollowup_intent_info\x18\x12 \x03(\x0b\x32\x35.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo\x1a\xf1\x02\n\x0eTrainingPhrase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12I\n\x04type\x18\x02 \x01(\x0e\x32\x36.google.cloud.dialogflow.v2.Intent.TrainingPhrase.TypeB\x03\xe0\x41\x02\x12J\n\x05parts\x18\x03 \x03(\x0b\x32\x36.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartB\x03\xe0\x41\x02\x12\x1e\n\x11times_added_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x1a]\n\x04Part\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x18\n\x0b\x65ntity_type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x61lias\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cuser_defined\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01";\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45XAMPLE\x10\x01\x12\x10\n\x08TEMPLATE\x10\x02\x1a\x02\x08\x01\x1a\xca\x01\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\x05value\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdefault_value\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x65ntity_type_display_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tmandatory\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12\x14\n\x07prompts\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07is_list\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x96*\n\x07Message\x12?\n\x04text\x18\x01 \x01(\x0b\x32/.google.cloud.dialogflow.v2.Intent.Message.TextH\x00\x12\x41\n\x05image\x18\x02 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageH\x00\x12P\n\rquick_replies\x18\x03 \x01(\x0b\x32\x37.google.cloud.dialogflow.v2.Intent.Message.QuickRepliesH\x00\x12?\n\x04\x63\x61rd\x18\x04 \x01(\x0b\x32/.google.cloud.dialogflow.v2.Intent.Message.CardH\x00\x12*\n\x07payload\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12V\n\x10simple_responses\x18\x07 \x01(\x0b\x32:.google.cloud.dialogflow.v2.Intent.Message.SimpleResponsesH\x00\x12J\n\nbasic_card\x18\x08 \x01(\x0b\x32\x34.google.cloud.dialogflow.v2.Intent.Message.BasicCardH\x00\x12M\n\x0bsuggestions\x18\t \x01(\x0b\x32\x36.google.cloud.dialogflow.v2.Intent.Message.SuggestionsH\x00\x12[\n\x13link_out_suggestion\x18\n \x01(\x0b\x32<.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestionH\x00\x12L\n\x0blist_select\x18\x0b \x01(\x0b\x32\x35.google.cloud.dialogflow.v2.Intent.Message.ListSelectH\x00\x12T\n\x0f\x63\x61rousel_select\x18\x0c \x01(\x0b\x32\x39.google.cloud.dialogflow.v2.Intent.Message.CarouselSelectH\x00\x12]\n\x14\x62rowse_carousel_card\x18\x16 \x01(\x0b\x32=.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCardH\x00\x12J\n\ntable_card\x18\x17 \x01(\x0b\x32\x34.google.cloud.dialogflow.v2.Intent.Message.TableCardH\x00\x12P\n\rmedia_content\x18\x18 \x01(\x0b\x32\x37.google.cloud.dialogflow.v2.Intent.Message.MediaContentH\x00\x12J\n\x08platform\x18\x06 \x01(\x0e\x32\x33.google.cloud.dialogflow.v2.Intent.Message.PlatformB\x03\xe0\x41\x01\x1a\x19\n\x04Text\x12\x11\n\x04text\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a@\n\x05Image\x12\x16\n\timage_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12\x61\x63\x63\x65ssibility_text\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a>\n\x0cQuickReplies\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rquick_replies\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\xcb\x01\n\x04\x43\x61rd\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08subtitle\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\timage_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12L\n\x07\x62uttons\x18\x04 \x03(\x0b\x32\x36.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonB\x03\xe0\x41\x01\x1a\x32\n\x06\x42utton\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08postback\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1aQ\n\x0eSimpleResponse\x12\x16\n\x0etext_to_speech\x18\x01 \x01(\t\x12\x0c\n\x04ssml\x18\x02 \x01(\t\x12\x19\n\x0c\x64isplay_text\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1ak\n\x0fSimpleResponses\x12X\n\x10simple_responses\x18\x01 \x03(\x0b\x32\x39.google.cloud.dialogflow.v2.Intent.Message.SimpleResponseB\x03\xe0\x41\x02\x1a\x88\x03\n\tBasicCard\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08subtitle\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\x0e\x66ormatted_text\x18\x03 \x01(\t\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01\x12Q\n\x07\x62uttons\x18\x05 \x03(\x0b\x32;.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonB\x03\xe0\x41\x01\x1a\x9e\x01\n\x06\x42utton\x12\r\n\x05title\x18\x01 \x01(\t\x12g\n\x0fopen_uri_action\x18\x02 \x01(\x0b\x32I.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriActionB\x03\xe0\x41\x02\x1a\x1c\n\rOpenUriAction\x12\x0b\n\x03uri\x18\x01 \x01(\t\x1a \n\nSuggestion\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a^\n\x0bSuggestions\x12O\n\x0bsuggestions\x18\x01 \x03(\x0b\x32\x35.google.cloud.dialogflow.v2.Intent.Message.SuggestionB\x03\xe0\x41\x02\x1a\x44\n\x11LinkOutSuggestion\x12\x1d\n\x10\x64\x65stination_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\xd2\x02\n\nListSelect\x12\x12\n\x05title\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12N\n\x05items\x18\x02 \x03(\x0b\x32:.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemB\x03\xe0\x41\x02\x12\x15\n\x08subtitle\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\xc8\x01\n\x04Item\x12L\n\x04info\x18\x01 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoB\x03\xe0\x41\x02\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01\x1a\xaf\x02\n\x0e\x43\x61rouselSelect\x12R\n\x05items\x18\x01 \x03(\x0b\x32>.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.ItemB\x03\xe0\x41\x02\x1a\xc8\x01\n\x04Item\x12L\n\x04info\x18\x01 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoB\x03\xe0\x41\x02\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01\x1a\x39\n\x0eSelectItemInfo\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08synonyms\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a\x8e\x04\n\x0cMediaContent\x12\x62\n\nmedia_type\x18\x01 \x01(\x0e\x32I.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaTypeB\x03\xe0\x41\x01\x12\x62\n\rmedia_objects\x18\x02 \x03(\x0b\x32K.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject\x1a\xf0\x01\n\x13ResponseMediaObject\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12L\n\x0blarge_image\x18\x03 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01H\x00\x12\x45\n\x04icon\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01H\x00\x12\x13\n\x0b\x63ontent_url\x18\x05 \x01(\tB\x07\n\x05image"C\n\x11ResponseMediaType\x12#\n\x1fRESPONSE_MEDIA_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41UDIO\x10\x01\x1a\xff\x06\n\x12\x42rowseCarouselCard\x12\x63\n\x05items\x18\x01 \x03(\x0b\x32T.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem\x12u\n\x15image_display_options\x18\x02 \x01(\x0e\x32Q.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptionsB\x03\xe0\x41\x01\x1a\x94\x04\n\x16\x42rowseCarouselCardItem\x12{\n\x0fopen_uri_action\x18\x01 \x01(\x0b\x32\x62.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction\x12\r\n\x05title\x18\x02 \x01(\t\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01\x12\x13\n\x06\x66ooter\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\xf8\x01\n\rOpenUrlAction\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x8a\x01\n\rurl_type_hint\x18\x03 \x01(\x0e\x32n.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHintB\x03\xe0\x41\x01"M\n\x0bUrlTypeHint\x12\x1d\n\x19URL_TYPE_HINT_UNSPECIFIED\x10\x00\x12\x0e\n\nAMP_ACTION\x10\x01\x12\x0f\n\x0b\x41MP_CONTENT\x10\x02"v\n\x13ImageDisplayOptions\x12%\n!IMAGE_DISPLAY_OPTIONS_UNSPECIFIED\x10\x00\x12\x08\n\x04GRAY\x10\x01\x12\t\n\x05WHITE\x10\x02\x12\x0b\n\x07\x43ROPPED\x10\x03\x12\x16\n\x12\x42LURRED_BACKGROUND\x10\x04\x1a\xf3\x02\n\tTableCard\x12\r\n\x05title\x18\x01 \x01(\t\x12\x15\n\x08subtitle\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x05image\x18\x03 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.ImageB\x03\xe0\x41\x01\x12[\n\x11\x63olumn_properties\x18\x04 \x03(\x0b\x32;.google.cloud.dialogflow.v2.Intent.Message.ColumnPropertiesB\x03\xe0\x41\x01\x12J\n\x04rows\x18\x05 \x03(\x0b\x32\x37.google.cloud.dialogflow.v2.Intent.Message.TableCardRowB\x03\xe0\x41\x01\x12Q\n\x07\x62uttons\x18\x06 \x03(\x0b\x32;.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonB\x03\xe0\x41\x01\x1a\xfa\x01\n\x10\x43olumnProperties\x12\x0e\n\x06header\x18\x01 \x01(\t\x12r\n\x14horizontal_alignment\x18\x02 \x01(\x0e\x32O.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignmentB\x03\xe0\x41\x01"b\n\x13HorizontalAlignment\x12$\n HORIZONTAL_ALIGNMENT_UNSPECIFIED\x10\x00\x12\x0b\n\x07LEADING\x10\x01\x12\n\n\x06\x43\x45NTER\x10\x02\x12\x0c\n\x08TRAILING\x10\x03\x1ax\n\x0cTableCardRow\x12L\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32\x38.google.cloud.dialogflow.v2.Intent.Message.TableCardCellB\x03\xe0\x41\x01\x12\x1a\n\rdivider_after\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x1d\n\rTableCardCell\x12\x0c\n\x04text\x18\x01 \x01(\t"\xa0\x01\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x46\x41\x43\x45\x42OOK\x10\x01\x12\t\n\x05SLACK\x10\x02\x12\x0c\n\x08TELEGRAM\x10\x03\x12\x07\n\x03KIK\x10\x04\x12\t\n\x05SKYPE\x10\x05\x12\x08\n\x04LINE\x10\x06\x12\t\n\x05VIBER\x10\x07\x12\x15\n\x11\x41\x43TIONS_ON_GOOGLE\x10\x08\x12\x13\n\x0fGOOGLE_HANGOUTS\x10\x0b\x42\t\n\x07message\x1aW\n\x12\x46ollowupIntentInfo\x12\x1c\n\x14\x66ollowup_intent_name\x18\x01 \x01(\t\x12#\n\x1bparent_followup_intent_name\x18\x02 \x01(\t"t\n\x0cWebhookState\x12\x1d\n\x19WEBHOOK_STATE_UNSPECIFIED\x10\x00\x12\x19\n\x15WEBHOOK_STATE_ENABLED\x10\x01\x12*\n&WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING\x10\x02:P\xea\x41M\n dialogflow.googleapis.com/Intent\x12)projects/{project}/agent/intents/{intent}"\xdd\x01\n\x12ListIntentsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 dialogflow.googleapis.com/Intent\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12@\n\x0bintent_view\x18\x03 \x01(\x0e\x32&.google.cloud.dialogflow.v2.IntentViewB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01"c\n\x13ListIntentsResponse\x12\x33\n\x07intents\x18\x01 \x03(\x0b\x32".google.cloud.dialogflow.v2.Intent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xa8\x01\n\x10GetIntentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n dialogflow.googleapis.com/Intent\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12@\n\x0bintent_view\x18\x03 \x01(\x0e\x32&.google.cloud.dialogflow.v2.IntentViewB\x03\xe0\x41\x01"\xe6\x01\n\x13\x43reateIntentRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 dialogflow.googleapis.com/Intent\x12\x37\n\x06intent\x18\x02 \x01(\x0b\x32".google.cloud.dialogflow.v2.IntentB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12@\n\x0bintent_view\x18\x04 \x01(\x0e\x32&.google.cloud.dialogflow.v2.IntentViewB\x03\xe0\x41\x01"\xe2\x01\n\x13UpdateIntentRequest\x12\x37\n\x06intent\x18\x01 \x01(\x0b\x32".google.cloud.dialogflow.v2.IntentB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12@\n\x0bintent_view\x18\x04 \x01(\x0e\x32&.google.cloud.dialogflow.v2.IntentViewB\x03\xe0\x41\x01"M\n\x13\x44\x65leteIntentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n dialogflow.googleapis.com/Intent"\xdd\x02\n\x19\x42\x61tchUpdateIntentsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 dialogflow.googleapis.com/Intent\x12\x1a\n\x10intent_batch_uri\x18\x02 \x01(\tH\x00\x12\x46\n\x13intent_batch_inline\x18\x03 \x01(\x0b\x32\'.google.cloud.dialogflow.v2.IntentBatchH\x00\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12@\n\x0bintent_view\x18\x06 \x01(\x0e\x32&.google.cloud.dialogflow.v2.IntentViewB\x03\xe0\x41\x01\x42\x0e\n\x0cintent_batch"Q\n\x1a\x42\x61tchUpdateIntentsResponse\x12\x33\n\x07intents\x18\x01 \x03(\x0b\x32".google.cloud.dialogflow.v2.Intent"\x8f\x01\n\x19\x42\x61tchDeleteIntentsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 dialogflow.googleapis.com/Intent\x12\x38\n\x07intents\x18\x02 \x03(\x0b\x32".google.cloud.dialogflow.v2.IntentB\x03\xe0\x41\x02"B\n\x0bIntentBatch\x12\x33\n\x07intents\x18\x01 \x03(\x0b\x32".google.cloud.dialogflow.v2.Intent*?\n\nIntentView\x12\x1b\n\x17INTENT_VIEW_UNSPECIFIED\x10\x00\x12\x14\n\x10INTENT_VIEW_FULL\x10\x01\x32\xca\x0c\n\x07Intents\x12\xbd\x01\n\x0bListIntents\x12..google.cloud.dialogflow.v2.ListIntentsRequest\x1a/.google.cloud.dialogflow.v2.ListIntentsResponse"M\x82\xd3\xe4\x93\x02\'\x12%/v2/{parent=projects/*/agent}/intents\xda\x41\x06parent\xda\x41\x14parent,language_code\x12\xa8\x01\n\tGetIntent\x12,.google.cloud.dialogflow.v2.GetIntentRequest\x1a".google.cloud.dialogflow.v2.Intent"I\x82\xd3\xe4\x93\x02\'\x12%/v2/{name=projects/*/agent/intents/*}\xda\x41\x04name\xda\x41\x12name,language_code\x12\xc8\x01\n\x0c\x43reateIntent\x12/.google.cloud.dialogflow.v2.CreateIntentRequest\x1a".google.cloud.dialogflow.v2.Intent"c\x82\xd3\xe4\x93\x02/"%/v2/{parent=projects/*/agent}/intents:\x06intent\xda\x41\rparent,intent\xda\x41\x1bparent,intent,language_code\x12\xdb\x01\n\x0cUpdateIntent\x12/.google.cloud.dialogflow.v2.UpdateIntentRequest\x1a".google.cloud.dialogflow.v2.Intent"v\x82\xd3\xe4\x93\x02\x36\x32,/v2/{intent.name=projects/*/agent/intents/*}:\x06intent\xda\x41\x14intent,language_code\xda\x41 intent,language_code,update_mask\x12\x8d\x01\n\x0c\x44\x65leteIntent\x12/.google.cloud.dialogflow.v2.DeleteIntentRequest\x1a\x16.google.protobuf.Empty"4\x82\xd3\xe4\x93\x02\'*%/v2/{name=projects/*/agent/intents/*}\xda\x41\x04name\x12\xb2\x02\n\x12\x42\x61tchUpdateIntents\x12\x35.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest\x1a\x1d.google.longrunning.Operation"\xc5\x01\x82\xd3\xe4\x93\x02\x36"1/v2/{parent=projects/*/agent}/intents:batchUpdate:\x01*\xda\x41\x17parent,intent_batch_uri\xda\x41\x1aparent,intent_batch_inline\xca\x41O\n5google.cloud.dialogflow.v2.BatchUpdateIntentsResponse\x12\x16google.protobuf.Struct\x12\xeb\x01\n\x12\x42\x61tchDeleteIntents\x12\x35.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest\x1a\x1d.google.longrunning.Operation"\x7f\x82\xd3\xe4\x93\x02\x36"1/v2/{parent=projects/*/agent}/intents:batchDelete:\x01*\xda\x41\x0eparent,intents\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x9a\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x0bIntentProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -65,6 +59,7 @@ full_name="google.cloud.dialogflow.v2.IntentView", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="INTENT_VIEW_UNSPECIFIED", @@ -72,6 +67,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="INTENT_VIEW_FULL", @@ -79,12 +75,13 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=9251, - serialized_end=9314, + serialized_start=9260, + serialized_end=9323, ) _sym_db.RegisterEnumDescriptor(_INTENTVIEW) @@ -98,6 +95,7 @@ full_name="google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="TYPE_UNSPECIFIED", @@ -105,22 +103,29 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="EXAMPLE", index=1, number=1, serialized_options=None, type=None + name="EXAMPLE", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="TEMPLATE", index=2, number=2, - serialized_options=_b("\010\001"), + serialized_options=b"\010\001", type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=1613, - serialized_end=1672, + serialized_start=1618, + serialized_end=1677, ) _sym_db.RegisterEnumDescriptor(_INTENT_TRAININGPHRASE_TYPE) @@ -129,6 +134,7 @@ full_name="google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="RESPONSE_MEDIA_TYPE_UNSPECIFIED", @@ -136,15 +142,21 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="AUDIO", index=1, number=1, serialized_options=None, type=None + name="AUDIO", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=5359, - serialized_end=5426, + serialized_start=5364, + serialized_end=5431, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIATYPE) @@ -153,6 +165,7 @@ full_name="google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="URL_TYPE_HINT_UNSPECIFIED", @@ -160,18 +173,29 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="AMP_ACTION", index=1, number=1, serialized_options=None, type=None + name="AMP_ACTION", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="AMP_CONTENT", index=2, number=2, serialized_options=None, type=None + name="AMP_CONTENT", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=6127, - serialized_end=6204, + serialized_start=6132, + serialized_end=6209, ) _sym_db.RegisterEnumDescriptor( _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION_URLTYPEHINT @@ -182,6 +206,7 @@ full_name="google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="IMAGE_DISPLAY_OPTIONS_UNSPECIFIED", @@ -189,15 +214,31 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="GRAY", index=1, number=1, serialized_options=None, type=None + name="GRAY", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="WHITE", index=2, number=2, serialized_options=None, type=None + name="WHITE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CROPPED", index=3, number=3, serialized_options=None, type=None + name="CROPPED", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="BLURRED_BACKGROUND", @@ -205,12 +246,13 @@ number=4, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=6206, - serialized_end=6324, + serialized_start=6211, + serialized_end=6329, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_BROWSECAROUSELCARD_IMAGEDISPLAYOPTIONS) @@ -219,6 +261,7 @@ full_name="google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="HORIZONTAL_ALIGNMENT_UNSPECIFIED", @@ -226,21 +269,37 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LEADING", index=1, number=1, serialized_options=None, type=None + name="LEADING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CENTER", index=2, number=2, serialized_options=None, type=None + name="CENTER", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TRAILING", index=3, number=3, serialized_options=None, type=None + name="TRAILING", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=6853, - serialized_end=6951, + serialized_start=6858, + serialized_end=6956, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_COLUMNPROPERTIES_HORIZONTALALIGNMENT) @@ -249,6 +308,7 @@ full_name="google.cloud.dialogflow.v2.Intent.Message.Platform", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="PLATFORM_UNSPECIFIED", @@ -256,27 +316,63 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FACEBOOK", index=1, number=1, serialized_options=None, type=None + name="FACEBOOK", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SLACK", index=2, number=2, serialized_options=None, type=None + name="SLACK", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TELEGRAM", index=3, number=3, serialized_options=None, type=None + name="TELEGRAM", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="KIK", index=4, number=4, serialized_options=None, type=None + name="KIK", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SKYPE", index=5, number=5, serialized_options=None, type=None + name="SKYPE", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LINE", index=6, number=6, serialized_options=None, type=None + name="LINE", + index=6, + number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="VIBER", index=7, number=7, serialized_options=None, type=None + name="VIBER", + index=7, + number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="ACTIONS_ON_GOOGLE", @@ -284,6 +380,7 @@ number=8, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="GOOGLE_HANGOUTS", @@ -291,12 +388,13 @@ number=11, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=7107, - serialized_end=7267, + serialized_start=7112, + serialized_end=7272, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_PLATFORM) @@ -305,6 +403,7 @@ full_name="google.cloud.dialogflow.v2.Intent.WebhookState", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="WEBHOOK_STATE_UNSPECIFIED", @@ -312,6 +411,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="WEBHOOK_STATE_ENABLED", @@ -319,6 +419,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING", @@ -326,12 +427,13 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=7369, - serialized_end=7485, + serialized_start=7374, + serialized_end=7490, ) _sym_db.RegisterEnumDescriptor(_INTENT_WEBHOOKSTATE) @@ -342,6 +444,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -352,7 +455,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -360,6 +463,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_type", @@ -370,14 +474,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="alias", @@ -388,14 +493,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="user_defined", @@ -412,8 +518,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -424,8 +531,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1518, - serialized_end=1611, + serialized_start=1523, + serialized_end=1616, ) _INTENT_TRAININGPHRASE = _descriptor.Descriptor( @@ -434,6 +541,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -444,7 +552,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -452,6 +560,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="type", @@ -468,8 +577,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parts", @@ -486,8 +596,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="times_added_count", @@ -504,8 +615,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -516,8 +628,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1303, - serialized_end=1672, + serialized_start=1308, + serialized_end=1677, ) _INTENT_PARAMETER = _descriptor.Descriptor( @@ -526,6 +638,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -536,7 +649,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -544,6 +657,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -554,7 +668,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -562,6 +676,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -572,14 +687,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="default_value", @@ -590,14 +706,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_type_display_name", @@ -608,14 +725,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="mandatory", @@ -632,8 +750,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="prompts", @@ -650,8 +769,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="is_list", @@ -668,8 +788,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -680,8 +801,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1675, - serialized_end=1877, + serialized_start=1680, + serialized_end=1882, ) _INTENT_MESSAGE_TEXT = _descriptor.Descriptor( @@ -690,6 +811,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -706,8 +828,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -718,8 +841,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3043, - serialized_end=3068, + serialized_start=3048, + serialized_end=3073, ) _INTENT_MESSAGE_IMAGE = _descriptor.Descriptor( @@ -728,6 +851,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="image_uri", @@ -738,14 +862,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="accessibility_text", @@ -756,14 +881,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -774,8 +900,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3070, - serialized_end=3134, + serialized_start=3075, + serialized_end=3139, ) _INTENT_MESSAGE_QUICKREPLIES = _descriptor.Descriptor( @@ -784,6 +910,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -794,14 +921,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="quick_replies", @@ -818,8 +946,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -830,8 +959,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3136, - serialized_end=3198, + serialized_start=3141, + serialized_end=3203, ) _INTENT_MESSAGE_CARD_BUTTON = _descriptor.Descriptor( @@ -840,6 +969,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -850,14 +980,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="postback", @@ -868,14 +999,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -886,8 +1018,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3354, - serialized_end=3404, + serialized_start=3359, + serialized_end=3409, ) _INTENT_MESSAGE_CARD = _descriptor.Descriptor( @@ -896,6 +1028,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -906,14 +1039,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="subtitle", @@ -924,14 +1058,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_uri", @@ -942,14 +1077,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="buttons", @@ -966,8 +1102,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -978,8 +1115,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3201, - serialized_end=3404, + serialized_start=3206, + serialized_end=3409, ) _INTENT_MESSAGE_SIMPLERESPONSE = _descriptor.Descriptor( @@ -988,6 +1125,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text_to_speech", @@ -998,7 +1136,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1006,6 +1144,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="ssml", @@ -1016,7 +1155,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1024,6 +1163,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_text", @@ -1034,14 +1174,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1052,8 +1193,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3406, - serialized_end=3487, + serialized_start=3411, + serialized_end=3492, ) _INTENT_MESSAGE_SIMPLERESPONSES = _descriptor.Descriptor( @@ -1062,6 +1203,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="simple_responses", @@ -1078,8 +1220,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1090,8 +1233,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3489, - serialized_end=3596, + serialized_start=3494, + serialized_end=3601, ) _INTENT_MESSAGE_BASICCARD_BUTTON_OPENURIACTION = _descriptor.Descriptor( @@ -1100,6 +1243,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -1110,7 +1254,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1118,6 +1262,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1128,8 +1273,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3963, - serialized_end=3991, + serialized_start=3968, + serialized_end=3996, ) _INTENT_MESSAGE_BASICCARD_BUTTON = _descriptor.Descriptor( @@ -1138,6 +1283,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -1148,7 +1294,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1156,6 +1302,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="open_uri_action", @@ -1172,8 +1319,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1184,8 +1332,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3833, - serialized_end=3991, + serialized_start=3838, + serialized_end=3996, ) _INTENT_MESSAGE_BASICCARD = _descriptor.Descriptor( @@ -1194,6 +1342,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -1204,14 +1353,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="subtitle", @@ -1222,14 +1372,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="formatted_text", @@ -1240,7 +1391,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1248,6 +1399,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -1264,8 +1416,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="buttons", @@ -1282,8 +1435,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1294,8 +1448,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3599, - serialized_end=3991, + serialized_start=3604, + serialized_end=3996, ) _INTENT_MESSAGE_SUGGESTION = _descriptor.Descriptor( @@ -1304,6 +1458,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -1314,14 +1469,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1332,8 +1488,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3993, - serialized_end=4025, + serialized_start=3998, + serialized_end=4030, ) _INTENT_MESSAGE_SUGGESTIONS = _descriptor.Descriptor( @@ -1342,6 +1498,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="suggestions", @@ -1358,8 +1515,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1370,8 +1528,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4027, - serialized_end=4121, + serialized_start=4032, + serialized_end=4126, ) _INTENT_MESSAGE_LINKOUTSUGGESTION = _descriptor.Descriptor( @@ -1380,6 +1538,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="destination_name", @@ -1390,14 +1549,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="uri", @@ -1408,14 +1568,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1426,8 +1587,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4123, - serialized_end=4191, + serialized_start=4128, + serialized_end=4196, ) _INTENT_MESSAGE_LISTSELECT_ITEM = _descriptor.Descriptor( @@ -1436,6 +1597,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="info", @@ -1452,8 +1614,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="title", @@ -1464,14 +1627,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -1482,14 +1646,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -1506,8 +1671,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1518,8 +1684,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4332, - serialized_end=4532, + serialized_start=4337, + serialized_end=4537, ) _INTENT_MESSAGE_LISTSELECT = _descriptor.Descriptor( @@ -1528,6 +1694,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -1538,14 +1705,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="items", @@ -1562,8 +1730,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="subtitle", @@ -1574,14 +1743,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1592,8 +1762,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4194, - serialized_end=4532, + serialized_start=4199, + serialized_end=4537, ) _INTENT_MESSAGE_CAROUSELSELECT_ITEM = _descriptor.Descriptor( @@ -1602,6 +1772,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="info", @@ -1618,8 +1789,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="title", @@ -1630,14 +1802,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -1648,14 +1821,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -1672,8 +1846,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1684,8 +1859,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4332, - serialized_end=4532, + serialized_start=4337, + serialized_end=4537, ) _INTENT_MESSAGE_CAROUSELSELECT = _descriptor.Descriptor( @@ -1694,6 +1869,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="items", @@ -1710,8 +1886,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1722,8 +1899,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4535, - serialized_end=4838, + serialized_start=4540, + serialized_end=4843, ) _INTENT_MESSAGE_SELECTITEMINFO = _descriptor.Descriptor( @@ -1732,6 +1909,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -1742,14 +1920,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="synonyms", @@ -1766,8 +1945,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1778,8 +1958,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4840, - serialized_end=4897, + serialized_start=4845, + serialized_end=4902, ) _INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT = _descriptor.Descriptor( @@ -1788,6 +1968,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1798,7 +1979,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1806,6 +1987,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -1816,14 +1998,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="large_image", @@ -1840,8 +2023,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="icon", @@ -1858,8 +2042,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="content_url", @@ -1870,7 +2055,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1878,6 +2063,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1893,11 +2079,12 @@ full_name="google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject.image", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=5117, - serialized_end=5357, + serialized_start=5122, + serialized_end=5362, ) _INTENT_MESSAGE_MEDIACONTENT = _descriptor.Descriptor( @@ -1906,6 +2093,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="media_type", @@ -1922,8 +2110,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="media_objects", @@ -1942,6 +2131,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1952,8 +2142,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4900, - serialized_end=5426, + serialized_start=4905, + serialized_end=5431, ) _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION = _descriptor.Descriptor( @@ -1962,6 +2152,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="url", @@ -1972,7 +2163,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1980,6 +2171,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="url_type_hint", @@ -1996,8 +2188,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2010,8 +2203,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5956, - serialized_end=6204, + serialized_start=5961, + serialized_end=6209, ) _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM = _descriptor.Descriptor( @@ -2020,6 +2213,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="open_uri_action", @@ -2038,6 +2232,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="title", @@ -2048,7 +2243,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2056,6 +2251,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -2066,14 +2262,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -2090,8 +2287,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="footer", @@ -2102,14 +2300,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2122,8 +2321,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5672, - serialized_end=6204, + serialized_start=5677, + serialized_end=6209, ) _INTENT_MESSAGE_BROWSECAROUSELCARD = _descriptor.Descriptor( @@ -2132,6 +2331,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="items", @@ -2150,6 +2350,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_display_options", @@ -2166,8 +2367,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2178,8 +2380,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5429, - serialized_end=6324, + serialized_start=5434, + serialized_end=6329, ) _INTENT_MESSAGE_TABLECARD = _descriptor.Descriptor( @@ -2188,6 +2390,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -2198,7 +2401,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2206,6 +2409,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="subtitle", @@ -2216,14 +2420,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -2240,8 +2445,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="column_properties", @@ -2258,8 +2464,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="rows", @@ -2276,8 +2483,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="buttons", @@ -2294,8 +2502,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2306,8 +2515,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6327, - serialized_end=6698, + serialized_start=6332, + serialized_end=6703, ) _INTENT_MESSAGE_COLUMNPROPERTIES = _descriptor.Descriptor( @@ -2316,6 +2525,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="header", @@ -2326,7 +2536,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2334,6 +2544,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="horizontal_alignment", @@ -2350,8 +2561,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2362,8 +2574,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6701, - serialized_end=6951, + serialized_start=6706, + serialized_end=6956, ) _INTENT_MESSAGE_TABLECARDROW = _descriptor.Descriptor( @@ -2372,6 +2584,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="cells", @@ -2388,8 +2601,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="divider_after", @@ -2406,8 +2620,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2418,8 +2633,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6953, - serialized_end=7073, + serialized_start=6958, + serialized_end=7078, ) _INTENT_MESSAGE_TABLECARDCELL = _descriptor.Descriptor( @@ -2428,6 +2643,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -2438,7 +2654,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2446,6 +2662,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -2456,8 +2673,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7075, - serialized_end=7104, + serialized_start=7080, + serialized_end=7109, ) _INTENT_MESSAGE = _descriptor.Descriptor( @@ -2466,6 +2683,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -2484,6 +2702,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -2502,6 +2721,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="quick_replies", @@ -2520,6 +2740,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="card", @@ -2538,6 +2759,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="payload", @@ -2556,6 +2778,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="simple_responses", @@ -2574,6 +2797,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="basic_card", @@ -2592,6 +2816,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="suggestions", @@ -2610,6 +2835,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="link_out_suggestion", @@ -2628,6 +2854,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="list_select", @@ -2646,6 +2873,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="carousel_select", @@ -2664,6 +2892,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="browse_carousel_card", @@ -2682,6 +2911,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="table_card", @@ -2700,6 +2930,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="media_content", @@ -2718,6 +2949,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="platform", @@ -2734,8 +2966,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2771,11 +3004,12 @@ full_name="google.cloud.dialogflow.v2.Intent.Message.message", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=1880, - serialized_end=7278, + serialized_start=1885, + serialized_end=7283, ) _INTENT_FOLLOWUPINTENTINFO = _descriptor.Descriptor( @@ -2784,6 +3018,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="followup_intent_name", @@ -2794,7 +3029,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2802,6 +3037,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parent_followup_intent_name", @@ -2812,7 +3048,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2820,6 +3056,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2830,8 +3067,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7280, - serialized_end=7367, + serialized_start=7285, + serialized_end=7372, ) _INTENT = _descriptor.Descriptor( @@ -2840,6 +3077,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -2850,14 +3088,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -2868,14 +3107,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="webhook_state", @@ -2892,8 +3132,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="priority", @@ -2910,8 +3151,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="is_fallback", @@ -2928,8 +3170,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="ml_disabled", @@ -2946,8 +3189,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_context_names", @@ -2964,8 +3208,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="events", @@ -2982,8 +3227,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="training_phrases", @@ -3000,8 +3246,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="action", @@ -3012,14 +3259,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_contexts", @@ -3036,8 +3284,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="reset_contexts", @@ -3054,8 +3303,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parameters", @@ -3072,8 +3322,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="messages", @@ -3090,8 +3341,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="default_response_platforms", @@ -3108,8 +3360,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="root_followup_intent_name", @@ -3120,7 +3373,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3128,6 +3381,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parent_followup_intent_name", @@ -3138,7 +3392,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3146,6 +3400,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="followup_intent_info", @@ -3164,6 +3419,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3174,15 +3430,13 @@ _INTENT_FOLLOWUPINTENTINFO, ], enum_types=[_INTENT_WEBHOOKSTATE], - serialized_options=_b( - "\352AM\n dialogflow.googleapis.com/Intent\022)projects/{project}/agent/intents/{intent}" - ), + serialized_options=b"\352AM\n dialogflow.googleapis.com/Intent\022)projects/{project}/agent/intents/{intent}", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], serialized_start=456, - serialized_end=7567, + serialized_end=7572, ) @@ -3192,6 +3446,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -3202,16 +3457,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" - ), + serialized_options=b'\340A\002\372A"\022 dialogflow.googleapis.com/Intent', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -3222,14 +3476,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_view", @@ -3246,8 +3501,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -3264,8 +3520,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -3276,14 +3533,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3294,8 +3552,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7570, - serialized_end=7790, + serialized_start=7575, + serialized_end=7796, ) @@ -3305,6 +3563,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="intents", @@ -3323,6 +3582,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -3333,7 +3593,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3341,6 +3601,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3351,8 +3612,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7792, - serialized_end=7891, + serialized_start=7798, + serialized_end=7897, ) @@ -3362,6 +3623,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -3372,14 +3634,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b('\340A\002\372A"\n dialogflow.googleapis.com/Intent'), + serialized_options=b'\340A\002\372A"\n dialogflow.googleapis.com/Intent', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -3390,14 +3653,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_view", @@ -3414,8 +3678,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3426,8 +3691,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7894, - serialized_end=8062, + serialized_start=7900, + serialized_end=8068, ) @@ -3437,6 +3702,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -3447,16 +3713,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" - ), + serialized_options=b'\340A\002\372A"\022 dialogflow.googleapis.com/Intent', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent", @@ -3473,8 +3738,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -3485,14 +3751,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_view", @@ -3509,8 +3776,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3521,8 +3789,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8065, - serialized_end=8294, + serialized_start=8071, + serialized_end=8301, ) @@ -3532,6 +3800,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="intent", @@ -3548,8 +3817,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -3560,14 +3830,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -3584,8 +3855,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_view", @@ -3602,8 +3874,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3614,8 +3887,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8297, - serialized_end=8523, + serialized_start=8304, + serialized_end=8530, ) @@ -3625,6 +3898,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -3635,14 +3909,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b('\340A\002\372A"\n dialogflow.googleapis.com/Intent'), + serialized_options=b'\340A\002\372A"\n dialogflow.googleapis.com/Intent', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -3653,8 +3928,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8525, - serialized_end=8602, + serialized_start=8532, + serialized_end=8609, ) @@ -3664,6 +3939,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -3674,16 +3950,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" - ), + serialized_options=b'\340A\002\372A"\022 dialogflow.googleapis.com/Intent', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_batch_uri", @@ -3694,7 +3969,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3702,6 +3977,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_batch_inline", @@ -3720,6 +3996,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -3730,14 +4007,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -3754,8 +4032,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_view", @@ -3772,8 +4051,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3789,11 +4069,12 @@ full_name="google.cloud.dialogflow.v2.BatchUpdateIntentsRequest.intent_batch", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=8605, - serialized_end=8953, + serialized_start=8612, + serialized_end=8961, ) @@ -3803,6 +4084,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="intents", @@ -3821,6 +4103,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -3831,8 +4114,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8955, - serialized_end=9036, + serialized_start=8963, + serialized_end=9044, ) @@ -3842,6 +4125,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -3852,16 +4136,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" - ), + serialized_options=b'\340A\002\372A"\022 dialogflow.googleapis.com/Intent', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intents", @@ -3878,8 +4161,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3890,8 +4174,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=9039, - serialized_end=9181, + serialized_start=9047, + serialized_end=9190, ) @@ -3901,6 +4185,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="intents", @@ -3919,6 +4204,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -3929,8 +4215,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=9183, - serialized_end=9249, + serialized_start=9192, + serialized_end=9258, ) _INTENT_TRAININGPHRASE_PART.containing_type = _INTENT_TRAININGPHRASE @@ -4266,19 +4552,18 @@ Intent = _reflection.GeneratedProtocolMessageType( "Intent", (_message.Message,), - dict( - TrainingPhrase=_reflection.GeneratedProtocolMessageType( + { + "TrainingPhrase": _reflection.GeneratedProtocolMessageType( "TrainingPhrase", (_message.Message,), - dict( - Part=_reflection.GeneratedProtocolMessageType( + { + "Part": _reflection.GeneratedProtocolMessageType( "Part", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_TRAININGPHRASE_PART, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Represents a part of a training phrase. - + { + "DESCRIPTOR": _INTENT_TRAININGPHRASE_PART, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Represents a part of a training phrase. Attributes: text: @@ -4297,12 +4582,11 @@ with the API, you must set this to true. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part) - ), + }, ), - DESCRIPTOR=_INTENT_TRAININGPHRASE, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Represents an example that the agent is trained on. - + "DESCRIPTOR": _INTENT_TRAININGPHRASE, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Represents an example that the agent is trained on. Attributes: name: @@ -4332,16 +4616,15 @@ editing an intent or training, this counter is increased. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.TrainingPhrase) - ), + }, ), - Parameter=_reflection.GeneratedProtocolMessageType( + "Parameter": _reflection.GeneratedProtocolMessageType( "Parameter", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_PARAMETER, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Represents intent parameters. - + { + "DESCRIPTOR": _INTENT_PARAMETER, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Represents intent parameters. Attributes: name: @@ -4349,11 +4632,11 @@ display_name: Required. The name of the parameter. value: - Optional. The definition of the parameter value. It can be: - - a constant string, - a parameter value defined as - ``$parameter_name``, - an original parameter value defined as - ``$parameter_name.original``, - a parameter value from some - context defined as ``#context_name.parameter_name``. + Optional. The definition of the parameter value. It can be: - + a constant string, - a parameter value defined as + ``$parameter_name``, - an original parameter value defined as + ``$parameter_name.original``, - a parameter value from some + context defined as ``#context_name.parameter_name``. default_value: Optional. The default value to use when the ``value`` yields an empty result. Default values can be extracted from contexts @@ -4375,36 +4658,34 @@ values. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Parameter) - ), + }, ), - Message=_reflection.GeneratedProtocolMessageType( + "Message": _reflection.GeneratedProtocolMessageType( "Message", (_message.Message,), - dict( - Text=_reflection.GeneratedProtocolMessageType( + { + "Text": _reflection.GeneratedProtocolMessageType( "Text", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_TEXT, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The text response message. - + { + "DESCRIPTOR": _INTENT_MESSAGE_TEXT, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The text response message. Attributes: text: - Optional. The collection of the agent's responses. + Optional. The collection of the agent’s responses. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Text) - ), + }, ), - Image=_reflection.GeneratedProtocolMessageType( + "Image": _reflection.GeneratedProtocolMessageType( "Image", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_IMAGE, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The image response message. - + { + "DESCRIPTOR": _INTENT_MESSAGE_IMAGE, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The image response message. Attributes: image_uri: @@ -4414,16 +4695,15 @@ accessibility, e.g., screen readers. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Image) - ), + }, ), - QuickReplies=_reflection.GeneratedProtocolMessageType( + "QuickReplies": _reflection.GeneratedProtocolMessageType( "QuickReplies", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_QUICKREPLIES, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The quick replies response message. - + { + "DESCRIPTOR": _INTENT_MESSAGE_QUICKREPLIES, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The quick replies response message. Attributes: title: @@ -4432,20 +4712,19 @@ Optional. The collection of quick replies. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.QuickReplies) - ), + }, ), - Card=_reflection.GeneratedProtocolMessageType( + "Card": _reflection.GeneratedProtocolMessageType( "Card", (_message.Message,), - dict( - Button=_reflection.GeneratedProtocolMessageType( + { + "Button": _reflection.GeneratedProtocolMessageType( "Button", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_CARD_BUTTON, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Contains information about a button. - + { + "DESCRIPTOR": _INTENT_MESSAGE_CARD_BUTTON, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Contains information about a button. Attributes: text: @@ -4455,12 +4734,11 @@ to open. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Card.Button) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_CARD, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The card response message. - + "DESCRIPTOR": _INTENT_MESSAGE_CARD, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The card response message. Attributes: title: @@ -4473,78 +4751,74 @@ Optional. The collection of card buttons. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Card) - ), + }, ), - SimpleResponse=_reflection.GeneratedProtocolMessageType( + "SimpleResponse": _reflection.GeneratedProtocolMessageType( "SimpleResponse", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_SIMPLERESPONSE, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The simple response message containing speech or text. - + { + "DESCRIPTOR": _INTENT_MESSAGE_SIMPLERESPONSE, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The simple response message containing speech or text. Attributes: text_to_speech: - One of text\_to\_speech or ssml must be provided. The plain - text of the speech output. Mutually exclusive with ssml. + One of text_to_speech or ssml must be provided. The plain text + of the speech output. Mutually exclusive with ssml. ssml: - One of text\_to\_speech or ssml must be provided. Structured + One of text_to_speech or ssml must be provided. Structured spoken response to the user in the SSML format. Mutually - exclusive with text\_to\_speech. + exclusive with text_to_speech. display_text: Optional. The text to display. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.SimpleResponse) - ), + }, ), - SimpleResponses=_reflection.GeneratedProtocolMessageType( + "SimpleResponses": _reflection.GeneratedProtocolMessageType( "SimpleResponses", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_SIMPLERESPONSES, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The collection of simple response candidates. This message - in ``QueryResult.fulfillment_messages`` and + { + "DESCRIPTOR": _INTENT_MESSAGE_SIMPLERESPONSES, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The collection of simple response candidates. This message in + ``QueryResult.fulfillment_messages`` and ``WebhookResponse.fulfillment_messages`` should contain only one ``SimpleResponse``. - Attributes: simple_responses: Required. The list of simple responses. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) - ), + }, ), - BasicCard=_reflection.GeneratedProtocolMessageType( + "BasicCard": _reflection.GeneratedProtocolMessageType( "BasicCard", (_message.Message,), - dict( - Button=_reflection.GeneratedProtocolMessageType( + { + "Button": _reflection.GeneratedProtocolMessageType( "Button", (_message.Message,), - dict( - OpenUriAction=_reflection.GeneratedProtocolMessageType( + { + "OpenUriAction": _reflection.GeneratedProtocolMessageType( "OpenUriAction", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_BASICCARD_BUTTON_OPENURIACTION, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Opens the given URI. - + { + "DESCRIPTOR": _INTENT_MESSAGE_BASICCARD_BUTTON_OPENURIACTION, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Opens the given URI. Attributes: uri: Required. The HTTP or HTTPS scheme URI. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_BASICCARD_BUTTON, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The button object that appears at the bottom of a card. - + "DESCRIPTOR": _INTENT_MESSAGE_BASICCARD_BUTTON, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The button object that appears at the bottom of a card. Attributes: title: @@ -4553,12 +4827,11 @@ Required. Action to take when a user taps on the button. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_BASICCARD, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The basic card message. Useful for displaying information. - + "DESCRIPTOR": _INTENT_MESSAGE_BASICCARD, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The basic card message. Useful for displaying information. Attributes: title: @@ -4573,50 +4846,47 @@ Optional. The collection of card buttons. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.BasicCard) - ), + }, ), - Suggestion=_reflection.GeneratedProtocolMessageType( + "Suggestion": _reflection.GeneratedProtocolMessageType( "Suggestion", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_SUGGESTION, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The suggestion chip message that the user can tap to - quickly post a reply to the conversation. - + { + "DESCRIPTOR": _INTENT_MESSAGE_SUGGESTION, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The suggestion chip message that the user can tap to quickly post a + reply to the conversation. Attributes: title: Required. The text shown the in the suggestion chip. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Suggestion) - ), + }, ), - Suggestions=_reflection.GeneratedProtocolMessageType( + "Suggestions": _reflection.GeneratedProtocolMessageType( "Suggestions", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_SUGGESTIONS, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The collection of suggestions. - + { + "DESCRIPTOR": _INTENT_MESSAGE_SUGGESTIONS, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The collection of suggestions. Attributes: suggestions: Required. The list of suggested replies. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Suggestions) - ), + }, ), - LinkOutSuggestion=_reflection.GeneratedProtocolMessageType( + "LinkOutSuggestion": _reflection.GeneratedProtocolMessageType( "LinkOutSuggestion", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_LINKOUTSUGGESTION, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The suggestion chip message that allows the user to jump - out to the app or website associated with this agent. - + { + "DESCRIPTOR": _INTENT_MESSAGE_LINKOUTSUGGESTION, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The suggestion chip message that allows the user to jump out to the + app or website associated with this agent. Attributes: destination_name: @@ -4626,20 +4896,19 @@ taps the suggestion chip. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) - ), + }, ), - ListSelect=_reflection.GeneratedProtocolMessageType( + "ListSelect": _reflection.GeneratedProtocolMessageType( "ListSelect", (_message.Message,), - dict( - Item=_reflection.GeneratedProtocolMessageType( + { + "Item": _reflection.GeneratedProtocolMessageType( "Item", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_LISTSELECT_ITEM, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""An item in the list. - + { + "DESCRIPTOR": _INTENT_MESSAGE_LISTSELECT_ITEM, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """An item in the list. Attributes: info: @@ -4652,12 +4921,11 @@ Optional. The image to display. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_LISTSELECT, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The card for presenting a list of options to select from. - + "DESCRIPTOR": _INTENT_MESSAGE_LISTSELECT, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The card for presenting a list of options to select from. Attributes: title: @@ -4668,20 +4936,19 @@ Optional. Subtitle of the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.ListSelect) - ), + }, ), - CarouselSelect=_reflection.GeneratedProtocolMessageType( + "CarouselSelect": _reflection.GeneratedProtocolMessageType( "CarouselSelect", (_message.Message,), - dict( - Item=_reflection.GeneratedProtocolMessageType( + { + "Item": _reflection.GeneratedProtocolMessageType( "Item", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_CAROUSELSELECT_ITEM, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""An item in the carousel. - + { + "DESCRIPTOR": _INTENT_MESSAGE_CAROUSELSELECT_ITEM, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """An item in the carousel. Attributes: info: @@ -4694,30 +4961,27 @@ Optional. The image to display. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_CAROUSELSELECT, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The card for presenting a carousel of options to select - from. - + "DESCRIPTOR": _INTENT_MESSAGE_CAROUSELSELECT, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The card for presenting a carousel of options to select from. Attributes: items: Required. Carousel items. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) - ), + }, ), - SelectItemInfo=_reflection.GeneratedProtocolMessageType( + "SelectItemInfo": _reflection.GeneratedProtocolMessageType( "SelectItemInfo", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_SELECTITEMINFO, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Additional info about the select item for when it is - triggered in a dialog. - + { + "DESCRIPTOR": _INTENT_MESSAGE_SELECTITEMINFO, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Additional info about the select item for when it is triggered in a + dialog. Attributes: key: @@ -4728,20 +4992,19 @@ this item in dialog. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo) - ), + }, ), - MediaContent=_reflection.GeneratedProtocolMessageType( + "MediaContent": _reflection.GeneratedProtocolMessageType( "MediaContent", (_message.Message,), - dict( - ResponseMediaObject=_reflection.GeneratedProtocolMessageType( + { + "ResponseMediaObject": _reflection.GeneratedProtocolMessageType( "ResponseMediaObject", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Response media object for media content card. - + { + "DESCRIPTOR": _INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Response media object for media content card. Attributes: name: @@ -4758,38 +5021,36 @@ Required. Url where the media is stored. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_MEDIACONTENT, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The media content card for Actions on Google. - + "DESCRIPTOR": _INTENT_MESSAGE_MEDIACONTENT, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The media content card for Actions on Google. Attributes: media_type: - Optional. What type of media is the content (ie "audio"). + Optional. What type of media is the content (ie “audio”). media_objects: Required. List of media objects. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.MediaContent) - ), + }, ), - BrowseCarouselCard=_reflection.GeneratedProtocolMessageType( + "BrowseCarouselCard": _reflection.GeneratedProtocolMessageType( "BrowseCarouselCard", (_message.Message,), - dict( - BrowseCarouselCardItem=_reflection.GeneratedProtocolMessageType( + { + "BrowseCarouselCardItem": _reflection.GeneratedProtocolMessageType( "BrowseCarouselCardItem", (_message.Message,), - dict( - OpenUrlAction=_reflection.GeneratedProtocolMessageType( + { + "OpenUrlAction": _reflection.GeneratedProtocolMessageType( "OpenUrlAction", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Actions on Google action to open a given url. - + { + "DESCRIPTOR": _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Actions on Google action to open a given url. Attributes: url: @@ -4799,12 +5060,11 @@ opening the URL. Defaults to opening via web browser. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Browsing carousel tile - + "DESCRIPTOR": _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Browsing carousel tile Attributes: open_uri_action: @@ -4822,13 +5082,12 @@ Carousel Card. Maximum of one line of text. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_BROWSECAROUSELCARD, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Browse Carousel Card for Actions on Google. - https://developers.google.com/actions/assistant/responses#browsing\_carousel - + "DESCRIPTOR": _INTENT_MESSAGE_BROWSECAROUSELCARD, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Browse Carousel Card for Actions on Google. https://developers.google. + com/actions/assistant/responses#browsing_carousel Attributes: items: @@ -4840,16 +5099,15 @@ wseCarouselCard.items]. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard) - ), + }, ), - TableCard=_reflection.GeneratedProtocolMessageType( + "TableCard": _reflection.GeneratedProtocolMessageType( "TableCard", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_TABLECARD, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Table card for Actions on Google. - + { + "DESCRIPTOR": _INTENT_MESSAGE_TABLECARD, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Table card for Actions on Google. Attributes: title: @@ -4866,18 +5124,17 @@ Optional. List of buttons for the card. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.TableCard) - ), + }, ), - ColumnProperties=_reflection.GeneratedProtocolMessageType( + "ColumnProperties": _reflection.GeneratedProtocolMessageType( "ColumnProperties", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_COLUMNPROPERTIES, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Column properties for + { + "DESCRIPTOR": _INTENT_MESSAGE_COLUMNPROPERTIES, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Column properties for [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard]. - Attributes: header: Required. Column heading. @@ -4885,18 +5142,17 @@ Optional. Defines text alignment for all cells in this column. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.ColumnProperties) - ), + }, ), - TableCardRow=_reflection.GeneratedProtocolMessageType( + "TableCardRow": _reflection.GeneratedProtocolMessageType( "TableCardRow", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_TABLECARDROW, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Row of + { + "DESCRIPTOR": _INTENT_MESSAGE_TABLECARDROW, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Row of [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard]. - Attributes: cells: Optional. List of cells that make up this row. @@ -4904,30 +5160,30 @@ Optional. Whether to add a visual divider after this row. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.TableCardRow) - ), + }, ), - TableCardCell=_reflection.GeneratedProtocolMessageType( + "TableCardCell": _reflection.GeneratedProtocolMessageType( "TableCardCell", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_TABLECARDCELL, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Cell of - [TableCardRow][google.cloud.dialogflow.v2.Intent.Message.TableCardRow]. - + { + "DESCRIPTOR": _INTENT_MESSAGE_TABLECARDCELL, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Cell of [TableCardRow][google.cloud.dialogflow.v2.Intent.Message.Table + CardRow]. Attributes: text: Required. Text in this cell. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.TableCardCell) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Corresponds to the ``Response`` field in the Dialogflow - console. - + "DESCRIPTOR": _INTENT_MESSAGE, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """A rich response message. Corresponds to the intent ``Response`` field + in the Dialogflow console. For more information, see `Rich response + messages `__. Attributes: message: @@ -4941,10 +5197,7 @@ card: The card response. payload: - Returns a response containing a custom, platform-specific - payload. See the Intent.Message.Platform type for a - description of the structure that may be required for your - platform. + A custom platform-specific response. simple_responses: The voice and text-only responses for Actions on Google. basic_card: @@ -4967,42 +5220,45 @@ Optional. The platform that this message is intended for. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message) - ), + }, ), - FollowupIntentInfo=_reflection.GeneratedProtocolMessageType( + "FollowupIntentInfo": _reflection.GeneratedProtocolMessageType( "FollowupIntentInfo", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_FOLLOWUPINTENTINFO, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Represents a single followup intent in the chain. - + { + "DESCRIPTOR": _INTENT_FOLLOWUPINTENTINFO, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Represents a single followup intent in the chain. Attributes: followup_intent_name: The unique identifier of the followup intent. Format: ``projects//agent/intents/``. parent_followup_intent_name: - The unique identifier of the followup intent's parent. Format: + The unique identifier of the followup intent’s parent. Format: ``projects//agent/intents/``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.FollowupIntentInfo) - ), - ), - DESCRIPTOR=_INTENT, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Represents an intent. Intents convert a number of user - expressions or patterns into an action. An action is an extraction of a - user command or sentence semantics. - + }, + ), + "DESCRIPTOR": _INTENT, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """An intent categorizes an end-user’s intention for one conversation + turn. For each agent, you define many intents, where your combined + intents can handle a complete conversation. When an end-user writes or + says something, referred to as an end-user expression or end-user + input, Dialogflow matches the end-user input to the best intent in + your agent. Matching an intent is also known as intent classification. + For more information, see the `intent guide + `__. Attributes: name: - The unique identifier of this intent. Required for [Intents.Up - dateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] - and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.In - tents.BatchUpdateIntents] methods. Format: ``projects//agent/intents/``. + Optional. The unique identifier of this intent. Required for [ + Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.Updat + eIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogf + low.v2.Intents.BatchUpdateIntents] methods. Format: + ``projects//agent/intents/``. display_name: Required. The name of this intent. webhook_state: @@ -5057,8 +5313,8 @@ ``Response`` field in the Dialogflow console. default_response_platforms: Optional. The list of platforms for which the first responses - will be copied from the messages in PLATFORM\_UNSPECIFIED - (i.e. default platform). + will be copied from the messages in PLATFORM_UNSPECIFIED + (i.e. default platform). root_followup_intent_name: Read-only. The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup @@ -5080,7 +5336,7 @@ field only in the output. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent) - ), + }, ) _sym_db.RegisterMessage(Intent) _sym_db.RegisterMessage(Intent.TrainingPhrase) @@ -5121,99 +5377,93 @@ ListIntentsRequest = _reflection.GeneratedProtocolMessageType( "ListIntentsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTINTENTSREQUEST, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The request message for + { + "DESCRIPTOR": _LISTINTENTSREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The request message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents]. - Attributes: parent: Required. The agent to list all intents from. Format: ``projects//agent``. language_code: - Optional. The language to list training phrases, parameters - and rich messages for. If not specified, the agent's default - language is used. `Many languages `__ are supported. Note: - languages must be enabled in the agent before they can be - used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. intent_view: Optional. The resource view to apply to the returned intent. page_size: Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. page_token: - Optional. The next\_page\_token value returned from a previous + Optional. The next_page_token value returned from a previous list request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListIntentsRequest) - ), + }, ) _sym_db.RegisterMessage(ListIntentsRequest) ListIntentsResponse = _reflection.GeneratedProtocolMessageType( "ListIntentsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTINTENTSRESPONSE, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The response message for + { + "DESCRIPTOR": _LISTINTENTSRESPONSE, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The response message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents]. - Attributes: intents: The list of agent intents. There will be a maximum number of - items returned based on the page\_size field in the request. + items returned based on the page_size field in the request. next_page_token: Token to retrieve the next page of results, or empty if there are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListIntentsResponse) - ), + }, ) _sym_db.RegisterMessage(ListIntentsResponse) GetIntentRequest = _reflection.GeneratedProtocolMessageType( "GetIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETINTENTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The request message for + { + "DESCRIPTOR": _GETINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The request message for [Intents.GetIntent][google.cloud.dialogflow.v2.Intents.GetIntent]. - Attributes: name: Required. The name of the intent. Format: ``projects//agent/intents/``. language_code: - Optional. The language to retrieve training phrases, - parameters and rich messages for. If not specified, the - agent's default language is used. `Many languages `__ are - supported. Note: languages must be enabled in the agent before - they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. intent_view: Optional. The resource view to apply to the returned intent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.GetIntentRequest) - ), + }, ) _sym_db.RegisterMessage(GetIntentRequest) CreateIntentRequest = _reflection.GeneratedProtocolMessageType( "CreateIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEINTENTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The request message for - [Intents.CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent]. - + { + "DESCRIPTOR": _CREATEINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The request message for [Intents.CreateIntent][google.cloud.dialogflow + .v2.Intents.CreateIntent]. Attributes: parent: @@ -5222,59 +5472,55 @@ intent: Required. The intent to create. language_code: - Optional. The language of training phrases, parameters and - rich messages defined in ``intent``. If not specified, the - agent's default language is used. `Many languages `__ are - supported. Note: languages must be enabled in the agent before - they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. intent_view: Optional. The resource view to apply to the returned intent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.CreateIntentRequest) - ), + }, ) _sym_db.RegisterMessage(CreateIntentRequest) UpdateIntentRequest = _reflection.GeneratedProtocolMessageType( "UpdateIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATEINTENTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The request message for - [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent]. - + { + "DESCRIPTOR": _UPDATEINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The request message for [Intents.UpdateIntent][google.cloud.dialogflow + .v2.Intents.UpdateIntent]. Attributes: intent: Required. The intent to update. language_code: - Optional. The language of training phrases, parameters and - rich messages defined in ``intent``. If not specified, the - agent's default language is used. `Many languages `__ are - supported. Note: languages must be enabled in the agent before - they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. update_mask: Optional. The mask to control which fields get updated. intent_view: Optional. The resource view to apply to the returned intent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.UpdateIntentRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateIntentRequest) DeleteIntentRequest = _reflection.GeneratedProtocolMessageType( "DeleteIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEINTENTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The request message for - [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent]. - + { + "DESCRIPTOR": _DELETEINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The request message for [Intents.DeleteIntent][google.cloud.dialogflow + .v2.Intents.DeleteIntent]. Attributes: name: @@ -5283,21 +5529,17 @@ Format: ``projects//agent/intents/``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.DeleteIntentRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteIntentRequest) BatchUpdateIntentsRequest = _reflection.GeneratedProtocolMessageType( "BatchUpdateIntentsRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHUPDATEINTENTSREQUEST, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The request message for - [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents]. - - - Attributes: + { + "DESCRIPTOR": _BATCHUPDATEINTENTSREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """Attributes: parent: Required. The name of the agent to update or create intents in. Format: ``projects//agent``. @@ -5307,54 +5549,51 @@ The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must - start with "gs://". + start with “gs://”. intent_batch_inline: The collection of intents to update or create. language_code: - Optional. The language of training phrases, parameters and - rich messages defined in ``intents``. If not specified, the - agent's default language is used. `Many languages `__ are - supported. Note: languages must be enabled in the agent before - they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. update_mask: Optional. The mask to control which fields get updated. intent_view: Optional. The resource view to apply to the returned intent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchUpdateIntentsRequest) - ), + }, ) _sym_db.RegisterMessage(BatchUpdateIntentsRequest) BatchUpdateIntentsResponse = _reflection.GeneratedProtocolMessageType( "BatchUpdateIntentsResponse", (_message.Message,), - dict( - DESCRIPTOR=_BATCHUPDATEINTENTSRESPONSE, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The response message for - [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents]. - + { + "DESCRIPTOR": _BATCHUPDATEINTENTSRESPONSE, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The response message for [Intents.BatchUpdateIntents][google.cloud.dia + logflow.v2.Intents.BatchUpdateIntents]. Attributes: intents: The collection of updated or created intents. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchUpdateIntentsResponse) - ), + }, ) _sym_db.RegisterMessage(BatchUpdateIntentsResponse) BatchDeleteIntentsRequest = _reflection.GeneratedProtocolMessageType( "BatchDeleteIntentsRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHDELETEINTENTSREQUEST, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""The request message for - [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2.Intents.BatchDeleteIntents]. - + { + "DESCRIPTOR": _BATCHDELETEINTENTSREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """The request message for [Intents.BatchDeleteIntents][google.cloud.dial + ogflow.v2.Intents.BatchDeleteIntents]. Attributes: parent: @@ -5365,25 +5604,24 @@ ``name`` must be filled in. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.BatchDeleteIntentsRequest) - ), + }, ) _sym_db.RegisterMessage(BatchDeleteIntentsRequest) IntentBatch = _reflection.GeneratedProtocolMessageType( "IntentBatch", (_message.Message,), - dict( - DESCRIPTOR=_INTENTBATCH, - __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""This message is a wrapper around a collection of intents. - + { + "DESCRIPTOR": _INTENTBATCH, + "__module__": "google.cloud.dialogflow_v2.proto.intent_pb2", + "__doc__": """This message is a wrapper around a collection of intents. Attributes: intents: A collection of intents. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.IntentBatch) - ), + }, ) _sym_db.RegisterMessage(IntentBatch) @@ -5470,6 +5708,7 @@ _INTENT_MESSAGE_TABLECARDROW.fields_by_name["cells"]._options = None _INTENT_MESSAGE_TABLECARDROW.fields_by_name["divider_after"]._options = None _INTENT_MESSAGE.fields_by_name["platform"]._options = None +_INTENT.fields_by_name["name"]._options = None _INTENT.fields_by_name["display_name"]._options = None _INTENT.fields_by_name["webhook_state"]._options = None _INTENT.fields_by_name["priority"]._options = None @@ -5514,11 +5753,10 @@ full_name="google.cloud.dialogflow.v2.Intents", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), - serialized_start=9317, - serialized_end=10872, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=9326, + serialized_end=10936, methods=[ _descriptor.MethodDescriptor( name="ListIntents", @@ -5527,9 +5765,8 @@ containing_service=None, input_type=_LISTINTENTSREQUEST, output_type=_LISTINTENTSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002'\022%/v2/{parent=projects/*/agent}/intents\332A\006parent\332A\024parent,language_code" - ), + serialized_options=b"\202\323\344\223\002'\022%/v2/{parent=projects/*/agent}/intents\332A\006parent\332A\024parent,language_code", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetIntent", @@ -5538,9 +5775,8 @@ containing_service=None, input_type=_GETINTENTREQUEST, output_type=_INTENT, - serialized_options=_b( - "\202\323\344\223\002'\022%/v2/{name=projects/*/agent/intents/*}\332A\004name\332A\022name,language_code" - ), + serialized_options=b"\202\323\344\223\002'\022%/v2/{name=projects/*/agent/intents/*}\332A\004name\332A\022name,language_code", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateIntent", @@ -5549,9 +5785,8 @@ containing_service=None, input_type=_CREATEINTENTREQUEST, output_type=_INTENT, - serialized_options=_b( - '\202\323\344\223\002/"%/v2/{parent=projects/*/agent}/intents:\006intent\332A\rparent,intent\332A\033parent,intent,language_code' - ), + serialized_options=b'\202\323\344\223\002/"%/v2/{parent=projects/*/agent}/intents:\006intent\332A\rparent,intent\332A\033parent,intent,language_code', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateIntent", @@ -5560,9 +5795,8 @@ containing_service=None, input_type=_UPDATEINTENTREQUEST, output_type=_INTENT, - serialized_options=_b( - "\202\323\344\223\00262,/v2/{intent.name=projects/*/agent/intents/*}:\006intent\332A\024intent,language_code\332A intent,language_code,update_mask" - ), + serialized_options=b"\202\323\344\223\00262,/v2/{intent.name=projects/*/agent/intents/*}:\006intent\332A\024intent,language_code\332A intent,language_code,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteIntent", @@ -5571,9 +5805,8 @@ containing_service=None, input_type=_DELETEINTENTREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002'*%/v2/{name=projects/*/agent/intents/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002'*%/v2/{name=projects/*/agent/intents/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchUpdateIntents", @@ -5582,9 +5815,8 @@ containing_service=None, input_type=_BATCHUPDATEINTENTSREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\0026"1/v2/{parent=projects/*/agent}/intents:batchUpdate:\001*\312AO\n5google.cloud.dialogflow.v2.BatchUpdateIntentsResponse\022\026google.protobuf.Struct' - ), + serialized_options=b'\202\323\344\223\0026"1/v2/{parent=projects/*/agent}/intents:batchUpdate:\001*\332A\027parent,intent_batch_uri\332A\032parent,intent_batch_inline\312AO\n5google.cloud.dialogflow.v2.BatchUpdateIntentsResponse\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchDeleteIntents", @@ -5593,9 +5825,8 @@ containing_service=None, input_type=_BATCHDELETEINTENTSREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\0026"1/v2/{parent=projects/*/agent}/intents:batchDelete:\001*\332A\016parent,intents\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct' - ), + serialized_options=b'\202\323\344\223\0026"1/v2/{parent=projects/*/agent}/intents:batchDelete:\001*\332A\016parent,intents\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2/proto/intent_pb2_grpc.py b/dialogflow_v2/proto/intent_pb2_grpc.py index 1bf9dc039..8ab7696ad 100644 --- a/dialogflow_v2/proto/intent_pb2_grpc.py +++ b/dialogflow_v2/proto/intent_pb2_grpc.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2.proto import ( @@ -12,46 +13,15 @@ class IntentsStub(object): - """An intent represents a mapping between input from a user and an action to - be taken by your application. When you pass user input to the - [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or - [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method, the - Dialogflow API analyzes the input and searches - for a matching intent. If no match is found, the Dialogflow API returns a - fallback intent (`is_fallback` = true). - - You can provide additional information for the Dialogflow API to use to - match user input to an intent by adding the following to your intent. - - * **Contexts** - provide additional context for intent analysis. For - example, if an intent is related to an object in your application that - plays music, you can provide a context to determine when to match the - intent if the user input is "turn it off". You can include a context - that matches the intent when there is previous user input of - "play music", and not when there is previous user input of - "turn on the light". - - * **Events** - allow for matching an intent by using an event name - instead of user input. Your application can provide an event name and - related parameters to the Dialogflow API to match an intent. For - example, when your application starts, you can send a welcome event - with a user name parameter to the Dialogflow API to match an intent with - a personalized welcome message for the user. - - * **Training phrases** - provide examples of user input to train the - Dialogflow API agent to better match intents. - - For more information about intents, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/intents-overview). - """ + """Service for managing [Intents][google.cloud.dialogflow.v2.Intent]. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.ListIntents = channel.unary_unary( "/google.cloud.dialogflow.v2.Intents/ListIntents", request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.ListIntentsRequest.SerializeToString, @@ -90,71 +60,40 @@ def __init__(self, channel): class IntentsServicer(object): - """An intent represents a mapping between input from a user and an action to - be taken by your application. When you pass user input to the - [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or - [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method, the - Dialogflow API analyzes the input and searches - for a matching intent. If no match is found, the Dialogflow API returns a - fallback intent (`is_fallback` = true). - - You can provide additional information for the Dialogflow API to use to - match user input to an intent by adding the following to your intent. - - * **Contexts** - provide additional context for intent analysis. For - example, if an intent is related to an object in your application that - plays music, you can provide a context to determine when to match the - intent if the user input is "turn it off". You can include a context - that matches the intent when there is previous user input of - "play music", and not when there is previous user input of - "turn on the light". - - * **Events** - allow for matching an intent by using an event name - instead of user input. Your application can provide an event name and - related parameters to the Dialogflow API to match an intent. For - example, when your application starts, you can send a welcome event - with a user name parameter to the Dialogflow API to match an intent with - a personalized welcome message for the user. - - * **Training phrases** - provide examples of user input to train the - Dialogflow API agent to better match intents. - - For more information about intents, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/intents-overview). - """ + """Service for managing [Intents][google.cloud.dialogflow.v2.Intent]. + """ def ListIntents(self, request, context): """Returns the list of all intents in the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetIntent(self, request, context): """Retrieves the specified intent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def CreateIntent(self, request, context): """Creates an intent in the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateIntent(self, request, context): """Updates the specified intent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteIntent(self, request, context): """Deletes the specified intent and its direct or indirect followup intents. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -162,8 +101,8 @@ def DeleteIntent(self, request, context): def BatchUpdateIntents(self, request, context): """Updates/Creates multiple intents in the specified agent. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -171,8 +110,8 @@ def BatchUpdateIntents(self, request, context): def BatchDeleteIntents(self, request, context): """Deletes intents in the specified agent. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -220,3 +159,198 @@ def add_IntentsServicer_to_server(servicer, server): "google.cloud.dialogflow.v2.Intents", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Intents(object): + """Service for managing [Intents][google.cloud.dialogflow.v2.Intent]. + """ + + @staticmethod + def ListIntents( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Intents/ListIntents", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.ListIntentsRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.ListIntentsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetIntent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Intents/GetIntent", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.GetIntentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.Intent.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateIntent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Intents/CreateIntent", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.CreateIntentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.Intent.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateIntent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Intents/UpdateIntent", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.UpdateIntentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.Intent.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteIntent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Intents/DeleteIntent", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.DeleteIntentRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchUpdateIntents( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Intents/BatchUpdateIntents", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.BatchUpdateIntentsRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchDeleteIntents( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Intents/BatchDeleteIntents", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.BatchDeleteIntentsRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2/proto/session.proto b/dialogflow_v2/proto/session.proto new file mode 100644 index 000000000..96e7c2ced --- /dev/null +++ b/dialogflow_v2/proto/session.proto @@ -0,0 +1,625 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2/audio_config.proto"; +import "google/cloud/dialogflow/v2/context.proto"; +import "google/cloud/dialogflow/v2/intent.proto"; +import "google/cloud/dialogflow/v2/session_entity_type.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/rpc/status.proto"; +import "google/type/latlng.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "SessionProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; +option (google.api.resource_definition) = { + type: "dialogflow.googleapis.com/Session" + pattern: "projects/{project}/agent/sessions/{session}" + pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}" +}; + +// A service used for session interactions. +// +// For more information, see the [API interactions +// guide](https://cloud.google.com/dialogflow/docs/api-overview). +service Sessions { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Processes a natural language query and returns structured, actionable data + // as a result. This method is not idempotent, because it may cause contexts + // and session entity types to be updated, which in turn might affect + // results of future queries. + rpc DetectIntent(DetectIntentRequest) returns (DetectIntentResponse) { + option (google.api.http) = { + post: "/v2/{session=projects/*/agent/sessions/*}:detectIntent" + body: "*" + additional_bindings { + post: "/v2/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent" + body: "*" + } + }; + option (google.api.method_signature) = "session,query_input"; + } + + // Processes a natural language query in audio format in a streaming fashion + // and returns structured, actionable data as a result. This method is only + // available via the gRPC API (not REST). + rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) { + } +} + +// The request to detect user's intent. +message DetectIntentRequest { + // Required. The name of the session this query is sent to. Format: + // `projects//agent/sessions/`, or + // `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + // default 'draft' environment. If `User ID` is not specified, we are using + // "-". It's up to the API caller to choose an appropriate `Session ID` and + // `User Id`. They can be a random number or some type of user and session + // identifiers (preferably hashed). The length of the `Session ID` and + // `User ID` must not exceed 36 characters. + // + // For more information, see the [API interactions + // guide](https://cloud.google.com/dialogflow/docs/api-overview). + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Session" + } + ]; + + // The parameters of this query. + QueryParameters query_params = 2; + + // Required. The input specification. It can be set to: + // + // 1. an audio config + // which instructs the speech recognizer how to process the speech audio, + // + // 2. a conversational query in the form of text, or + // + // 3. an event that specifies which intent to trigger. + QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED]; + + // Instructs the speech synthesizer how to generate the output + // audio. If this field is not set and agent-level speech synthesizer is not + // configured, no output audio is generated. + OutputAudioConfig output_audio_config = 4; + + // Mask for [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] indicating which settings in this + // request-level config should override speech synthesizer settings defined at + // agent-level. + // + // If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] replaces the agent-level + // config in its entirety. + google.protobuf.FieldMask output_audio_config_mask = 7; + + // The natural language speech audio to be processed. This field + // should be populated iff `query_input` is set to an input audio config. + // A single request can contain up to 1 minute of speech audio data. + bytes input_audio = 5; +} + +// The message returned from the DetectIntent method. +message DetectIntentResponse { + // The unique identifier of the response. It can be used to + // locate a response in the training example set or for reporting issues. + string response_id = 1; + + // The selected results of the conversational query or event processing. + // See `alternative_query_results` for additional potential results. + QueryResult query_result = 2; + + // Specifies the status of the webhook request. + google.rpc.Status webhook_status = 3; + + // The audio data bytes encoded as specified in the request. + // Note: The output audio is generated based on the values of default platform + // text responses found in the `query_result.fulfillment_messages` field. If + // multiple default text responses exist, they will be concatenated when + // generating audio. If no default platform text responses exist, the + // generated audio content will be empty. + // + // In some scenarios, multiple output audio fields may be present in the + // response structure. In these cases, only the top-most-level audio output + // has content. + bytes output_audio = 4; + + // The config used by the speech synthesizer to generate the output audio. + OutputAudioConfig output_audio_config = 6; +} + +// Represents the parameters of the conversational query. +message QueryParameters { + // The time zone of this conversational query from the + // [time zone database](https://www.iana.org/time-zones), e.g., + // America/New_York, Europe/Paris. If not provided, the time zone specified in + // agent settings is used. + string time_zone = 1; + + // The geo location of this conversational query. + google.type.LatLng geo_location = 2; + + // The collection of contexts to be activated before this query is + // executed. + repeated Context contexts = 3; + + // Specifies whether to delete all contexts in the current session + // before the new ones are activated. + bool reset_contexts = 4; + + // Additional session entity types to replace or extend developer + // entity types with. The entity synonyms apply to all languages and persist + // for the session of this query. + repeated SessionEntityType session_entity_types = 5; + + // This field can be used to pass custom data to your webhook. + // Arbitrary JSON objects are supported. + // If supplied, the value is used to populate the + // `WebhookRequest.original_detect_intent_request.payload` + // field sent to your webhook. + google.protobuf.Struct payload = 6; + + // Configures the type of sentiment analysis to perform. If not + // provided, sentiment analysis is not performed. + SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; +} + +// Represents the query input. It can contain either: +// +// 1. An audio config which +// instructs the speech recognizer how to process the speech audio. +// +// 2. A conversational query in the form of text,. +// +// 3. An event that specifies which intent to trigger. +message QueryInput { + // Required. The input specification. + oneof input { + // Instructs the speech recognizer how to process the speech audio. + InputAudioConfig audio_config = 1; + + // The natural language text to be processed. + TextInput text = 2; + + // The event to be processed. + EventInput event = 3; + } +} + +// Represents the result of conversational query or event processing. +message QueryResult { + // The original conversational query text: + // + // - If natural language text was provided as input, `query_text` contains + // a copy of the input. + // - If natural language speech audio was provided as input, `query_text` + // contains the speech recognition result. If speech recognizer produced + // multiple alternatives, a particular one is picked. + // - If automatic spell correction is enabled, `query_text` will contain the + // corrected user input. + string query_text = 1; + + // The language that was triggered during intent detection. + // See [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // for a list of the currently supported language codes. + string language_code = 15; + + // The Speech recognition confidence between 0.0 and 1.0. A higher number + // indicates an estimated greater likelihood that the recognized words are + // correct. The default of 0.0 is a sentinel value indicating that confidence + // was not set. + // + // This field is not guaranteed to be accurate or set. In particular this + // field isn't set for StreamingDetectIntent since the streaming endpoint has + // separate confidence estimates per portion of the audio in + // StreamingRecognitionResult. + float speech_recognition_confidence = 2; + + // The action name from the matched intent. + string action = 3; + + // The collection of extracted parameters. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value + google.protobuf.Struct parameters = 4; + + // This field is set to: + // + // - `false` if the matched intent has required parameters and not all of + // the required parameter values have been collected. + // - `true` if all required parameter values have been collected, or if the + // matched intent doesn't contain any required parameters. + bool all_required_params_present = 5; + + // The text to be pronounced to the user or shown on the screen. + // Note: This is a legacy field, `fulfillment_messages` should be preferred. + string fulfillment_text = 6; + + // The collection of rich messages to present to the user. + repeated Intent.Message fulfillment_messages = 7; + + // If the query was fulfilled by a webhook call, this field is set to the + // value of the `source` field returned in the webhook response. + string webhook_source = 8; + + // If the query was fulfilled by a webhook call, this field is set to the + // value of the `payload` field returned in the webhook response. + google.protobuf.Struct webhook_payload = 9; + + // The collection of output contexts. If applicable, + // `output_contexts.parameters` contains entries with name + // `.original` containing the original parameter values + // before the query. + repeated Context output_contexts = 10; + + // The intent that matched the conversational query. Some, not + // all fields are filled in this message, including but not limited to: + // `name`, `display_name`, `end_interaction` and `is_fallback`. + Intent intent = 11; + + // The intent detection confidence. Values range from 0.0 + // (completely uncertain) to 1.0 (completely certain). + // This value is for informational purpose only and is only used to + // help match the best intent within the classification threshold. + // This value may change for the same end-user expression at any time due to a + // model retraining or change in implementation. + // If there are `multiple knowledge_answers` messages, this value is set to + // the greatest `knowledgeAnswers.match_confidence` value in the list. + float intent_detection_confidence = 12; + + // Free-form diagnostic information for the associated detect intent request. + // The fields of this data can change without notice, so you should not write + // code that depends on its structure. + // The data may contain: + // + // - webhook call latency + // - webhook errors + google.protobuf.Struct diagnostic_info = 14; + + // The sentiment analysis result, which depends on the + // `sentiment_analysis_request_config` specified in the request. + SentimentAnalysisResult sentiment_analysis_result = 17; +} + +// The top-level message sent by the client to the +// [Sessions.StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent] method. +// +// Multiple request messages should be sent in order: +// +// 1. The first message must contain +// [session][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.session], +// [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] plus optionally +// [query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_params]. If the client +// wants to receive an audio response, it should also contain +// [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config]. +// The message must not contain +// [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio]. +// 2. If [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] was set to +// [query_input.audio_config][google.cloud.dialogflow.v2.InputAudioConfig], all subsequent +// messages must contain +// [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio] to continue with +// Speech recognition. +// If you decide to rather detect an intent from text input after you +// already started Speech recognition, please send a message with +// [query_input.text][google.cloud.dialogflow.v2.QueryInput.text]. +// +// However, note that: +// +// * Dialogflow will bill you for the audio duration so far. +// * Dialogflow discards all Speech recognition results in favor of the +// input text. +// * Dialogflow will use the language code from the first message. +// +// After you sent all input, you must half-close or abort the request stream. +message StreamingDetectIntentRequest { + // Required. The name of the session the query is sent to. + // Format of the session name: + // `projects//agent/sessions/`, or + // `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + // default 'draft' environment. If `User ID` is not specified, we are using + // "-". It's up to the API caller to choose an appropriate `Session ID` and + // `User Id`. They can be a random number or some type of user and session + // identifiers (preferably hashed). The length of the `Session ID` and + // `User ID` must not exceed 36 characters. + // + // For more information, see the [API interactions + // guide](https://cloud.google.com/dialogflow/docs/api-overview). + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Session" + } + ]; + + // The parameters of this query. + QueryParameters query_params = 2; + + // Required. The input specification. It can be set to: + // + // 1. an audio config which instructs the speech recognizer how to process + // the speech audio, + // + // 2. a conversational query in the form of text, or + // + // 3. an event that specifies which intent to trigger. + QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED]; + + // Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] instead. + // If `false` (default), recognition does not cease until + // the client closes the stream. If `true`, the recognizer will detect a + // single spoken utterance in input audio. Recognition ceases when it detects + // the audio's voice has stopped or paused. In this case, once a detected + // intent is received, the client should close the stream and start a new + // request with a new stream as needed. + // This setting is ignored when `query_input` is a piece of text or an event. + bool single_utterance = 4 [deprecated = true]; + + // Instructs the speech synthesizer how to generate the output + // audio. If this field is not set and agent-level speech synthesizer is not + // configured, no output audio is generated. + OutputAudioConfig output_audio_config = 5; + + // Mask for [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] indicating which settings in this + // request-level config should override speech synthesizer settings defined at + // agent-level. + // + // If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] replaces the agent-level + // config in its entirety. + google.protobuf.FieldMask output_audio_config_mask = 7; + + // The input audio content to be recognized. Must be sent if + // `query_input` was set to a streaming input audio config. The complete audio + // over all streaming messages must not exceed 1 minute. + bytes input_audio = 6; +} + +// The top-level message returned from the +// `StreamingDetectIntent` method. +// +// Multiple response messages can be returned in order: +// +// 1. If the input was set to streaming audio, the first one or more messages +// contain `recognition_result`. Each `recognition_result` represents a more +// complete transcript of what the user said. The last `recognition_result` +// has `is_final` set to `true`. +// +// 2. The next message contains `response_id`, `query_result` +// and optionally `webhook_status` if a WebHook was called. +message StreamingDetectIntentResponse { + // The unique identifier of the response. It can be used to + // locate a response in the training example set or for reporting issues. + string response_id = 1; + + // The result of speech recognition. + StreamingRecognitionResult recognition_result = 2; + + // The result of the conversational query or event processing. + QueryResult query_result = 3; + + // Specifies the status of the webhook request. + google.rpc.Status webhook_status = 4; + + // The audio data bytes encoded as specified in the request. + // Note: The output audio is generated based on the values of default platform + // text responses found in the `query_result.fulfillment_messages` field. If + // multiple default text responses exist, they will be concatenated when + // generating audio. If no default platform text responses exist, the + // generated audio content will be empty. + // + // In some scenarios, multiple output audio fields may be present in the + // response structure. In these cases, only the top-most-level audio output + // has content. + bytes output_audio = 5; + + // The config used by the speech synthesizer to generate the output audio. + OutputAudioConfig output_audio_config = 6; +} + +// Contains a speech recognition result corresponding to a portion of the audio +// that is currently being processed or an indication that this is the end +// of the single requested utterance. +// +// Example: +// +// 1. transcript: "tube" +// +// 2. transcript: "to be a" +// +// 3. transcript: "to be" +// +// 4. transcript: "to be or not to be" +// is_final: true +// +// 5. transcript: " that's" +// +// 6. transcript: " that is" +// +// 7. message_type: `END_OF_SINGLE_UTTERANCE` +// +// 8. transcript: " that is the question" +// is_final: true +// +// Only two of the responses contain final results (#4 and #8 indicated by +// `is_final: true`). Concatenating these generates the full transcript: "to be +// or not to be that is the question". +// +// In each response we populate: +// +// * for `TRANSCRIPT`: `transcript` and possibly `is_final`. +// +// * for `END_OF_SINGLE_UTTERANCE`: only `message_type`. +message StreamingRecognitionResult { + // Type of the response message. + enum MessageType { + // Not specified. Should never be used. + MESSAGE_TYPE_UNSPECIFIED = 0; + + // Message contains a (possibly partial) transcript. + TRANSCRIPT = 1; + + // Event indicates that the server has detected the end of the user's speech + // utterance and expects no additional inputs. + // Therefore, the server will not process additional audio (although it may subsequently return additional results). The + // client should stop sending additional audio data, half-close the gRPC + // connection, and wait for any additional results until the server closes + // the gRPC connection. This message is only sent if `single_utterance` was + // set to `true`, and is not used otherwise. + END_OF_SINGLE_UTTERANCE = 2; + } + + // Type of the result message. + MessageType message_type = 1; + + // Transcript text representing the words that the user spoke. + // Populated if and only if `message_type` = `TRANSCRIPT`. + string transcript = 2; + + // If `false`, the `StreamingRecognitionResult` represents an + // interim result that may change. If `true`, the recognizer will not return + // any further hypotheses about this piece of the audio. May only be populated + // for `message_type` = `TRANSCRIPT`. + bool is_final = 3; + + // The Speech confidence between 0.0 and 1.0 for the current portion of audio. + // A higher number indicates an estimated greater likelihood that the + // recognized words are correct. The default of 0.0 is a sentinel value + // indicating that confidence was not set. + // + // This field is typically only provided if `is_final` is true and you should + // not rely on it being accurate or even set. + float confidence = 4; + + // Word-specific information for the words recognized by Speech in + // [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and + // [InputAudioConfig.enable_word_info] is set. + repeated SpeechWordInfo speech_word_info = 7; + + // Time offset of the end of this Speech recognition result relative to the + // beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. + google.protobuf.Duration speech_end_offset = 8; +} + +// Represents the natural language text to be processed. +message TextInput { + // Required. The UTF-8 encoded natural language text to be processed. + // Text length must not exceed 256 characters. + string text = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The language of this conversational query. See [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // for a list of the currently supported language codes. Note that queries in + // the same session do not necessarily need to specify the same language. + string language_code = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Events allow for matching intents by event name instead of the natural +// language input. For instance, input `` can trigger a personalized welcome response. +// The parameter `name` may be used by the agent in the response: +// `"Hello #welcome_event.name! What can I do for you today?"`. +message EventInput { + // Required. The unique identifier of the event. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The collection of parameters associated with the event. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value + google.protobuf.Struct parameters = 2; + + // Required. The language of this query. See [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // for a list of the currently supported language codes. Note that queries in + // the same session do not necessarily need to specify the same language. + string language_code = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Configures the types of sentiment analysis to perform. +message SentimentAnalysisRequestConfig { + // Instructs the service to perform sentiment analysis on + // `query_text`. If not provided, sentiment analysis is not performed on + // `query_text`. + bool analyze_query_text_sentiment = 1; +} + +// The result of sentiment analysis. Sentiment analysis inspects user input +// and identifies the prevailing subjective opinion, especially to determine a +// user's attitude as positive, negative, or neutral. +// For [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent], it needs to be configured in +// [DetectIntentRequest.query_params][google.cloud.dialogflow.v2.DetectIntentRequest.query_params]. For +// [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent], it needs to be configured in +// [StreamingDetectIntentRequest.query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_params]. +// And for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and +// [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent], it needs to be configured in +// [ConversationProfile.human_agent_assistant_config][google.cloud.dialogflow.v2.ConversationProfile.human_agent_assistant_config] +message SentimentAnalysisResult { + // The sentiment analysis result for `query_text`. + Sentiment query_text_sentiment = 1; +} + +// The sentiment, such as positive/negative feeling or association, for a unit +// of analysis, such as the query text. +message Sentiment { + // Sentiment score between -1.0 (negative sentiment) and 1.0 (positive + // sentiment). + float score = 1; + + // A non-negative number in the [0, +inf) range, which represents the absolute + // magnitude of sentiment, regardless of score (positive or negative). + float magnitude = 2; +} diff --git a/dialogflow_v2/proto/session_entity_type.proto b/dialogflow_v2/proto/session_entity_type.proto new file mode 100644 index 000000000..8d7fa89c0 --- /dev/null +++ b/dialogflow_v2/proto/session_entity_type.proto @@ -0,0 +1,277 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2/entity_type.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "SessionEntityTypeProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; + +// Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityType]. +service SessionEntityTypes { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all session entity types in the specified session. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. + rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes" + additional_bindings { + get: "/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. + rpc GetSessionEntityType(GetSessionEntityTypeRequest) returns (SessionEntityType) { + option (google.api.http) = { + get: "/v2/{name=projects/*/agent/sessions/*/entityTypes/*}" + additional_bindings { + get: "/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a session entity type. + // + // If the specified session entity type already exists, overrides the session + // entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. + rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes" + body: "session_entity_type" + additional_bindings { + post: "/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes" + body: "session_entity_type" + } + }; + option (google.api.method_signature) = "parent,session_entity_type"; + } + + // Updates the specified session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. + rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest) returns (SessionEntityType) { + option (google.api.http) = { + patch: "/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}" + body: "session_entity_type" + additional_bindings { + patch: "/v2/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + body: "session_entity_type" + } + }; + option (google.api.method_signature) = "session_entity_type"; + option (google.api.method_signature) = "session_entity_type,update_mask"; + } + + // Deletes the specified session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. + rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/agent/sessions/*/entityTypes/*}" + additional_bindings { + delete: "/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// A session represents a conversation between a Dialogflow agent and an +// end-user. You can create special entities, called session entities, during a +// session. Session entities can extend or replace custom entity types and only +// exist during the session that they were created for. All session data, +// including session entities, is stored by Dialogflow for 20 minutes. +// +// For more information, see the [session entity +// guide](https://cloud.google.com/dialogflow/docs/entities-session). +message SessionEntityType { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/SessionEntityType" + pattern: "projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}" + pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}" + }; + + // The types of modifications for a session entity type. + enum EntityOverrideMode { + // Not specified. This value should be never used. + ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0; + + // The collection of session entities overrides the collection of entities + // in the corresponding custom entity type. + ENTITY_OVERRIDE_MODE_OVERRIDE = 1; + + // The collection of session entities extends the collection of entities in + // the corresponding custom entity type. + // + // Note: Even in this override mode calls to `ListSessionEntityTypes`, + // `GetSessionEntityType`, `CreateSessionEntityType` and + // `UpdateSessionEntityType` only return the additional entities added in + // this session entity type. If you want to get the supplemented list, + // please call [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType] on the custom entity type + // and merge. + ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; + } + + // Required. The unique identifier of this session entity type. Format: + // `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + // + // `` must be the display name of an existing entity + // type in the same agent that will be overridden or supplemented. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Indicates whether the additional data should override or + // supplement the custom entity type definition. + EntityOverrideMode entity_override_mode = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The collection of entities associated with this session entity + // type. + repeated EntityType.Entity entities = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. +message ListSessionEntityTypesRequest { + // Required. The session to list all session entity types from. + // Format: `projects//agent/sessions/` or + // `projects//agent/environments//users// + // sessions/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/SessionEntityType" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. +message ListSessionEntityTypesResponse { + // The list of session entity types. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated SessionEntityType session_entity_types = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType]. +message GetSessionEntityTypeRequest { + // Required. The name of the session entity type. Format: + // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/SessionEntityType" + } + ]; +} + +// The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType]. +message CreateSessionEntityTypeRequest { + // Required. The session to create a session entity type for. + // Format: `projects//agent/sessions/` or + // `projects//agent/environments//users// + // sessions/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/SessionEntityType" + } + ]; + + // Required. The session entity type to create. + SessionEntityType session_entity_type = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType]. +message UpdateSessionEntityTypeRequest { + // Required. The session entity type to update. + SessionEntityType session_entity_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType]. +message DeleteSessionEntityTypeRequest { + // Required. The name of the entity type to delete. Format: + // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/SessionEntityType" + } + ]; +} diff --git a/dialogflow_v2/proto/session_entity_type_pb2.py b/dialogflow_v2/proto/session_entity_type_pb2.py index 9fdf48c69..678c7f91c 100644 --- a/dialogflow_v2/proto/session_entity_type_pb2.py +++ b/dialogflow_v2/proto/session_entity_type_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/session_entity_type.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -30,12 +27,9 @@ name="google/cloud/dialogflow_v2/proto/session_entity_type.proto", package="google.cloud.dialogflow.v2", syntax="proto3", - serialized_options=_b( - "\n\036com.google.cloud.dialogflow.v2B\026SessionEntityTypeProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2" - ), - serialized_pb=_b( - '\n:google/cloud/dialogflow_v2/proto/session_entity_type.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/dialogflow_v2/proto/entity_type.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\xcf\x03\n\x11SessionEntityType\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x63\n\x14\x65ntity_override_mode\x18\x02 \x01(\x0e\x32@.google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideModeB\x03\xe0\x41\x02\x12\x44\n\x08\x65ntities\x18\x03 \x03(\x0b\x32-.google.cloud.dialogflow.v2.EntityType.EntityB\x03\xe0\x41\x02"\x82\x01\n\x12\x45ntityOverrideMode\x12$\n ENTITY_OVERRIDE_MODE_UNSPECIFIED\x10\x00\x12!\n\x1d\x45NTITY_OVERRIDE_MODE_OVERRIDE\x10\x01\x12#\n\x1f\x45NTITY_OVERRIDE_MODE_SUPPLEMENT\x10\x02:w\xea\x41t\n+dialogflow.googleapis.com/SessionEntityType\x12\x45projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}"e\n\x1dListSessionEntityTypesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01"\x86\x01\n\x1eListSessionEntityTypesResponse\x12K\n\x14session_entity_types\x18\x01 \x03(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"`\n\x1bGetSessionEntityTypeRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+dialogflow.googleapis.com/SessionEntityType"\x86\x01\n\x1e\x43reateSessionEntityTypeRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\x13session_entity_type\x18\x02 \x01(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityTypeB\x03\xe0\x41\x02"\xa7\x01\n\x1eUpdateSessionEntityTypeRequest\x12O\n\x13session_entity_type\x18\x01 \x01(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"Y\n\x1e\x44\x65leteSessionEntityTypeRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Context2\xbc\r\n\x12SessionEntityTypes\x12\xa7\x02\n\x16ListSessionEntityTypes\x12\x39.google.cloud.dialogflow.v2.ListSessionEntityTypesRequest\x1a:.google.cloud.dialogflow.v2.ListSessionEntityTypesResponse"\x95\x01\x82\xd3\xe4\x93\x02\x85\x01\x12\x34/v2/{parent=projects/*/agent/sessions/*}/entityTypesZM\x12K/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes\xda\x41\x06parent\x12\x94\x02\n\x14GetSessionEntityType\x12\x37.google.cloud.dialogflow.v2.GetSessionEntityTypeRequest\x1a-.google.cloud.dialogflow.v2.SessionEntityType"\x93\x01\x82\xd3\xe4\x93\x02\x85\x01\x12\x34/v2/{name=projects/*/agent/sessions/*/entityTypes/*}ZM\x12K/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\xda\x41\x04name\x12\xda\x02\n\x17\x43reateSessionEntityType\x12:.google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest\x1a-.google.cloud.dialogflow.v2.SessionEntityType"\xd3\x01\x82\xd3\xe4\x93\x02\xaf\x01"4/v2/{parent=projects/*/agent/sessions/*}/entityTypes:\x13session_entity_typeZb"K/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes:\x13session_entity_type\xda\x41\x1aparent,session_entity_type\x12\x87\x03\n\x17UpdateSessionEntityType\x12:.google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest\x1a-.google.cloud.dialogflow.v2.SessionEntityType"\x80\x02\x82\xd3\xe4\x93\x02\xd7\x01\x32H/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}:\x13session_entity_typeZv2_/v2/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}:\x13session_entity_type\xda\x41\x1fsession_entity_type,update_mask\x12\x83\x02\n\x17\x44\x65leteSessionEntityType\x12:.google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest\x1a\x16.google.protobuf.Empty"\x93\x01\x82\xd3\xe4\x93\x02\x85\x01*4/v2/{name=projects/*/agent/sessions/*/entityTypes/*}ZM*K/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\xda\x41\x04name\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xa5\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x16SessionEntityTypeProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3' - ), + serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\026SessionEntityTypeProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n:google/cloud/dialogflow_v2/proto/session_entity_type.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/dialogflow_v2/proto/entity_type.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\xc0\x04\n\x11SessionEntityType\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x63\n\x14\x65ntity_override_mode\x18\x02 \x01(\x0e\x32@.google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideModeB\x03\xe0\x41\x02\x12\x44\n\x08\x65ntities\x18\x03 \x03(\x0b\x32-.google.cloud.dialogflow.v2.EntityType.EntityB\x03\xe0\x41\x02"\x82\x01\n\x12\x45ntityOverrideMode\x12$\n ENTITY_OVERRIDE_MODE_UNSPECIFIED\x10\x00\x12!\n\x1d\x45NTITY_OVERRIDE_MODE_OVERRIDE\x10\x01\x12#\n\x1f\x45NTITY_OVERRIDE_MODE_SUPPLEMENT\x10\x02:\xe7\x01\xea\x41\xe3\x01\n+dialogflow.googleapis.com/SessionEntityType\x12\x45projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}\x12mprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}"\x95\x01\n\x1dListSessionEntityTypesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+dialogflow.googleapis.com/SessionEntityType\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01"\x86\x01\n\x1eListSessionEntityTypesResponse\x12K\n\x14session_entity_types\x18\x01 \x03(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"`\n\x1bGetSessionEntityTypeRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+dialogflow.googleapis.com/SessionEntityType"\xb6\x01\n\x1e\x43reateSessionEntityTypeRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+dialogflow.googleapis.com/SessionEntityType\x12O\n\x13session_entity_type\x18\x02 \x01(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityTypeB\x03\xe0\x41\x02"\xa7\x01\n\x1eUpdateSessionEntityTypeRequest\x12O\n\x13session_entity_type\x18\x01 \x01(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityTypeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"c\n\x1e\x44\x65leteSessionEntityTypeRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+dialogflow.googleapis.com/SessionEntityType2\xd2\r\n\x12SessionEntityTypes\x12\xa7\x02\n\x16ListSessionEntityTypes\x12\x39.google.cloud.dialogflow.v2.ListSessionEntityTypesRequest\x1a:.google.cloud.dialogflow.v2.ListSessionEntityTypesResponse"\x95\x01\x82\xd3\xe4\x93\x02\x85\x01\x12\x34/v2/{parent=projects/*/agent/sessions/*}/entityTypesZM\x12K/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes\xda\x41\x06parent\x12\x94\x02\n\x14GetSessionEntityType\x12\x37.google.cloud.dialogflow.v2.GetSessionEntityTypeRequest\x1a-.google.cloud.dialogflow.v2.SessionEntityType"\x93\x01\x82\xd3\xe4\x93\x02\x85\x01\x12\x34/v2/{name=projects/*/agent/sessions/*/entityTypes/*}ZM\x12K/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\xda\x41\x04name\x12\xda\x02\n\x17\x43reateSessionEntityType\x12:.google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest\x1a-.google.cloud.dialogflow.v2.SessionEntityType"\xd3\x01\x82\xd3\xe4\x93\x02\xaf\x01"4/v2/{parent=projects/*/agent/sessions/*}/entityTypes:\x13session_entity_typeZb"K/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes:\x13session_entity_type\xda\x41\x1aparent,session_entity_type\x12\x9d\x03\n\x17UpdateSessionEntityType\x12:.google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest\x1a-.google.cloud.dialogflow.v2.SessionEntityType"\x96\x02\x82\xd3\xe4\x93\x02\xd7\x01\x32H/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}:\x13session_entity_typeZv2_/v2/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}:\x13session_entity_type\xda\x41\x13session_entity_type\xda\x41\x1fsession_entity_type,update_mask\x12\x83\x02\n\x17\x44\x65leteSessionEntityType\x12:.google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest\x1a\x16.google.protobuf.Empty"\x93\x01\x82\xd3\xe4\x93\x02\x85\x01*4/v2/{name=projects/*/agent/sessions/*/entityTypes/*}ZM*K/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\xda\x41\x04name\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xa5\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x16SessionEntityTypeProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -53,6 +47,7 @@ full_name="google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="ENTITY_OVERRIDE_MODE_UNSPECIFIED", @@ -60,6 +55,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="ENTITY_OVERRIDE_MODE_OVERRIDE", @@ -67,6 +63,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="ENTITY_OVERRIDE_MODE_SUPPLEMENT", @@ -74,6 +71,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -90,6 +88,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -100,14 +99,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_override_mode", @@ -124,8 +124,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entities", @@ -142,22 +143,21 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[_SESSIONENTITYTYPE_ENTITYOVERRIDEMODE], - serialized_options=_b( - "\352At\n+dialogflow.googleapis.com/SessionEntityType\022Eprojects/{project}/agent/sessions/{session}/entityTypes/{entity_type}" - ), + serialized_options=b"\352A\343\001\n+dialogflow.googleapis.com/SessionEntityType\022Eprojects/{project}/agent/sessions/{session}/entityTypes/{entity_type}\022mprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], serialized_start=321, - serialized_end=784, + serialized_end=897, ) @@ -167,6 +167,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -177,14 +178,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002\372A-\022+dialogflow.googleapis.com/SessionEntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -201,8 +203,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -213,14 +216,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -231,8 +235,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=786, - serialized_end=887, + serialized_start=900, + serialized_end=1049, ) @@ -242,6 +246,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="session_entity_types", @@ -260,6 +265,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -270,7 +276,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -278,6 +284,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -288,8 +295,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=890, - serialized_end=1024, + serialized_start=1052, + serialized_end=1186, ) @@ -299,6 +306,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -309,16 +317,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A-\n+dialogflow.googleapis.com/SessionEntityType" - ), + serialized_options=b"\340A\002\372A-\n+dialogflow.googleapis.com/SessionEntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -329,8 +336,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1026, - serialized_end=1122, + serialized_start=1188, + serialized_end=1284, ) @@ -340,6 +347,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -350,14 +358,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002\372A-\022+dialogflow.googleapis.com/SessionEntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="session_entity_type", @@ -374,8 +383,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -386,8 +396,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1125, - serialized_end=1259, + serialized_start=1287, + serialized_end=1469, ) @@ -397,6 +407,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="session_entity_type", @@ -413,8 +424,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -431,8 +443,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -443,8 +456,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1262, - serialized_end=1429, + serialized_start=1472, + serialized_end=1639, ) @@ -454,6 +467,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -464,16 +478,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!dialogflow.googleapis.com/Context" - ), + serialized_options=b"\340A\002\372A-\n+dialogflow.googleapis.com/SessionEntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -484,8 +497,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1431, - serialized_end=1520, + serialized_start=1641, + serialized_end=1740, ) _SESSIONENTITYTYPE.fields_by_name[ @@ -533,18 +546,16 @@ SessionEntityType = _reflection.GeneratedProtocolMessageType( "SessionEntityType", (_message.Message,), - dict( - DESCRIPTOR=_SESSIONENTITYTYPE, - __module__="google.cloud.dialogflow_v2.proto.session_entity_type_pb2", - __doc__="""Represents a session entity type. - - Extends or replaces a custom entity type at the user session level (we - refer to the entity types defined at the agent level as "custom entity - types"). - - Note: session entity types apply to all queries, regardless of the - language. - + { + "DESCRIPTOR": _SESSIONENTITYTYPE, + "__module__": "google.cloud.dialogflow_v2.proto.session_entity_type_pb2", + "__doc__": """A session represents a conversation between a Dialogflow agent and an + end-user. You can create special entities, called session entities, + during a session. Session entities can extend or replace custom entity + types and only exist during the session that they were created for. + All session data, including session entities, is stored by Dialogflow + for 20 minutes. For more information, see the `session entity guide + `__. Attributes: name: @@ -554,8 +565,8 @@ ``projects//agent/environments//users//sessions//entityTypes/``. If ``Environment ID`` is not specified, - we assume default 'draft' environment. If ``User ID`` is not - specified, we assume default '-' user. ```` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. entity_override_mode: @@ -566,19 +577,18 @@ session entity type. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SessionEntityType) - ), + }, ) _sym_db.RegisterMessage(SessionEntityType) ListSessionEntityTypesRequest = _reflection.GeneratedProtocolMessageType( "ListSessionEntityTypesRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTSESSIONENTITYTYPESREQUEST, - __module__="google.cloud.dialogflow_v2.proto.session_entity_type_pb2", - __doc__="""The request message for - [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. - + { + "DESCRIPTOR": _LISTSESSIONENTITYTYPESREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.session_entity_type_pb2", + "__doc__": """The request message for [SessionEntityTypes.ListSessionEntityTypes][go + ogle.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. Attributes: parent: @@ -586,53 +596,51 @@ Format: ``projects//agent/sessions/`` or ``projects//agent/environments//users// sessions/``. If ``Environment - ID`` is not specified, we assume default 'draft' environment. - If ``User ID`` is not specified, we assume default '-' user. + ID`` is not specified, we assume default ‘draft’ environment. + If ``User ID`` is not specified, we assume default ‘-’ user. page_size: Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. page_token: - Optional. The next\_page\_token value returned from a previous + Optional. The next_page_token value returned from a previous list request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListSessionEntityTypesRequest) - ), + }, ) _sym_db.RegisterMessage(ListSessionEntityTypesRequest) ListSessionEntityTypesResponse = _reflection.GeneratedProtocolMessageType( "ListSessionEntityTypesResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTSESSIONENTITYTYPESRESPONSE, - __module__="google.cloud.dialogflow_v2.proto.session_entity_type_pb2", - __doc__="""The response message for - [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. - + { + "DESCRIPTOR": _LISTSESSIONENTITYTYPESRESPONSE, + "__module__": "google.cloud.dialogflow_v2.proto.session_entity_type_pb2", + "__doc__": """The response message for [SessionEntityTypes.ListSessionEntityTypes][g + oogle.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes]. Attributes: session_entity_types: The list of session entity types. There will be a maximum - number of items returned based on the page\_size field in the + number of items returned based on the page_size field in the request. next_page_token: Token to retrieve the next page of results, or empty if there are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListSessionEntityTypesResponse) - ), + }, ) _sym_db.RegisterMessage(ListSessionEntityTypesResponse) GetSessionEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "GetSessionEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETSESSIONENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2.proto.session_entity_type_pb2", - __doc__="""The request message for - [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType]. - + { + "DESCRIPTOR": _GETSESSIONENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.session_entity_type_pb2", + "__doc__": """The request message for [SessionEntityTypes.GetSessionEntityType][goog + le.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType]. Attributes: name: @@ -642,23 +650,22 @@ ``projects//agent/environments//users//sessions//entityTypes/``. If ``Environment ID`` is not specified, - we assume default 'draft' environment. If ``User ID`` is not - specified, we assume default '-' user. + we assume default ‘draft’ environment. If ``User ID`` is not + specified, we assume default ‘-’ user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.GetSessionEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(GetSessionEntityTypeRequest) CreateSessionEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "CreateSessionEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATESESSIONENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2.proto.session_entity_type_pb2", - __doc__="""The request message for - [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType]. - + { + "DESCRIPTOR": _CREATESESSIONENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.session_entity_type_pb2", + "__doc__": """The request message for [SessionEntityTypes.CreateSessionEntityType][g + oogle.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType]. Attributes: parent: @@ -666,25 +673,24 @@ Format: ``projects//agent/sessions/`` or ``projects//agent/environments//users// sessions/``. If ``Environment - ID`` is not specified, we assume default 'draft' environment. - If ``User ID`` is not specified, we assume default '-' user. + ID`` is not specified, we assume default ‘draft’ environment. + If ``User ID`` is not specified, we assume default ‘-’ user. session_entity_type: Required. The session entity type to create. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(CreateSessionEntityTypeRequest) UpdateSessionEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "UpdateSessionEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATESESSIONENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2.proto.session_entity_type_pb2", - __doc__="""The request message for - [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType]. - + { + "DESCRIPTOR": _UPDATESESSIONENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.session_entity_type_pb2", + "__doc__": """The request message for [SessionEntityTypes.UpdateSessionEntityType][g + oogle.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType]. Attributes: session_entity_type: @@ -693,19 +699,18 @@ Optional. The mask to control which fields get updated. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateSessionEntityTypeRequest) DeleteSessionEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "DeleteSessionEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETESESSIONENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2.proto.session_entity_type_pb2", - __doc__="""The request message for - [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType]. - + { + "DESCRIPTOR": _DELETESESSIONENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.session_entity_type_pb2", + "__doc__": """The request message for [SessionEntityTypes.DeleteSessionEntityType][g + oogle.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType]. Attributes: name: @@ -715,11 +720,11 @@ ``projects//agent/environments//users//sessions//entityTypes/``. If ``Environment ID`` is not specified, - we assume default 'draft' environment. If ``User ID`` is not - specified, we assume default '-' user. + we assume default ‘draft’ environment. If ``User ID`` is not + specified, we assume default ‘-’ user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteSessionEntityTypeRequest) @@ -744,11 +749,10 @@ full_name="google.cloud.dialogflow.v2.SessionEntityTypes", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), - serialized_start=1523, - serialized_end=3247, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=1743, + serialized_end=3489, methods=[ _descriptor.MethodDescriptor( name="ListSessionEntityTypes", @@ -757,9 +761,8 @@ containing_service=None, input_type=_LISTSESSIONENTITYTYPESREQUEST, output_type=_LISTSESSIONENTITYTYPESRESPONSE, - serialized_options=_b( - "\202\323\344\223\002\205\001\0224/v2/{parent=projects/*/agent/sessions/*}/entityTypesZM\022K/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002\205\001\0224/v2/{parent=projects/*/agent/sessions/*}/entityTypesZM\022K/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetSessionEntityType", @@ -768,9 +771,8 @@ containing_service=None, input_type=_GETSESSIONENTITYTYPEREQUEST, output_type=_SESSIONENTITYTYPE, - serialized_options=_b( - "\202\323\344\223\002\205\001\0224/v2/{name=projects/*/agent/sessions/*/entityTypes/*}ZM\022K/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002\205\001\0224/v2/{name=projects/*/agent/sessions/*/entityTypes/*}ZM\022K/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateSessionEntityType", @@ -779,9 +781,8 @@ containing_service=None, input_type=_CREATESESSIONENTITYTYPEREQUEST, output_type=_SESSIONENTITYTYPE, - serialized_options=_b( - '\202\323\344\223\002\257\001"4/v2/{parent=projects/*/agent/sessions/*}/entityTypes:\023session_entity_typeZb"K/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes:\023session_entity_type\332A\032parent,session_entity_type' - ), + serialized_options=b'\202\323\344\223\002\257\001"4/v2/{parent=projects/*/agent/sessions/*}/entityTypes:\023session_entity_typeZb"K/v2/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes:\023session_entity_type\332A\032parent,session_entity_type', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateSessionEntityType", @@ -790,9 +791,8 @@ containing_service=None, input_type=_UPDATESESSIONENTITYTYPEREQUEST, output_type=_SESSIONENTITYTYPE, - serialized_options=_b( - "\202\323\344\223\002\327\0012H/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}:\023session_entity_typeZv2_/v2/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}:\023session_entity_type\332A\037session_entity_type,update_mask" - ), + serialized_options=b"\202\323\344\223\002\327\0012H/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}:\023session_entity_typeZv2_/v2/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}:\023session_entity_type\332A\023session_entity_type\332A\037session_entity_type,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteSessionEntityType", @@ -801,9 +801,8 @@ containing_service=None, input_type=_DELETESESSIONENTITYTYPEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002\205\001*4/v2/{name=projects/*/agent/sessions/*/entityTypes/*}ZM*K/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002\205\001*4/v2/{name=projects/*/agent/sessions/*/entityTypes/*}ZM*K/v2/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2/proto/session_entity_type_pb2_grpc.py b/dialogflow_v2/proto/session_entity_type_pb2_grpc.py index b030eb808..294ecf527 100644 --- a/dialogflow_v2/proto/session_entity_type_pb2_grpc.py +++ b/dialogflow_v2/proto/session_entity_type_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2.proto import ( @@ -8,31 +9,15 @@ class SessionEntityTypesStub(object): - """Entities are extracted from user input and represent parameters that are - meaningful to your application. For example, a date range, a proper name - such as a geographic location or landmark, and so on. Entities represent - actionable data for your application. - - Session entity types are referred to as **User** entity types and are - entities that are built for an individual user such as - favorites, preferences, playlists, and so on. You can redefine a session - entity type at the session level. - - Session entity methods do not work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - - For more information about entity types, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/entities-overview). - """ + """Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityType]. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.ListSessionEntityTypes = channel.unary_unary( "/google.cloud.dialogflow.v2.SessionEntityTypes/ListSessionEntityTypes", request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2.ListSessionEntityTypesRequest.SerializeToString, @@ -61,32 +46,16 @@ def __init__(self, channel): class SessionEntityTypesServicer(object): - """Entities are extracted from user input and represent parameters that are - meaningful to your application. For example, a date range, a proper name - such as a geographic location or landmark, and so on. Entities represent - actionable data for your application. - - Session entity types are referred to as **User** entity types and are - entities that are built for an individual user such as - favorites, preferences, playlists, and so on. You can redefine a session - entity type at the session level. - - Session entity methods do not work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - - For more information about entity types, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/entities-overview). - """ + """Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityType]. + """ def ListSessionEntityTypes(self, request, context): """Returns the list of all session entity types in the specified session. - This method doesn't work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - """ + This method doesn't work with Google Assistant integration. + Contact Dialogflow support if you need to use session entities + with Google Assistant integration. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -94,10 +63,10 @@ def ListSessionEntityTypes(self, request, context): def GetSessionEntityType(self, request, context): """Retrieves the specified session entity type. - This method doesn't work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - """ + This method doesn't work with Google Assistant integration. + Contact Dialogflow support if you need to use session entities + with Google Assistant integration. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -105,13 +74,13 @@ def GetSessionEntityType(self, request, context): def CreateSessionEntityType(self, request, context): """Creates a session entity type. - If the specified session entity type already exists, overrides the session - entity type. + If the specified session entity type already exists, overrides the session + entity type. - This method doesn't work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - """ + This method doesn't work with Google Assistant integration. + Contact Dialogflow support if you need to use session entities + with Google Assistant integration. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -119,10 +88,10 @@ def CreateSessionEntityType(self, request, context): def UpdateSessionEntityType(self, request, context): """Updates the specified session entity type. - This method doesn't work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - """ + This method doesn't work with Google Assistant integration. + Contact Dialogflow support if you need to use session entities + with Google Assistant integration. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -130,10 +99,10 @@ def UpdateSessionEntityType(self, request, context): def DeleteSessionEntityType(self, request, context): """Deletes the specified session entity type. - This method doesn't work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - """ + This method doesn't work with Google Assistant integration. + Contact Dialogflow support if you need to use session entities + with Google Assistant integration. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -171,3 +140,144 @@ def add_SessionEntityTypesServicer_to_server(servicer, server): "google.cloud.dialogflow.v2.SessionEntityTypes", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class SessionEntityTypes(object): + """Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityType]. + """ + + @staticmethod + def ListSessionEntityTypes( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.SessionEntityTypes/ListSessionEntityTypes", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2.ListSessionEntityTypesRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2.ListSessionEntityTypesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetSessionEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.SessionEntityTypes/GetSessionEntityType", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2.GetSessionEntityTypeRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2.SessionEntityType.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateSessionEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.SessionEntityTypes/CreateSessionEntityType", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2.CreateSessionEntityTypeRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2.SessionEntityType.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateSessionEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.SessionEntityTypes/UpdateSessionEntityType", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2.UpdateSessionEntityTypeRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2.SessionEntityType.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteSessionEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.SessionEntityTypes/DeleteSessionEntityType", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2.DeleteSessionEntityTypeRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2/proto/session_pb2.py b/dialogflow_v2/proto/session_pb2.py index ae703d050..b257bea47 100644 --- a/dialogflow_v2/proto/session_pb2.py +++ b/dialogflow_v2/proto/session_pb2.py @@ -2,10 +2,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/session.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -43,12 +40,9 @@ name="google/cloud/dialogflow_v2/proto/session.proto", package="google.cloud.dialogflow.v2", syntax="proto3", - serialized_options=_b( - "\n\036com.google.cloud.dialogflow.v2B\014SessionProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2\352A\222\001\n!dialogflow.googleapis.com/Session\022@projects/{project}/locations/{location}/agent/sessions/{session}\022+projects/{project}/agent/sessions/{session}" - ), - serialized_pb=_b( - '\n.google/cloud/dialogflow_v2/proto/session.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/dialogflow_v2/proto/audio_config.proto\x1a.google/cloud/dialogflow_v2/proto/context.proto\x1a-google/cloud/dialogflow_v2/proto/intent.proto\x1a:google/cloud/dialogflow_v2/proto/session_entity_type.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x18google/type/latlng.proto"\xf5\x02\n\x13\x44\x65tectIntentRequest\x12:\n\x07session\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Session\x12\x41\n\x0cquery_params\x18\x02 \x01(\x0b\x32+.google.cloud.dialogflow.v2.QueryParameters\x12@\n\x0bquery_input\x18\x03 \x01(\x0b\x32&.google.cloud.dialogflow.v2.QueryInputB\x03\xe0\x41\x02\x12J\n\x13output_audio_config\x18\x04 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig\x12<\n\x18output_audio_config_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0binput_audio\x18\x05 \x01(\x0c"\xf8\x01\n\x14\x44\x65tectIntentResponse\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12=\n\x0cquery_result\x18\x02 \x01(\x0b\x32\'.google.cloud.dialogflow.v2.QueryResult\x12*\n\x0ewebhook_status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x14\n\x0coutput_audio\x18\x04 \x01(\x0c\x12J\n\x13output_audio_config\x18\x06 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig"\xfc\x02\n\x0fQueryParameters\x12\x11\n\ttime_zone\x18\x01 \x01(\t\x12)\n\x0cgeo_location\x18\x02 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x08\x63ontexts\x18\x03 \x03(\x0b\x32#.google.cloud.dialogflow.v2.Context\x12\x16\n\x0ereset_contexts\x18\x04 \x01(\x08\x12K\n\x14session_entity_types\x18\x05 \x03(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityType\x12(\n\x07payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x65\n!sentiment_analysis_request_config\x18\n \x01(\x0b\x32:.google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig"\xcb\x01\n\nQueryInput\x12\x44\n\x0c\x61udio_config\x18\x01 \x01(\x0b\x32,.google.cloud.dialogflow.v2.InputAudioConfigH\x00\x12\x35\n\x04text\x18\x02 \x01(\x0b\x32%.google.cloud.dialogflow.v2.TextInputH\x00\x12\x37\n\x05\x65vent\x18\x03 \x01(\x0b\x32&.google.cloud.dialogflow.v2.EventInputH\x00\x42\x07\n\x05input"\x90\x05\n\x0bQueryResult\x12\x12\n\nquery_text\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x0f \x01(\t\x12%\n\x1dspeech_recognition_confidence\x18\x02 \x01(\x02\x12\x0e\n\x06\x61\x63tion\x18\x03 \x01(\t\x12+\n\nparameters\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12#\n\x1b\x61ll_required_params_present\x18\x05 \x01(\x08\x12\x18\n\x10\x66ulfillment_text\x18\x06 \x01(\t\x12H\n\x14\x66ulfillment_messages\x18\x07 \x03(\x0b\x32*.google.cloud.dialogflow.v2.Intent.Message\x12\x16\n\x0ewebhook_source\x18\x08 \x01(\t\x12\x30\n\x0fwebhook_payload\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12<\n\x0foutput_contexts\x18\n \x03(\x0b\x32#.google.cloud.dialogflow.v2.Context\x12\x32\n\x06intent\x18\x0b \x01(\x0b\x32".google.cloud.dialogflow.v2.Intent\x12#\n\x1bintent_detection_confidence\x18\x0c \x01(\x02\x12\x30\n\x0f\x64iagnostic_info\x18\x0e \x01(\x0b\x32\x17.google.protobuf.Struct\x12V\n\x19sentiment_analysis_result\x18\x11 \x01(\x0b\x32\x33.google.cloud.dialogflow.v2.SentimentAnalysisResult"\x9c\x03\n\x1cStreamingDetectIntentRequest\x12:\n\x07session\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Session\x12\x41\n\x0cquery_params\x18\x02 \x01(\x0b\x32+.google.cloud.dialogflow.v2.QueryParameters\x12@\n\x0bquery_input\x18\x03 \x01(\x0b\x32&.google.cloud.dialogflow.v2.QueryInputB\x03\xe0\x41\x02\x12\x1c\n\x10single_utterance\x18\x04 \x01(\x08\x42\x02\x18\x01\x12J\n\x13output_audio_config\x18\x05 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig\x12<\n\x18output_audio_config_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0binput_audio\x18\x06 \x01(\x0c"\xd5\x02\n\x1dStreamingDetectIntentResponse\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12R\n\x12recognition_result\x18\x02 \x01(\x0b\x32\x36.google.cloud.dialogflow.v2.StreamingRecognitionResult\x12=\n\x0cquery_result\x18\x03 \x01(\x0b\x32\'.google.cloud.dialogflow.v2.QueryResult\x12*\n\x0ewebhook_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\x12\x14\n\x0coutput_audio\x18\x05 \x01(\x0c\x12J\n\x13output_audio_config\x18\x06 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig"\x86\x03\n\x1aStreamingRecognitionResult\x12X\n\x0cmessage_type\x18\x01 \x01(\x0e\x32\x42.google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType\x12\x12\n\ntranscript\x18\x02 \x01(\t\x12\x10\n\x08is_final\x18\x03 \x01(\x08\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x44\n\x10speech_word_info\x18\x07 \x03(\x0b\x32*.google.cloud.dialogflow.v2.SpeechWordInfo\x12\x34\n\x11speech_end_offset\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration"X\n\x0bMessageType\x12\x1c\n\x18MESSAGE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTRANSCRIPT\x10\x01\x12\x1b\n\x17\x45ND_OF_SINGLE_UTTERANCE\x10\x02":\n\tTextInput\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x02"h\n\nEventInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12+\n\nparameters\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x02"F\n\x1eSentimentAnalysisRequestConfig\x12$\n\x1c\x61nalyze_query_text_sentiment\x18\x01 \x01(\x08"^\n\x17SentimentAnalysisResult\x12\x43\n\x14query_text_sentiment\x18\x01 \x01(\x0b\x32%.google.cloud.dialogflow.v2.Sentiment"-\n\tSentiment\x12\r\n\x05score\x18\x01 \x01(\x02\x12\x11\n\tmagnitude\x18\x02 \x01(\x02\x32\xbc\x04\n\x08Sessions\x12\xa0\x02\n\x0c\x44\x65tectIntent\x12/.google.cloud.dialogflow.v2.DetectIntentRequest\x1a\x30.google.cloud.dialogflow.v2.DetectIntentResponse"\xac\x01\x82\xd3\xe4\x93\x02\x8f\x01"6/v2/{session=projects/*/agent/sessions/*}:detectIntent:\x01*ZR"M/v2/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent:\x01*\xda\x41\x13session,query_input\x12\x92\x01\n\x15StreamingDetectIntent\x12\x38.google.cloud.dialogflow.v2.StreamingDetectIntentRequest\x1a\x39.google.cloud.dialogflow.v2.StreamingDetectIntentResponse"\x00(\x01\x30\x01\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xb1\x02\n\x1e\x63om.google.cloud.dialogflow.v2B\x0cSessionProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2\xea\x41\x92\x01\n!dialogflow.googleapis.com/Session\x12@projects/{project}/locations/{location}/agent/sessions/{session}\x12+projects/{project}/agent/sessions/{session}b\x06proto3' - ), + serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\014SessionProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2\352A\245\001\n!dialogflow.googleapis.com/Session\022+projects/{project}/agent/sessions/{session}\022Sprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n.google/cloud/dialogflow_v2/proto/session.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/dialogflow_v2/proto/audio_config.proto\x1a.google/cloud/dialogflow_v2/proto/context.proto\x1a-google/cloud/dialogflow_v2/proto/intent.proto\x1a:google/cloud/dialogflow_v2/proto/session_entity_type.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x18google/type/latlng.proto"\xf5\x02\n\x13\x44\x65tectIntentRequest\x12:\n\x07session\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Session\x12\x41\n\x0cquery_params\x18\x02 \x01(\x0b\x32+.google.cloud.dialogflow.v2.QueryParameters\x12@\n\x0bquery_input\x18\x03 \x01(\x0b\x32&.google.cloud.dialogflow.v2.QueryInputB\x03\xe0\x41\x02\x12J\n\x13output_audio_config\x18\x04 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig\x12<\n\x18output_audio_config_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0binput_audio\x18\x05 \x01(\x0c"\xf8\x01\n\x14\x44\x65tectIntentResponse\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12=\n\x0cquery_result\x18\x02 \x01(\x0b\x32\'.google.cloud.dialogflow.v2.QueryResult\x12*\n\x0ewebhook_status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x14\n\x0coutput_audio\x18\x04 \x01(\x0c\x12J\n\x13output_audio_config\x18\x06 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig"\xfc\x02\n\x0fQueryParameters\x12\x11\n\ttime_zone\x18\x01 \x01(\t\x12)\n\x0cgeo_location\x18\x02 \x01(\x0b\x32\x13.google.type.LatLng\x12\x35\n\x08\x63ontexts\x18\x03 \x03(\x0b\x32#.google.cloud.dialogflow.v2.Context\x12\x16\n\x0ereset_contexts\x18\x04 \x01(\x08\x12K\n\x14session_entity_types\x18\x05 \x03(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityType\x12(\n\x07payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x65\n!sentiment_analysis_request_config\x18\n \x01(\x0b\x32:.google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig"\xcb\x01\n\nQueryInput\x12\x44\n\x0c\x61udio_config\x18\x01 \x01(\x0b\x32,.google.cloud.dialogflow.v2.InputAudioConfigH\x00\x12\x35\n\x04text\x18\x02 \x01(\x0b\x32%.google.cloud.dialogflow.v2.TextInputH\x00\x12\x37\n\x05\x65vent\x18\x03 \x01(\x0b\x32&.google.cloud.dialogflow.v2.EventInputH\x00\x42\x07\n\x05input"\x90\x05\n\x0bQueryResult\x12\x12\n\nquery_text\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x0f \x01(\t\x12%\n\x1dspeech_recognition_confidence\x18\x02 \x01(\x02\x12\x0e\n\x06\x61\x63tion\x18\x03 \x01(\t\x12+\n\nparameters\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12#\n\x1b\x61ll_required_params_present\x18\x05 \x01(\x08\x12\x18\n\x10\x66ulfillment_text\x18\x06 \x01(\t\x12H\n\x14\x66ulfillment_messages\x18\x07 \x03(\x0b\x32*.google.cloud.dialogflow.v2.Intent.Message\x12\x16\n\x0ewebhook_source\x18\x08 \x01(\t\x12\x30\n\x0fwebhook_payload\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12<\n\x0foutput_contexts\x18\n \x03(\x0b\x32#.google.cloud.dialogflow.v2.Context\x12\x32\n\x06intent\x18\x0b \x01(\x0b\x32".google.cloud.dialogflow.v2.Intent\x12#\n\x1bintent_detection_confidence\x18\x0c \x01(\x02\x12\x30\n\x0f\x64iagnostic_info\x18\x0e \x01(\x0b\x32\x17.google.protobuf.Struct\x12V\n\x19sentiment_analysis_result\x18\x11 \x01(\x0b\x32\x33.google.cloud.dialogflow.v2.SentimentAnalysisResult"\x9c\x03\n\x1cStreamingDetectIntentRequest\x12:\n\x07session\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Session\x12\x41\n\x0cquery_params\x18\x02 \x01(\x0b\x32+.google.cloud.dialogflow.v2.QueryParameters\x12@\n\x0bquery_input\x18\x03 \x01(\x0b\x32&.google.cloud.dialogflow.v2.QueryInputB\x03\xe0\x41\x02\x12\x1c\n\x10single_utterance\x18\x04 \x01(\x08\x42\x02\x18\x01\x12J\n\x13output_audio_config\x18\x05 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig\x12<\n\x18output_audio_config_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0binput_audio\x18\x06 \x01(\x0c"\xd5\x02\n\x1dStreamingDetectIntentResponse\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12R\n\x12recognition_result\x18\x02 \x01(\x0b\x32\x36.google.cloud.dialogflow.v2.StreamingRecognitionResult\x12=\n\x0cquery_result\x18\x03 \x01(\x0b\x32\'.google.cloud.dialogflow.v2.QueryResult\x12*\n\x0ewebhook_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\x12\x14\n\x0coutput_audio\x18\x05 \x01(\x0c\x12J\n\x13output_audio_config\x18\x06 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig"\x86\x03\n\x1aStreamingRecognitionResult\x12X\n\x0cmessage_type\x18\x01 \x01(\x0e\x32\x42.google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType\x12\x12\n\ntranscript\x18\x02 \x01(\t\x12\x10\n\x08is_final\x18\x03 \x01(\x08\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x44\n\x10speech_word_info\x18\x07 \x03(\x0b\x32*.google.cloud.dialogflow.v2.SpeechWordInfo\x12\x34\n\x11speech_end_offset\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration"X\n\x0bMessageType\x12\x1c\n\x18MESSAGE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTRANSCRIPT\x10\x01\x12\x1b\n\x17\x45ND_OF_SINGLE_UTTERANCE\x10\x02":\n\tTextInput\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x02"h\n\nEventInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12+\n\nparameters\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x02"F\n\x1eSentimentAnalysisRequestConfig\x12$\n\x1c\x61nalyze_query_text_sentiment\x18\x01 \x01(\x08"^\n\x17SentimentAnalysisResult\x12\x43\n\x14query_text_sentiment\x18\x01 \x01(\x0b\x32%.google.cloud.dialogflow.v2.Sentiment"-\n\tSentiment\x12\r\n\x05score\x18\x01 \x01(\x02\x12\x11\n\tmagnitude\x18\x02 \x01(\x02\x32\xbc\x04\n\x08Sessions\x12\xa0\x02\n\x0c\x44\x65tectIntent\x12/.google.cloud.dialogflow.v2.DetectIntentRequest\x1a\x30.google.cloud.dialogflow.v2.DetectIntentResponse"\xac\x01\x82\xd3\xe4\x93\x02\x8f\x01"6/v2/{session=projects/*/agent/sessions/*}:detectIntent:\x01*ZR"M/v2/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent:\x01*\xda\x41\x13session,query_input\x12\x92\x01\n\x15StreamingDetectIntent\x12\x38.google.cloud.dialogflow.v2.StreamingDetectIntentRequest\x1a\x39.google.cloud.dialogflow.v2.StreamingDetectIntentResponse"\x00(\x01\x30\x01\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xc4\x02\n\x1e\x63om.google.cloud.dialogflow.v2B\x0cSessionProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2\xea\x41\xa5\x01\n!dialogflow.googleapis.com/Session\x12+projects/{project}/agent/sessions/{session}\x12Sprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -72,6 +66,7 @@ full_name="google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="MESSAGE_TYPE_UNSPECIFIED", @@ -79,9 +74,15 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TRANSCRIPT", index=1, number=1, serialized_options=None, type=None + name="TRANSCRIPT", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="END_OF_SINGLE_UTTERANCE", @@ -89,6 +90,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -105,6 +107,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="session", @@ -115,16 +118,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!dialogflow.googleapis.com/Session" - ), + serialized_options=b"\340A\002\372A#\n!dialogflow.googleapis.com/Session", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_params", @@ -143,6 +145,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_input", @@ -159,8 +162,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio_config", @@ -179,6 +183,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio_config_mask", @@ -197,6 +202,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_audio", @@ -207,7 +213,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -215,6 +221,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -236,6 +243,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="response_id", @@ -246,7 +254,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -254,6 +262,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_result", @@ -272,6 +281,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="webhook_status", @@ -290,6 +300,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio", @@ -300,7 +311,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -308,6 +319,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio_config", @@ -326,6 +338,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -347,6 +360,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="time_zone", @@ -357,7 +371,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -365,6 +379,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="geo_location", @@ -383,6 +398,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="contexts", @@ -401,6 +417,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="reset_contexts", @@ -419,6 +436,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="session_entity_types", @@ -437,6 +455,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="payload", @@ -455,6 +474,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sentiment_analysis_request_config", @@ -473,6 +493,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -494,6 +515,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="audio_config", @@ -512,6 +534,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text", @@ -530,6 +553,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="event", @@ -548,6 +572,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -563,6 +588,7 @@ full_name="google.cloud.dialogflow.v2.QueryInput.input", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], @@ -577,6 +603,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="query_text", @@ -587,7 +614,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -595,6 +622,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -605,7 +633,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -613,6 +641,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="speech_recognition_confidence", @@ -631,6 +660,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="action", @@ -641,7 +671,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -649,6 +679,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parameters", @@ -667,6 +698,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="all_required_params_present", @@ -685,6 +717,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="fulfillment_text", @@ -695,7 +728,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -703,6 +736,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="fulfillment_messages", @@ -721,6 +755,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="webhook_source", @@ -731,7 +766,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -739,6 +774,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="webhook_payload", @@ -757,6 +793,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_contexts", @@ -775,6 +812,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent", @@ -793,6 +831,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_detection_confidence", @@ -811,6 +850,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="diagnostic_info", @@ -829,6 +869,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sentiment_analysis_result", @@ -847,6 +888,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -868,6 +910,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="session", @@ -878,16 +921,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!dialogflow.googleapis.com/Session" - ), + serialized_options=b"\340A\002\372A#\n!dialogflow.googleapis.com/Session", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_params", @@ -906,6 +948,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_input", @@ -922,8 +965,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="single_utterance", @@ -940,8 +984,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\030\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio_config", @@ -960,6 +1005,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio_config_mask", @@ -978,6 +1024,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_audio", @@ -988,7 +1035,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -996,6 +1043,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1017,6 +1065,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="response_id", @@ -1027,7 +1076,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1035,6 +1084,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="recognition_result", @@ -1053,6 +1103,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_result", @@ -1071,6 +1122,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="webhook_status", @@ -1089,6 +1141,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio", @@ -1099,7 +1152,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -1107,6 +1160,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio_config", @@ -1125,6 +1179,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1146,6 +1201,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="message_type", @@ -1164,6 +1220,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="transcript", @@ -1174,7 +1231,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1182,6 +1239,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="is_final", @@ -1200,6 +1258,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -1218,6 +1277,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="speech_word_info", @@ -1236,6 +1296,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="speech_end_offset", @@ -1254,6 +1315,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1275,6 +1337,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -1285,14 +1348,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -1303,14 +1367,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1332,6 +1397,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1342,14 +1408,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parameters", @@ -1368,6 +1435,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -1378,14 +1446,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1407,6 +1476,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="analyze_query_text_sentiment", @@ -1425,6 +1495,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1446,6 +1517,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="query_text_sentiment", @@ -1464,6 +1536,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1485,6 +1558,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="score", @@ -1503,6 +1577,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="magnitude", @@ -1521,6 +1596,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1685,13 +1761,10 @@ DetectIntentRequest = _reflection.GeneratedProtocolMessageType( "DetectIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_DETECTINTENTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__=""" - Requests and responses for custom methods. The request to detect user's - intent. - + { + "DESCRIPTOR": _DETECTINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.session_pb2", + "__doc__": """The request to detect user’s intent. Attributes: session: @@ -1699,12 +1772,14 @@ Format: ``projects//agent/sessions/``, or ``projects//agent/environments//users//sessions/``. If ``Environment - ID`` is not specified, we assume default 'draft' environment. - If ``User ID`` is not specified, we are using "-". It's up to + ID`` is not specified, we assume default ‘draft’ environment. + If ``User ID`` is not specified, we are using “-”. It’s up to the API caller to choose an appropriate ``Session ID`` and ``User Id``. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the ``Session ID`` and ``User ID`` must not exceed 36 characters. + For more information, see the `API interactions guide + `__. query_params: The parameters of this query. query_input: @@ -1718,13 +1793,13 @@ audio. If this field is not set and agent-level speech synthesizer is not configured, no output audio is generated. output_audio_config_mask: - Mask for [output\_audio\_config][google.cloud.dialogflow.v2.De - tectIntentRequest.output\_audio\_config] indicating which - settings in this request-level config should override speech + Mask for [output_audio_config][google.cloud.dialogflow.v2.Dete + ctIntentRequest.output_audio_config] indicating which settings + in this request-level config should override speech synthesizer settings defined at agent-level. If unspecified - or empty, [output\_audio\_config][google.cloud.dialogflow.v2.D - etectIntentRequest.output\_audio\_config] replaces the agent- - level config in its entirety. + or empty, [output_audio_config][google.cloud.dialogflow.v2.Det + ectIntentRequest.output_audio_config] replaces the agent-level + config in its entirety. input_audio: The natural language speech audio to be processed. This field should be populated iff ``query_input`` is set to an input @@ -1732,18 +1807,17 @@ speech audio data. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.DetectIntentRequest) - ), + }, ) _sym_db.RegisterMessage(DetectIntentRequest) DetectIntentResponse = _reflection.GeneratedProtocolMessageType( "DetectIntentResponse", (_message.Message,), - dict( - DESCRIPTOR=_DETECTINTENTRESPONSE, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__="""The message returned from the DetectIntent method. - + { + "DESCRIPTOR": _DETECTINTENTRESPONSE, + "__module__": "google.cloud.dialogflow_v2.proto.session_pb2", + "__doc__": """The message returned from the DetectIntent method. Attributes: response_id: @@ -1763,31 +1837,33 @@ ``query_result.fulfillment_messages`` field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, - the generated audio content will be empty. + the generated audio content will be empty. In some scenarios, + multiple output audio fields may be present in the response + structure. In these cases, only the top-most-level audio + output has content. output_audio_config: The config used by the speech synthesizer to generate the output audio. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.DetectIntentResponse) - ), + }, ) _sym_db.RegisterMessage(DetectIntentResponse) QueryParameters = _reflection.GeneratedProtocolMessageType( "QueryParameters", (_message.Message,), - dict( - DESCRIPTOR=_QUERYPARAMETERS, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__="""Represents the parameters of the conversational query. - + { + "DESCRIPTOR": _QUERYPARAMETERS, + "__module__": "google.cloud.dialogflow_v2.proto.session_pb2", + "__doc__": """Represents the parameters of the conversational query. Attributes: time_zone: The time zone of this conversational query from the `time zone database `__, e.g., - America/New\_York, Europe/Paris. If not provided, the time - zone specified in agent settings is used. + America/New_York, Europe/Paris. If not provided, the time zone + specified in agent settings is used. geo_location: The geo location of this conversational query. contexts: @@ -1801,33 +1877,30 @@ entity types with. The entity synonyms apply to all languages and persist for the session of this query. payload: - This field can be used to pass custom data into the webhook - associated with the agent. Arbitrary JSON objects are - supported. + This field can be used to pass custom data to your webhook. + Arbitrary JSON objects are supported. If supplied, the value + is used to populate the + ``WebhookRequest.original_detect_intent_request.payload`` + field sent to your webhook. sentiment_analysis_request_config: Configures the type of sentiment analysis to perform. If not provided, sentiment analysis is not performed. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.QueryParameters) - ), + }, ) _sym_db.RegisterMessage(QueryParameters) QueryInput = _reflection.GeneratedProtocolMessageType( "QueryInput", (_message.Message,), - dict( - DESCRIPTOR=_QUERYINPUT, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__="""Represents the query input. It can contain either: - - 1. An audio config which instructs the speech recognizer how to process - the speech audio. - - 2. A conversational query in the form of text,. - - 3. An event that specifies which intent to trigger. - + { + "DESCRIPTOR": _QUERYINPUT, + "__module__": "google.cloud.dialogflow_v2.proto.session_pb2", + "__doc__": """Represents the query input. It can contain either: 1. An audio config + which instructs the speech recognizer how to process the speech + audio. 2. A conversational query in the form of text,. 3. An event + that specifies which intent to trigger. Attributes: input: @@ -1841,19 +1914,17 @@ The event to be processed. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.QueryInput) - ), + }, ) _sym_db.RegisterMessage(QueryInput) QueryResult = _reflection.GeneratedProtocolMessageType( "QueryResult", (_message.Message,), - dict( - DESCRIPTOR=_QUERYRESULT, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__="""Represents the result of conversational query or event - processing. - + { + "DESCRIPTOR": _QUERYRESULT, + "__module__": "google.cloud.dialogflow_v2.proto.session_pb2", + "__doc__": """Represents the result of conversational query or event processing. Attributes: query_text: @@ -1876,19 +1947,29 @@ the recognized words are correct. The default of 0.0 is a sentinel value indicating that confidence was not set. This field is not guaranteed to be accurate or set. In particular - this field isn't set for StreamingDetectIntent since the + this field isn’t set for StreamingDetectIntent since the streaming endpoint has separate confidence estimates per portion of the audio in StreamingRecognitionResult. action: The action name from the matched intent. parameters: - The collection of extracted parameters. + The collection of extracted parameters. Depending on your + protocol or client library language, this is a map, + associative array, symbol table, dictionary, or JSON object + composed of a collection of (MapKey, MapValue) pairs: - + MapKey type: string - MapKey value: parameter name - + MapValue type: - If parameter’s entity type is a + composite entity: map - Else: string or number, depending + on parameter value type - MapValue value: - If + parameter’s entity type is a composite entity: map from + composite entity property names to property values - Else: + parameter value all_required_params_present: This field is set to: - ``false`` if the matched intent has required parameters and not all of the required parameter values have been collected. - ``true`` if all required parameter values have been collected, or if the matched - intent doesn't contain any required parameters. + intent doesn’t contain any required parameters. fulfillment_text: The text to be pronounced to the user or shown on the screen. Note: This is a legacy field, ``fulfillment_messages`` should @@ -1935,53 +2016,41 @@ request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.QueryResult) - ), + }, ) _sym_db.RegisterMessage(QueryResult) StreamingDetectIntentRequest = _reflection.GeneratedProtocolMessageType( "StreamingDetectIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_STREAMINGDETECTINTENTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__="""The top-level message sent by the client to the - [Sessions.StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent] - method. - - Multiple request messages should be sent in order: - - 1. The first message must contain - [session][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.session], - [query\_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query\_input] - plus optionally - [query\_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query\_params]. - If the client wants to receive an audio response, it should also - contain - [output\_audio\_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output\_audio\_config]. - The message must not contain - [input\_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input\_audio]. - 2. If - [query\_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query\_input] - was set to - [query\_input.audio\_config][google.cloud.dialogflow.v2.InputAudioConfig], - all subsequent messages must contain - [input\_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input\_audio] - to continue with Speech recognition. If you decide to rather detect - an intent from text input after you already started Speech - recognition, please send a message with - [query\_input.text][google.cloud.dialogflow.v2.QueryInput.text]. - - However, note that: - - - Dialogflow will bill you for the audio duration so far. - - Dialogflow discards all Speech recognition results in favor of the - input text. - - Dialogflow will use the language code from the first message. - - After you sent all input, you must half-close or abort the request - stream. - + { + "DESCRIPTOR": _STREAMINGDETECTINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.session_pb2", + "__doc__": """The top-level message sent by the client to the [Sessions.StreamingDet + ectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent] + method. Multiple request messages should be sent in order: 1. The + first message must contain [session][google.cloud.dialogflow.v2.Str + eamingDetectIntentRequest.session], [query_input][google.cloud.dial + ogflow.v2.StreamingDetectIntentRequest.query_input] plus optionally + [query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest + .query_params]. If the client wants to receive an audio response, + it should also contain [output_audio_config][google.cloud.dialog + flow.v2.StreamingDetectIntentRequest.output_audio_config]. The + message must not contain [input_audio][google.cloud.dialogflow.v2.S + treamingDetectIntentRequest.input_audio]. 2. If [query_input][googl + e.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] was + set to [query_input.audio_config][google.cloud.dialogflow.v2.InputA + udioConfig], all subsequent messages must contain [input_audio][ + google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio] + to continue with Speech recognition. If you decide to rather detect + an intent from text input after you already started Speech + recognition, please send a message with + [query_input.text][google.cloud.dialogflow.v2.QueryInput.text]. + However, note that: - Dialogflow will bill you for the audio + duration so far. - Dialogflow discards all Speech recognition + results in favor of the input text. - Dialogflow will use + the language code from the first message. After you sent all input, + you must half-close or abort the request stream. Attributes: session: @@ -1990,12 +2059,14 @@ ID>/agent/sessions/``, or ``projects//agent/environments//users//sessions/``. If ``Environment ID`` is not - specified, we assume default 'draft' environment. If ``User - ID`` is not specified, we are using "-". It's up to the API + specified, we assume default ‘draft’ environment. If ``User + ID`` is not specified, we are using “-”. It’s up to the API caller to choose an appropriate ``Session ID`` and ``User Id``. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the ``Session ID`` and ``User ID`` must not exceed 36 characters. + For more information, see the `API interactions guide + `__. query_params: The parameters of this query. query_input: @@ -2005,12 +2076,12 @@ form of text, or 3. an event that specifies which intent to trigger. single_utterance: - Please use [InputAudioConfig.single\_utterance][google.cloud.d - ialogflow.v2.InputAudioConfig.single\_utterance] instead. If + Please use [InputAudioConfig.single_utterance][google.cloud.di + alogflow.v2.InputAudioConfig.single_utterance] instead. If ``false`` (default), recognition does not cease until the client closes the stream. If ``true``, the recognizer will detect a single spoken utterance in input audio. Recognition - ceases when it detects the audio's voice has stopped or + ceases when it detects the audio’s voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. This setting is ignored when @@ -2020,13 +2091,13 @@ audio. If this field is not set and agent-level speech synthesizer is not configured, no output audio is generated. output_audio_config_mask: - Mask for [output\_audio\_config][google.cloud.dialogflow.v2.St - reamingDetectIntentRequest.output\_audio\_config] indicating - which settings in this request-level config should override - speech synthesizer settings defined at agent-level. If - unspecified or empty, [output\_audio\_config][google.cloud.dia - logflow.v2.StreamingDetectIntentRequest.output\_audio\_config] - replaces the agent-level config in its entirety. + Mask for [output_audio_config][google.cloud.dialogflow.v2.Stre + amingDetectIntentRequest.output_audio_config] indicating which + settings in this request-level config should override speech + synthesizer settings defined at agent-level. If unspecified + or empty, [output_audio_config][google.cloud.dialogflow.v2.Str + eamingDetectIntentRequest.output_audio_config] replaces the + agent-level config in its entirety. input_audio: The input audio content to be recognized. Must be sent if ``query_input`` was set to a streaming input audio config. The @@ -2034,29 +2105,24 @@ minute. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.StreamingDetectIntentRequest) - ), + }, ) _sym_db.RegisterMessage(StreamingDetectIntentRequest) StreamingDetectIntentResponse = _reflection.GeneratedProtocolMessageType( "StreamingDetectIntentResponse", (_message.Message,), - dict( - DESCRIPTOR=_STREAMINGDETECTINTENTRESPONSE, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__="""The top-level message returned from the - ``StreamingDetectIntent`` method. - - Multiple response messages can be returned in order: - - 1. If the input was set to streaming audio, the first one or more - messages contain ``recognition_result``. Each ``recognition_result`` - represents a more complete transcript of what the user said. The last - ``recognition_result`` has ``is_final`` set to ``true``. - - 2. The next message contains ``response_id``, ``query_result`` and - optionally ``webhook_status`` if a WebHook was called. - + { + "DESCRIPTOR": _STREAMINGDETECTINTENTRESPONSE, + "__module__": "google.cloud.dialogflow_v2.proto.session_pb2", + "__doc__": """The top-level message returned from the ``StreamingDetectIntent`` + method. Multiple response messages can be returned in order: 1. If + the input was set to streaming audio, the first one or more + messages contain ``recognition_result``. Each ``recognition_result`` + represents a more complete transcript of what the user said. The last + ``recognition_result`` has ``is_final`` set to ``true``. 2. The next + message contains ``response_id``, ``query_result`` and optionally + ``webhook_status`` if a WebHook was called. Attributes: response_id: @@ -2076,54 +2142,38 @@ ``query_result.fulfillment_messages`` field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, - the generated audio content will be empty. + the generated audio content will be empty. In some scenarios, + multiple output audio fields may be present in the response + structure. In these cases, only the top-most-level audio + output has content. output_audio_config: The config used by the speech synthesizer to generate the output audio. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.StreamingDetectIntentResponse) - ), + }, ) _sym_db.RegisterMessage(StreamingDetectIntentResponse) StreamingRecognitionResult = _reflection.GeneratedProtocolMessageType( "StreamingRecognitionResult", (_message.Message,), - dict( - DESCRIPTOR=_STREAMINGRECOGNITIONRESULT, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__="""Contains a speech recognition result corresponding to a - portion of the audio that is currently being processed or an indication - that this is the end of the single requested utterance. - - Example: - - 1. transcript: "tube" - - 2. transcript: "to be a" - - 3. transcript: "to be" - - 4. transcript: "to be or not to be" is\_final: true - - 5. transcript: " that's" - - 6. transcript: " that is" - - 7. message\_type: ``END_OF_SINGLE_UTTERANCE`` - - 8. transcript: " that is the question" is\_final: true - - Only two of the responses contain final results (#4 and #8 indicated by - ``is_final: true``). Concatenating these generates the full transcript: - "to be or not to be that is the question". - - In each response we populate: - - - for ``TRANSCRIPT``: ``transcript`` and possibly ``is_final``. - - - for ``END_OF_SINGLE_UTTERANCE``: only ``message_type``. - + { + "DESCRIPTOR": _STREAMINGRECOGNITIONRESULT, + "__module__": "google.cloud.dialogflow_v2.proto.session_pb2", + "__doc__": """Contains a speech recognition result corresponding to a portion of the + audio that is currently being processed or an indication that this is + the end of the single requested utterance. Example: 1. transcript: + “tube” 2. transcript: “to be a” 3. transcript: “to be” 4. + transcript: “to be or not to be” is_final: true 5. transcript: " + that’s" 6. transcript: " that is" 7. message_type: + ``END_OF_SINGLE_UTTERANCE`` 8. transcript: " that is the question" + is_final: true Only two of the responses contain final results (#4 + and #8 indicated by ``is_final: true``). Concatenating these generates + the full transcript: “to be or not to be that is the question”. In + each response we populate: - for ``TRANSCRIPT``: ``transcript`` and + possibly ``is_final``. - for ``END_OF_SINGLE_UTTERANCE``: only + ``message_type``. Attributes: message_type: @@ -2149,7 +2199,7 @@ Word-specific information for the words recognized by Speech in [transcript][google.cloud.dialogflow.v2.StreamingRecognitio nResult.transcript]. Populated if and only if ``message_type`` - = ``TRANSCRIPT`` and [InputAudioConfig.enable\_word\_info] is + = ``TRANSCRIPT`` and [InputAudioConfig.enable_word_info] is set. speech_end_offset: Time offset of the end of this Speech recognition result @@ -2157,18 +2207,17 @@ ``message_type`` = ``TRANSCRIPT``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.StreamingRecognitionResult) - ), + }, ) _sym_db.RegisterMessage(StreamingRecognitionResult) TextInput = _reflection.GeneratedProtocolMessageType( "TextInput", (_message.Message,), - dict( - DESCRIPTOR=_TEXTINPUT, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__="""Represents the natural language text to be processed. - + { + "DESCRIPTOR": _TEXTINPUT, + "__module__": "google.cloud.dialogflow_v2.proto.session_pb2", + "__doc__": """Represents the natural language text to be processed. Attributes: text: @@ -2182,29 +2231,38 @@ necessarily need to specify the same language. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.TextInput) - ), + }, ) _sym_db.RegisterMessage(TextInput) EventInput = _reflection.GeneratedProtocolMessageType( "EventInput", (_message.Message,), - dict( - DESCRIPTOR=_EVENTINPUT, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__="""Events allow for matching intents by event name instead of - the natural language input. For instance, input - ```` can - trigger a personalized welcome response. The parameter ``name`` may be - used by the agent in the response: - ``"Hello #welcome_event.name! What can I do for you today?"``. - + { + "DESCRIPTOR": _EVENTINPUT, + "__module__": "google.cloud.dialogflow_v2.proto.session_pb2", + "__doc__": """Events allow for matching intents by event name instead of the natural + language input. For instance, input ```` can trigger a personalized welcome + response. The parameter ``name`` may be used by the agent in the + response: ``"Hello #welcome_event.name! What can I do for you + today?"``. Attributes: name: Required. The unique identifier of the event. parameters: The collection of parameters associated with the event. + Depending on your protocol or client library language, this is + a map, associative array, symbol table, dictionary, or JSON + object composed of a collection of (MapKey, MapValue) pairs: + - MapKey type: string - MapKey value: parameter name - + MapValue type: - If parameter’s entity type is a + composite entity: map - Else: string or number, depending + on parameter value type - MapValue value: - If + parameter’s entity type is a composite entity: map from + composite entity property names to property values - Else: + parameter value language_code: Required. The language of this query. See `Language Support `__ @@ -2213,18 +2271,17 @@ specify the same language. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.EventInput) - ), + }, ) _sym_db.RegisterMessage(EventInput) SentimentAnalysisRequestConfig = _reflection.GeneratedProtocolMessageType( "SentimentAnalysisRequestConfig", (_message.Message,), - dict( - DESCRIPTOR=_SENTIMENTANALYSISREQUESTCONFIG, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__="""Configures the types of sentiment analysis to perform. - + { + "DESCRIPTOR": _SENTIMENTANALYSISREQUESTCONFIG, + "__module__": "google.cloud.dialogflow_v2.proto.session_pb2", + "__doc__": """Configures the types of sentiment analysis to perform. Attributes: analyze_query_text_sentiment: @@ -2233,38 +2290,49 @@ performed on ``query_text``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig) - ), + }, ) _sym_db.RegisterMessage(SentimentAnalysisRequestConfig) SentimentAnalysisResult = _reflection.GeneratedProtocolMessageType( "SentimentAnalysisResult", (_message.Message,), - dict( - DESCRIPTOR=_SENTIMENTANALYSISRESULT, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__="""The result of sentiment analysis as configured by - ``sentiment_analysis_request_config``. - + { + "DESCRIPTOR": _SENTIMENTANALYSISRESULT, + "__module__": "google.cloud.dialogflow_v2.proto.session_pb2", + "__doc__": """The result of sentiment analysis. Sentiment analysis inspects user + input and identifies the prevailing subjective opinion, especially to + determine a user’s attitude as positive, negative, or neutral. For [Pa + rticipants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.Ana + lyzeContent], it needs to be configured in [DetectIntentRequest.query_ + params][google.cloud.dialogflow.v2.DetectIntentRequest.query_params]. + For [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2. + Participants.StreamingAnalyzeContent], it needs to be configured in [S + treamingDetectIntentRequest.query_params][google.cloud.dialogflow.v2.S + treamingDetectIntentRequest.query_params]. And for [Participants.Analy + zeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and + [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Part + icipants.StreamingAnalyzeContent], it needs to be configured in [Conve + rsationProfile.human_agent_assistant_config][google.cloud.dialogflow.v + 2.ConversationProfile.human_agent_assistant_config] Attributes: query_text_sentiment: The sentiment analysis result for ``query_text``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SentimentAnalysisResult) - ), + }, ) _sym_db.RegisterMessage(SentimentAnalysisResult) Sentiment = _reflection.GeneratedProtocolMessageType( "Sentiment", (_message.Message,), - dict( - DESCRIPTOR=_SENTIMENT, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__="""The sentiment, such as positive/negative feeling or - association, for a unit of analysis, such as the query text. - + { + "DESCRIPTOR": _SENTIMENT, + "__module__": "google.cloud.dialogflow_v2.proto.session_pb2", + "__doc__": """The sentiment, such as positive/negative feeling or association, for a + unit of analysis, such as the query text. Attributes: score: @@ -2276,7 +2344,7 @@ (positive or negative). """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Sentiment) - ), + }, ) _sym_db.RegisterMessage(Sentiment) @@ -2297,9 +2365,8 @@ full_name="google.cloud.dialogflow.v2.Sessions", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, serialized_start=3957, serialized_end=4529, methods=[ @@ -2310,9 +2377,8 @@ containing_service=None, input_type=_DETECTINTENTREQUEST, output_type=_DETECTINTENTRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\217\001"6/v2/{session=projects/*/agent/sessions/*}:detectIntent:\001*ZR"M/v2/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent:\001*\332A\023session,query_input' - ), + serialized_options=b'\202\323\344\223\002\217\001"6/v2/{session=projects/*/agent/sessions/*}:detectIntent:\001*ZR"M/v2/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent:\001*\332A\023session,query_input', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="StreamingDetectIntent", @@ -2322,6 +2388,7 @@ input_type=_STREAMINGDETECTINTENTREQUEST, output_type=_STREAMINGDETECTINTENTRESPONSE, serialized_options=None, + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2/proto/session_pb2_grpc.py b/dialogflow_v2/proto/session_pb2_grpc.py index 06296dfd2..d83706aff 100644 --- a/dialogflow_v2/proto/session_pb2_grpc.py +++ b/dialogflow_v2/proto/session_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2.proto import ( @@ -7,18 +8,18 @@ class SessionsStub(object): - """A session represents an interaction with a user. You retrieve user input - and pass it to the [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or - [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method to determine - user intent and respond. - """ + """A service used for session interactions. + + For more information, see the [API interactions + guide](https://cloud.google.com/dialogflow/docs/api-overview). + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.DetectIntent = channel.unary_unary( "/google.cloud.dialogflow.v2.Sessions/DetectIntent", request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__pb2.DetectIntentRequest.SerializeToString, @@ -32,27 +33,27 @@ def __init__(self, channel): class SessionsServicer(object): - """A session represents an interaction with a user. You retrieve user input - and pass it to the [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or - [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method to determine - user intent and respond. - """ + """A service used for session interactions. + + For more information, see the [API interactions + guide](https://cloud.google.com/dialogflow/docs/api-overview). + """ def DetectIntent(self, request, context): """Processes a natural language query and returns structured, actionable data - as a result. This method is not idempotent, because it may cause contexts - and session entity types to be updated, which in turn might affect - results of future queries. - """ + as a result. This method is not idempotent, because it may cause contexts + and session entity types to be updated, which in turn might affect + results of future queries. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def StreamingDetectIntent(self, request_iterator, context): """Processes a natural language query in audio format in a streaming fashion - and returns structured, actionable data as a result. This method is only - available via the gRPC API (not REST). - """ + and returns structured, actionable data as a result. This method is only + available via the gRPC API (not REST). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -75,3 +76,66 @@ def add_SessionsServicer_to_server(servicer, server): "google.cloud.dialogflow.v2.Sessions", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Sessions(object): + """A service used for session interactions. + + For more information, see the [API interactions + guide](https://cloud.google.com/dialogflow/docs/api-overview). + """ + + @staticmethod + def DetectIntent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2.Sessions/DetectIntent", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__pb2.DetectIntentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__pb2.DetectIntentResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def StreamingDetectIntent( + request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.stream_stream( + request_iterator, + target, + "/google.cloud.dialogflow.v2.Sessions/StreamingDetectIntent", + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__pb2.StreamingDetectIntentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__pb2.StreamingDetectIntentResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2/proto/validation_result.proto b/dialogflow_v2/proto/validation_result.proto new file mode 100644 index 000000000..e499c1462 --- /dev/null +++ b/dialogflow_v2/proto/validation_result.proto @@ -0,0 +1,76 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2; + +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "ValidationResultProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; + +// Represents a single validation error. +message ValidationError { + // Represents a level of severity. + enum Severity { + // Not specified. This value should never be used. + SEVERITY_UNSPECIFIED = 0; + + // The agent doesn't follow Dialogflow best practicies. + INFO = 1; + + // The agent may not behave as expected. + WARNING = 2; + + // The agent may experience partial failures. + ERROR = 3; + + // The agent may completely fail. + CRITICAL = 4; + } + + // The severity of the error. + Severity severity = 1; + + // The names of the entries that the error is associated with. + // Format: + // + // - "projects//agent", if the error is associated with the entire + // agent. + // - "projects//agent/intents/", if the error is + // associated with certain intents. + // - "projects//agent/intents//trainingPhrases/", if the + // error is associated with certain intent training phrases. + // - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. + // - "projects//agent/entities/", if the error is + // associated with certain entities. + repeated string entries = 3; + + // The detailed error messsage. + string error_message = 4; +} + +// Represents the output of agent validation. +message ValidationResult { + // Contains all validation errors. + repeated ValidationError validation_errors = 1; +} diff --git a/dialogflow_v2/proto/validation_result_pb2.py b/dialogflow_v2/proto/validation_result_pb2.py index a5af3edf6..1d969487c 100644 --- a/dialogflow_v2/proto/validation_result_pb2.py +++ b/dialogflow_v2/proto/validation_result_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/validation_result.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -22,12 +19,9 @@ name="google/cloud/dialogflow_v2/proto/validation_result.proto", package="google.cloud.dialogflow.v2", syntax="proto3", - serialized_options=_b( - "\n\036com.google.cloud.dialogflow.v2B\025ValidationResultProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2" - ), - serialized_pb=_b( - '\n8google/cloud/dialogflow_v2/proto/validation_result.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto"\xd7\x01\n\x0fValidationError\x12\x46\n\x08severity\x18\x01 \x01(\x0e\x32\x34.google.cloud.dialogflow.v2.ValidationError.Severity\x12\x0f\n\x07\x65ntries\x18\x03 \x03(\t\x12\x15\n\rerror_message\x18\x04 \x01(\t"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04"Z\n\x10ValidationResult\x12\x46\n\x11validation_errors\x18\x01 \x03(\x0b\x32+.google.cloud.dialogflow.v2.ValidationErrorB\xa4\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x15ValidationResultProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3' - ), + serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\025ValidationResultProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n8google/cloud/dialogflow_v2/proto/validation_result.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto"\xd7\x01\n\x0fValidationError\x12\x46\n\x08severity\x18\x01 \x01(\x0e\x32\x34.google.cloud.dialogflow.v2.ValidationError.Severity\x12\x0f\n\x07\x65ntries\x18\x03 \x03(\t\x12\x15\n\rerror_message\x18\x04 \x01(\t"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04"Z\n\x10ValidationResult\x12\x46\n\x11validation_errors\x18\x01 \x03(\x0b\x32+.google.cloud.dialogflow.v2.ValidationErrorB\xa4\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x15ValidationResultProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3', dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR], ) @@ -37,6 +31,7 @@ full_name="google.cloud.dialogflow.v2.ValidationError.Severity", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="SEVERITY_UNSPECIFIED", @@ -44,18 +39,39 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="INFO", index=1, number=1, serialized_options=None, type=None + name="INFO", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="WARNING", index=2, number=2, serialized_options=None, type=None + name="WARNING", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="ERROR", index=3, number=3, serialized_options=None, type=None + name="ERROR", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CRITICAL", index=4, number=4, serialized_options=None, type=None + name="CRITICAL", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -72,6 +88,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="severity", @@ -90,6 +107,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entries", @@ -108,6 +126,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="error_message", @@ -118,7 +137,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -126,6 +145,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -147,6 +167,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="validation_errors", @@ -165,6 +186,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -189,49 +211,47 @@ ValidationError = _reflection.GeneratedProtocolMessageType( "ValidationError", (_message.Message,), - dict( - DESCRIPTOR=_VALIDATIONERROR, - __module__="google.cloud.dialogflow_v2.proto.validation_result_pb2", - __doc__="""Represents a single validation error. - + { + "DESCRIPTOR": _VALIDATIONERROR, + "__module__": "google.cloud.dialogflow_v2.proto.validation_result_pb2", + "__doc__": """Represents a single validation error. Attributes: severity: The severity of the error. entries: The names of the entries that the error is associated with. - Format: - "projects//agent", if the error is associated with - the entire agent. - "projects//agent/intents/", if the error + Format: - “projects//agent”, if the error is associated with + the entire agent. - “projects//agent/intents/”, if the error is associated with certain intents. - - "projects//agent/intents//trainingPhrases/", if the error is + “projects//agent/intents//trainingPhrases/”, if the error is associated with certain intent training phrases. - - "projects//agent/intents//parameters/", if the error is + “projects//agent/intents//parameters/”, if the error is associated with certain intent parameters. - - "projects//agent/entities/", if the error is associated with + “projects//agent/entities/”, if the error is associated with certain entities. error_message: The detailed error messsage. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ValidationError) - ), + }, ) _sym_db.RegisterMessage(ValidationError) ValidationResult = _reflection.GeneratedProtocolMessageType( "ValidationResult", (_message.Message,), - dict( - DESCRIPTOR=_VALIDATIONRESULT, - __module__="google.cloud.dialogflow_v2.proto.validation_result_pb2", - __doc__="""Represents the output of agent validation. - + { + "DESCRIPTOR": _VALIDATIONRESULT, + "__module__": "google.cloud.dialogflow_v2.proto.validation_result_pb2", + "__doc__": """Represents the output of agent validation. Attributes: validation_errors: Contains all validation errors. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ValidationResult) - ), + }, ) _sym_db.RegisterMessage(ValidationResult) diff --git a/dialogflow_v2/proto/validation_result_pb2_grpc.py b/dialogflow_v2/proto/validation_result_pb2_grpc.py index 07cb78fe0..8a9393943 100644 --- a/dialogflow_v2/proto/validation_result_pb2_grpc.py +++ b/dialogflow_v2/proto/validation_result_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/dialogflow_v2/proto/webhook.proto b/dialogflow_v2/proto/webhook.proto new file mode 100644 index 000000000..509649a74 --- /dev/null +++ b/dialogflow_v2/proto/webhook.proto @@ -0,0 +1,145 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2; + +import "google/cloud/dialogflow/v2/context.proto"; +import "google/cloud/dialogflow/v2/intent.proto"; +import "google/cloud/dialogflow/v2/session.proto"; +import "google/cloud/dialogflow/v2/session_entity_type.proto"; +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "WebhookProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; + +// The request message for a webhook call. +message WebhookRequest { + // The unique identifier of detectIntent request session. + // Can be used to identify end-user inside webhook implementation. + // Format: `projects//agent/sessions/`, or + // `projects//agent/environments//users//sessions/`. + string session = 4; + + // The unique identifier of the response. Contains the same value as + // `[Streaming]DetectIntentResponse.response_id`. + string response_id = 1; + + // The result of the conversational query or event processing. Contains the + // same value as `[Streaming]DetectIntentResponse.query_result`. + QueryResult query_result = 2; + + // Optional. The contents of the original request that was passed to + // `[Streaming]DetectIntent` call. + OriginalDetectIntentRequest original_detect_intent_request = 3; +} + +// The response message for a webhook call. +// +// This response is validated by the Dialogflow server. If validation fails, +// an error will be returned in the [QueryResult.diagnostic_info][google.cloud.dialogflow.v2.QueryResult.diagnostic_info] field. +// Setting JSON fields to an empty value with the wrong type is a common error. +// To avoid this error: +// +// - Use `""` for empty strings +// - Use `{}` or `null` for empty objects +// - Use `[]` or `null` for empty arrays +// +// For more information, see the +// [Protocol Buffers Language +// Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). +message WebhookResponse { + // Optional. The text response message intended for the end-user. + // It is recommended to use `fulfillment_messages.text.text[0]` instead. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller. + string fulfillment_text = 1; + + // Optional. The rich response messages intended for the end-user. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller. + repeated Intent.Message fulfillment_messages = 2; + + // Optional. A custom field used to identify the webhook source. + // Arbitrary strings are supported. + // When provided, Dialogflow uses this field to populate + // [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller. + string source = 3; + + // Optional. This field can be used to pass custom data from your webhook to the + // integration or API caller. Arbitrary JSON objects are supported. + // When provided, Dialogflow uses this field to populate + // [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller. + // This field is also used by the + // [Google Assistant + // integration](https://cloud.google.com/dialogflow/docs/integrations/aog) + // for rich response messages. + // See the format definition at [Google Assistant Dialogflow webhook + // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) + google.protobuf.Struct payload = 4; + + // Optional. The collection of output contexts that will overwrite currently + // active contexts for the session and reset their lifespans. + // When provided, Dialogflow uses this field to populate + // [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller. + repeated Context output_contexts = 5; + + // Optional. Invokes the supplied events. + // When this field is set, Dialogflow ignores the `fulfillment_text`, + // `fulfillment_messages`, and `payload` fields. + EventInput followup_event_input = 6; + + // Optional. Additional session entity types to replace or extend developer + // entity types with. The entity synonyms apply to all languages and persist + // for the session. Setting this data from a webhook overwrites + // the session entity types that have been set using `detectIntent`, + // `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods. + repeated SessionEntityType session_entity_types = 10; +} + +// Represents the contents of the original request that was passed to +// the `[Streaming]DetectIntent` call. +message OriginalDetectIntentRequest { + // The source of this request, e.g., `google`, `facebook`, `slack`. It is set + // by Dialogflow-owned servers. + string source = 1; + + // Optional. The version of the protocol used for this request. + // This field is AoG-specific. + string version = 2; + + // Optional. This field is set to the value of the `QueryParameters.payload` + // field passed in the request. Some integrations that query a Dialogflow + // agent may provide additional information in the payload. + // + // In particular, for the Dialogflow Phone Gateway integration, this field has + // the form: + //
{
+  //  "telephony": {
+  //    "caller_id": "+18558363987"
+  //  }
+  // }
+ // Note: The caller ID field (`caller_id`) will be redacted for Standard + // Edition agents and populated with the caller ID in [E.164 + // format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition agents. + google.protobuf.Struct payload = 3; +} diff --git a/dialogflow_v2/proto/webhook_pb2.py b/dialogflow_v2/proto/webhook_pb2.py index 13d33848c..401c575f5 100644 --- a/dialogflow_v2/proto/webhook_pb2.py +++ b/dialogflow_v2/proto/webhook_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/webhook.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -35,12 +32,9 @@ name="google/cloud/dialogflow_v2/proto/webhook.proto", package="google.cloud.dialogflow.v2", syntax="proto3", - serialized_options=_b( - "\n\036com.google.cloud.dialogflow.v2B\014WebhookProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2" - ), - serialized_pb=_b( - '\n.google/cloud/dialogflow_v2/proto/webhook.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a.google/cloud/dialogflow_v2/proto/context.proto\x1a-google/cloud/dialogflow_v2/proto/intent.proto\x1a.google/cloud/dialogflow_v2/proto/session.proto\x1a:google/cloud/dialogflow_v2/proto/session_entity_type.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto"\xd6\x01\n\x0eWebhookRequest\x12\x0f\n\x07session\x18\x04 \x01(\t\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12=\n\x0cquery_result\x18\x02 \x01(\x0b\x32\'.google.cloud.dialogflow.v2.QueryResult\x12_\n\x1eoriginal_detect_intent_request\x18\x03 \x01(\x0b\x32\x37.google.cloud.dialogflow.v2.OriginalDetectIntentRequest"\x80\x03\n\x0fWebhookResponse\x12\x18\n\x10\x66ulfillment_text\x18\x01 \x01(\t\x12H\n\x14\x66ulfillment_messages\x18\x02 \x03(\x0b\x32*.google.cloud.dialogflow.v2.Intent.Message\x12\x0e\n\x06source\x18\x03 \x01(\t\x12(\n\x07payload\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12<\n\x0foutput_contexts\x18\x05 \x03(\x0b\x32#.google.cloud.dialogflow.v2.Context\x12\x44\n\x14\x66ollowup_event_input\x18\x06 \x01(\x0b\x32&.google.cloud.dialogflow.v2.EventInput\x12K\n\x14session_entity_types\x18\n \x03(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityType"h\n\x1bOriginalDetectIntentRequest\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12(\n\x07payload\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x9b\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x0cWebhookProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3' - ), + serialized_options=b"\n\036com.google.cloud.dialogflow.v2B\014WebhookProtoP\001ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n.google/cloud/dialogflow_v2/proto/webhook.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a.google/cloud/dialogflow_v2/proto/context.proto\x1a-google/cloud/dialogflow_v2/proto/intent.proto\x1a.google/cloud/dialogflow_v2/proto/session.proto\x1a:google/cloud/dialogflow_v2/proto/session_entity_type.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto"\xd6\x01\n\x0eWebhookRequest\x12\x0f\n\x07session\x18\x04 \x01(\t\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12=\n\x0cquery_result\x18\x02 \x01(\x0b\x32\'.google.cloud.dialogflow.v2.QueryResult\x12_\n\x1eoriginal_detect_intent_request\x18\x03 \x01(\x0b\x32\x37.google.cloud.dialogflow.v2.OriginalDetectIntentRequest"\x80\x03\n\x0fWebhookResponse\x12\x18\n\x10\x66ulfillment_text\x18\x01 \x01(\t\x12H\n\x14\x66ulfillment_messages\x18\x02 \x03(\x0b\x32*.google.cloud.dialogflow.v2.Intent.Message\x12\x0e\n\x06source\x18\x03 \x01(\t\x12(\n\x07payload\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12<\n\x0foutput_contexts\x18\x05 \x03(\x0b\x32#.google.cloud.dialogflow.v2.Context\x12\x44\n\x14\x66ollowup_event_input\x18\x06 \x01(\x0b\x32&.google.cloud.dialogflow.v2.EventInput\x12K\n\x14session_entity_types\x18\n \x03(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityType"h\n\x1bOriginalDetectIntentRequest\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12(\n\x07payload\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x9b\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x0cWebhookProtoP\x01ZDgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3', dependencies=[ google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.DESCRIPTOR, @@ -58,6 +52,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="session", @@ -68,7 +63,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -76,6 +71,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="response_id", @@ -86,7 +82,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -94,6 +90,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_result", @@ -112,6 +109,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="original_detect_intent_request", @@ -130,6 +128,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -151,6 +150,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="fulfillment_text", @@ -161,7 +161,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -169,6 +169,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="fulfillment_messages", @@ -187,6 +188,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="source", @@ -197,7 +199,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -205,6 +207,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="payload", @@ -223,6 +226,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_contexts", @@ -241,6 +245,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="followup_event_input", @@ -259,6 +264,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="session_entity_types", @@ -277,6 +283,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -298,6 +305,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="source", @@ -308,7 +316,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -316,6 +324,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="version", @@ -326,7 +335,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -334,6 +343,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="payload", @@ -352,6 +362,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -408,11 +419,10 @@ WebhookRequest = _reflection.GeneratedProtocolMessageType( "WebhookRequest", (_message.Message,), - dict( - DESCRIPTOR=_WEBHOOKREQUEST, - __module__="google.cloud.dialogflow_v2.proto.webhook_pb2", - __doc__="""The request message for a webhook call. - + { + "DESCRIPTOR": _WEBHOOKREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.webhook_pb2", + "__doc__": """The request message for a webhook call. Attributes: session: @@ -433,88 +443,92 @@ to ``[Streaming]DetectIntent`` call. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.WebhookRequest) - ), + }, ) _sym_db.RegisterMessage(WebhookRequest) WebhookResponse = _reflection.GeneratedProtocolMessageType( "WebhookResponse", (_message.Message,), - dict( - DESCRIPTOR=_WEBHOOKRESPONSE, - __module__="google.cloud.dialogflow_v2.proto.webhook_pb2", - __doc__="""The response message for a webhook call. - - This response is validated by the Dialogflow server. If validation - fails, an error will be returned in the - [QueryResult.diagnostic\_info][google.cloud.dialogflow.v2.QueryResult.diagnostic\_info] - field. Setting JSON fields to an empty value with the wrong type is a - common error. To avoid this error: - - - Use ``""`` for empty strings - - Use ``{}`` or ``null`` for empty objects - - Use ``[]`` or ``null`` for empty arrays - - For more information, see the `Protocol Buffers Language - Guide `__. - + { + "DESCRIPTOR": _WEBHOOKRESPONSE, + "__module__": "google.cloud.dialogflow_v2.proto.webhook_pb2", + "__doc__": """The response message for a webhook call. This response is validated + by the Dialogflow server. If validation fails, an error will be + returned in the [QueryResult.diagnostic_info][google.cloud.dialogflow. + v2.QueryResult.diagnostic_info] field. Setting JSON fields to an empty + value with the wrong type is a common error. To avoid this error: - + Use ``""`` for empty strings - Use ``{}`` or ``null`` for empty + objects - Use ``[]`` or ``null`` for empty arrays For more + information, see the `Protocol Buffers Language Guide + `__. Attributes: fulfillment_text: - Optional. The text to be shown on the screen. This value is - passed directly to ``QueryResult.fulfillment_text``. + Optional. The text response message intended for the end-user. + It is recommended to use ``fulfillment_messages.text.text[0]`` + instead. When provided, Dialogflow uses this field to populate + [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.Quer + yResult.fulfillment_text] sent to the integration or API + caller. fulfillment_messages: - Optional. The collection of rich messages to present to the - user. This value is passed directly to - ``QueryResult.fulfillment_messages``. + Optional. The rich response messages intended for the end- + user. When provided, Dialogflow uses this field to populate [Q + ueryResult.fulfillment_messages][google.cloud.dialogflow.v2.Qu + eryResult.fulfillment_messages] sent to the integration or API + caller. source: - Optional. This value is passed directly to - ``QueryResult.webhook_source``. + Optional. A custom field used to identify the webhook source. + Arbitrary strings are supported. When provided, Dialogflow + uses this field to populate [QueryResult.webhook_source][googl + e.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the + integration or API caller. payload: - Optional. This value is passed directly to - ``QueryResult.webhook_payload``. See the related - ``fulfillment_messages[i].payload field``, which may be used - as an alternative to this field. This field can be used for - Actions on Google responses. It should have a structure - similar to the JSON message shown here. For more information, - see `Actions on Google Webhook Format - `__ - .. raw:: html
{      "google": {
-          "expectUserResponse": true,        "richResponse": {
-          "items": [            {              "simpleResponse": {
-          "textToSpeech": "this is a simple response"              }
-          }          ]        }      }    }
+ Optional. This field can be used to pass custom data from your + webhook to the integration or API caller. Arbitrary JSON + objects are supported. When provided, Dialogflow uses this + field to populate [QueryResult.webhook_payload][google.cloud.d + ialogflow.v2.QueryResult.webhook_payload] sent to the + integration or API caller. This field is also used by the + `Google Assistant integration + `__ + for rich response messages. See the format definition at + `Google Assistant Dialogflow webhook format `__ output_contexts: - Optional. The collection of output contexts. This value is - passed directly to ``QueryResult.output_contexts``. + Optional. The collection of output contexts that will + overwrite currently active contexts for the session and reset + their lifespans. When provided, Dialogflow uses this field to + populate [QueryResult.output_contexts][google.cloud.dialogflow + .v2.QueryResult.output_contexts] sent to the integration or + API caller. followup_event_input: - Optional. Makes the platform immediately invoke another - ``DetectIntent`` call internally with the specified event as - input. When this field is set, Dialogflow ignores the - ``fulfillment_text``, ``fulfillment_messages``, and - ``payload`` fields. + Optional. Invokes the supplied events. When this field is set, + Dialogflow ignores the ``fulfillment_text``, + ``fulfillment_messages``, and ``payload`` fields. session_entity_types: Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all - languages and persist for the session of this query. Setting - the session entity types inside webhook overwrites the session - entity types that have been set through - ``DetectIntentRequest.query_params.session_entity_types``. + languages and persist for the session. Setting this data from + a webhook overwrites the session entity types that have been + set using ``detectIntent``, ``streamingDetectIntent`` or [Sess + ionEntityType][google.cloud.dialogflow.v2.SessionEntityType] + management methods. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.WebhookResponse) - ), + }, ) _sym_db.RegisterMessage(WebhookResponse) OriginalDetectIntentRequest = _reflection.GeneratedProtocolMessageType( "OriginalDetectIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_ORIGINALDETECTINTENTREQUEST, - __module__="google.cloud.dialogflow_v2.proto.webhook_pb2", - __doc__="""Represents the contents of the original request that was - passed to the ``[Streaming]DetectIntent`` call. - + { + "DESCRIPTOR": _ORIGINALDETECTINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2.proto.webhook_pb2", + "__doc__": """Represents the contents of the original request that was passed to the + ``[Streaming]DetectIntent`` call. Attributes: source: @@ -527,17 +541,17 @@ Optional. This field is set to the value of the ``QueryParameters.payload`` field passed in the request. Some integrations that query a Dialogflow agent may provide - additional information in the payload. In particular for the - Telephony Gateway this field has the form: .. raw:: html -
{     "telephony": {       "caller_id": "+18558363987"
-          }    }
Note: The caller ID field (``caller_id``) will - be redacted for Standard Edition agents and populated with the - caller ID in `E.164 format + additional information in the payload. In particular, for the + Dialogflow Phone Gateway integration, this field has the form: + .. raw:: html
{     "telephony": {       "caller_id":
+          "+18558363987"     }    }
Note: The caller ID field + (``caller_id``) will be redacted for Standard Edition agents + and populated with the caller ID in `E.164 format `__ for Enterprise Edition agents. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.OriginalDetectIntentRequest) - ), + }, ) _sym_db.RegisterMessage(OriginalDetectIntentRequest) diff --git a/dialogflow_v2/proto/webhook_pb2_grpc.py b/dialogflow_v2/proto/webhook_pb2_grpc.py index 07cb78fe0..8a9393943 100644 --- a/dialogflow_v2/proto/webhook_pb2_grpc.py +++ b/dialogflow_v2/proto/webhook_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/dialogflow_v2/types.py b/dialogflow_v2/types.py index d38315c9e..c469ee666 100644 --- a/dialogflow_v2/types.py +++ b/dialogflow_v2/types.py @@ -24,6 +24,7 @@ from dialogflow_v2.proto import audio_config_pb2 from dialogflow_v2.proto import context_pb2 from dialogflow_v2.proto import entity_type_pb2 +from dialogflow_v2.proto import environment_pb2 from dialogflow_v2.proto import intent_pb2 from dialogflow_v2.proto import session_entity_type_pb2 from dialogflow_v2.proto import session_pb2 @@ -35,6 +36,7 @@ from google.protobuf import empty_pb2 from google.protobuf import field_mask_pb2 from google.protobuf import struct_pb2 +from google.protobuf import timestamp_pb2 from google.rpc import status_pb2 from google.type import latlng_pb2 @@ -46,6 +48,7 @@ empty_pb2, field_mask_pb2, struct_pb2, + timestamp_pb2, status_pb2, latlng_pb2, ] @@ -55,6 +58,7 @@ audio_config_pb2, context_pb2, entity_type_pb2, + environment_pb2, intent_pb2, session_entity_type_pb2, session_pb2, diff --git a/dialogflow_v2beta1/__init__.py b/dialogflow_v2beta1/__init__.py index 76e34efe8..625580b0d 100644 --- a/dialogflow_v2beta1/__init__.py +++ b/dialogflow_v2beta1/__init__.py @@ -25,6 +25,7 @@ from dialogflow_v2beta1.gapic import documents_client from dialogflow_v2beta1.gapic import entity_types_client from dialogflow_v2beta1.gapic import enums +from dialogflow_v2beta1.gapic import environments_client from dialogflow_v2beta1.gapic import intents_client from dialogflow_v2beta1.gapic import knowledge_bases_client from dialogflow_v2beta1.gapic import session_entity_types_client @@ -33,13 +34,18 @@ if sys.version_info[:2] == (2, 7): message = ( - "A future version of this library will drop support for Python 2.7." - "More details about Python 2 support for Google Cloud Client Libraries" + "A future version of this library will drop support for Python 2.7. " + "More details about Python 2 support for Google Cloud Client Libraries " "can be found at https://cloud.google.com/python/docs/python2-sunset/" ) warnings.warn(message, DeprecationWarning) +class EnvironmentsClient(environments_client.EnvironmentsClient): + __doc__ = environments_client.EnvironmentsClient.__doc__ + enums = enums + + class AgentsClient(agents_client.AgentsClient): __doc__ = agents_client.AgentsClient.__doc__ enums = enums @@ -83,6 +89,7 @@ class SessionsClient(sessions_client.SessionsClient): __all__ = ( "enums", "types", + "EnvironmentsClient", "AgentsClient", "ContextsClient", "DocumentsClient", diff --git a/dialogflow_v2beta1/gapic/agents_client.py b/dialogflow_v2beta1/gapic/agents_client.py index 869098b68..a86399486 100644 --- a/dialogflow_v2beta1/gapic/agents_client.py +++ b/dialogflow_v2beta1/gapic/agents_client.py @@ -39,6 +39,8 @@ from dialogflow_v2beta1.gapic.transports import agents_grpc_transport from dialogflow_v2beta1.proto import agent_pb2 from dialogflow_v2beta1.proto import agent_pb2_grpc +from dialogflow_v2beta1.proto import environment_pb2 +from dialogflow_v2beta1.proto import environment_pb2_grpc from dialogflow_v2beta1.proto import validation_result_pb2 from google.longrunning import operations_pb2 from google.protobuf import empty_pb2 @@ -50,32 +52,7 @@ class AgentsClient(object): - """ - Agents are best described as Natural Language Understanding (NLU) - modules that transform user requests into actionable data. You can - include agents in your app, product, or service to determine user intent - and respond to the user in a natural way. - - After you create an agent, you can add ``Intents``, ``Contexts``, - ``Entity Types``, ``Webhooks``, and so on to manage the flow of a - conversation and match user input to predefined intents and actions. - - You can create an agent using both Dialogflow Standard Edition and - Dialogflow Enterprise Edition. For details, see `Dialogflow - Editions `__. - - You can save your agent for backup or versioning by exporting the agent - by using the ``ExportAgent`` method. You can import a saved agent by - using the ``ImportAgent`` method. - - Dialogflow provides several `prebuilt - agents `__ for - common conversation scenarios such as determining a date and time, - converting currency, and so on. - - For more information about agents, see the `Dialogflow - documentation `__. - """ + """Service for managing ``Agents``.""" SERVICE_ADDRESS = "dialogflow.googleapis.com:443" """The default address of the service.""" @@ -104,6 +81,15 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file + @classmethod + def location_path(cls, project, location): + """Return a fully-qualified location string.""" + return google.api_core.path_template.expand( + "projects/{project}/locations/{location}", + project=project, + location=location, + ) + @classmethod def project_path(cls, project): """Return a fully-qualified project string.""" @@ -224,36 +210,28 @@ def __init__( self._inner_api_calls = {} # Service calls - def set_agent( + def get_agent( self, - agent, - update_mask=None, + parent, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Creates/updates the specified agent. + Retrieves the specified agent. Example: >>> import dialogflow_v2beta1 >>> >>> client = dialogflow_v2beta1.AgentsClient() >>> - >>> # TODO: Initialize `agent`: - >>> agent = {} + >>> parent = client.project_path('[PROJECT]') >>> - >>> response = client.set_agent(agent) + >>> response = client.get_agent(parent) Args: - agent (Union[dict, ~google.cloud.dialogflow_v2beta1.types.Agent]): Required. The agent to update. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.dialogflow_v2beta1.types.Agent` - update_mask (Union[dict, ~google.cloud.dialogflow_v2beta1.types.FieldMask]): Optional. The mask to control which fields get updated. - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.dialogflow_v2beta1.types.FieldMask` + parent (str): Required. The project that the agent to fetch is associated with. + Format: ``projects/``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -274,22 +252,22 @@ def set_agent( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "set_agent" not in self._inner_api_calls: + if "get_agent" not in self._inner_api_calls: self._inner_api_calls[ - "set_agent" + "get_agent" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.set_agent, - default_retry=self._method_configs["SetAgent"].retry, - default_timeout=self._method_configs["SetAgent"].timeout, + self.transport.get_agent, + default_retry=self._method_configs["GetAgent"].retry, + default_timeout=self._method_configs["GetAgent"].timeout, client_info=self._client_info, ) - request = agent_pb2.SetAgentRequest(agent=agent, update_mask=update_mask) + request = agent_pb2.GetAgentRequest(parent=parent) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("agent.parent", agent.parent)] + routing_header = [("parent", parent)] except AttributeError: pass else: @@ -298,32 +276,40 @@ def set_agent( ) metadata.append(routing_metadata) - return self._inner_api_calls["set_agent"]( + return self._inner_api_calls["get_agent"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def delete_agent( + def set_agent( self, - parent, + agent, + update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Deletes the specified agent. + Creates/updates the specified agent. Example: >>> import dialogflow_v2beta1 >>> >>> client = dialogflow_v2beta1.AgentsClient() >>> - >>> parent = client.project_path('[PROJECT]') + >>> # TODO: Initialize `agent`: + >>> agent = {} >>> - >>> client.delete_agent(parent) + >>> response = client.set_agent(agent) Args: - parent (str): Required. The project that the agent to delete is associated with. - Format: ``projects/``. + agent (Union[dict, ~google.cloud.dialogflow_v2beta1.types.Agent]): Required. The agent to update. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.dialogflow_v2beta1.types.Agent` + update_mask (Union[dict, ~google.cloud.dialogflow_v2beta1.types.FieldMask]): Optional. The mask to control which fields get updated. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.dialogflow_v2beta1.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -333,6 +319,9 @@ def delete_agent( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. + Returns: + A :class:`~google.cloud.dialogflow_v2beta1.types.Agent` instance. + Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -341,22 +330,22 @@ def delete_agent( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "delete_agent" not in self._inner_api_calls: + if "set_agent" not in self._inner_api_calls: self._inner_api_calls[ - "delete_agent" + "set_agent" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.delete_agent, - default_retry=self._method_configs["DeleteAgent"].retry, - default_timeout=self._method_configs["DeleteAgent"].timeout, + self.transport.set_agent, + default_retry=self._method_configs["SetAgent"].retry, + default_timeout=self._method_configs["SetAgent"].timeout, client_info=self._client_info, ) - request = agent_pb2.DeleteAgentRequest(parent=parent) + request = agent_pb2.SetAgentRequest(agent=agent, update_mask=update_mask) if metadata is None: metadata = [] metadata = list(metadata) try: - routing_header = [("parent", parent)] + routing_header = [("agent.parent", agent.parent)] except AttributeError: pass else: @@ -365,11 +354,11 @@ def delete_agent( ) metadata.append(routing_metadata) - self._inner_api_calls["delete_agent"]( + return self._inner_api_calls["set_agent"]( request, retry=retry, timeout=timeout, metadata=metadata ) - def get_agent( + def delete_agent( self, parent, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -377,7 +366,7 @@ def get_agent( metadata=None, ): """ - Retrieves the specified agent. + Deletes the specified agent. Example: >>> import dialogflow_v2beta1 @@ -386,10 +375,10 @@ def get_agent( >>> >>> parent = client.project_path('[PROJECT]') >>> - >>> response = client.get_agent(parent) + >>> client.delete_agent(parent) Args: - parent (str): Required. The project that the agent to fetch is associated with. + parent (str): Required. The project that the agent to delete is associated with. Format: ``projects/``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -400,9 +389,6 @@ def get_agent( metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata that is provided to the method. - Returns: - A :class:`~google.cloud.dialogflow_v2beta1.types.Agent` instance. - Raises: google.api_core.exceptions.GoogleAPICallError: If the request failed for any reason. @@ -411,17 +397,17 @@ def get_agent( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "get_agent" not in self._inner_api_calls: + if "delete_agent" not in self._inner_api_calls: self._inner_api_calls[ - "get_agent" + "delete_agent" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.get_agent, - default_retry=self._method_configs["GetAgent"].retry, - default_timeout=self._method_configs["GetAgent"].timeout, + self.transport.delete_agent, + default_retry=self._method_configs["DeleteAgent"].retry, + default_timeout=self._method_configs["DeleteAgent"].timeout, client_info=self._client_info, ) - request = agent_pb2.GetAgentRequest(parent=parent) + request = agent_pb2.DeleteAgentRequest(parent=parent) if metadata is None: metadata = [] metadata = list(metadata) @@ -435,7 +421,7 @@ def get_agent( ) metadata.append(routing_metadata) - return self._inner_api_calls["get_agent"]( + self._inner_api_calls["delete_agent"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -448,12 +434,10 @@ def search_agents( metadata=None, ): """ - Returns the list of agents. - - Since there is at most one conversational agent per project, this method - is useful primarily for listing all agents across projects the caller - has access to. One can achieve that with a wildcard project collection - id "-". Refer to `List + Returns the list of agents. Since there is at most one + conversational agent per project, this method is useful primarily for + listing all agents across projects the caller has access to. One can + achieve that with a wildcard project collection id "-". Refer to `List Sub-Collections `__. Example: @@ -741,9 +725,15 @@ def import_agent( Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new - versions from ImportAgentRequest. + versions from ``ImportAgentRequest``. After the import, the imported + draft agent will be trained automatically (unless disabled in agent + settings). However, once the import is done, training may not be + completed yet. Please call ``TrainAgent`` and wait for the operation it + returns in order to train explicitly. - Operation + Operation An operation which + tracks when importing is complete. It only tracks when the draft agent + is updated not when it is done training. Example: >>> import dialogflow_v2beta1 @@ -844,9 +834,15 @@ def restore_agent( Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and - entity types in the older version are deleted. + entity types in the older version are deleted. After the restore, the + restored draft agent will be trained automatically (unless disabled in + agent settings). However, once the restore is done, training may not be + completed yet. Please call ``TrainAgent`` and wait for the operation it + returns in order to train explicitly. - Operation + Operation An operation which + tracks when restoring is complete. It only tracks when the draft agent + is updated not when it is done training. Example: >>> import dialogflow_v2beta1 @@ -951,13 +947,15 @@ def get_validation_result( >>> >>> client = dialogflow_v2beta1.AgentsClient() >>> - >>> response = client.get_validation_result() + >>> parent = client.project_path('[PROJECT]') + >>> + >>> response = client.get_validation_result(parent) Args: parent (str): Required. The project that the agent is associated with. Format: ``projects/``. - language_code (str): Optional. The language for which you want a validation result. If not - specified, the agent's default language is used. `Many + language_code (str): Optional. The language for which you want a validation result. If + not specified, the agent's default language is used. `Many languages `__ are supported. Note: languages must be enabled in the agent before they can be used. diff --git a/dialogflow_v2beta1/gapic/agents_client_config.py b/dialogflow_v2beta1/gapic/agents_client_config.py index 9904888f5..d8a13d0f7 100644 --- a/dialogflow_v2beta1/gapic/agents_client_config.py +++ b/dialogflow_v2beta1/gapic/agents_client_config.py @@ -2,65 +2,104 @@ "interfaces": { "google.cloud.dialogflow.v2beta1.Agents": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_3_codes": ["UNAVAILABLE"], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 180000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 180000, + "total_timeout_millis": 180000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { - "SetAgent": { + "GetAgent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, - "DeleteAgent": { + "SetAgent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, - "GetAgent": { + "DeleteAgent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "SearchAgents": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "TrainAgent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "ExportAgent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "ImportAgent": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "RestoreAgent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetValidationResult": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/dialogflow_v2beta1/gapic/contexts_client.py b/dialogflow_v2beta1/gapic/contexts_client.py index d7b6b3618..dfe422bb2 100644 --- a/dialogflow_v2beta1/gapic/contexts_client.py +++ b/dialogflow_v2beta1/gapic/contexts_client.py @@ -38,6 +38,8 @@ from dialogflow_v2beta1.proto import agent_pb2_grpc from dialogflow_v2beta1.proto import context_pb2 from dialogflow_v2beta1.proto import context_pb2_grpc +from dialogflow_v2beta1.proto import environment_pb2 +from dialogflow_v2beta1.proto import environment_pb2_grpc from dialogflow_v2beta1.proto import validation_result_pb2 from google.longrunning import operations_pb2 from google.protobuf import empty_pb2 @@ -49,24 +51,7 @@ class ContextsClient(object): - """ - A context represents additional information included with user input or - with an intent returned by the Dialogflow API. Contexts are helpful for - differentiating user input which may be vague or have a different - meaning depending on additional details from your application such as - user setting and preferences, previous user input, where the user is in - your application, geographic location, and so on. - - You can include contexts as input parameters of a ``DetectIntent`` (or - ``StreamingDetectIntent``) request, or as output contexts included in - the returned intent. Contexts expire when an intent is matched, after - the number of ``DetectIntent`` requests specified by the - ``lifespan_count`` parameter, or after 20 minutes if no intents are - matched for a ``DetectIntent`` request. - - For more information about contexts, see the `Dialogflow - documentation `__. - """ + """Service for managing ``Contexts``.""" SERVICE_ADDRESS = "dialogflow.googleapis.com:443" """The default address of the service.""" @@ -266,7 +251,8 @@ def list_contexts( >>> >>> client = dialogflow_v2beta1.ContextsClient() >>> - >>> parent = client.session_path('[PROJECT]', '[SESSION]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # Iterate over all results >>> for element in client.list_contexts(parent): @@ -371,7 +357,8 @@ def get_context( >>> >>> client = dialogflow_v2beta1.ContextsClient() >>> - >>> name = client.context_path('[PROJECT]', '[SESSION]', '[CONTEXT]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> response = client.get_context(name) @@ -449,7 +436,8 @@ def create_context( >>> >>> client = dialogflow_v2beta1.ContextsClient() >>> - >>> parent = client.session_path('[PROJECT]', '[SESSION]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # TODO: Initialize `context`: >>> context = {} @@ -610,7 +598,8 @@ def delete_context( >>> >>> client = dialogflow_v2beta1.ContextsClient() >>> - >>> name = client.context_path('[PROJECT]', '[SESSION]', '[CONTEXT]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> client.delete_context(name) @@ -682,13 +671,14 @@ def delete_all_contexts( >>> >>> client = dialogflow_v2beta1.ContextsClient() >>> - >>> parent = client.session_path('[PROJECT]', '[SESSION]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> client.delete_all_contexts(parent) Args: - parent (str): Required. The name of the session to delete all contexts from. Format: - ``projects//agent/sessions/`` or + parent (str): Required. The name of the session to delete all contexts from. + Format: ``projects//agent/sessions/`` or ``projects//agent/environments//users//sessions/``. If ``Environment ID`` is not specified we assume default 'draft' environment. If ``User ID`` is not specified, we assume default '-' diff --git a/dialogflow_v2beta1/gapic/contexts_client_config.py b/dialogflow_v2beta1/gapic/contexts_client_config.py index 1d24c129c..7861c060c 100644 --- a/dialogflow_v2beta1/gapic/contexts_client_config.py +++ b/dialogflow_v2beta1/gapic/contexts_client_config.py @@ -2,50 +2,89 @@ "interfaces": { "google.cloud.dialogflow.v2beta1.Contexts": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_3_codes": ["UNAVAILABLE"], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 180000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 180000, + "total_timeout_millis": 180000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { "ListContexts": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetContext": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "CreateContext": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "UpdateContext": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteContext": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteAllContexts": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/dialogflow_v2beta1/gapic/documents_client.py b/dialogflow_v2beta1/gapic/documents_client.py index e22059eeb..dd2cb065a 100644 --- a/dialogflow_v2beta1/gapic/documents_client.py +++ b/dialogflow_v2beta1/gapic/documents_client.py @@ -43,6 +43,8 @@ from dialogflow_v2beta1.proto import context_pb2_grpc from dialogflow_v2beta1.proto import document_pb2 from dialogflow_v2beta1.proto import document_pb2_grpc +from dialogflow_v2beta1.proto import environment_pb2 +from dialogflow_v2beta1.proto import environment_pb2_grpc from dialogflow_v2beta1.proto import gcs_pb2 from dialogflow_v2beta1.proto import validation_result_pb2 from google.longrunning import operations_pb2 @@ -55,7 +57,7 @@ class DocumentsClient(object): - """Manages documents of a knowledge base.""" + """Service for managing knowledge ``Documents``.""" SERVICE_ADDRESS = "dialogflow.googleapis.com:443" """The default address of the service.""" @@ -408,9 +410,6 @@ def create_document( Note: The ``projects.agent.knowledgeBases.documents`` resource is deprecated; only use ``projects.knowledgeBases.documents``. - Operation - Example: >>> import dialogflow_v2beta1 >>> @@ -506,9 +505,6 @@ def delete_document( Note: The ``projects.agent.knowledgeBases.documents`` resource is deprecated; only use ``projects.knowledgeBases.documents``. - Operation - Example: >>> import dialogflow_v2beta1 >>> @@ -528,7 +524,7 @@ def delete_document( >>> metadata = response.metadata() Args: - name (str): The name of the document to delete. Format: + name (str): Required. The name of the document to delete. Format: ``projects//knowledgeBases//documents/``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -598,9 +594,6 @@ def update_document( Note: The ``projects.agent.knowledgeBases.documents`` resource is deprecated; only use ``projects.knowledgeBases.documents``. - Operation - Example: >>> import dialogflow_v2beta1 >>> @@ -696,29 +689,38 @@ def reload_document( metadata=None, ): """ - Reloads the specified document from its specified source, content\_uri - or content. The previously loaded content of the document will be - deleted. Note: Even when the content of the document has not changed, - there still may be side effects because of internal implementation - changes. + Reloads the specified document from its specified source, + content_uri or content. The previously loaded content of the document + will be deleted. Note: Even when the content of the document has not + changed, there still may be side effects because of internal + implementation changes. Note: The ``projects.agent.knowledgeBases.documents`` resource is deprecated; only use ``projects.knowledgeBases.documents``. - Operation - Example: >>> import dialogflow_v2beta1 >>> >>> client = dialogflow_v2beta1.DocumentsClient() >>> - >>> response = client.reload_document() + >>> name = client.document_path('[PROJECT]', '[KNOWLEDGE_BASE]', '[DOCUMENT]') + >>> + >>> response = client.reload_document(name) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() Args: - name (str): The name of the document to reload. Format: + name (str): Required. The name of the document to reload. Format: ``projects//knowledgeBases//documents/`` - gcs_source (Union[dict, ~google.cloud.dialogflow_v2beta1.types.GcsSource]): The path of gcs source file for reloading document content. + gcs_source (Union[dict, ~google.cloud.dialogflow_v2beta1.types.GcsSource]): The path for a Cloud Storage source file for reloading document content. + If not provided, the Document's existing source will be reloaded. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.GcsSource` @@ -732,7 +734,7 @@ def reload_document( that is provided to the method. Returns: - A :class:`~google.cloud.dialogflow_v2beta1.types.Operation` instance. + A :class:`~google.cloud.dialogflow_v2beta1.types._OperationFuture` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -770,6 +772,12 @@ def reload_document( ) metadata.append(routing_metadata) - return self._inner_api_calls["reload_document"]( + operation = self._inner_api_calls["reload_document"]( request, retry=retry, timeout=timeout, metadata=metadata ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + document_pb2.Document, + metadata_type=document_pb2.KnowledgeOperationMetadata, + ) diff --git a/dialogflow_v2beta1/gapic/documents_client_config.py b/dialogflow_v2beta1/gapic/documents_client_config.py index e11215d45..533abc6a2 100644 --- a/dialogflow_v2beta1/gapic/documents_client_config.py +++ b/dialogflow_v2beta1/gapic/documents_client_config.py @@ -2,50 +2,89 @@ "interfaces": { "google.cloud.dialogflow.v2beta1.Documents": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_3_codes": ["UNAVAILABLE"], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 180000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 180000, + "total_timeout_millis": 180000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { "ListDocuments": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetDocument": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "CreateDocument": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteDocument": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "UpdateDocument": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "ReloadDocument": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/dialogflow_v2beta1/gapic/entity_types_client.py b/dialogflow_v2beta1/gapic/entity_types_client.py index aa8b442f3..0f7a09ba7 100644 --- a/dialogflow_v2beta1/gapic/entity_types_client.py +++ b/dialogflow_v2beta1/gapic/entity_types_client.py @@ -45,6 +45,8 @@ from dialogflow_v2beta1.proto import document_pb2_grpc from dialogflow_v2beta1.proto import entity_type_pb2 from dialogflow_v2beta1.proto import entity_type_pb2_grpc +from dialogflow_v2beta1.proto import environment_pb2 +from dialogflow_v2beta1.proto import environment_pb2_grpc from dialogflow_v2beta1.proto import gcs_pb2 from dialogflow_v2beta1.proto import validation_result_pb2 from google.longrunning import operations_pb2 @@ -57,35 +59,7 @@ class EntityTypesClient(object): - """ - Entities are extracted from user input and represent parameters that are - meaningful to your application. For example, a date range, a proper name - such as a geographic location or landmark, and so on. Entities represent - actionable data for your application. - - When you define an entity, you can also include synonyms that all map to - that entity. For example, "soft drink", "soda", "pop", and so on. - - There are three types of entities: - - - **System** - entities that are defined by the Dialogflow API for - common data types such as date, time, currency, and so on. A system - entity is represented by the ``EntityType`` type. - - - **Custom** - entities that are defined by you that represent - actionable data that is meaningful to your application. For example, - you could define a ``pizza.sauce`` entity for red or white pizza - sauce, a ``pizza.cheese`` entity for the different types of cheese on - a pizza, a ``pizza.topping`` entity for different toppings, and so - on. A custom entity is represented by the ``EntityType`` type. - - - **User** - entities that are built for an individual user such as - favorites, preferences, playlists, and so on. A user entity is - represented by the ``SessionEntityType`` type. - - For more information about entity types, see the `Dialogflow - documentation `__. - """ + """Service for managing ``EntityTypes``.""" SERVICE_ADDRESS = "dialogflow.googleapis.com:443" """The default address of the service.""" @@ -115,21 +89,28 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def entity_type_path(cls, project, entity_type): - """Return a fully-qualified entity_type string.""" + def project_agent_path(cls, project): + """Return a fully-qualified project_agent string.""" return google.api_core.path_template.expand( - "projects/{project}/agent/entityTypes/{entity_type}", - project=project, - entity_type=entity_type, + "projects/{project}/agent", project=project ) @classmethod - def project_agent_path(cls, project): - """Return a fully-qualified project_agent string.""" + def agent_path(cls, project): + """Return a fully-qualified agent string.""" return google.api_core.path_template.expand( "projects/{project}/agent", project=project ) + @classmethod + def entity_type_path(cls, project, entity_type): + """Return a fully-qualified entity_type string.""" + return google.api_core.path_template.expand( + "projects/{project}/agent/entityTypes/{entity_type}", + project=project, + entity_type=entity_type, + ) + def __init__( self, transport=None, @@ -260,7 +241,8 @@ def list_entity_types( >>> >>> client = dialogflow_v2beta1.EntityTypesClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # Iterate over all results >>> for element in client.list_entity_types(parent): @@ -279,11 +261,10 @@ def list_entity_types( Args: parent (str): Required. The agent to list all entity types from. Format: ``projects//agent``. - language_code (str): Optional. The language to list entity synonyms for. If not specified, - the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. page_size (int): The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page @@ -369,18 +350,18 @@ def get_entity_type( >>> >>> client = dialogflow_v2beta1.EntityTypesClient() >>> - >>> name = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> response = client.get_entity_type(name) Args: name (str): Required. The name of the entity type. Format: ``projects//agent/entityTypes/``. - language_code (str): Optional. The language to retrieve entity synonyms for. If not - specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -448,7 +429,8 @@ def create_entity_type( >>> >>> client = dialogflow_v2beta1.EntityTypesClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # TODO: Initialize `entity_type`: >>> entity_type = {} @@ -462,11 +444,10 @@ def create_entity_type( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.EntityType` - language_code (str): Optional. The language of entity synonyms defined in ``entity_type``. If - not specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -544,11 +525,10 @@ def update_entity_type( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.EntityType` - language_code (str): Optional. The language of entity synonyms defined in ``entity_type``. If - not specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. update_mask (Union[dict, ~google.cloud.dialogflow_v2beta1.types.FieldMask]): Optional. The mask to control which fields get updated. If a dict is provided, it must be of the same form as the protobuf @@ -620,7 +600,8 @@ def delete_entity_type( >>> >>> client = dialogflow_v2beta1.EntityTypesClient() >>> - >>> name = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> client.delete_entity_type(name) @@ -685,7 +666,6 @@ def batch_update_entity_types( ): """ Updates/Creates multiple entity types in the specified agent. - Operation Example: @@ -693,7 +673,8 @@ def batch_update_entity_types( >>> >>> client = dialogflow_v2beta1.EntityTypesClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> response = client.batch_update_entity_types(parent) >>> @@ -717,11 +698,10 @@ def batch_update_entity_types( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.EntityTypeBatch` - language_code (str): Optional. The language of entity synonyms defined in ``entity_types``. - If not specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. update_mask (Union[dict, ~google.cloud.dialogflow_v2beta1.types.FieldMask]): Optional. The mask to control which fields get updated. If a dict is provided, it must be of the same form as the protobuf @@ -802,16 +782,16 @@ def batch_delete_entity_types( metadata=None, ): """ - Deletes entity types in the specified agent. - - Operation + Deletes entity types in the specified agent. Operation Example: >>> import dialogflow_v2beta1 >>> >>> client = dialogflow_v2beta1.EntityTypesClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # TODO: Initialize `entity_type_names`: >>> entity_type_names = [] @@ -830,8 +810,8 @@ def batch_delete_entity_types( Args: parent (str): Required. The name of the agent to delete all entities types for. Format: ``projects//agent``. - entity_type_names (list[str]): Required. The names entity types to delete. All names must point to the - same agent as ``parent``. + entity_type_names (list[str]): Required. The names entity types to delete. All names must point to + the same agent as ``parent``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -907,7 +887,8 @@ def batch_create_entities( >>> >>> client = dialogflow_v2beta1.EntityTypesClient() >>> - >>> parent = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # TODO: Initialize `entities`: >>> entities = [] @@ -930,11 +911,10 @@ def batch_create_entities( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.Entity` - language_code (str): Optional. The language of entity synonyms defined in ``entities``. If - not specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -1002,8 +982,8 @@ def batch_update_entities( metadata=None, ): """ - Updates or creates multiple entities in the specified entity type. This - method does not affect entities in the entity type that aren't + Updates or creates multiple entities in the specified entity type. + This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation @@ -1013,7 +993,8 @@ def batch_update_entities( >>> >>> client = dialogflow_v2beta1.EntityTypesClient() >>> - >>> parent = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # TODO: Initialize `entities`: >>> entities = [] @@ -1030,17 +1011,17 @@ def batch_update_entities( >>> metadata = response.metadata() Args: - parent (str): Required. The name of the entity type to update or create entities in. - Format: ``projects//agent/entityTypes/``. + parent (str): Required. The name of the entity type to update or create entities + in. Format: + ``projects//agent/entityTypes/``. entities (list[Union[dict, ~google.cloud.dialogflow_v2beta1.types.Entity]]): Required. The entities to update or create. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.Entity` - language_code (str): Optional. The language of entity synonyms defined in ``entities``. If - not specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. update_mask (Union[dict, ~google.cloud.dialogflow_v2beta1.types.FieldMask]): Optional. The mask to control which fields get updated. If a dict is provided, it must be of the same form as the protobuf @@ -1123,7 +1104,8 @@ def batch_delete_entities( >>> >>> client = dialogflow_v2beta1.EntityTypesClient() >>> - >>> parent = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # TODO: Initialize `entity_values`: >>> entity_values = [] @@ -1142,14 +1124,13 @@ def batch_delete_entities( Args: parent (str): Required. The name of the entity type to delete entries for. Format: ``projects//agent/entityTypes/``. - entity_values (list[str]): Required. The reference ``values`` of the entities to delete. Note that - these are not fully-qualified names, i.e. they don't start with + entity_values (list[str]): Required. The reference ``values`` of the entities to delete. Note + that these are not fully-qualified names, i.e. they don't start with ``projects/``. - language_code (str): Optional. The language of entity synonyms defined in ``entities``. If - not specified, the agent's default language is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. diff --git a/dialogflow_v2beta1/gapic/entity_types_client_config.py b/dialogflow_v2beta1/gapic/entity_types_client_config.py index fc564212b..d4b2a8432 100644 --- a/dialogflow_v2beta1/gapic/entity_types_client_config.py +++ b/dialogflow_v2beta1/gapic/entity_types_client_config.py @@ -2,70 +2,109 @@ "interfaces": { "google.cloud.dialogflow.v2beta1.EntityTypes": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_3_codes": ["UNAVAILABLE"], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 180000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 180000, + "total_timeout_millis": 180000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { "ListEntityTypes": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetEntityType": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "CreateEntityType": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "UpdateEntityType": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteEntityType": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchUpdateEntityTypes": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchDeleteEntityTypes": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchCreateEntities": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchUpdateEntities": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchDeleteEntities": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/dialogflow_v2beta1/gapic/enums.py b/dialogflow_v2beta1/gapic/enums.py index f780b1626..8277dfa8c 100644 --- a/dialogflow_v2beta1/gapic/enums.py +++ b/dialogflow_v2beta1/gapic/enums.py @@ -29,8 +29,8 @@ class AudioEncoding(enum.IntEnum): Attributes: AUDIO_ENCODING_UNSPECIFIED (int): Not specified. AUDIO_ENCODING_LINEAR_16 (int): Uncompressed 16-bit signed little-endian samples (Linear PCM). - AUDIO_ENCODING_FLAC (int): ```FLAC`` `__ (Free Lossless - Audio Codec) is the recommended encoding because it is lossless + AUDIO_ENCODING_FLAC (int): ```FLAC`` `__ (Free + Lossless Audio Codec) is the recommended encoding because it is lossless (therefore recognition is not compromised) and requires only about half the bandwidth of ``LINEAR16``. ``FLAC`` stream encoding supports 16-bit and 24-bit samples, however, not all fields in ``STREAMINFO`` are @@ -38,12 +38,13 @@ class AudioEncoding(enum.IntEnum): AUDIO_ENCODING_MULAW (int): 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. AUDIO_ENCODING_AMR (int): Adaptive Multi-Rate Narrowband codec. ``sample_rate_hertz`` must be 8000. - AUDIO_ENCODING_AMR_WB (int): Adaptive Multi-Rate Wideband codec. ``sample_rate_hertz`` must be 16000. + AUDIO_ENCODING_AMR_WB (int): Adaptive Multi-Rate Wideband codec. ``sample_rate_hertz`` must be + 16000. AUDIO_ENCODING_OGG_OPUS (int): Opus encoded audio frames in Ogg container (`OggOpus `__). ``sample_rate_hertz`` must be 16000. - AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE (int): Although the use of lossy encodings is not recommended, if a very low - bitrate encoding is required, ``OGG_OPUS`` is highly preferred over + AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE (int): Although the use of lossy encodings is not recommended, if a very + low bitrate encoding is required, ``OGG_OPUS`` is highly preferred over Speex encoding. The `Speex `__ encoding supported by Dialogflow API has a header byte in each block, as in MIME type ``audio/x-speex-with-header-byte``. It is a variant of the RTP Speex @@ -83,8 +84,8 @@ class IntentView(enum.IntEnum): class NullValue(enum.IntEnum): """ - ``NullValue`` is a singleton enumeration to represent the null value for - the ``Value`` type union. + ``NullValue`` is a singleton enumeration to represent the null value + for the ``Value`` type union. The JSON representation for ``NullValue`` is JSON ``null``. @@ -122,22 +123,22 @@ class SpeechModelVariant(enum.IntEnum): See the `Cloud Speech documentation `__ - for which models have different variants. For example, the "phone\_call" + for which models have different variants. For example, the "phone_call" model has both a standard and an enhanced variant. When you use an enhanced model, you will generally receive higher quality results than for a standard model. Attributes: SPEECH_MODEL_VARIANT_UNSPECIFIED (int): No model variant specified. In this case Dialogflow defaults to - USE\_BEST\_AVAILABLE. - USE_BEST_AVAILABLE (int): Use the best available variant of the ``Speech model`` that the caller - is eligible for. + USE_BEST_AVAILABLE. + USE_BEST_AVAILABLE (int): Use the best available variant of the ``Speech model`` that the + caller is eligible for. Please see the `Dialogflow docs `__ for how to make your project eligible for enhanced models. - USE_STANDARD (int): Use standard model variant even if an enhanced model is available. See - the `Cloud Speech + USE_STANDARD (int): Use standard model variant even if an enhanced model is available. + See the `Cloud Speech documentation `__ for details about enhanced models. USE_ENHANCED (int): Use an enhanced model variant: @@ -290,6 +291,28 @@ class Kind(enum.IntEnum): KIND_REGEXP = 3 +class Environment(object): + class State(enum.IntEnum): + """ + Represents an environment state. When an environment is pointed to a + new agent version, the environment is temporarily set to the ``LOADING`` + state. During that time, the environment keeps on serving the previous + version of the agent. After the new agent version is done loading, the + environment is set back to the ``RUNNING`` state. + + Attributes: + STATE_UNSPECIFIED (int): Not specified. This value is not used. + STOPPED (int): Stopped. + LOADING (int): Loading. + RUNNING (int): Running. + """ + + STATE_UNSPECIFIED = 0 + STOPPED = 1 + LOADING = 2 + RUNNING = 3 + + class Intent(object): class WebhookState(enum.IntEnum): """ @@ -341,67 +364,8 @@ class Platform(enum.IntEnum): SKYPE (int): Skype. LINE (int): Line. VIBER (int): Viber. - ACTIONS_ON_GOOGLE (int): Actions on Google. When using Actions on Google, you can choose one of - the specific Intent.Message types that mention support for Actions on - Google, or you can use the advanced Intent.Message.payload field. The - payload field provides access to AoG features not available in the - specific message types. If using the Intent.Message.payload field, it - should have a structure similar to the JSON message shown here. For more - information, see `Actions on Google Webhook - Format `__ - - .. raw:: html -
{
-                    "expectUserResponse": true,
-                    "isSsml": false,
-                    "noInputPrompts": [],
-                    "richResponse": {
-                      "items": [
-                        {
-                          "simpleResponse": {
-                            "displayText": "hi",
-                            "textToSpeech": "hello"
-                          }
-                        }
-                      ],
-                      "suggestions": [
-                        {
-                          "title": "Say this"
-                        },
-                        {
-                          "title": "or this"
-                        }
-                      ]
-                    },
-                    "systemIntent": {
-                      "data": {
-                        "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
-                        "listSelect": {
-                          "items": [
-                            {
-                              "optionInfo": {
-                                "key": "key1",
-                                "synonyms": [
-                                  "key one"
-                                ]
-                              },
-                              "title": "must not be empty, but unique"
-                            },
-                            {
-                              "optionInfo": {
-                                "key": "key2",
-                                "synonyms": [
-                                  "key two"
-                                ]
-                              },
-                              "title": "must not be empty, but unique"
-                            }
-                          ]
-                        }
-                      },
-                      "intent": "actions.intent.OPTION"
-                    }
-                  }
+ ACTIONS_ON_GOOGLE (int): Google Assistant See `Dialogflow webhook + format `__ TELEPHONY (int): Telephony Gateway. GOOGLE_HANGOUTS (int): Google Hangouts. """ @@ -607,8 +571,8 @@ class EntityOverrideMode(enum.IntEnum): ENTITY_OVERRIDE_MODE_UNSPECIFIED (int): Not specified. This value should be never used. ENTITY_OVERRIDE_MODE_OVERRIDE (int): The collection of session entities overrides the collection of entities in the corresponding custom entity type. - ENTITY_OVERRIDE_MODE_SUPPLEMENT (int): The collection of session entities extends the collection of entities in - the corresponding custom entity type. + ENTITY_OVERRIDE_MODE_SUPPLEMENT (int): The collection of session entities extends the collection of + entities in the corresponding custom entity type. Note: Even in this override mode calls to ``ListSessionEntityTypes``, ``GetSessionEntityType``, ``CreateSessionEntityType`` and diff --git a/dialogflow_v2beta1/gapic/environments_client.py b/dialogflow_v2beta1/gapic/environments_client.py new file mode 100644 index 000000000..b0f74e725 --- /dev/null +++ b/dialogflow_v2beta1/gapic/environments_client.py @@ -0,0 +1,299 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Accesses the google.cloud.dialogflow.v2beta1 Environments API.""" + +import functools +import pkg_resources +import warnings + +from google.oauth2 import service_account +import google.api_core.client_options +import google.api_core.gapic_v1.client_info +import google.api_core.gapic_v1.config +import google.api_core.gapic_v1.method +import google.api_core.gapic_v1.routing_header +import google.api_core.grpc_helpers +import google.api_core.page_iterator +import google.api_core.path_template +import grpc + +from dialogflow_v2beta1.gapic import enums +from dialogflow_v2beta1.gapic import environments_client_config +from dialogflow_v2beta1.gapic.transports import environments_grpc_transport +from dialogflow_v2beta1.proto import environment_pb2 +from dialogflow_v2beta1.proto import environment_pb2_grpc + + +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version + + +class EnvironmentsClient(object): + """Service for managing ``Environments``.""" + + SERVICE_ADDRESS = "dialogflow.googleapis.com:443" + """The default address of the service.""" + + # The name of the interface for this client. This is the key used to + # find the method configuration in the client_config dictionary. + _INTERFACE_NAME = "google.cloud.dialogflow.v2beta1.Environments" + + @classmethod + def from_service_account_file(cls, filename, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + dialogflow_v2beta1.EnvironmentsClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @classmethod + def agent_path(cls, project): + """Return a fully-qualified agent string.""" + return google.api_core.path_template.expand( + "projects/{project}/agent", project=project + ) + + def __init__( + self, + transport=None, + channel=None, + credentials=None, + client_config=None, + client_info=None, + client_options=None, + ): + """Constructor. + + Args: + transport (Union[~.EnvironmentsGrpcTransport, + Callable[[~.Credentials, type], ~.EnvironmentsGrpcTransport]): A transport + instance, responsible for actually making the API calls. + The default transport uses the gRPC protocol. + This argument may also be a callable which returns a + transport instance. Callables will be sent the credentials + as the first argument and the default transport class as + the second argument. + channel (grpc.Channel): DEPRECATED. A ``Channel`` instance + through which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. + credentials (google.auth.credentials.Credentials): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If none + are specified, the client will attempt to ascertain the + credentials from the environment. + This argument is mutually exclusive with providing a + transport instance to ``transport``; doing so will raise + an exception. + client_config (dict): DEPRECATED. A dictionary of call options for + each method. If not specified, the default configuration is used. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + client_options (Union[dict, google.api_core.client_options.ClientOptions]): + Client options used to set user options on the client. API Endpoint + should be set through client_options. + """ + # Raise deprecation warnings for things we want to go away. + if client_config is not None: + warnings.warn( + "The `client_config` argument is deprecated.", + PendingDeprecationWarning, + stacklevel=2, + ) + else: + client_config = environments_client_config.config + + if channel: + warnings.warn( + "The `channel` argument is deprecated; use " "`transport` instead.", + PendingDeprecationWarning, + stacklevel=2, + ) + + api_endpoint = self.SERVICE_ADDRESS + if client_options: + if type(client_options) == dict: + client_options = google.api_core.client_options.from_dict( + client_options + ) + if client_options.api_endpoint: + api_endpoint = client_options.api_endpoint + + # Instantiate the transport. + # The transport is responsible for handling serialization and + # deserialization and actually sending data to the service. + if transport: + if callable(transport): + self.transport = transport( + credentials=credentials, + default_class=environments_grpc_transport.EnvironmentsGrpcTransport, + address=api_endpoint, + ) + else: + if credentials: + raise ValueError( + "Received both a transport instance and " + "credentials; these are mutually exclusive." + ) + self.transport = transport + else: + self.transport = environments_grpc_transport.EnvironmentsGrpcTransport( + address=api_endpoint, channel=channel, credentials=credentials + ) + + if client_info is None: + client_info = google.api_core.gapic_v1.client_info.ClientInfo( + gapic_version=_GAPIC_LIBRARY_VERSION + ) + else: + client_info.gapic_version = _GAPIC_LIBRARY_VERSION + self._client_info = client_info + + # Parse out the default settings for retry and timeout for each RPC + # from the client configuration. + # (Ordinarily, these are the defaults specified in the `*_config.py` + # file next to this one.) + self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( + client_config["interfaces"][self._INTERFACE_NAME] + ) + + # Save a dictionary of cached API call functions. + # These are the actual callables which invoke the proper + # transport methods, wrapped with `wrap_method` to add retry, + # timeout, and the like. + self._inner_api_calls = {} + + # Service calls + def list_environments( + self, + parent, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Returns the list of all non-draft environments of the specified agent. + + Example: + >>> import dialogflow_v2beta1 + >>> + >>> client = dialogflow_v2beta1.EnvironmentsClient() + >>> + >>> # TODO: Initialize `parent`: + >>> parent = '' + >>> + >>> # Iterate over all results + >>> for element in client.list_environments(parent): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_environments(parent).pages: + ... for element in page: + ... # process element + ... pass + + Args: + parent (str): Required. The agent to list all environments from. Format: + + - ``projects//agent`` + - \`projects//locations//agent + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2beta1.types.Environment` instances. + You can also iterate over the pages of the response + using its `pages` property. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "list_environments" not in self._inner_api_calls: + self._inner_api_calls[ + "list_environments" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.list_environments, + default_retry=self._method_configs["ListEnvironments"].retry, + default_timeout=self._method_configs["ListEnvironments"].timeout, + client_info=self._client_info, + ) + + request = environment_pb2.ListEnvironmentsRequest( + parent=parent, page_size=page_size + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_environments"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="environments", + request_token_field="page_token", + response_token_field="next_page_token", + ) + return iterator diff --git a/dialogflow_v2beta1/gapic/environments_client_config.py b/dialogflow_v2beta1/gapic/environments_client_config.py new file mode 100644 index 000000000..c8e084e0c --- /dev/null +++ b/dialogflow_v2beta1/gapic/environments_client_config.py @@ -0,0 +1,67 @@ +config = { + "interfaces": { + "google.cloud.dialogflow.v2beta1.Environments": { + "retry_codes": { + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_3_codes": ["UNAVAILABLE"], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], + }, + "retry_params": { + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 180000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 180000, + "total_timeout_millis": 180000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + }, + "methods": { + "ListEnvironments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + } + }, + } + } +} diff --git a/dialogflow_v2beta1/gapic/intents_client.py b/dialogflow_v2beta1/gapic/intents_client.py index 2d75a3712..3945b1d78 100644 --- a/dialogflow_v2beta1/gapic/intents_client.py +++ b/dialogflow_v2beta1/gapic/intents_client.py @@ -45,6 +45,8 @@ from dialogflow_v2beta1.proto import document_pb2_grpc from dialogflow_v2beta1.proto import entity_type_pb2 from dialogflow_v2beta1.proto import entity_type_pb2_grpc +from dialogflow_v2beta1.proto import environment_pb2 +from dialogflow_v2beta1.proto import environment_pb2_grpc from dialogflow_v2beta1.proto import gcs_pb2 from dialogflow_v2beta1.proto import intent_pb2 from dialogflow_v2beta1.proto import intent_pb2_grpc @@ -59,38 +61,7 @@ class IntentsClient(object): - """ - An intent represents a mapping between input from a user and an action - to be taken by your application. When you pass user input to the - ``DetectIntent`` (or ``StreamingDetectIntent``) method, the Dialogflow - API analyzes the input and searches for a matching intent. If no match - is found, the Dialogflow API returns a fallback intent (``is_fallback`` - = true). - - You can provide additional information for the Dialogflow API to use to - match user input to an intent by adding the following to your intent. - - - **Contexts** - provide additional context for intent analysis. For - example, if an intent is related to an object in your application - that plays music, you can provide a context to determine when to - match the intent if the user input is "turn it off". You can include - a context that matches the intent when there is previous user input - of "play music", and not when there is previous user input of "turn - on the light". - - - **Events** - allow for matching an intent by using an event name - instead of user input. Your application can provide an event name and - related parameters to the Dialogflow API to match an intent. For - example, when your application starts, you can send a welcome event - with a user name parameter to the Dialogflow API to match an intent - with a personalized welcome message for the user. - - - **Training phrases** - provide examples of user input to train the - Dialogflow API agent to better match intents. - - For more information about intents, see the `Dialogflow - documentation `__. - """ + """Service for managing ``Intents``.""" SERVICE_ADDRESS = "dialogflow.googleapis.com:443" """The default address of the service.""" @@ -120,10 +91,10 @@ def from_service_account_file(cls, filename, *args, **kwargs): from_service_account_json = from_service_account_file @classmethod - def intent_path(cls, project, intent): - """Return a fully-qualified intent string.""" + def agent_path(cls, project, agent): + """Return a fully-qualified agent string.""" return google.api_core.path_template.expand( - "projects/{project}/agent/intents/{intent}", project=project, intent=intent + "projects/{project}/agents/{agent}", project=project, agent=agent ) @classmethod @@ -133,6 +104,13 @@ def project_agent_path(cls, project): "projects/{project}/agent", project=project ) + @classmethod + def intent_path(cls, project, intent): + """Return a fully-qualified intent string.""" + return google.api_core.path_template.expand( + "projects/{project}/agent/intents/{intent}", project=project, intent=intent + ) + def __init__( self, transport=None, @@ -264,7 +242,8 @@ def list_intents( >>> >>> client = dialogflow_v2beta1.IntentsClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # Iterate over all results >>> for element in client.list_intents(parent): @@ -283,12 +262,10 @@ def list_intents( Args: parent (str): Required. The agent to list all intents from. Format: ``projects//agent``. - language_code (str): Optional. The language to list training phrases, parameters and rich - messages for. If not specified, the agent's default language is used. - `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. intent_view (~google.cloud.dialogflow_v2beta1.types.IntentView): Optional. The resource view to apply to the returned intent. page_size (int): The maximum number of resources contained in the underlying API response. If page streaming is performed per- @@ -379,19 +356,18 @@ def get_intent( >>> >>> client = dialogflow_v2beta1.IntentsClient() >>> - >>> name = client.intent_path('[PROJECT]', '[INTENT]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> response = client.get_intent(name) Args: name (str): Required. The name of the intent. Format: ``projects//agent/intents/``. - language_code (str): Optional. The language to retrieve training phrases, parameters and rich - messages for. If not specified, the agent's default language is used. - `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. intent_view (~google.cloud.dialogflow_v2beta1.types.IntentView): Optional. The resource view to apply to the returned intent. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -461,7 +437,8 @@ def create_intent( >>> >>> client = dialogflow_v2beta1.IntentsClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # TODO: Initialize `intent`: >>> intent = {} @@ -475,12 +452,10 @@ def create_intent( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.Intent` - language_code (str): Optional. The language of training phrases, parameters and rich messages - defined in ``intent``. If not specified, the agent's default language is - used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. intent_view (~google.cloud.dialogflow_v2beta1.types.IntentView): Optional. The resource view to apply to the returned intent. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -563,12 +538,10 @@ def update_intent( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.Intent` - language_code (str): Optional. The language of training phrases, parameters and rich messages - defined in ``intent``. If not specified, the agent's default language is - used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. update_mask (Union[dict, ~google.cloud.dialogflow_v2beta1.types.FieldMask]): Optional. The mask to control which fields get updated. If a dict is provided, it must be of the same form as the protobuf @@ -642,13 +615,14 @@ def delete_intent( >>> >>> client = dialogflow_v2beta1.IntentsClient() >>> - >>> name = client.intent_path('[PROJECT]', '[INTENT]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> client.delete_intent(name) Args: - name (str): Required. The name of the intent to delete. If this intent has direct or - indirect followup intents, we also delete them. + name (str): Required. The name of the intent to delete. If this intent has + direct or indirect followup intents, we also delete them. Format: ``projects//agent/intents/``. retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -718,7 +692,8 @@ def batch_update_intents( >>> >>> client = dialogflow_v2beta1.IntentsClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> response = client.batch_update_intents(parent) >>> @@ -732,8 +707,8 @@ def batch_update_intents( >>> metadata = response.metadata() Args: - parent (str): Required. The name of the agent to update or create intents in. Format: - ``projects//agent``. + parent (str): Required. The name of the agent to update or create intents in. + Format: ``projects//agent``. intent_batch_uri (str): The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must start with "gs://". @@ -741,12 +716,10 @@ def batch_update_intents( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.IntentBatch` - language_code (str): Optional. The language of training phrases, parameters and rich messages - defined in ``intents``. If not specified, the agent's default language - is used. `Many - languages `__ - are supported. Note: languages must be enabled in the agent before they - can be used. + language_code (str): Optional. The language used to access language-specific data. If not + specified, the agent's default language is used. For more information, + see `Multilingual intent and entity + data `__. update_mask (Union[dict, ~google.cloud.dialogflow_v2beta1.types.FieldMask]): Optional. The mask to control which fields get updated. If a dict is provided, it must be of the same form as the protobuf @@ -837,7 +810,8 @@ def batch_delete_intents( >>> >>> client = dialogflow_v2beta1.IntentsClient() >>> - >>> parent = client.project_agent_path('[PROJECT]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # TODO: Initialize `intents`: >>> intents = [] @@ -856,8 +830,8 @@ def batch_delete_intents( Args: parent (str): Required. The name of the agent to delete all entities types for. Format: ``projects//agent``. - intents (list[Union[dict, ~google.cloud.dialogflow_v2beta1.types.Intent]]): Required. The collection of intents to delete. Only intent ``name`` must - be filled in. + intents (list[Union[dict, ~google.cloud.dialogflow_v2beta1.types.Intent]]): Required. The collection of intents to delete. Only intent ``name`` + must be filled in. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.Intent` diff --git a/dialogflow_v2beta1/gapic/intents_client_config.py b/dialogflow_v2beta1/gapic/intents_client_config.py index 63644c169..7adfd6a6f 100644 --- a/dialogflow_v2beta1/gapic/intents_client_config.py +++ b/dialogflow_v2beta1/gapic/intents_client_config.py @@ -2,55 +2,94 @@ "interfaces": { "google.cloud.dialogflow.v2beta1.Intents": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_3_codes": ["UNAVAILABLE"], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 180000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 180000, + "total_timeout_millis": 180000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { "ListIntents": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetIntent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "CreateIntent": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "UpdateIntent": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteIntent": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchUpdateIntents": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchDeleteIntents": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/dialogflow_v2beta1/gapic/knowledge_bases_client.py b/dialogflow_v2beta1/gapic/knowledge_bases_client.py index 14a8b6ea2..1b5abbbbd 100644 --- a/dialogflow_v2beta1/gapic/knowledge_bases_client.py +++ b/dialogflow_v2beta1/gapic/knowledge_bases_client.py @@ -42,6 +42,8 @@ from dialogflow_v2beta1.proto import document_pb2_grpc from dialogflow_v2beta1.proto import entity_type_pb2 from dialogflow_v2beta1.proto import entity_type_pb2_grpc +from dialogflow_v2beta1.proto import environment_pb2 +from dialogflow_v2beta1.proto import environment_pb2_grpc from dialogflow_v2beta1.proto import gcs_pb2 from dialogflow_v2beta1.proto import intent_pb2 from dialogflow_v2beta1.proto import intent_pb2_grpc @@ -58,11 +60,7 @@ class KnowledgeBasesClient(object): - """ - Manages knowledge bases. - - Allows users to setup and maintain knowledge bases with their knowledge data. - """ + """Service for managing ``KnowledgeBases``.""" SERVICE_ADDRESS = "dialogflow.googleapis.com:443" """The default address of the service.""" diff --git a/dialogflow_v2beta1/gapic/knowledge_bases_client_config.py b/dialogflow_v2beta1/gapic/knowledge_bases_client_config.py index 9b740b8f0..15e8042c4 100644 --- a/dialogflow_v2beta1/gapic/knowledge_bases_client_config.py +++ b/dialogflow_v2beta1/gapic/knowledge_bases_client_config.py @@ -2,45 +2,84 @@ "interfaces": { "google.cloud.dialogflow.v2beta1.KnowledgeBases": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_3_codes": ["UNAVAILABLE"], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 180000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 180000, + "total_timeout_millis": 180000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { "ListKnowledgeBases": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetKnowledgeBase": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "CreateKnowledgeBase": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteKnowledgeBase": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "UpdateKnowledgeBase": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/dialogflow_v2beta1/gapic/session_entity_types_client.py b/dialogflow_v2beta1/gapic/session_entity_types_client.py index cd473fe57..eb10a3dd6 100644 --- a/dialogflow_v2beta1/gapic/session_entity_types_client.py +++ b/dialogflow_v2beta1/gapic/session_entity_types_client.py @@ -42,6 +42,8 @@ from dialogflow_v2beta1.proto import document_pb2_grpc from dialogflow_v2beta1.proto import entity_type_pb2 from dialogflow_v2beta1.proto import entity_type_pb2_grpc +from dialogflow_v2beta1.proto import environment_pb2 +from dialogflow_v2beta1.proto import environment_pb2_grpc from dialogflow_v2beta1.proto import gcs_pb2 from dialogflow_v2beta1.proto import intent_pb2 from dialogflow_v2beta1.proto import intent_pb2_grpc @@ -60,24 +62,7 @@ class SessionEntityTypesClient(object): - """ - Entities are extracted from user input and represent parameters that are - meaningful to your application. For example, a date range, a proper name - such as a geographic location or landmark, and so on. Entities represent - actionable data for your application. - - Session entity types are referred to as **User** entity types and are - entities that are built for an individual user such as favorites, - preferences, playlists, and so on. You can redefine a session entity - type at the session level. - - Session entity methods do not work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities with - Google Assistant integration. - - For more information about entity types, see the `Dialogflow - documentation `__. - """ + """Service for managing ``SessionEntityTypes``.""" SERVICE_ADDRESS = "dialogflow.googleapis.com:443" """The default address of the service.""" @@ -283,7 +268,8 @@ def list_session_entity_types( >>> >>> client = dialogflow_v2beta1.SessionEntityTypesClient() >>> - >>> parent = client.session_path('[PROJECT]', '[SESSION]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # Iterate over all results >>> for element in client.list_session_entity_types(parent): @@ -394,7 +380,8 @@ def get_session_entity_type( >>> >>> client = dialogflow_v2beta1.SessionEntityTypesClient() >>> - >>> name = client.session_entity_type_path('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> response = client.get_session_entity_type(name) @@ -477,7 +464,8 @@ def create_session_entity_type( >>> >>> client = dialogflow_v2beta1.SessionEntityTypesClient() >>> - >>> parent = client.session_path('[PROJECT]', '[SESSION]') + >>> # TODO: Initialize `parent`: + >>> parent = '' >>> >>> # TODO: Initialize `session_entity_type`: >>> session_entity_type = {} @@ -571,13 +559,7 @@ def update_session_entity_type( >>> response = client.update_session_entity_type(session_entity_type) Args: - session_entity_type (Union[dict, ~google.cloud.dialogflow_v2beta1.types.SessionEntityType]): Required. The entity type to update. Format: - ``projects//agent/sessions//entityTypes/`` - or - ``projects//agent/environments//users//sessions//entityTypes/``. - If ``Environment ID`` is not specified, we assume default 'draft' - environment. If ``User ID`` is not specified, we assume default '-' - user. + session_entity_type (Union[dict, ~google.cloud.dialogflow_v2beta1.types.SessionEntityType]): Required. The session entity type to update. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.SessionEntityType` @@ -654,7 +636,8 @@ def delete_session_entity_type( >>> >>> client = dialogflow_v2beta1.SessionEntityTypesClient() >>> - >>> name = client.session_entity_type_path('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]') + >>> # TODO: Initialize `name`: + >>> name = '' >>> >>> client.delete_session_entity_type(name) diff --git a/dialogflow_v2beta1/gapic/session_entity_types_client_config.py b/dialogflow_v2beta1/gapic/session_entity_types_client_config.py index 817bc614f..ad2f36087 100644 --- a/dialogflow_v2beta1/gapic/session_entity_types_client_config.py +++ b/dialogflow_v2beta1/gapic/session_entity_types_client_config.py @@ -2,45 +2,84 @@ "interfaces": { "google.cloud.dialogflow.v2beta1.SessionEntityTypes": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_3_codes": ["UNAVAILABLE"], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 180000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 180000, + "total_timeout_millis": 180000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { "ListSessionEntityTypes": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetSessionEntityType": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "CreateSessionEntityType": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "UpdateSessionEntityType": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteSessionEntityType": { "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/dialogflow_v2beta1/gapic/sessions_client.py b/dialogflow_v2beta1/gapic/sessions_client.py index 72d59e5fc..b2077c6da 100644 --- a/dialogflow_v2beta1/gapic/sessions_client.py +++ b/dialogflow_v2beta1/gapic/sessions_client.py @@ -41,6 +41,8 @@ from dialogflow_v2beta1.proto import document_pb2_grpc from dialogflow_v2beta1.proto import entity_type_pb2 from dialogflow_v2beta1.proto import entity_type_pb2_grpc +from dialogflow_v2beta1.proto import environment_pb2 +from dialogflow_v2beta1.proto import environment_pb2_grpc from dialogflow_v2beta1.proto import gcs_pb2 from dialogflow_v2beta1.proto import intent_pb2 from dialogflow_v2beta1.proto import intent_pb2_grpc @@ -62,9 +64,10 @@ class SessionsClient(object): """ - A session represents an interaction with a user. You retrieve user input - and pass it to the ``DetectIntent`` (or ``StreamingDetectIntent``) - method to determine user intent and respond. + A service used for session interactions. + + For more information, see the `API interactions + guide `__. """ SERVICE_ADDRESS = "dialogflow.googleapis.com:443" @@ -250,7 +253,8 @@ def detect_intent( >>> >>> client = dialogflow_v2beta1.SessionsClient() >>> - >>> session = client.session_path('[PROJECT]', '[SESSION]') + >>> # TODO: Initialize `session`: + >>> session = '' >>> >>> # TODO: Initialize `query_input`: >>> query_input = {} @@ -267,6 +271,9 @@ def detect_intent( ``User Id``. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the ``Session ID`` and ``User ID`` must not exceed 36 characters. + + For more information, see the `API interactions + guide `__. query_input (Union[dict, ~google.cloud.dialogflow_v2beta1.types.QueryInput]): Required. The input specification. It can be set to: 1. an audio config @@ -297,9 +304,9 @@ def detect_intent( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.FieldMask` - input_audio (bytes): The natural language speech audio to be processed. This field should be - populated iff ``query_input`` is set to an input audio config. A single - request can contain up to 1 minute of speech audio data. + input_audio (bytes): The natural language speech audio to be processed. This field should + be populated iff ``query_input`` is set to an input audio config. A + single request can contain up to 1 minute of speech audio data. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. diff --git a/dialogflow_v2beta1/gapic/sessions_client_config.py b/dialogflow_v2beta1/gapic/sessions_client_config.py index 62240223e..465f6423c 100644 --- a/dialogflow_v2beta1/gapic/sessions_client_config.py +++ b/dialogflow_v2beta1/gapic/sessions_client_config.py @@ -2,30 +2,69 @@ "interfaces": { "google.cloud.dialogflow.v2beta1.Sessions": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE"], + "no_retry_codes": [], + "retry_policy_3_codes": ["UNAVAILABLE"], + "retry_policy_2_codes": ["UNAVAILABLE"], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000, - } + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000, + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 180000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 180000, + "total_timeout_millis": 180000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 220000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 220000, + "total_timeout_millis": 220000, + }, }, "methods": { "DetectIntent": { "timeout_millis": 220000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "StreamingDetectIntent": { "timeout_millis": 220000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, }, } diff --git a/dialogflow_v2beta1/gapic/transports/agents_grpc_transport.py b/dialogflow_v2beta1/gapic/transports/agents_grpc_transport.py index 24994682a..a9524916b 100644 --- a/dialogflow_v2beta1/gapic/transports/agents_grpc_transport.py +++ b/dialogflow_v2beta1/gapic/transports/agents_grpc_transport.py @@ -117,54 +117,52 @@ def channel(self): return self._channel @property - def set_agent(self): - """Return the gRPC stub for :meth:`AgentsClient.set_agent`. + def get_agent(self): + """Return the gRPC stub for :meth:`AgentsClient.get_agent`. - Creates/updates the specified agent. + Retrieves the specified agent. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["agents_stub"].SetAgent + return self._stubs["agents_stub"].GetAgent @property - def delete_agent(self): - """Return the gRPC stub for :meth:`AgentsClient.delete_agent`. + def set_agent(self): + """Return the gRPC stub for :meth:`AgentsClient.set_agent`. - Deletes the specified agent. + Creates/updates the specified agent. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["agents_stub"].DeleteAgent + return self._stubs["agents_stub"].SetAgent @property - def get_agent(self): - """Return the gRPC stub for :meth:`AgentsClient.get_agent`. + def delete_agent(self): + """Return the gRPC stub for :meth:`AgentsClient.delete_agent`. - Retrieves the specified agent. + Deletes the specified agent. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["agents_stub"].GetAgent + return self._stubs["agents_stub"].DeleteAgent @property def search_agents(self): """Return the gRPC stub for :meth:`AgentsClient.search_agents`. - Returns the list of agents. - - Since there is at most one conversational agent per project, this method - is useful primarily for listing all agents across projects the caller - has access to. One can achieve that with a wildcard project collection - id "-". Refer to `List + Returns the list of agents. Since there is at most one + conversational agent per project, this method is useful primarily for + listing all agents across projects the caller has access to. One can + achieve that with a wildcard project collection id "-". Refer to `List Sub-Collections `__. Returns: @@ -212,9 +210,15 @@ def import_agent(self): Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new - versions from ImportAgentRequest. + versions from ``ImportAgentRequest``. After the import, the imported + draft agent will be trained automatically (unless disabled in agent + settings). However, once the import is done, training may not be + completed yet. Please call ``TrainAgent`` and wait for the operation it + returns in order to train explicitly. - Operation + Operation An operation which + tracks when importing is complete. It only tracks when the draft agent + is updated not when it is done training. Returns: Callable: A callable which accepts the appropriate @@ -230,9 +234,15 @@ def restore_agent(self): Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and - entity types in the older version are deleted. - - Operation + entity types in the older version are deleted. After the restore, the + restored draft agent will be trained automatically (unless disabled in + agent settings). However, once the restore is done, training may not be + completed yet. Please call ``TrainAgent`` and wait for the operation it + returns in order to train explicitly. + + Operation An operation which + tracks when restoring is complete. It only tracks when the draft agent + is updated not when it is done training. Returns: Callable: A callable which accepts the appropriate diff --git a/dialogflow_v2beta1/gapic/transports/documents_grpc_transport.py b/dialogflow_v2beta1/gapic/transports/documents_grpc_transport.py index dc3932288..d83dd37b8 100644 --- a/dialogflow_v2beta1/gapic/transports/documents_grpc_transport.py +++ b/dialogflow_v2beta1/gapic/transports/documents_grpc_transport.py @@ -157,9 +157,6 @@ def create_document(self): Note: The ``projects.agent.knowledgeBases.documents`` resource is deprecated; only use ``projects.knowledgeBases.documents``. - Operation - Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -176,9 +173,6 @@ def delete_document(self): Note: The ``projects.agent.knowledgeBases.documents`` resource is deprecated; only use ``projects.knowledgeBases.documents``. - Operation - Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -195,9 +189,6 @@ def update_document(self): Note: The ``projects.agent.knowledgeBases.documents`` resource is deprecated; only use ``projects.knowledgeBases.documents``. - Operation - Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -209,18 +200,15 @@ def update_document(self): def reload_document(self): """Return the gRPC stub for :meth:`DocumentsClient.reload_document`. - Reloads the specified document from its specified source, content\_uri - or content. The previously loaded content of the document will be - deleted. Note: Even when the content of the document has not changed, - there still may be side effects because of internal implementation - changes. + Reloads the specified document from its specified source, + content_uri or content. The previously loaded content of the document + will be deleted. Note: Even when the content of the document has not + changed, there still may be side effects because of internal + implementation changes. Note: The ``projects.agent.knowledgeBases.documents`` resource is deprecated; only use ``projects.knowledgeBases.documents``. - Operation - Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a diff --git a/dialogflow_v2beta1/gapic/transports/entity_types_grpc_transport.py b/dialogflow_v2beta1/gapic/transports/entity_types_grpc_transport.py index a39d236c7..8a0ef7744 100644 --- a/dialogflow_v2beta1/gapic/transports/entity_types_grpc_transport.py +++ b/dialogflow_v2beta1/gapic/transports/entity_types_grpc_transport.py @@ -188,7 +188,6 @@ def batch_update_entity_types(self): """Return the gRPC stub for :meth:`EntityTypesClient.batch_update_entity_types`. Updates/Creates multiple entity types in the specified agent. - Operation Returns: @@ -202,9 +201,8 @@ def batch_update_entity_types(self): def batch_delete_entity_types(self): """Return the gRPC stub for :meth:`EntityTypesClient.batch_delete_entity_types`. - Deletes entity types in the specified agent. - - Operation + Deletes entity types in the specified agent. Operation Returns: Callable: A callable which accepts the appropriate @@ -232,8 +230,8 @@ def batch_create_entities(self): def batch_update_entities(self): """Return the gRPC stub for :meth:`EntityTypesClient.batch_update_entities`. - Updates or creates multiple entities in the specified entity type. This - method does not affect entities in the entity type that aren't + Updates or creates multiple entities in the specified entity type. + This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation diff --git a/dialogflow_v2beta1/gapic/transports/environments_grpc_transport.py b/dialogflow_v2beta1/gapic/transports/environments_grpc_transport.py new file mode 100644 index 000000000..e8d9ca4ad --- /dev/null +++ b/dialogflow_v2beta1/gapic/transports/environments_grpc_transport.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import google.api_core.grpc_helpers + +from dialogflow_v2beta1.proto import environment_pb2_grpc + + +class EnvironmentsGrpcTransport(object): + """gRPC transport class providing stubs for + google.cloud.dialogflow.v2beta1 Environments API. + + The transport provides access to the raw gRPC stubs, + which can be used to take advantage of advanced + features of gRPC. + """ + + # The scopes needed to make gRPC calls to all of the methods defined + # in this service. + _OAUTH_SCOPES = ( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow", + ) + + def __init__( + self, channel=None, credentials=None, address="dialogflow.googleapis.com:443" + ): + """Instantiate the transport class. + + Args: + channel (grpc.Channel): A ``Channel`` instance through + which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. + credentials (google.auth.credentials.Credentials): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If none + are specified, the client will attempt to ascertain the + credentials from the environment. + address (str): The address where the service is hosted. + """ + # If both `channel` and `credentials` are specified, raise an + # exception (channels come with credentials baked in already). + if channel is not None and credentials is not None: + raise ValueError( + "The `channel` and `credentials` arguments are mutually " "exclusive." + ) + + # Create the channel. + if channel is None: + channel = self.create_channel( + address=address, + credentials=credentials, + options={ + "grpc.max_send_message_length": -1, + "grpc.max_receive_message_length": -1, + }.items(), + ) + + self._channel = channel + + # gRPC uses objects called "stubs" that are bound to the + # channel and provide a basic method for each RPC. + self._stubs = { + "environments_stub": environment_pb2_grpc.EnvironmentsStub(channel) + } + + @classmethod + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): + """Create and return a gRPC channel object. + + Args: + address (str): The host for the channel to use. + credentials (~.Credentials): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If + none are specified, the client will attempt to ascertain + the credentials from the environment. + kwargs (dict): Keyword arguments, which are passed to the + channel creation. + + Returns: + grpc.Channel: A gRPC channel object. + """ + return google.api_core.grpc_helpers.create_channel( + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs + ) + + @property + def channel(self): + """The gRPC channel used by the transport. + + Returns: + grpc.Channel: A gRPC channel object. + """ + return self._channel + + @property + def list_environments(self): + """Return the gRPC stub for :meth:`EnvironmentsClient.list_environments`. + + Returns the list of all non-draft environments of the specified agent. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["environments_stub"].ListEnvironments diff --git a/dialogflow_v2beta1/proto/agent.proto b/dialogflow_v2beta1/proto/agent.proto new file mode 100644 index 000000000..dec8dde09 --- /dev/null +++ b/dialogflow_v2beta1/proto/agent.proto @@ -0,0 +1,500 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2beta1/environment.proto"; +import "google/cloud/dialogflow/v2beta1/validation_result.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "AgentProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Service for managing [Agents][google.cloud.dialogflow.v2beta1.Agent]. +service Agents { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Retrieves the specified agent. + rpc GetAgent(GetAgentRequest) returns (Agent) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*}/agent" + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*}/agent" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Creates/updates the specified agent. + rpc SetAgent(SetAgentRequest) returns (Agent) { + option (google.api.http) = { + post: "/v2beta1/{agent.parent=projects/*}/agent" + body: "agent" + additional_bindings { + post: "/v2beta1/{agent.parent=projects/*/locations/*}/agent" + body: "agent" + } + }; + option (google.api.method_signature) = "agent"; + } + + // Deletes the specified agent. + rpc DeleteAgent(DeleteAgentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta1/{parent=projects/*}/agent" + additional_bindings { + delete: "/v2beta1/{parent=projects/*/locations/*}/agent" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the list of agents. + // Since there is at most one conversational agent per project, this method is + // useful primarily for listing all agents across projects the caller has + // access to. One can achieve that with a wildcard project collection id "-". + // Refer to [List + // Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). + rpc SearchAgents(SearchAgentsRequest) returns (SearchAgentsResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*}/agent:search" + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*}/agent:search" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Trains the specified agent. + // + // + // Operation + rpc TrainAgent(TrainAgentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*}/agent:train" + body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*}/agent:train" + body: "*" + } + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Exports the specified agent to a ZIP file. + // + // + // Operation + rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*}/agent:export" + body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*}/agent:export" + body: "*" + } + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.dialogflow.v2beta1.ExportAgentResponse" + metadata_type: "google.protobuf.Struct" + }; + } + + // Imports the specified agent from a ZIP file. + // + // Uploads new intents and entity types without deleting the existing ones. + // Intents and entity types with the same name are replaced with the new + // versions from [ImportAgentRequest][google.cloud.dialogflow.v2beta1.ImportAgentRequest]. After the import, the imported draft + // agent will be trained automatically (unless disabled in agent settings). + // However, once the import is done, training may not be completed yet. Please + // call [TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent] and wait for the operation it returns in order to train + // explicitly. + // + // + // Operation + // An operation which tracks when importing is complete. It only tracks + // when the draft agent is updated not when it is done training. + rpc ImportAgent(ImportAgentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*}/agent:import" + body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*}/agent:import" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Restores the specified agent from a ZIP file. + // + // Replaces the current agent version with a new one. All the intents and + // entity types in the older version are deleted. After the restore, the + // restored draft agent will be trained automatically (unless disabled in + // agent settings). However, once the restore is done, training may not be + // completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent] and wait for the operation it + // returns in order to train explicitly. + // + // + // Operation + // An operation which tracks when restoring is complete. It only tracks + // when the draft agent is updated not when it is done training. + rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*}/agent:restore" + body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*}/agent:restore" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Gets agent validation result. Agent validation is performed during + // training time and is updated automatically when training is completed. + rpc GetValidationResult(GetValidationResultRequest) returns (ValidationResult) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*}/agent/validationResult" + }; + } +} + +// A Dialogflow agent is a virtual agent that handles conversations with your +// end-users. It is a natural language understanding module that understands the +// nuances of human language. Dialogflow translates end-user text or audio +// during a conversation to structured data that your apps and services can +// understand. You design and build a Dialogflow agent to handle the types of +// conversations required for your system. +// +// For more information about agents, see the +// [Agent guide](https://cloud.google.com/dialogflow/docs/agents-overview). +message Agent { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Agent" + pattern: "projects/{project}/agent" + pattern: "projects/{project}/locations/{location}/agent" + }; + + // Match mode determines how intents are detected from user queries. + enum MatchMode { + // Not specified. + MATCH_MODE_UNSPECIFIED = 0; + + // Best for agents with a small number of examples in intents and/or wide + // use of templates syntax and composite entities. + MATCH_MODE_HYBRID = 1; + + // Can be used for agents with a large number of examples in intents, + // especially the ones using @sys.any or very large custom entities. + MATCH_MODE_ML_ONLY = 2; + } + + // API version for the agent. + enum ApiVersion { + // Not specified. + API_VERSION_UNSPECIFIED = 0; + + // Legacy V1 API. + API_VERSION_V1 = 1; + + // V2 API. + API_VERSION_V2 = 2; + + // V2beta1 API. + API_VERSION_V2_BETA_1 = 3; + } + + // Represents the agent tier. + enum Tier { + // Not specified. This value should never be used. + TIER_UNSPECIFIED = 0; + + // Standard tier. + TIER_STANDARD = 1; + + // Enterprise tier (Essentials). + TIER_ENTERPRISE = 2; + + // Enterprise tier (Plus). + TIER_ENTERPRISE_PLUS = 3; + } + + // Required. The project of this agent. + // Format: `projects/`. + string parent = 1; + + // Required. The name of this agent. + string display_name = 2; + + // Required. The default language of the agent as a language tag. See + // [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // for a list of the currently supported language codes. This field cannot be + // set by the `Update` method. + string default_language_code = 3; + + // Optional. The list of all languages supported by this agent (except for the + // `default_language_code`). + repeated string supported_language_codes = 4; + + // Required. The time zone of this agent from the + // [time zone database](https://www.iana.org/time-zones), e.g., + // America/New_York, Europe/Paris. + string time_zone = 5; + + // Optional. The description of this agent. + // The maximum length is 500 characters. If exceeded, the request is rejected. + string description = 6; + + // Optional. The URI of the agent's avatar. + // Avatars are used throughout the Dialogflow console and in the self-hosted + // [Web + // Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) + // integration. + string avatar_uri = 7; + + // Optional. Determines whether this agent should log conversation queries. + bool enable_logging = 8; + + // Optional. Determines how intents are detected from user queries. + MatchMode match_mode = 9; + + // Optional. To filter out false positive results and still get variety in + // matched natural language inputs for your agent, you can tune the machine + // learning classification threshold. If the returned score value is less than + // the threshold value, then a fallback intent will be triggered or, if there + // are no fallback intents defined, no intent will be triggered. The score + // values range from 0.0 (completely uncertain) to 1.0 (completely certain). + // If set to 0.0, the default of 0.3 is used. + float classification_threshold = 10; + + // Optional. API version displayed in Dialogflow console. If not specified, + // V2 API is assumed. Clients are free to query different service endpoints + // for different API versions. However, bots connectors and webhook calls will + // follow the specified API version. + ApiVersion api_version = 14; + + // Optional. The agent tier. If not specified, TIER_STANDARD is assumed. + Tier tier = 15; +} + +// The request message for [Agents.GetAgent][google.cloud.dialogflow.v2beta1.Agents.GetAgent]. +message GetAgentRequest { + // Required. The project that the agent to fetch is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; +} + +// The request message for [Agents.SetAgent][google.cloud.dialogflow.v2beta1.Agents.SetAgent]. +message SetAgentRequest { + // Required. The agent to update. + Agent agent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v2beta1.Agents.DeleteAgent]. +message DeleteAgentRequest { + // Required. The project that the agent to delete is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; +} + +// Contains basic configuration for a sub-agent. +message SubAgent { + // Required. The project of this agent. + // Format: `projects/`. + string project = 1; + + // Optional. The unique identifier (`environment name` in dialogflow console) + // of this sub-agent environment. Assumes draft environment if `environment` + // is not set. + string environment = 2; +} + +// The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents]. +message SearchAgentsRequest { + // Required. The project to list agents from. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents]. +message SearchAgentsResponse { + // The list of agents. There will be a maximum number of items returned based + // on the page_size field in the request. + repeated Agent agents = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent]. +message TrainAgentRequest { + // Required. The project that the agent to train is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; +} + +// The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent]. +message ExportAgentRequest { + // Required. The project that the agent to export is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Optional. The + // [Google Cloud Storage](https://cloud.google.com/storage/docs/) + // URI to export the agent to. + // The format of this URI must be `gs:///`. + // If left unspecified, the serialized agent is returned inline. + string agent_uri = 2; +} + +// The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent]. +message ExportAgentResponse { + // The exported agent. + oneof agent { + // The URI to a file containing the exported agent. This field is populated + // only if `agent_uri` is specified in `ExportAgentRequest`. + string agent_uri = 1; + + // Zip compressed raw byte content for agent. + bytes agent_content = 2; + } +} + +// The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2beta1.Agents.ImportAgent]. +message ImportAgentRequest { + // Required. The project that the agent to import is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Required. The agent to import. + oneof agent { + // The URI to a Google Cloud Storage file containing the agent to import. + // Note: The URI must start with "gs://". + string agent_uri = 2; + + // Zip compressed raw byte content for agent. + bytes agent_content = 3; + } +} + +// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2beta1.Agents.RestoreAgent]. +message RestoreAgentRequest { + // Required. The project that the agent to restore is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Required. The agent to restore. + oneof agent { + // The URI to a Google Cloud Storage file containing the agent to restore. + // Note: The URI must start with "gs://". + string agent_uri = 2; + + // Zip compressed raw byte content for agent. + bytes agent_content = 3; + } +} + +// The request message for [Agents.GetValidationResult][google.cloud.dialogflow.v2beta1.Agents.GetValidationResult]. +message GetValidationResultRequest { + // Required. The project that the agent is associated with. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Optional. The language for which you want a validation result. If not + // specified, the agent's default language is used. [Many + // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // are supported. Note: languages must be enabled in the agent before they can + // be used. + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/dialogflow_v2beta1/proto/agent_pb2.py b/dialogflow_v2beta1/proto/agent_pb2.py index 188bcdbec..e50e20bcf 100644 --- a/dialogflow_v2beta1/proto/agent_pb2.py +++ b/dialogflow_v2beta1/proto/agent_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/agent.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -16,8 +13,12 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 +from dialogflow_v2beta1.proto import ( + environment_pb2 as google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_environment__pb2, +) from dialogflow_v2beta1.proto import ( validation_result_pb2 as google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_validation__result__pb2, ) @@ -26,28 +27,25 @@ ) from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="google/cloud/dialogflow_v2beta1/proto/agent.proto", package="google.cloud.dialogflow.v2beta1", syntax="proto3", - serialized_options=_b( - "\n#com.google.cloud.dialogflow.v2beta1B\nAgentProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1" - ), - serialized_pb=_b( - '\n1google/cloud/dialogflow_v2beta1/proto/agent.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a=google/cloud/dialogflow_v2beta1/proto/validation_result.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/api/client.proto"\xc2\x06\n\x05\x41gent\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x1d\n\x15\x64\x65\x66\x61ult_language_code\x18\x03 \x01(\t\x12 \n\x18supported_language_codes\x18\x04 \x03(\t\x12\x11\n\ttime_zone\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x12\n\navatar_uri\x18\x07 \x01(\t\x12\x16\n\x0e\x65nable_logging\x18\x08 \x01(\x08\x12\x44\n\nmatch_mode\x18\t \x01(\x0e\x32\x30.google.cloud.dialogflow.v2beta1.Agent.MatchMode\x12 \n\x18\x63lassification_threshold\x18\n \x01(\x02\x12\x46\n\x0b\x61pi_version\x18\x0e \x01(\x0e\x32\x31.google.cloud.dialogflow.v2beta1.Agent.ApiVersion\x12\x39\n\x04tier\x18\x0f \x01(\x0e\x32+.google.cloud.dialogflow.v2beta1.Agent.Tier"V\n\tMatchMode\x12\x1a\n\x16MATCH_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11MATCH_MODE_HYBRID\x10\x01\x12\x16\n\x12MATCH_MODE_ML_ONLY\x10\x02"l\n\nApiVersion\x12\x1b\n\x17\x41PI_VERSION_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x41PI_VERSION_V1\x10\x01\x12\x12\n\x0e\x41PI_VERSION_V2\x10\x02\x12\x19\n\x15\x41PI_VERSION_V2_BETA_1\x10\x03"^\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x11\n\rTIER_STANDARD\x10\x01\x12\x13\n\x0fTIER_ENTERPRISE\x10\x02\x12\x18\n\x14TIER_ENTERPRISE_PLUS\x10\x03:m\xea\x41j\n\x1f\x64ialogflow.googleapis.com/Agent\x12\x18projects/{project}/agent\x12-projects/{project}/locations/{location}/agent"!\n\x0fGetAgentRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t"y\n\x0fSetAgentRequest\x12\x35\n\x05\x61gent\x18\x01 \x01(\x0b\x32&.google.cloud.dialogflow.v2beta1.Agent\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"$\n\x12\x44\x65leteAgentRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t"0\n\x08SubAgent\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x13\n\x0b\x65nvironment\x18\x02 \x01(\t"L\n\x13SearchAgentsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"g\n\x14SearchAgentsResponse\x12\x36\n\x06\x61gents\x18\x01 \x03(\x0b\x32&.google.cloud.dialogflow.v2beta1.Agent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"#\n\x11TrainAgentRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t"7\n\x12\x45xportAgentRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tagent_uri\x18\x02 \x01(\t"L\n\x13\x45xportAgentResponse\x12\x13\n\tagent_uri\x18\x01 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x02 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"[\n\x12ImportAgentRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x13\n\tagent_uri\x18\x02 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x03 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"\\\n\x13RestoreAgentRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x13\n\tagent_uri\x18\x02 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x03 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"M\n\x1aGetValidationResultRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x32\xaf\x0f\n\x06\x41gents\x12\xc2\x01\n\x08GetAgent\x12\x30.google.cloud.dialogflow.v2beta1.GetAgentRequest\x1a&.google.cloud.dialogflow.v2beta1.Agent"\\\x82\xd3\xe4\x93\x02V\x12"/v2beta1/{parent=projects/*}/agentZ0\x12./v2beta1/{parent=projects/*/locations/*}/agent\x12\xdc\x01\n\x08SetAgent\x12\x30.google.cloud.dialogflow.v2beta1.SetAgentRequest\x1a&.google.cloud.dialogflow.v2beta1.Agent"v\x82\xd3\xe4\x93\x02p"(/v2beta1/{agent.parent=projects/*}/agent:\x05\x61gentZ="4/v2beta1/{agent.parent=projects/*/locations/*}/agent:\x05\x61gent\x12\xb8\x01\n\x0b\x44\x65leteAgent\x12\x33.google.cloud.dialogflow.v2beta1.DeleteAgentRequest\x1a\x16.google.protobuf.Empty"\\\x82\xd3\xe4\x93\x02V*"/v2beta1/{parent=projects/*}/agentZ0*./v2beta1/{parent=projects/*/locations/*}/agent\x12\xae\x01\n\x0cSearchAgents\x12\x34.google.cloud.dialogflow.v2beta1.SearchAgentsRequest\x1a\x35.google.cloud.dialogflow.v2beta1.SearchAgentsResponse"1\x82\xd3\xe4\x93\x02+\x12)/v2beta1/{parent=projects/*}/agent:search\x12\xcf\x01\n\nTrainAgent\x12\x32.google.cloud.dialogflow.v2beta1.TrainAgentRequest\x1a\x1d.google.longrunning.Operation"n\x82\xd3\xe4\x93\x02h"(/v2beta1/{parent=projects/*}/agent:train:\x01*Z9"4/v2beta1/{parent=projects/*/locations/*}/agent:train:\x01*\x12\xd3\x01\n\x0b\x45xportAgent\x12\x33.google.cloud.dialogflow.v2beta1.ExportAgentRequest\x1a\x1d.google.longrunning.Operation"p\x82\xd3\xe4\x93\x02j")/v2beta1/{parent=projects/*}/agent:export:\x01*Z:"5/v2beta1/{parent=projects/*/locations/*}/agent:export:\x01*\x12\xd3\x01\n\x0bImportAgent\x12\x33.google.cloud.dialogflow.v2beta1.ImportAgentRequest\x1a\x1d.google.longrunning.Operation"p\x82\xd3\xe4\x93\x02j")/v2beta1/{parent=projects/*}/agent:import:\x01*Z:"5/v2beta1/{parent=projects/*/locations/*}/agent:import:\x01*\x12\xd7\x01\n\x0cRestoreAgent\x12\x34.google.cloud.dialogflow.v2beta1.RestoreAgentRequest\x1a\x1d.google.longrunning.Operation"r\x82\xd3\xe4\x93\x02l"*/v2beta1/{parent=projects/*}/agent:restore:\x01*Z;"6/v2beta1/{parent=projects/*/locations/*}/agent:restore:\x01*\x12\xc2\x01\n\x13GetValidationResult\x12;.google.cloud.dialogflow.v2beta1.GetValidationResultRequest\x1a\x31.google.cloud.dialogflow.v2beta1.ValidationResult";\x82\xd3\xe4\x93\x02\x35\x12\x33/v2beta1/{parent=projects/*}/agent/validationResult\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xa8\x01\n#com.google.cloud.dialogflow.v2beta1B\nAgentProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3' - ), + serialized_options=b"\n#com.google.cloud.dialogflow.v2beta1B\nAgentProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n1google/cloud/dialogflow_v2beta1/proto/agent.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x37google/cloud/dialogflow_v2beta1/proto/environment.proto\x1a=google/cloud/dialogflow_v2beta1/proto/validation_result.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\xc2\x06\n\x05\x41gent\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x1d\n\x15\x64\x65\x66\x61ult_language_code\x18\x03 \x01(\t\x12 \n\x18supported_language_codes\x18\x04 \x03(\t\x12\x11\n\ttime_zone\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x12\n\navatar_uri\x18\x07 \x01(\t\x12\x16\n\x0e\x65nable_logging\x18\x08 \x01(\x08\x12\x44\n\nmatch_mode\x18\t \x01(\x0e\x32\x30.google.cloud.dialogflow.v2beta1.Agent.MatchMode\x12 \n\x18\x63lassification_threshold\x18\n \x01(\x02\x12\x46\n\x0b\x61pi_version\x18\x0e \x01(\x0e\x32\x31.google.cloud.dialogflow.v2beta1.Agent.ApiVersion\x12\x39\n\x04tier\x18\x0f \x01(\x0e\x32+.google.cloud.dialogflow.v2beta1.Agent.Tier"V\n\tMatchMode\x12\x1a\n\x16MATCH_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11MATCH_MODE_HYBRID\x10\x01\x12\x16\n\x12MATCH_MODE_ML_ONLY\x10\x02"l\n\nApiVersion\x12\x1b\n\x17\x41PI_VERSION_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x41PI_VERSION_V1\x10\x01\x12\x12\n\x0e\x41PI_VERSION_V2\x10\x02\x12\x19\n\x15\x41PI_VERSION_V2_BETA_1\x10\x03"^\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x11\n\rTIER_STANDARD\x10\x01\x12\x13\n\x0fTIER_ENTERPRISE\x10\x02\x12\x18\n\x14TIER_ENTERPRISE_PLUS\x10\x03:m\xea\x41j\n\x1f\x64ialogflow.googleapis.com/Agent\x12\x18projects/{project}/agent\x12-projects/{project}/locations/{location}/agent"J\n\x0fGetAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent"~\n\x0fSetAgentRequest\x12:\n\x05\x61gent\x18\x01 \x01(\x0b\x32&.google.cloud.dialogflow.v2beta1.AgentB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"M\n\x12\x44\x65leteAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent"0\n\x08SubAgent\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x13\n\x0b\x65nvironment\x18\x02 \x01(\t"u\n\x13SearchAgentsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"g\n\x14SearchAgentsResponse\x12\x36\n\x06\x61gents\x18\x01 \x03(\x0b\x32&.google.cloud.dialogflow.v2beta1.Agent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"L\n\x11TrainAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent"`\n\x12\x45xportAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x11\n\tagent_uri\x18\x02 \x01(\t"L\n\x13\x45xportAgentResponse\x12\x13\n\tagent_uri\x18\x01 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x02 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"\x84\x01\n\x12ImportAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x13\n\tagent_uri\x18\x02 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x03 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"\x85\x01\n\x13RestoreAgentRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x13\n\tagent_uri\x18\x02 \x01(\tH\x00\x12\x17\n\ragent_content\x18\x03 \x01(\x0cH\x00\x42\x07\n\x05\x61gent"q\n\x1aGetValidationResultRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x64ialogflow.googleapis.com/Agent\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x32\x87\x12\n\x06\x41gents\x12\xcb\x01\n\x08GetAgent\x12\x30.google.cloud.dialogflow.v2beta1.GetAgentRequest\x1a&.google.cloud.dialogflow.v2beta1.Agent"e\x82\xd3\xe4\x93\x02V\x12"/v2beta1/{parent=projects/*}/agentZ0\x12./v2beta1/{parent=projects/*/locations/*}/agent\xda\x41\x06parent\x12\xe4\x01\n\x08SetAgent\x12\x30.google.cloud.dialogflow.v2beta1.SetAgentRequest\x1a&.google.cloud.dialogflow.v2beta1.Agent"~\x82\xd3\xe4\x93\x02p"(/v2beta1/{agent.parent=projects/*}/agent:\x05\x61gentZ="4/v2beta1/{agent.parent=projects/*/locations/*}/agent:\x05\x61gent\xda\x41\x05\x61gent\x12\xc1\x01\n\x0b\x44\x65leteAgent\x12\x33.google.cloud.dialogflow.v2beta1.DeleteAgentRequest\x1a\x16.google.protobuf.Empty"e\x82\xd3\xe4\x93\x02V*"/v2beta1/{parent=projects/*}/agentZ0*./v2beta1/{parent=projects/*/locations/*}/agent\xda\x41\x06parent\x12\xf0\x01\n\x0cSearchAgents\x12\x34.google.cloud.dialogflow.v2beta1.SearchAgentsRequest\x1a\x35.google.cloud.dialogflow.v2beta1.SearchAgentsResponse"s\x82\xd3\xe4\x93\x02\x64\x12)/v2beta1/{parent=projects/*}/agent:searchZ7\x12\x35/v2beta1/{parent=projects/*/locations/*}/agent:search\xda\x41\x06parent\x12\x8b\x02\n\nTrainAgent\x12\x32.google.cloud.dialogflow.v2beta1.TrainAgentRequest\x1a\x1d.google.longrunning.Operation"\xa9\x01\x82\xd3\xe4\x93\x02h"(/v2beta1/{parent=projects/*}/agent:train:\x01*Z9"4/v2beta1/{parent=projects/*/locations/*}/agent:train:\x01*\xda\x41\x06parent\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xad\x02\n\x0b\x45xportAgent\x12\x33.google.cloud.dialogflow.v2beta1.ExportAgentRequest\x1a\x1d.google.longrunning.Operation"\xc9\x01\x82\xd3\xe4\x93\x02j")/v2beta1/{parent=projects/*}/agent:export:\x01*Z:"5/v2beta1/{parent=projects/*/locations/*}/agent:export:\x01*\xda\x41\x06parent\xca\x41M\n3google.cloud.dialogflow.v2beta1.ExportAgentResponse\x12\x16google.protobuf.Struct\x12\x86\x02\n\x0bImportAgent\x12\x33.google.cloud.dialogflow.v2beta1.ImportAgentRequest\x1a\x1d.google.longrunning.Operation"\xa2\x01\x82\xd3\xe4\x93\x02j")/v2beta1/{parent=projects/*}/agent:import:\x01*Z:"5/v2beta1/{parent=projects/*/locations/*}/agent:import:\x01*\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\x8a\x02\n\x0cRestoreAgent\x12\x34.google.cloud.dialogflow.v2beta1.RestoreAgentRequest\x1a\x1d.google.longrunning.Operation"\xa4\x01\x82\xd3\xe4\x93\x02l"*/v2beta1/{parent=projects/*}/agent:restore:\x01*Z;"6/v2beta1/{parent=projects/*/locations/*}/agent:restore:\x01*\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\xc2\x01\n\x13GetValidationResult\x12;.google.cloud.dialogflow.v2beta1.GetValidationResultRequest\x1a\x31.google.cloud.dialogflow.v2beta1.ValidationResult";\x82\xd3\xe4\x93\x02\x35\x12\x33/v2beta1/{parent=projects/*}/agent/validationResult\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xa8\x01\n#com.google.cloud.dialogflow.v2beta1B\nAgentProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_environment__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_validation__result__pb2.DESCRIPTOR, google_dot_longrunning_dot_operations__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -57,6 +55,7 @@ full_name="google.cloud.dialogflow.v2beta1.Agent.MatchMode", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="MATCH_MODE_UNSPECIFIED", @@ -64,6 +63,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="MATCH_MODE_HYBRID", @@ -71,6 +71,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="MATCH_MODE_ML_ONLY", @@ -78,12 +79,13 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=796, - serialized_end=882, + serialized_start=853, + serialized_end=939, ) _sym_db.RegisterEnumDescriptor(_AGENT_MATCHMODE) @@ -92,6 +94,7 @@ full_name="google.cloud.dialogflow.v2beta1.Agent.ApiVersion", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="API_VERSION_UNSPECIFIED", @@ -99,12 +102,23 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="API_VERSION_V1", index=1, number=1, serialized_options=None, type=None + name="API_VERSION_V1", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="API_VERSION_V2", index=2, number=2, serialized_options=None, type=None + name="API_VERSION_V2", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="API_VERSION_V2_BETA_1", @@ -112,12 +126,13 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=884, - serialized_end=992, + serialized_start=941, + serialized_end=1049, ) _sym_db.RegisterEnumDescriptor(_AGENT_APIVERSION) @@ -126,6 +141,7 @@ full_name="google.cloud.dialogflow.v2beta1.Agent.Tier", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="TIER_UNSPECIFIED", @@ -133,9 +149,15 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TIER_STANDARD", index=1, number=1, serialized_options=None, type=None + name="TIER_STANDARD", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="TIER_ENTERPRISE", @@ -143,6 +165,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="TIER_ENTERPRISE_PLUS", @@ -150,12 +173,13 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=994, - serialized_end=1088, + serialized_start=1051, + serialized_end=1145, ) _sym_db.RegisterEnumDescriptor(_AGENT_TIER) @@ -166,6 +190,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -176,7 +201,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -184,6 +209,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -194,7 +220,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -202,6 +228,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="default_language_code", @@ -212,7 +239,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -220,6 +247,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="supported_language_codes", @@ -238,6 +266,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="time_zone", @@ -248,7 +277,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -256,6 +285,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -266,7 +296,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -274,6 +304,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="avatar_uri", @@ -284,7 +315,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -292,6 +323,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="enable_logging", @@ -310,6 +342,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="match_mode", @@ -328,6 +361,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="classification_threshold", @@ -346,6 +380,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="api_version", @@ -364,6 +399,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="tier", @@ -382,20 +418,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[_AGENT_MATCHMODE, _AGENT_APIVERSION, _AGENT_TIER], - serialized_options=_b( - "\352Aj\n\037dialogflow.googleapis.com/Agent\022\030projects/{project}/agent\022-projects/{project}/locations/{location}/agent" - ), + serialized_options=b"\352Aj\n\037dialogflow.googleapis.com/Agent\022\030projects/{project}/agent\022-projects/{project}/locations/{location}/agent", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=365, - serialized_end=1199, + serialized_start=422, + serialized_end=1256, ) @@ -405,6 +440,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -415,14 +451,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -433,8 +470,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1201, - serialized_end=1234, + serialized_start=1258, + serialized_end=1332, ) @@ -444,6 +481,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="agent", @@ -460,8 +498,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -480,6 +519,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -490,8 +530,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1236, - serialized_end=1357, + serialized_start=1334, + serialized_end=1460, ) @@ -501,6 +541,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -511,14 +552,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -529,8 +571,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1359, - serialized_end=1395, + serialized_start=1462, + serialized_end=1539, ) @@ -540,6 +582,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="project", @@ -550,7 +593,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -558,6 +601,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="environment", @@ -568,7 +612,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -576,6 +620,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -586,8 +631,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1397, - serialized_end=1445, + serialized_start=1541, + serialized_end=1589, ) @@ -597,6 +642,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -607,14 +653,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -633,6 +680,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -643,7 +691,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -651,6 +699,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -661,8 +710,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1447, - serialized_end=1523, + serialized_start=1591, + serialized_end=1708, ) @@ -672,6 +721,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="agents", @@ -690,6 +740,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -700,7 +751,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -708,6 +759,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -718,8 +770,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1525, - serialized_end=1628, + serialized_start=1710, + serialized_end=1813, ) @@ -729,6 +781,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -739,14 +792,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -757,8 +811,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1630, - serialized_end=1665, + serialized_start=1815, + serialized_end=1891, ) @@ -768,6 +822,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -778,14 +833,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="agent_uri", @@ -796,7 +852,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -804,6 +860,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -814,8 +871,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1667, - serialized_end=1722, + serialized_start=1893, + serialized_end=1989, ) @@ -825,6 +882,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="agent_uri", @@ -835,7 +893,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -843,6 +901,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="agent_content", @@ -853,7 +912,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -861,6 +920,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -876,11 +936,12 @@ full_name="google.cloud.dialogflow.v2beta1.ExportAgentResponse.agent", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=1724, - serialized_end=1800, + serialized_start=1991, + serialized_end=2067, ) @@ -890,6 +951,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -900,14 +962,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="agent_uri", @@ -918,7 +981,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -926,6 +989,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="agent_content", @@ -936,7 +1000,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -944,6 +1008,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -959,11 +1024,12 @@ full_name="google.cloud.dialogflow.v2beta1.ImportAgentRequest.agent", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=1802, - serialized_end=1893, + serialized_start=2070, + serialized_end=2202, ) @@ -973,6 +1039,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -983,14 +1050,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="agent_uri", @@ -1001,7 +1069,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1009,6 +1077,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="agent_content", @@ -1019,7 +1088,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -1027,6 +1096,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1042,11 +1112,12 @@ full_name="google.cloud.dialogflow.v2beta1.RestoreAgentRequest.agent", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=1895, - serialized_end=1987, + serialized_start=2205, + serialized_end=2338, ) @@ -1056,6 +1127,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1066,14 +1138,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002\372A!\022\037dialogflow.googleapis.com/Agent", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -1084,14 +1157,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1102,8 +1176,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1989, - serialized_end=2066, + serialized_start=2340, + serialized_end=2453, ) _AGENT.fields_by_name["match_mode"].enum_type = _AGENT_MATCHMODE @@ -1173,11 +1247,17 @@ Agent = _reflection.GeneratedProtocolMessageType( "Agent", (_message.Message,), - dict( - DESCRIPTOR=_AGENT, - __module__="google.cloud.dialogflow_v2beta1.proto.agent_pb2", - __doc__="""Represents a conversational agent. - + { + "DESCRIPTOR": _AGENT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.agent_pb2", + "__doc__": """A Dialogflow agent is a virtual agent that handles conversations with + your end-users. It is a natural language understanding module that + understands the nuances of human language. Dialogflow translates end- + user text or audio during a conversation to structured data that your + apps and services can understand. You design and build a Dialogflow + agent to handle the types of conversations required for your system. + For more information about agents, see the `Agent guide + `__. Attributes: parent: @@ -1197,12 +1277,12 @@ time_zone: Required. The time zone of this agent from the `time zone database `__, e.g., - America/New\_York, Europe/Paris. + America/New_York, Europe/Paris. description: Optional. The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected. avatar_uri: - Optional. The URI of the agent's avatar. Avatars are used + Optional. The URI of the agent’s avatar. Avatars are used throughout the Dialogflow console and in the self-hosted `Web Demo ``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.GetAgentRequest) - ), + }, ) _sym_db.RegisterMessage(GetAgentRequest) SetAgentRequest = _reflection.GeneratedProtocolMessageType( "SetAgentRequest", (_message.Message,), - dict( - DESCRIPTOR=_SETAGENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.agent_pb2", - __doc__="""The request message for + { + "DESCRIPTOR": _SETAGENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.agent_pb2", + "__doc__": """The request message for [Agents.SetAgent][google.cloud.dialogflow.v2beta1.Agents.SetAgent]. - Attributes: agent: Required. The agent to update. @@ -1274,19 +1352,18 @@ Optional. The mask to control which fields get updated. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SetAgentRequest) - ), + }, ) _sym_db.RegisterMessage(SetAgentRequest) DeleteAgentRequest = _reflection.GeneratedProtocolMessageType( "DeleteAgentRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEAGENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.agent_pb2", - __doc__="""The request message for - [Agents.DeleteAgent][google.cloud.dialogflow.v2beta1.Agents.DeleteAgent]. - + { + "DESCRIPTOR": _DELETEAGENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.agent_pb2", + "__doc__": """The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v + 2beta1.Agents.DeleteAgent]. Attributes: parent: @@ -1294,18 +1371,17 @@ with. Format: ``projects/``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DeleteAgentRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteAgentRequest) SubAgent = _reflection.GeneratedProtocolMessageType( "SubAgent", (_message.Message,), - dict( - DESCRIPTOR=_SUBAGENT, - __module__="google.cloud.dialogflow_v2beta1.proto.agent_pb2", - __doc__="""Contains basic configuration for a sub-agent. - + { + "DESCRIPTOR": _SUBAGENT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.agent_pb2", + "__doc__": """Contains basic configuration for a sub-agent. Attributes: project: @@ -1317,19 +1393,18 @@ draft environment if ``environment`` is not set. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SubAgent) - ), + }, ) _sym_db.RegisterMessage(SubAgent) SearchAgentsRequest = _reflection.GeneratedProtocolMessageType( "SearchAgentsRequest", (_message.Message,), - dict( - DESCRIPTOR=_SEARCHAGENTSREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.agent_pb2", - __doc__="""The request message for - [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents]. - + { + "DESCRIPTOR": _SEARCHAGENTSREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.agent_pb2", + "__doc__": """The request message for [Agents.SearchAgents][google.cloud.dialogflow. + v2beta1.Agents.SearchAgents]. Attributes: parent: @@ -1339,46 +1414,44 @@ Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. page_token: - Optional. The next\_page\_token value returned from a previous + Optional. The next_page_token value returned from a previous list request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SearchAgentsRequest) - ), + }, ) _sym_db.RegisterMessage(SearchAgentsRequest) SearchAgentsResponse = _reflection.GeneratedProtocolMessageType( "SearchAgentsResponse", (_message.Message,), - dict( - DESCRIPTOR=_SEARCHAGENTSRESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.agent_pb2", - __doc__="""The response message for - [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents]. - + { + "DESCRIPTOR": _SEARCHAGENTSRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.agent_pb2", + "__doc__": """The response message for [Agents.SearchAgents][google.cloud.dialogflow + .v2beta1.Agents.SearchAgents]. Attributes: agents: The list of agents. There will be a maximum number of items - returned based on the page\_size field in the request. + returned based on the page_size field in the request. next_page_token: Token to retrieve the next page of results, or empty if there are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SearchAgentsResponse) - ), + }, ) _sym_db.RegisterMessage(SearchAgentsResponse) TrainAgentRequest = _reflection.GeneratedProtocolMessageType( "TrainAgentRequest", (_message.Message,), - dict( - DESCRIPTOR=_TRAINAGENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.agent_pb2", - __doc__="""The request message for - [Agents.TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent]. - + { + "DESCRIPTOR": _TRAINAGENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.agent_pb2", + "__doc__": """The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2 + beta1.Agents.TrainAgent]. Attributes: parent: @@ -1386,19 +1459,18 @@ with. Format: ``projects/``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.TrainAgentRequest) - ), + }, ) _sym_db.RegisterMessage(TrainAgentRequest) ExportAgentRequest = _reflection.GeneratedProtocolMessageType( "ExportAgentRequest", (_message.Message,), - dict( - DESCRIPTOR=_EXPORTAGENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.agent_pb2", - __doc__="""The request message for - [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent]. - + { + "DESCRIPTOR": _EXPORTAGENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.agent_pb2", + "__doc__": """The request message for [Agents.ExportAgent][google.cloud.dialogflow.v + 2beta1.Agents.ExportAgent]. Attributes: parent: @@ -1412,19 +1484,18 @@ agent is returned inline. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ExportAgentRequest) - ), + }, ) _sym_db.RegisterMessage(ExportAgentRequest) ExportAgentResponse = _reflection.GeneratedProtocolMessageType( "ExportAgentResponse", (_message.Message,), - dict( - DESCRIPTOR=_EXPORTAGENTRESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.agent_pb2", - __doc__="""The response message for - [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent]. - + { + "DESCRIPTOR": _EXPORTAGENTRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.agent_pb2", + "__doc__": """The response message for [Agents.ExportAgent][google.cloud.dialogflow. + v2beta1.Agents.ExportAgent]. Attributes: agent: @@ -1437,19 +1508,18 @@ Zip compressed raw byte content for agent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ExportAgentResponse) - ), + }, ) _sym_db.RegisterMessage(ExportAgentResponse) ImportAgentRequest = _reflection.GeneratedProtocolMessageType( "ImportAgentRequest", (_message.Message,), - dict( - DESCRIPTOR=_IMPORTAGENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.agent_pb2", - __doc__="""The request message for - [Agents.ImportAgent][google.cloud.dialogflow.v2beta1.Agents.ImportAgent]. - + { + "DESCRIPTOR": _IMPORTAGENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.agent_pb2", + "__doc__": """The request message for [Agents.ImportAgent][google.cloud.dialogflow.v + 2beta1.Agents.ImportAgent]. Attributes: parent: @@ -1459,24 +1529,23 @@ Required. The agent to import. agent_uri: The URI to a Google Cloud Storage file containing the agent to - import. Note: The URI must start with "gs://". + import. Note: The URI must start with “gs://”. agent_content: Zip compressed raw byte content for agent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ImportAgentRequest) - ), + }, ) _sym_db.RegisterMessage(ImportAgentRequest) RestoreAgentRequest = _reflection.GeneratedProtocolMessageType( "RestoreAgentRequest", (_message.Message,), - dict( - DESCRIPTOR=_RESTOREAGENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.agent_pb2", - __doc__="""The request message for - [Agents.RestoreAgent][google.cloud.dialogflow.v2beta1.Agents.RestoreAgent]. - + { + "DESCRIPTOR": _RESTOREAGENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.agent_pb2", + "__doc__": """The request message for [Agents.RestoreAgent][google.cloud.dialogflow. + v2beta1.Agents.RestoreAgent]. Attributes: parent: @@ -1486,24 +1555,23 @@ Required. The agent to restore. agent_uri: The URI to a Google Cloud Storage file containing the agent to - restore. Note: The URI must start with "gs://". + restore. Note: The URI must start with “gs://”. agent_content: Zip compressed raw byte content for agent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.RestoreAgentRequest) - ), + }, ) _sym_db.RegisterMessage(RestoreAgentRequest) GetValidationResultRequest = _reflection.GeneratedProtocolMessageType( "GetValidationResultRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETVALIDATIONRESULTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.agent_pb2", - __doc__="""The request message for - [Agents.GetValidationResult][google.cloud.dialogflow.v2beta1.Agents.GetValidationResult]. - + { + "DESCRIPTOR": _GETVALIDATIONRESULTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.agent_pb2", + "__doc__": """The request message for [Agents.GetValidationResult][google.cloud.dial + ogflow.v2beta1.Agents.GetValidationResult]. Attributes: parent: @@ -1511,19 +1579,27 @@ Format: ``projects/``. language_code: Optional. The language for which you want a validation result. - If not specified, the agent's default language is used. `Many + If not specified, the agent’s default language is used. `Many languages `__ are supported. Note: languages must be enabled in the agent before they can be used. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.GetValidationResultRequest) - ), + }, ) _sym_db.RegisterMessage(GetValidationResultRequest) DESCRIPTOR._options = None _AGENT._options = None +_GETAGENTREQUEST.fields_by_name["parent"]._options = None +_SETAGENTREQUEST.fields_by_name["agent"]._options = None +_DELETEAGENTREQUEST.fields_by_name["parent"]._options = None +_SEARCHAGENTSREQUEST.fields_by_name["parent"]._options = None +_TRAINAGENTREQUEST.fields_by_name["parent"]._options = None +_EXPORTAGENTREQUEST.fields_by_name["parent"]._options = None +_IMPORTAGENTREQUEST.fields_by_name["parent"]._options = None +_RESTOREAGENTREQUEST.fields_by_name["parent"]._options = None _GETVALIDATIONRESULTREQUEST.fields_by_name["parent"]._options = None _GETVALIDATIONRESULTREQUEST.fields_by_name["language_code"]._options = None @@ -1532,11 +1608,10 @@ full_name="google.cloud.dialogflow.v2beta1.Agents", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), - serialized_start=2069, - serialized_end=4036, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=2456, + serialized_end=4767, methods=[ _descriptor.MethodDescriptor( name="GetAgent", @@ -1545,9 +1620,8 @@ containing_service=None, input_type=_GETAGENTREQUEST, output_type=_AGENT, - serialized_options=_b( - '\202\323\344\223\002V\022"/v2beta1/{parent=projects/*}/agentZ0\022./v2beta1/{parent=projects/*/locations/*}/agent' - ), + serialized_options=b'\202\323\344\223\002V\022"/v2beta1/{parent=projects/*}/agentZ0\022./v2beta1/{parent=projects/*/locations/*}/agent\332A\006parent', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="SetAgent", @@ -1556,9 +1630,8 @@ containing_service=None, input_type=_SETAGENTREQUEST, output_type=_AGENT, - serialized_options=_b( - '\202\323\344\223\002p"(/v2beta1/{agent.parent=projects/*}/agent:\005agentZ="4/v2beta1/{agent.parent=projects/*/locations/*}/agent:\005agent' - ), + serialized_options=b'\202\323\344\223\002p"(/v2beta1/{agent.parent=projects/*}/agent:\005agentZ="4/v2beta1/{agent.parent=projects/*/locations/*}/agent:\005agent\332A\005agent', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteAgent", @@ -1567,9 +1640,8 @@ containing_service=None, input_type=_DELETEAGENTREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - '\202\323\344\223\002V*"/v2beta1/{parent=projects/*}/agentZ0*./v2beta1/{parent=projects/*/locations/*}/agent' - ), + serialized_options=b'\202\323\344\223\002V*"/v2beta1/{parent=projects/*}/agentZ0*./v2beta1/{parent=projects/*/locations/*}/agent\332A\006parent', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="SearchAgents", @@ -1578,9 +1650,8 @@ containing_service=None, input_type=_SEARCHAGENTSREQUEST, output_type=_SEARCHAGENTSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002+\022)/v2beta1/{parent=projects/*}/agent:search" - ), + serialized_options=b"\202\323\344\223\002d\022)/v2beta1/{parent=projects/*}/agent:searchZ7\0225/v2beta1/{parent=projects/*/locations/*}/agent:search\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="TrainAgent", @@ -1589,9 +1660,8 @@ containing_service=None, input_type=_TRAINAGENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002h"(/v2beta1/{parent=projects/*}/agent:train:\001*Z9"4/v2beta1/{parent=projects/*/locations/*}/agent:train:\001*' - ), + serialized_options=b'\202\323\344\223\002h"(/v2beta1/{parent=projects/*}/agent:train:\001*Z9"4/v2beta1/{parent=projects/*/locations/*}/agent:train:\001*\332A\006parent\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ExportAgent", @@ -1600,9 +1670,8 @@ containing_service=None, input_type=_EXPORTAGENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002j")/v2beta1/{parent=projects/*}/agent:export:\001*Z:"5/v2beta1/{parent=projects/*/locations/*}/agent:export:\001*' - ), + serialized_options=b'\202\323\344\223\002j")/v2beta1/{parent=projects/*}/agent:export:\001*Z:"5/v2beta1/{parent=projects/*/locations/*}/agent:export:\001*\332A\006parent\312AM\n3google.cloud.dialogflow.v2beta1.ExportAgentResponse\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ImportAgent", @@ -1611,9 +1680,8 @@ containing_service=None, input_type=_IMPORTAGENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002j")/v2beta1/{parent=projects/*}/agent:import:\001*Z:"5/v2beta1/{parent=projects/*/locations/*}/agent:import:\001*' - ), + serialized_options=b'\202\323\344\223\002j")/v2beta1/{parent=projects/*}/agent:import:\001*Z:"5/v2beta1/{parent=projects/*/locations/*}/agent:import:\001*\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="RestoreAgent", @@ -1622,9 +1690,8 @@ containing_service=None, input_type=_RESTOREAGENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002l"*/v2beta1/{parent=projects/*}/agent:restore:\001*Z;"6/v2beta1/{parent=projects/*/locations/*}/agent:restore:\001*' - ), + serialized_options=b'\202\323\344\223\002l"*/v2beta1/{parent=projects/*}/agent:restore:\001*Z;"6/v2beta1/{parent=projects/*/locations/*}/agent:restore:\001*\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetValidationResult", @@ -1633,9 +1700,8 @@ containing_service=None, input_type=_GETVALIDATIONRESULTREQUEST, output_type=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_validation__result__pb2._VALIDATIONRESULT, - serialized_options=_b( - "\202\323\344\223\0025\0223/v2beta1/{parent=projects/*}/agent/validationResult" - ), + serialized_options=b"\202\323\344\223\0025\0223/v2beta1/{parent=projects/*}/agent/validationResult", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2beta1/proto/agent_pb2_grpc.py b/dialogflow_v2beta1/proto/agent_pb2_grpc.py index e3c8f9b88..a0c3295bf 100644 --- a/dialogflow_v2beta1/proto/agent_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/agent_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2beta1.proto import ( @@ -14,42 +15,15 @@ class AgentsStub(object): - """Agents are best described as Natural Language Understanding (NLU) modules - that transform user requests into actionable data. You can include agents - in your app, product, or service to determine user intent and respond to the - user in a natural way. - - After you create an agent, you can add [Intents][google.cloud.dialogflow.v2beta1.Intents], [Contexts][google.cloud.dialogflow.v2beta1.Contexts], - [Entity Types][google.cloud.dialogflow.v2beta1.EntityTypes], [Webhooks][google.cloud.dialogflow.v2beta1.WebhookRequest], and so on to - manage the flow of a conversation and match user input to predefined intents - and actions. - - You can create an agent using both Dialogflow Standard Edition and - Dialogflow Enterprise Edition. For details, see - [Dialogflow - Editions](https://cloud.google.com/dialogflow/docs/editions). - - You can save your agent for backup or versioning by exporting the agent by - using the [ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent] method. You can import a saved - agent by using the [ImportAgent][google.cloud.dialogflow.v2beta1.Agents.ImportAgent] method. - - Dialogflow provides several - [prebuilt - agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt) - for common conversation scenarios such as determining a date and time, - converting currency, and so on. - - For more information about agents, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/agents-overview). - """ + """Service for managing [Agents][google.cloud.dialogflow.v2beta1.Agent]. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.GetAgent = channel.unary_unary( "/google.cloud.dialogflow.v2beta1.Agents/GetAgent", request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.GetAgentRequest.SerializeToString, @@ -98,66 +72,38 @@ def __init__(self, channel): class AgentsServicer(object): - """Agents are best described as Natural Language Understanding (NLU) modules - that transform user requests into actionable data. You can include agents - in your app, product, or service to determine user intent and respond to the - user in a natural way. - - After you create an agent, you can add [Intents][google.cloud.dialogflow.v2beta1.Intents], [Contexts][google.cloud.dialogflow.v2beta1.Contexts], - [Entity Types][google.cloud.dialogflow.v2beta1.EntityTypes], [Webhooks][google.cloud.dialogflow.v2beta1.WebhookRequest], and so on to - manage the flow of a conversation and match user input to predefined intents - and actions. - - You can create an agent using both Dialogflow Standard Edition and - Dialogflow Enterprise Edition. For details, see - [Dialogflow - Editions](https://cloud.google.com/dialogflow/docs/editions). - - You can save your agent for backup or versioning by exporting the agent by - using the [ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent] method. You can import a saved - agent by using the [ImportAgent][google.cloud.dialogflow.v2beta1.Agents.ImportAgent] method. - - Dialogflow provides several - [prebuilt - agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt) - for common conversation scenarios such as determining a date and time, - converting currency, and so on. - - For more information about agents, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/agents-overview). - """ + """Service for managing [Agents][google.cloud.dialogflow.v2beta1.Agent]. + """ def GetAgent(self, request, context): """Retrieves the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def SetAgent(self, request, context): """Creates/updates the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteAgent(self, request, context): """Deletes the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def SearchAgents(self, request, context): """Returns the list of agents. - - Since there is at most one conversational agent per project, this method is - useful primarily for listing all agents across projects the caller has - access to. One can achieve that with a wildcard project collection id "-". - Refer to [List - Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). - """ + Since there is at most one conversational agent per project, this method is + useful primarily for listing all agents across projects the caller has + access to. One can achieve that with a wildcard project collection id "-". + Refer to [List + Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -166,8 +112,8 @@ def TrainAgent(self, request, context): """Trains the specified agent. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -176,8 +122,8 @@ def ExportAgent(self, request, context): """Exports the specified agent to a ZIP file. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -185,13 +131,19 @@ def ExportAgent(self, request, context): def ImportAgent(self, request, context): """Imports the specified agent from a ZIP file. - Uploads new intents and entity types without deleting the existing ones. - Intents and entity types with the same name are replaced with the new - versions from ImportAgentRequest. + Uploads new intents and entity types without deleting the existing ones. + Intents and entity types with the same name are replaced with the new + versions from [ImportAgentRequest][google.cloud.dialogflow.v2beta1.ImportAgentRequest]. After the import, the imported draft + agent will be trained automatically (unless disabled in agent settings). + However, once the import is done, training may not be completed yet. Please + call [TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent] and wait for the operation it returns in order to train + explicitly. - Operation - """ + Operation + An operation which tracks when importing is complete. It only tracks + when the draft agent is updated not when it is done training. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -199,20 +151,26 @@ def ImportAgent(self, request, context): def RestoreAgent(self, request, context): """Restores the specified agent from a ZIP file. - Replaces the current agent version with a new one. All the intents and - entity types in the older version are deleted. + Replaces the current agent version with a new one. All the intents and + entity types in the older version are deleted. After the restore, the + restored draft agent will be trained automatically (unless disabled in + agent settings). However, once the restore is done, training may not be + completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent] and wait for the operation it + returns in order to train explicitly. - Operation - """ + Operation + An operation which tracks when restoring is complete. It only tracks + when the draft agent is updated not when it is done training. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetValidationResult(self, request, context): """Gets agent validation result. Agent validation is performed during - training time and is updated automatically when training is completed. - """ + training time and is updated automatically when training is completed. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -270,3 +228,252 @@ def add_AgentsServicer_to_server(servicer, server): "google.cloud.dialogflow.v2beta1.Agents", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Agents(object): + """Service for managing [Agents][google.cloud.dialogflow.v2beta1.Agent]. + """ + + @staticmethod + def GetAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Agents/GetAgent", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.GetAgentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.Agent.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def SetAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Agents/SetAgent", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.SetAgentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.Agent.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Agents/DeleteAgent", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.DeleteAgentRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def SearchAgents( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Agents/SearchAgents", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.SearchAgentsRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.SearchAgentsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def TrainAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Agents/TrainAgent", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.TrainAgentRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ExportAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Agents/ExportAgent", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.ExportAgentRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ImportAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Agents/ImportAgent", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.ImportAgentRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def RestoreAgent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Agents/RestoreAgent", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.RestoreAgentRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetValidationResult( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Agents/GetValidationResult", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.GetValidationResultRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_validation__result__pb2.ValidationResult.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2beta1/proto/audio_config.proto b/dialogflow_v2beta1/proto/audio_config.proto new file mode 100644 index 000000000..0d3c3acf4 --- /dev/null +++ b/dialogflow_v2beta1/proto/audio_config.proto @@ -0,0 +1,352 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "AudioConfigProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Hints for the speech recognizer to help with recognition in a specific +// conversation state. +message SpeechContext { + // Optional. A list of strings containing words and phrases that the speech + // recognizer should recognize with higher likelihood. + // + // This list can be used to: + // + // * improve accuracy for words and phrases you expect the user to say, + // e.g. typical commands for your Dialogflow agent + // * add additional words to the speech recognizer vocabulary + // * ... + // + // See the [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/quotas) for usage + // limits. + repeated string phrases = 1; + + // Optional. Boost for this context compared to other contexts: + // + // * If the boost is positive, Dialogflow will increase the probability that + // the phrases in this context are recognized over similar sounding phrases. + // * If the boost is unspecified or non-positive, Dialogflow will not apply + // any boost. + // + // Dialogflow recommends that you use boosts in the range (0, 20] and that you + // find a value that fits your use case with binary search. + float boost = 2; +} + +// Audio encoding of the audio content sent in the conversational query request. +// Refer to the +// [Cloud Speech API +// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more +// details. +enum AudioEncoding { + // Not specified. + AUDIO_ENCODING_UNSPECIFIED = 0; + + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + AUDIO_ENCODING_LINEAR_16 = 1; + + // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio + // Codec) is the recommended encoding because it is lossless (therefore + // recognition is not compromised) and requires only about half the + // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and + // 24-bit samples, however, not all fields in `STREAMINFO` are supported. + AUDIO_ENCODING_FLAC = 2; + + // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + AUDIO_ENCODING_MULAW = 3; + + // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. + AUDIO_ENCODING_AMR = 4; + + // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. + AUDIO_ENCODING_AMR_WB = 5; + + // Opus encoded audio frames in Ogg container + // ([OggOpus](https://wiki.xiph.org/OggOpus)). + // `sample_rate_hertz` must be 16000. + AUDIO_ENCODING_OGG_OPUS = 6; + + // Although the use of lossy encodings is not recommended, if a very low + // bitrate encoding is required, `OGG_OPUS` is highly preferred over + // Speex encoding. The [Speex](https://speex.org/) encoding supported by + // Dialogflow API has a header byte in each block, as in MIME type + // `audio/x-speex-with-header-byte`. + // It is a variant of the RTP Speex encoding defined in + // [RFC 5574](https://tools.ietf.org/html/rfc5574). + // The stream is a sequence of blocks, one block per RTP packet. Each block + // starts with a byte containing the length of the block, in bytes, followed + // by one or more frames of Speex data, padded to an integral number of + // bytes (octets) as specified in RFC 5574. In other words, each RTP header + // is replaced with a single byte containing the block length. Only Speex + // wideband is supported. `sample_rate_hertz` must be 16000. + AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; +} + +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // Time offset relative to the beginning of the audio that corresponds to the + // start of the spoken word. This is an experimental feature and the accuracy + // of the time offset can vary. + google.protobuf.Duration start_offset = 1; + + // Time offset relative to the beginning of the audio that corresponds to the + // end of the spoken word. This is an experimental feature and the accuracy of + // the time offset can vary. + google.protobuf.Duration end_offset = 2; + + // The Speech confidence between 0.0 and 1.0 for this word. A higher number + // indicates an estimated greater likelihood that the recognized word is + // correct. The default of 0.0 is a sentinel value indicating that confidence + // was not set. + // + // This field is not guaranteed to be fully stable over time for the same + // audio input. Users should also not rely on it to always be provided. + float confidence = 4; +} + +// Variant of the specified [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use. +// +// See the [Cloud Speech +// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) +// for which models have different variants. For example, the "phone_call" model +// has both a standard and an enhanced variant. When you use an enhanced model, +// you will generally receive higher quality results than for a standard model. +enum SpeechModelVariant { + // No model variant specified. In this case Dialogflow defaults to + // USE_BEST_AVAILABLE. + SPEECH_MODEL_VARIANT_UNSPECIFIED = 0; + + // Use the best available variant of the [Speech + // model][InputAudioConfig.model] that the caller is eligible for. + // + // Please see the [Dialogflow + // docs](https://cloud.google.com/dialogflow/docs/data-logging) for + // how to make your project eligible for enhanced models. + USE_BEST_AVAILABLE = 1; + + // Use standard model variant even if an enhanced model is available. See the + // [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + // for details about enhanced models. + USE_STANDARD = 2; + + // Use an enhanced model variant: + // + // * If an enhanced variant does not exist for the given + // [model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] and request language, Dialogflow falls + // back to the standard variant. + // + // The [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + // describes which models have enhanced variants. + // + // * If the API caller isn't eligible for enhanced models, Dialogflow returns + // an error. Please see the [Dialogflow + // docs](https://cloud.google.com/dialogflow/docs/data-logging) + // for how to make your project eligible. + USE_ENHANCED = 3; +} + +// Instructs the speech recognizer on how to process the audio content. +message InputAudioConfig { + // Required. Audio encoding of the audio content to process. + AudioEncoding audio_encoding = 1; + + // Required. Sample rate (in Hertz) of the audio content sent in the query. + // Refer to + // [Cloud Speech API + // documentation](https://cloud.google.com/speech-to-text/docs/basics) for + // more details. + int32 sample_rate_hertz = 2; + + // Required. The language of the supplied audio. Dialogflow does not do + // translations. See [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // for a list of the currently supported language codes. Note that queries in + // the same session do not necessarily need to specify the same language. + string language_code = 3; + + // If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in + // [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] with information about the recognized speech + // words, e.g. start and end time offsets. If false or unspecified, Speech + // doesn't return any word-level information. + bool enable_word_info = 13; + + // A list of strings containing words and phrases that the speech + // recognizer should recognize with higher likelihood. + // + // See [the Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + // for more details. + // + // This field is deprecated. Please use [speech_contexts]() instead. If you + // specify both [phrase_hints]() and [speech_contexts](), Dialogflow will + // treat the [phrase_hints]() as a single additional [SpeechContext](). + repeated string phrase_hints = 4 [deprecated = true]; + + // Context information to assist speech recognition. + // + // See [the Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + // for more details. + repeated SpeechContext speech_contexts = 11; + + // Which Speech model to select for the given request. Select the + // model best suited to your domain to get best results. If a model is not + // explicitly specified, then we auto-select a model based on the parameters + // in the InputAudioConfig. + // If enhanced speech model is enabled for the agent and an enhanced + // version of the specified model for the language does not exist, then the + // speech is recognized using the standard version of the specified model. + // Refer to + // [Cloud Speech API + // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) + // for more details. + string model = 7; + + // Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use. + SpeechModelVariant model_variant = 10; + + // If `false` (default), recognition does not cease until the + // client closes the stream. + // If `true`, the recognizer will detect a single spoken utterance in input + // audio. Recognition ceases when it detects the audio's voice has + // stopped or paused. In this case, once a detected intent is received, the + // client should close the stream and start a new request with a new stream as + // needed. + // Note: This setting is relevant only for streaming methods. + // Note: When specified, InputAudioConfig.single_utterance takes precedence + // over StreamingDetectIntentRequest.single_utterance. + bool single_utterance = 8; +} + +// Description of which voice to use for speech synthesis. +message VoiceSelectionParams { + // Optional. The name of the voice. If not set, the service will choose a + // voice based on the other parameters such as language_code and + // [ssml_gender][google.cloud.dialogflow.v2beta1.VoiceSelectionParams.ssml_gender]. + string name = 1; + + // Optional. The preferred gender of the voice. If not set, the service will + // choose a voice based on the other parameters such as language_code and + // [name][google.cloud.dialogflow.v2beta1.VoiceSelectionParams.name]. Note that this is only a preference, not requirement. If a + // voice of the appropriate gender is not available, the synthesizer should + // substitute a voice with a different gender rather than failing the request. + SsmlVoiceGender ssml_gender = 2; +} + +// Gender of the voice as described in +// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). +enum SsmlVoiceGender { + // An unspecified gender, which means that the client doesn't care which + // gender the selected voice will have. + SSML_VOICE_GENDER_UNSPECIFIED = 0; + + // A male voice. + SSML_VOICE_GENDER_MALE = 1; + + // A female voice. + SSML_VOICE_GENDER_FEMALE = 2; + + // A gender-neutral voice. + SSML_VOICE_GENDER_NEUTRAL = 3; +} + +// Configuration of how speech should be synthesized. +message SynthesizeSpeechConfig { + // Optional. Speaking rate/speed, in the range [0.25, 4.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. If unset(0.0), defaults to the native 1.0 speed. Any + // other values < 0.25 or > 4.0 will return an error. + double speaking_rate = 1; + + // Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 + // semitones from the original pitch. -20 means decrease 20 semitones from the + // original pitch. + double pitch = 2; + + // Optional. Volume gain (in dB) of the normal native volume supported by the + // specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of + // 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) + // will play at approximately half the amplitude of the normal native signal + // amplitude. A value of +6.0 (dB) will play at approximately twice the + // amplitude of the normal native signal amplitude. We strongly recommend not + // to exceed +10 (dB) as there's usually no effective increase in loudness for + // any value greater than that. + double volume_gain_db = 3; + + // Optional. An identifier which selects 'audio effects' profiles that are + // applied on (post synthesized) text to speech. Effects are applied on top of + // each other in the order they are given. + repeated string effects_profile_id = 5; + + // Optional. The desired voice of the synthesized audio. + VoiceSelectionParams voice = 4; +} + +// Instructs the speech synthesizer how to generate the output audio content. +// If this audio config is supplied in a request, it overrides all existing +// text-to-speech settings applied to the agent. +message OutputAudioConfig { + // Required. Audio encoding of the synthesized audio content. + OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; + + // The synthesis sample rate (in hertz) for this audio. If not + // provided, then the synthesizer will use the default sample rate based on + // the audio encoding. If this is different from the voice's natural sample + // rate, then the synthesizer will honor this request by converting to the + // desired sample rate (which might result in worse audio quality). + int32 sample_rate_hertz = 2; + + // Configuration of how speech should be synthesized. + SynthesizeSpeechConfig synthesize_speech_config = 3; +} + +// Audio encoding of the output audio format in Text-To-Speech. +enum OutputAudioEncoding { + // Not specified. + OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0; + + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + // Audio content returned as LINEAR16 also contains a WAV header. + OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; + + // MP3 audio at 32kbps. + OUTPUT_AUDIO_ENCODING_MP3 = 2; + + // Opus encoded audio wrapped in an ogg container. The result will be a + // file which can be played natively on Android, and in browsers (at least + // Chrome and Firefox). The quality of the encoding is considerably higher + // than MP3 while using approximately the same bitrate. + OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3; +} diff --git a/dialogflow_v2beta1/proto/audio_config_pb2.py b/dialogflow_v2beta1/proto/audio_config_pb2.py index ef3db6c7a..30f56d611 100644 --- a/dialogflow_v2beta1/proto/audio_config_pb2.py +++ b/dialogflow_v2beta1/proto/audio_config_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/audio_config.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -27,12 +24,9 @@ name="google/cloud/dialogflow_v2beta1/proto/audio_config.proto", package="google.cloud.dialogflow.v2beta1", syntax="proto3", - serialized_options=_b( - "\n#com.google.cloud.dialogflow.v2beta1B\020AudioConfigProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1" - ), - serialized_pb=_b( - '\n8google/cloud/dialogflow_v2beta1/proto/audio_config.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/api/annotations.proto"/\n\rSpeechContext\x12\x0f\n\x07phrases\x18\x01 \x03(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02"\x92\x01\n\x0eSpeechWordInfo\x12\x0c\n\x04word\x18\x03 \x01(\t\x12/\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\x81\x03\n\x10InputAudioConfig\x12\x46\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32..google.cloud.dialogflow.v2beta1.AudioEncoding\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\x12\x18\n\x10\x65nable_word_info\x18\r \x01(\x08\x12\x1b\n\x0cphrase_hints\x18\x04 \x03(\tB\x05\x18\x01\xe0\x41\x01\x12G\n\x0fspeech_contexts\x18\x0b \x03(\x0b\x32..google.cloud.dialogflow.v2beta1.SpeechContext\x12\r\n\x05model\x18\x07 \x01(\t\x12J\n\rmodel_variant\x18\n \x01(\x0e\x32\x33.google.cloud.dialogflow.v2beta1.SpeechModelVariant\x12\x18\n\x10single_utterance\x18\x08 \x01(\x08"k\n\x14VoiceSelectionParams\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x45\n\x0bssml_gender\x18\x02 \x01(\x0e\x32\x30.google.cloud.dialogflow.v2beta1.SsmlVoiceGender"\xb8\x01\n\x16SynthesizeSpeechConfig\x12\x15\n\rspeaking_rate\x18\x01 \x01(\x01\x12\r\n\x05pitch\x18\x02 \x01(\x01\x12\x16\n\x0evolume_gain_db\x18\x03 \x01(\x01\x12\x1a\n\x12\x65\x66\x66\x65\x63ts_profile_id\x18\x05 \x03(\t\x12\x44\n\x05voice\x18\x04 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.VoiceSelectionParams"\xdc\x01\n\x11OutputAudioConfig\x12Q\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32\x34.google.cloud.dialogflow.v2beta1.OutputAudioEncodingB\x03\xe0\x41\x02\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12Y\n\x18synthesize_speech_config\x18\x03 \x01(\x0b\x32\x37.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig*\xfb\x01\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41UDIO_ENCODING_LINEAR_16\x10\x01\x12\x17\n\x13\x41UDIO_ENCODING_FLAC\x10\x02\x12\x18\n\x14\x41UDIO_ENCODING_MULAW\x10\x03\x12\x16\n\x12\x41UDIO_ENCODING_AMR\x10\x04\x12\x19\n\x15\x41UDIO_ENCODING_AMR_WB\x10\x05\x12\x1b\n\x17\x41UDIO_ENCODING_OGG_OPUS\x10\x06\x12)\n%AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE\x10\x07*v\n\x12SpeechModelVariant\x12$\n SPEECH_MODEL_VARIANT_UNSPECIFIED\x10\x00\x12\x16\n\x12USE_BEST_AVAILABLE\x10\x01\x12\x10\n\x0cUSE_STANDARD\x10\x02\x12\x10\n\x0cUSE_ENHANCED\x10\x03*\x8d\x01\n\x0fSsmlVoiceGender\x12!\n\x1dSSML_VOICE_GENDER_UNSPECIFIED\x10\x00\x12\x1a\n\x16SSML_VOICE_GENDER_MALE\x10\x01\x12\x1c\n\x18SSML_VOICE_GENDER_FEMALE\x10\x02\x12\x1d\n\x19SSML_VOICE_GENDER_NEUTRAL\x10\x03*\xa4\x01\n\x13OutputAudioEncoding\x12%\n!OUTPUT_AUDIO_ENCODING_UNSPECIFIED\x10\x00\x12#\n\x1fOUTPUT_AUDIO_ENCODING_LINEAR_16\x10\x01\x12\x1d\n\x19OUTPUT_AUDIO_ENCODING_MP3\x10\x02\x12"\n\x1eOUTPUT_AUDIO_ENCODING_OGG_OPUS\x10\x03\x42\xae\x01\n#com.google.cloud.dialogflow.v2beta1B\x10\x41udioConfigProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3' - ), + serialized_options=b"\n#com.google.cloud.dialogflow.v2beta1B\020AudioConfigProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n8google/cloud/dialogflow_v2beta1/proto/audio_config.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/api/annotations.proto"/\n\rSpeechContext\x12\x0f\n\x07phrases\x18\x01 \x03(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02"\x92\x01\n\x0eSpeechWordInfo\x12\x0c\n\x04word\x18\x03 \x01(\t\x12/\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xfe\x02\n\x10InputAudioConfig\x12\x46\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32..google.cloud.dialogflow.v2beta1.AudioEncoding\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\x12\x18\n\x10\x65nable_word_info\x18\r \x01(\x08\x12\x18\n\x0cphrase_hints\x18\x04 \x03(\tB\x02\x18\x01\x12G\n\x0fspeech_contexts\x18\x0b \x03(\x0b\x32..google.cloud.dialogflow.v2beta1.SpeechContext\x12\r\n\x05model\x18\x07 \x01(\t\x12J\n\rmodel_variant\x18\n \x01(\x0e\x32\x33.google.cloud.dialogflow.v2beta1.SpeechModelVariant\x12\x18\n\x10single_utterance\x18\x08 \x01(\x08"k\n\x14VoiceSelectionParams\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x45\n\x0bssml_gender\x18\x02 \x01(\x0e\x32\x30.google.cloud.dialogflow.v2beta1.SsmlVoiceGender"\xb8\x01\n\x16SynthesizeSpeechConfig\x12\x15\n\rspeaking_rate\x18\x01 \x01(\x01\x12\r\n\x05pitch\x18\x02 \x01(\x01\x12\x16\n\x0evolume_gain_db\x18\x03 \x01(\x01\x12\x1a\n\x12\x65\x66\x66\x65\x63ts_profile_id\x18\x05 \x03(\t\x12\x44\n\x05voice\x18\x04 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.VoiceSelectionParams"\xdc\x01\n\x11OutputAudioConfig\x12Q\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32\x34.google.cloud.dialogflow.v2beta1.OutputAudioEncodingB\x03\xe0\x41\x02\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12Y\n\x18synthesize_speech_config\x18\x03 \x01(\x0b\x32\x37.google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig*\xfb\x01\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41UDIO_ENCODING_LINEAR_16\x10\x01\x12\x17\n\x13\x41UDIO_ENCODING_FLAC\x10\x02\x12\x18\n\x14\x41UDIO_ENCODING_MULAW\x10\x03\x12\x16\n\x12\x41UDIO_ENCODING_AMR\x10\x04\x12\x19\n\x15\x41UDIO_ENCODING_AMR_WB\x10\x05\x12\x1b\n\x17\x41UDIO_ENCODING_OGG_OPUS\x10\x06\x12)\n%AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE\x10\x07*v\n\x12SpeechModelVariant\x12$\n SPEECH_MODEL_VARIANT_UNSPECIFIED\x10\x00\x12\x16\n\x12USE_BEST_AVAILABLE\x10\x01\x12\x10\n\x0cUSE_STANDARD\x10\x02\x12\x10\n\x0cUSE_ENHANCED\x10\x03*\x8d\x01\n\x0fSsmlVoiceGender\x12!\n\x1dSSML_VOICE_GENDER_UNSPECIFIED\x10\x00\x12\x1a\n\x16SSML_VOICE_GENDER_MALE\x10\x01\x12\x1c\n\x18SSML_VOICE_GENDER_FEMALE\x10\x02\x12\x1d\n\x19SSML_VOICE_GENDER_NEUTRAL\x10\x03*\xa4\x01\n\x13OutputAudioEncoding\x12%\n!OUTPUT_AUDIO_ENCODING_UNSPECIFIED\x10\x00\x12#\n\x1fOUTPUT_AUDIO_ENCODING_LINEAR_16\x10\x01\x12\x1d\n\x19OUTPUT_AUDIO_ENCODING_MP3\x10\x02\x12"\n\x1eOUTPUT_AUDIO_ENCODING_OGG_OPUS\x10\x03\x42\xae\x01\n#com.google.cloud.dialogflow.v2beta1B\x10\x41udioConfigProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3', dependencies=[ google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, @@ -47,6 +41,7 @@ full_name="google.cloud.dialogflow.v2beta1.AudioEncoding", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_UNSPECIFIED", @@ -54,6 +49,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_LINEAR_16", @@ -61,6 +57,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_FLAC", @@ -68,6 +65,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_MULAW", @@ -75,6 +73,7 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_AMR", @@ -82,6 +81,7 @@ number=4, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_AMR_WB", @@ -89,6 +89,7 @@ number=5, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_OGG_OPUS", @@ -96,6 +97,7 @@ number=6, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE", @@ -103,12 +105,13 @@ number=7, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=1355, - serialized_end=1606, + serialized_start=1352, + serialized_end=1603, ) _sym_db.RegisterEnumDescriptor(_AUDIOENCODING) @@ -118,6 +121,7 @@ full_name="google.cloud.dialogflow.v2beta1.SpeechModelVariant", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="SPEECH_MODEL_VARIANT_UNSPECIFIED", @@ -125,6 +129,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="USE_BEST_AVAILABLE", @@ -132,18 +137,29 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="USE_STANDARD", index=2, number=2, serialized_options=None, type=None + name="USE_STANDARD", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="USE_ENHANCED", index=3, number=3, serialized_options=None, type=None + name="USE_ENHANCED", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=1608, - serialized_end=1726, + serialized_start=1605, + serialized_end=1723, ) _sym_db.RegisterEnumDescriptor(_SPEECHMODELVARIANT) @@ -153,6 +169,7 @@ full_name="google.cloud.dialogflow.v2beta1.SsmlVoiceGender", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="SSML_VOICE_GENDER_UNSPECIFIED", @@ -160,6 +177,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="SSML_VOICE_GENDER_MALE", @@ -167,6 +185,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="SSML_VOICE_GENDER_FEMALE", @@ -174,6 +193,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="SSML_VOICE_GENDER_NEUTRAL", @@ -181,12 +201,13 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=1729, - serialized_end=1870, + serialized_start=1726, + serialized_end=1867, ) _sym_db.RegisterEnumDescriptor(_SSMLVOICEGENDER) @@ -196,6 +217,7 @@ full_name="google.cloud.dialogflow.v2beta1.OutputAudioEncoding", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="OUTPUT_AUDIO_ENCODING_UNSPECIFIED", @@ -203,6 +225,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="OUTPUT_AUDIO_ENCODING_LINEAR_16", @@ -210,6 +233,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="OUTPUT_AUDIO_ENCODING_MP3", @@ -217,6 +241,7 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="OUTPUT_AUDIO_ENCODING_OGG_OPUS", @@ -224,12 +249,13 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=1873, - serialized_end=2037, + serialized_start=1870, + serialized_end=2034, ) _sym_db.RegisterEnumDescriptor(_OUTPUTAUDIOENCODING) @@ -262,6 +288,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="phrases", @@ -280,6 +307,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="boost", @@ -298,6 +326,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -319,6 +348,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="word", @@ -329,7 +359,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -337,6 +367,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="start_offset", @@ -355,6 +386,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="end_offset", @@ -373,6 +405,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -391,6 +424,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -412,6 +446,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="audio_encoding", @@ -430,6 +465,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sample_rate_hertz", @@ -448,6 +484,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -458,7 +495,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -466,6 +503,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="enable_word_info", @@ -484,6 +522,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="phrase_hints", @@ -500,8 +539,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001\340A\001"), + serialized_options=b"\030\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="speech_contexts", @@ -520,6 +560,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -530,7 +571,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -538,6 +579,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model_variant", @@ -556,6 +598,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="single_utterance", @@ -574,6 +617,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -585,7 +629,7 @@ extension_ranges=[], oneofs=[], serialized_start=448, - serialized_end=833, + serialized_end=830, ) @@ -595,6 +639,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -605,7 +650,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -613,6 +658,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="ssml_gender", @@ -631,6 +677,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -641,8 +688,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=835, - serialized_end=942, + serialized_start=832, + serialized_end=939, ) @@ -652,6 +699,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="speaking_rate", @@ -670,6 +718,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pitch", @@ -688,6 +737,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="volume_gain_db", @@ -706,6 +756,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="effects_profile_id", @@ -724,6 +775,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="voice", @@ -742,6 +794,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -752,8 +805,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=945, - serialized_end=1129, + serialized_start=942, + serialized_end=1126, ) @@ -763,6 +816,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="audio_encoding", @@ -779,8 +833,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sample_rate_hertz", @@ -799,6 +854,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="synthesize_speech_config", @@ -817,6 +873,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -827,8 +884,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1132, - serialized_end=1352, + serialized_start=1129, + serialized_end=1349, ) _SPEECHWORDINFO.fields_by_name[ @@ -861,47 +918,44 @@ SpeechContext = _reflection.GeneratedProtocolMessageType( "SpeechContext", (_message.Message,), - dict( - DESCRIPTOR=_SPEECHCONTEXT, - __module__="google.cloud.dialogflow_v2beta1.proto.audio_config_pb2", - __doc__="""Hints for the speech recognizer to help with recognition - in a specific conversation state. - + { + "DESCRIPTOR": _SPEECHCONTEXT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.audio_config_pb2", + "__doc__": """Hints for the speech recognizer to help with recognition in a specific + conversation state. Attributes: phrases: Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. - This list can be used to: \* improve accuracy for words and - phrases you expect the user to say, e.g. typical commands for - your Dialogflow agent \* add additional words to the speech - recognizer vocabulary \* ... See the `Cloud Speech + This list can be used to: - improve accuracy for words and + phrases you expect the user to say, e.g. typical commands + for your Dialogflow agent - add additional words to the + speech recognizer vocabulary - … See the `Cloud Speech documentation `__ for usage limits. boost: Optional. Boost for this context compared to other contexts: - \* If the boost is positive, Dialogflow will increase the - probability that the phrases in this context are recognized - over similar sounding phrases. \* If the boost is unspecified - or non-positive, Dialogflow will not apply any boost. - Dialogflow recommends that you use boosts in the range (0, 20] - and that you find a value that fits your use case with binary - search. + - If the boost is positive, Dialogflow will increase the + probability that the phrases in this context are recognized + over similar sounding phrases. - If the boost is + unspecified or non-positive, Dialogflow will not apply any + boost. Dialogflow recommends that you use boosts in the range + (0, 20] and that you find a value that fits your use case with + binary search. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SpeechContext) - ), + }, ) _sym_db.RegisterMessage(SpeechContext) SpeechWordInfo = _reflection.GeneratedProtocolMessageType( "SpeechWordInfo", (_message.Message,), - dict( - DESCRIPTOR=_SPEECHWORDINFO, - __module__="google.cloud.dialogflow_v2beta1.proto.audio_config_pb2", - __doc__="""Information for a word recognized by the speech - recognizer. - + { + "DESCRIPTOR": _SPEECHWORDINFO, + "__module__": "google.cloud.dialogflow_v2beta1.proto.audio_config_pb2", + "__doc__": """Information for a word recognized by the speech recognizer. Attributes: word: @@ -926,19 +980,17 @@ be provided. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SpeechWordInfo) - ), + }, ) _sym_db.RegisterMessage(SpeechWordInfo) InputAudioConfig = _reflection.GeneratedProtocolMessageType( "InputAudioConfig", (_message.Message,), - dict( - DESCRIPTOR=_INPUTAUDIOCONFIG, - __module__="google.cloud.dialogflow_v2beta1.proto.audio_config_pb2", - __doc__="""Instructs the speech recognizer on how to process the - audio content. - + { + "DESCRIPTOR": _INPUTAUDIOCONFIG, + "__module__": "google.cloud.dialogflow_v2beta1.proto.audio_config_pb2", + "__doc__": """Instructs the speech recognizer on how to process the audio content. Attributes: audio_encoding: @@ -956,96 +1008,92 @@ the same session do not necessarily need to specify the same language. enable_word_info: - Optional. If ``true``, Dialogflow returns [SpeechWordInfo][goo - gle.cloud.dialogflow.v2beta1.SpeechWordInfo] in [StreamingReco - gnitionResult][google.cloud.dialogflow.v2beta1.StreamingRecogn - itionResult] with information about the recognized speech - words, e.g. start and end time offsets. If false or - unspecified, Speech doesn't return any word-level information. + If ``true``, Dialogflow returns [SpeechWordInfo][google.cloud. + dialogflow.v2beta1.SpeechWordInfo] in [StreamingRecognitionRes + ult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResul + t] with information about the recognized speech words, + e.g. start and end time offsets. If false or unspecified, + Speech doesn’t return any word-level information. phrase_hints: - Optional. A list of strings containing words and phrases that - the speech recognizer should recognize with higher likelihood. - See `the Cloud Speech documentation - `__ for more details. This field is deprecated. Please - use `speech\_contexts` instead. If you specify both - `phrase\_hints` and `speech\_contexts`, Dialogflow - will treat the `phrase\_hints` as a single additional - `SpeechContext`. + A list of strings containing words and phrases that the speech + recognizer should recognize with higher likelihood. See `the + Cloud Speech documentation `__ for more details. This + field is deprecated. Please use `speech_contexts` + instead. If you specify both `phrase_hints` and + `speech_contexts`, Dialogflow will treat the + `phrase_hints` as a single additional `SpeechContext`. speech_contexts: - Optional. Context information to assist speech recognition. - See `the Cloud Speech documentation - `__ for more details. + Context information to assist speech recognition. See `the + Cloud Speech documentation `__ for more details. model: - Optional. Which Speech model to select for the given request. - Select the model best suited to your domain to get best - results. If a model is not explicitly specified, then we auto- - select a model based on the parameters in the - InputAudioConfig. If enhanced speech model is enabled for the - agent and an enhanced version of the specified model for the - language does not exist, then the speech is recognized using - the standard version of the specified model. Refer to `Cloud - Speech API documentation `__ for more details. + Which Speech model to select for the given request. Select the + model best suited to your domain to get best results. If a + model is not explicitly specified, then we auto-select a model + based on the parameters in the InputAudioConfig. If enhanced + speech model is enabled for the agent and an enhanced version + of the specified model for the language does not exist, then + the speech is recognized using the standard version of the + specified model. Refer to `Cloud Speech API documentation + `__ for more details. model_variant: - Optional. Which variant of the [Speech + Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use. single_utterance: - Optional. If ``false`` (default), recognition does not cease - until the client closes the stream. If ``true``, the - recognizer will detect a single spoken utterance in input - audio. Recognition ceases when it detects the audio's voice - has stopped or paused. In this case, once a detected intent is - received, the client should close the stream and start a new - request with a new stream as needed. Note: This setting is - relevant only for streaming methods. Note: When specified, - InputAudioConfig.single\_utterance takes precedence over - StreamingDetectIntentRequest.single\_utterance. + If ``false`` (default), recognition does not cease until the + client closes the stream. If ``true``, the recognizer will + detect a single spoken utterance in input audio. Recognition + ceases when it detects the audio’s voice has stopped or + paused. In this case, once a detected intent is received, the + client should close the stream and start a new request with a + new stream as needed. Note: This setting is relevant only for + streaming methods. Note: When specified, + InputAudioConfig.single_utterance takes precedence over + StreamingDetectIntentRequest.single_utterance. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.InputAudioConfig) - ), + }, ) _sym_db.RegisterMessage(InputAudioConfig) VoiceSelectionParams = _reflection.GeneratedProtocolMessageType( "VoiceSelectionParams", (_message.Message,), - dict( - DESCRIPTOR=_VOICESELECTIONPARAMS, - __module__="google.cloud.dialogflow_v2beta1.proto.audio_config_pb2", - __doc__="""Description of which voice to use for speech synthesis. - + { + "DESCRIPTOR": _VOICESELECTIONPARAMS, + "__module__": "google.cloud.dialogflow_v2beta1.proto.audio_config_pb2", + "__doc__": """Description of which voice to use for speech synthesis. Attributes: name: Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as - language\_code and [ssml\_gender][google.cloud.dialogflow.v2be - ta1.VoiceSelectionParams.ssml\_gender]. + language_code and [ssml_gender][google.cloud.dialogflow.v2beta + 1.VoiceSelectionParams.ssml_gender]. ssml_gender: Optional. The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such - as language\_code and [name][google.cloud.dialogflow.v2beta1.V - oiceSelectionParams.name]. Note that this is only a - preference, not requirement. If a voice of the appropriate - gender is not available, the synthesizer should substitute a - voice with a different gender rather than failing the request. + as language_code and [name][google.cloud.dialogflow.v2beta1.Vo + iceSelectionParams.name]. Note that this is only a preference, + not requirement. If a voice of the appropriate gender is not + available, the synthesizer should substitute a voice with a + different gender rather than failing the request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.VoiceSelectionParams) - ), + }, ) _sym_db.RegisterMessage(VoiceSelectionParams) SynthesizeSpeechConfig = _reflection.GeneratedProtocolMessageType( "SynthesizeSpeechConfig", (_message.Message,), - dict( - DESCRIPTOR=_SYNTHESIZESPEECHCONFIG, - __module__="google.cloud.dialogflow_v2beta1.proto.audio_config_pb2", - __doc__="""Configuration of how speech should be synthesized. - + { + "DESCRIPTOR": _SYNTHESIZESPEECHCONFIG, + "__module__": "google.cloud.dialogflow_v2beta1.proto.audio_config_pb2", + "__doc__": """Configuration of how speech should be synthesized. Attributes: speaking_rate: @@ -1066,31 +1114,30 @@ approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We - strongly recommend not to exceed +10 (dB) as there's usually + strongly recommend not to exceed +10 (dB) as there’s usually no effective increase in loudness for any value greater than that. effects_profile_id: - Optional. An identifier which selects 'audio effects' profiles + Optional. An identifier which selects ‘audio effects’ profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given. voice: Optional. The desired voice of the synthesized audio. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig) - ), + }, ) _sym_db.RegisterMessage(SynthesizeSpeechConfig) OutputAudioConfig = _reflection.GeneratedProtocolMessageType( "OutputAudioConfig", (_message.Message,), - dict( - DESCRIPTOR=_OUTPUTAUDIOCONFIG, - __module__="google.cloud.dialogflow_v2beta1.proto.audio_config_pb2", - __doc__="""Instructs the speech synthesizer how to generate the - output audio content. If this audio config is supplied in a request, it - overrides all existing text-to-speech settings applied to the agent. - + { + "DESCRIPTOR": _OUTPUTAUDIOCONFIG, + "__module__": "google.cloud.dialogflow_v2beta1.proto.audio_config_pb2", + "__doc__": """Instructs the speech synthesizer how to generate the output audio + content. If this audio config is supplied in a request, it overrides + all existing text-to-speech settings applied to the agent. Attributes: audio_encoding: @@ -1099,14 +1146,14 @@ The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from - the voice's natural sample rate, then the synthesizer will + the voice’s natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality). synthesize_speech_config: Configuration of how speech should be synthesized. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.OutputAudioConfig) - ), + }, ) _sym_db.RegisterMessage(OutputAudioConfig) diff --git a/dialogflow_v2beta1/proto/audio_config_pb2_grpc.py b/dialogflow_v2beta1/proto/audio_config_pb2_grpc.py index 07cb78fe0..8a9393943 100644 --- a/dialogflow_v2beta1/proto/audio_config_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/audio_config_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/dialogflow_v2beta1/proto/context.proto b/dialogflow_v2beta1/proto/context.proto new file mode 100644 index 000000000..e829882d9 --- /dev/null +++ b/dialogflow_v2beta1/proto/context.proto @@ -0,0 +1,329 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "ContextProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Service for managing [Contexts][google.cloud.dialogflow.v2beta1.Context]. +service Contexts { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all contexts in the specified session. + rpc ListContexts(ListContextsRequest) returns (ListContextsResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*/agent/sessions/*}/contexts" + additional_bindings { + get: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" + } + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contexts" + } + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified context. + rpc GetContext(GetContextRequest) returns (Context) { + option (google.api.http) = { + get: "/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}" + additional_bindings { + get: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" + } + additional_bindings { + get: "/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}" + } + additional_bindings { + get: "/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a context. + // + // If the specified context already exists, overrides the context. + rpc CreateContext(CreateContextRequest) returns (Context) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*/agent/sessions/*}/contexts" + body: "context" + additional_bindings { + post: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" + body: "context" + } + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contexts" + body: "context" + } + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" + body: "context" + } + }; + option (google.api.method_signature) = "parent,context"; + } + + // Updates the specified context. + rpc UpdateContext(UpdateContextRequest) returns (Context) { + option (google.api.http) = { + patch: "/v2beta1/{context.name=projects/*/agent/sessions/*/contexts/*}" + body: "context" + additional_bindings { + patch: "/v2beta1/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" + body: "context" + } + additional_bindings { + patch: "/v2beta1/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}" + body: "context" + } + additional_bindings { + patch: "/v2beta1/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" + body: "context" + } + }; + option (google.api.method_signature) = "context,update_mask"; + option (google.api.method_signature) = "context"; + } + + // Deletes the specified context. + rpc DeleteContext(DeleteContextRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}" + additional_bindings { + delete: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" + } + additional_bindings { + delete: "/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}" + } + additional_bindings { + delete: "/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Deletes all active contexts in the specified session. + rpc DeleteAllContexts(DeleteAllContextsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta1/{parent=projects/*/agent/sessions/*}/contexts" + additional_bindings { + delete: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" + } + additional_bindings { + delete: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contexts" + } + additional_bindings { + delete: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" + } + }; + option (google.api.method_signature) = "parent"; + } +} + +// Dialogflow contexts are similar to natural language context. If a person says +// to you "they are orange", you need context in order to understand what "they" +// is referring to. Similarly, for Dialogflow to handle an end-user expression +// like that, it needs to be provided with context in order to correctly match +// an intent. +// +// Using contexts, you can control the flow of a conversation. You can configure +// contexts for an intent by setting input and output contexts, which are +// identified by string names. When an intent is matched, any configured output +// contexts for that intent become active. While any contexts are active, +// Dialogflow is more likely to match intents that are configured with input +// contexts that correspond to the currently active contexts. +// +// For more information about context, see the +// [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview). +message Context { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Context" + pattern: "projects/{project}/agent/sessions/{session}/contexts/{context}" + pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}" + pattern: "projects/{project}/locations/{location}/agent/sessions/{session}/contexts/{context}" + }; + + // Required. The unique identifier of the context. Format: + // `projects//agent/sessions//contexts/`, + // or `projects//agent/environments//users//sessions//contexts/`. + // + // The `Context ID` is always converted to lowercase, may only contain + // characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + // + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + // + // The following context names are reserved for internal use by Dialogflow. + // You should not use these contexts or create contexts with these names: + // + // * `__system_counters__` + // * `*_id_dialog_context` + // * `*_dialog_params_size` + string name = 1; + + // Optional. The number of conversational query requests after which the + // context expires. The default is `0`. If set to `0`, the context expires + // immediately. Contexts expire automatically after 20 minutes if there + // are no matching queries. + int32 lifespan_count = 2; + + // Optional. The collection of parameters associated with this context. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value + google.protobuf.Struct parameters = 3; +} + +// The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts]. +message ListContextsRequest { + // Required. The session to list all contexts from. + // Format: `projects//agent/sessions/` or + // `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + // default 'draft' environment. If `User ID` is not specified, we assume + // default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Context" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts]. +message ListContextsResponse { + // The list of contexts. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated Context contexts = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [Contexts.GetContext][google.cloud.dialogflow.v2beta1.Contexts.GetContext]. +message GetContextRequest { + // Required. The name of the context. Format: + // `projects//agent/sessions//contexts/` + // or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is + // not specified, we assume default 'draft' environment. If `User ID` is not + // specified, we assume default '-' user. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Context" + } + ]; +} + +// The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2beta1.Contexts.CreateContext]. +message CreateContextRequest { + // Required. The session to create a context for. + // Format: `projects//agent/sessions/` or + // `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + // default 'draft' environment. If `User ID` is not specified, we assume + // default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Context" + } + ]; + + // Required. The context to create. + Context context = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2beta1.Contexts.UpdateContext]. +message UpdateContextRequest { + // Required. The context to update. + Context context = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2beta1.Contexts.DeleteContext]. +message DeleteContextRequest { + // Required. The name of the context to delete. Format: + // `projects//agent/sessions//contexts/` + // or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is + // not specified, we assume default 'draft' environment. If `User ID` is not + // specified, we assume default '-' user. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Context" + } + ]; +} + +// The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContexts]. +message DeleteAllContextsRequest { + // Required. The name of the session to delete all contexts from. Format: + // `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Context" + } + ]; +} diff --git a/dialogflow_v2beta1/proto/context_pb2.py b/dialogflow_v2beta1/proto/context_pb2.py index 9e3a150f0..0c952497b 100644 --- a/dialogflow_v2beta1/proto/context_pb2.py +++ b/dialogflow_v2beta1/proto/context_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/context.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -16,28 +13,29 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="google/cloud/dialogflow_v2beta1/proto/context.proto", package="google.cloud.dialogflow.v2beta1", syntax="proto3", - serialized_options=_b( - "\n#com.google.cloud.dialogflow.v2beta1B\014ContextProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1" - ), - serialized_pb=_b( - '\n3google/cloud/dialogflow_v2beta1/proto/context.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/api/client.proto"\\\n\x07\x43ontext\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\x0elifespan_count\x18\x02 \x01(\x05\x12+\n\nparameters\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct"L\n\x13ListContextsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"k\n\x14ListContextsResponse\x12:\n\x08\x63ontexts\x18\x01 \x03(\x0b\x32(.google.cloud.dialogflow.v2beta1.Context\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"!\n\x11GetContextRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"a\n\x14\x43reateContextRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x39\n\x07\x63ontext\x18\x02 \x01(\x0b\x32(.google.cloud.dialogflow.v2beta1.Context"\x82\x01\n\x14UpdateContextRequest\x12\x39\n\x07\x63ontext\x18\x01 \x01(\x0b\x32(.google.cloud.dialogflow.v2beta1.Context\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"$\n\x14\x44\x65leteContextRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"*\n\x18\x44\x65leteAllContextsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t2\xcb\x15\n\x08\x43ontexts\x12\xb1\x03\n\x0cListContexts\x12\x34.google.cloud.dialogflow.v2beta1.ListContextsRequest\x1a\x35.google.cloud.dialogflow.v2beta1.ListContextsResponse"\xb3\x02\x82\xd3\xe4\x93\x02\xac\x02\x12\x36/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO\x12M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZD\x12\x42/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contextsZ[\x12Y/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts\x12\xa0\x03\n\nGetContext\x12\x32.google.cloud.dialogflow.v2beta1.GetContextRequest\x1a(.google.cloud.dialogflow.v2beta1.Context"\xb3\x02\x82\xd3\xe4\x93\x02\xac\x02\x12\x36/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}ZO\x12M/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}ZD\x12\x42/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}Z[\x12Y/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}\x12\xca\x03\n\rCreateContext\x12\x35.google.cloud.dialogflow.v2beta1.CreateContextRequest\x1a(.google.cloud.dialogflow.v2beta1.Context"\xd7\x02\x82\xd3\xe4\x93\x02\xd0\x02"6/v2beta1/{parent=projects/*/agent/sessions/*}/contexts:\x07\x63ontextZX"M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:\x07\x63ontextZM"B/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contexts:\x07\x63ontextZd"Y/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts:\x07\x63ontext\x12\xea\x03\n\rUpdateContext\x12\x35.google.cloud.dialogflow.v2beta1.UpdateContextRequest\x1a(.google.cloud.dialogflow.v2beta1.Context"\xf7\x02\x82\xd3\xe4\x93\x02\xf0\x02\x32>/v2beta1/{context.name=projects/*/agent/sessions/*/contexts/*}:\x07\x63ontextZ`2U/v2beta1/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:\x07\x63ontextZU2J/v2beta1/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}:\x07\x63ontextZl2a/v2beta1/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}:\x07\x63ontext\x12\x94\x03\n\rDeleteContext\x12\x35.google.cloud.dialogflow.v2beta1.DeleteContextRequest\x1a\x16.google.protobuf.Empty"\xb3\x02\x82\xd3\xe4\x93\x02\xac\x02*6/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}ZO*M/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}ZD*B/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}Z[*Y/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}\x12\x9c\x03\n\x11\x44\x65leteAllContexts\x12\x39.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest\x1a\x16.google.protobuf.Empty"\xb3\x02\x82\xd3\xe4\x93\x02\xac\x02*6/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO*M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZD*B/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contextsZ[*Y/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xaa\x01\n#com.google.cloud.dialogflow.v2beta1B\x0c\x43ontextProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3' - ), + serialized_options=b"\n#com.google.cloud.dialogflow.v2beta1B\014ContextProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n3google/cloud/dialogflow_v2beta1/proto/context.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto"\x83\x03\n\x07\x43ontext\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\x0elifespan_count\x18\x02 \x01(\x05\x12+\n\nparameters\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct:\xa4\x02\xea\x41\xa0\x02\n!dialogflow.googleapis.com/Context\x12>projects/{project}/agent/sessions/{session}/contexts/{context}\x12\x66projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}\x12Sprojects/{project}/locations/{location}/agent/sessions/{session}/contexts/{context}"w\n\x13ListContextsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Context\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"k\n\x14ListContextsResponse\x12:\n\x08\x63ontexts\x18\x01 \x03(\x0b\x32(.google.cloud.dialogflow.v2beta1.Context\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"L\n\x11GetContextRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Context"\x91\x01\n\x14\x43reateContextRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Context\x12>\n\x07\x63ontext\x18\x02 \x01(\x0b\x32(.google.cloud.dialogflow.v2beta1.ContextB\x03\xe0\x41\x02"\x8c\x01\n\x14UpdateContextRequest\x12>\n\x07\x63ontext\x18\x01 \x01(\x0b\x32(.google.cloud.dialogflow.v2beta1.ContextB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"O\n\x14\x44\x65leteContextRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Context"U\n\x18\x44\x65leteAllContextsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!dialogflow.googleapis.com/Context2\x9c\x16\n\x08\x43ontexts\x12\xba\x03\n\x0cListContexts\x12\x34.google.cloud.dialogflow.v2beta1.ListContextsRequest\x1a\x35.google.cloud.dialogflow.v2beta1.ListContextsResponse"\xbc\x02\x82\xd3\xe4\x93\x02\xac\x02\x12\x36/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO\x12M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZD\x12\x42/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contextsZ[\x12Y/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts\xda\x41\x06parent\x12\xa7\x03\n\nGetContext\x12\x32.google.cloud.dialogflow.v2beta1.GetContextRequest\x1a(.google.cloud.dialogflow.v2beta1.Context"\xba\x02\x82\xd3\xe4\x93\x02\xac\x02\x12\x36/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}ZO\x12M/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}ZD\x12\x42/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}Z[\x12Y/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}\xda\x41\x04name\x12\xdb\x03\n\rCreateContext\x12\x35.google.cloud.dialogflow.v2beta1.CreateContextRequest\x1a(.google.cloud.dialogflow.v2beta1.Context"\xe8\x02\x82\xd3\xe4\x93\x02\xd0\x02"6/v2beta1/{parent=projects/*/agent/sessions/*}/contexts:\x07\x63ontextZX"M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:\x07\x63ontextZM"B/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contexts:\x07\x63ontextZd"Y/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts:\x07\x63ontext\xda\x41\x0eparent,context\x12\x8a\x04\n\rUpdateContext\x12\x35.google.cloud.dialogflow.v2beta1.UpdateContextRequest\x1a(.google.cloud.dialogflow.v2beta1.Context"\x97\x03\x82\xd3\xe4\x93\x02\xf0\x02\x32>/v2beta1/{context.name=projects/*/agent/sessions/*/contexts/*}:\x07\x63ontextZ`2U/v2beta1/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:\x07\x63ontextZU2J/v2beta1/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}:\x07\x63ontextZl2a/v2beta1/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}:\x07\x63ontext\xda\x41\x13\x63ontext,update_mask\xda\x41\x07\x63ontext\x12\x9b\x03\n\rDeleteContext\x12\x35.google.cloud.dialogflow.v2beta1.DeleteContextRequest\x1a\x16.google.protobuf.Empty"\xba\x02\x82\xd3\xe4\x93\x02\xac\x02*6/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}ZO*M/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}ZD*B/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}Z[*Y/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}\xda\x41\x04name\x12\xa5\x03\n\x11\x44\x65leteAllContexts\x12\x39.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest\x1a\x16.google.protobuf.Empty"\xbc\x02\x82\xd3\xe4\x93\x02\xac\x02*6/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO*M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZD*B/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contextsZ[*Y/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts\xda\x41\x06parent\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xaa\x01\n#com.google.cloud.dialogflow.v2beta1B\x0c\x43ontextProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, google_dot_protobuf_dot_struct__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -48,6 +46,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -58,7 +57,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -66,6 +65,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="lifespan_count", @@ -84,6 +84,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parameters", @@ -102,18 +103,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=b"\352A\240\002\n!dialogflow.googleapis.com/Context\022>projects/{project}/agent/sessions/{session}/contexts/{context}\022fprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}\022Sprojects/{project}/locations/{location}/agent/sessions/{session}/contexts/{context}", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=236, - serialized_end=328, + serialized_start=297, + serialized_end=684, ) @@ -123,6 +125,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -133,14 +136,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A#\022!dialogflow.googleapis.com/Context", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -159,6 +163,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -169,7 +174,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -177,6 +182,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -187,8 +193,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=330, - serialized_end=406, + serialized_start=686, + serialized_end=805, ) @@ -198,6 +204,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="contexts", @@ -216,6 +223,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -226,7 +234,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -234,6 +242,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -244,8 +253,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=408, - serialized_end=515, + serialized_start=807, + serialized_end=914, ) @@ -255,6 +264,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -265,14 +275,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A#\n!dialogflow.googleapis.com/Context", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -283,8 +294,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=517, - serialized_end=550, + serialized_start=916, + serialized_end=992, ) @@ -294,6 +305,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -304,14 +316,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A#\022!dialogflow.googleapis.com/Context", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="context", @@ -328,8 +341,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -340,8 +354,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=552, - serialized_end=649, + serialized_start=995, + serialized_end=1140, ) @@ -351,6 +365,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="context", @@ -367,8 +382,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -385,8 +401,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -397,8 +414,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=652, - serialized_end=782, + serialized_start=1143, + serialized_end=1283, ) @@ -408,6 +425,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -418,14 +436,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A#\n!dialogflow.googleapis.com/Context", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -436,8 +455,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=784, - serialized_end=820, + serialized_start=1285, + serialized_end=1364, ) @@ -447,6 +466,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -457,14 +477,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A#\022!dialogflow.googleapis.com/Context", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -475,8 +496,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=822, - serialized_end=864, + serialized_start=1366, + serialized_end=1451, ) _CONTEXT.fields_by_name[ @@ -501,11 +522,22 @@ Context = _reflection.GeneratedProtocolMessageType( "Context", (_message.Message,), - dict( - DESCRIPTOR=_CONTEXT, - __module__="google.cloud.dialogflow_v2beta1.proto.context_pb2", - __doc__="""Represents a context. - + { + "DESCRIPTOR": _CONTEXT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.context_pb2", + "__doc__": """Dialogflow contexts are similar to natural language context. If a + person says to you “they are orange”, you need context in order to + understand what “they” is referring to. Similarly, for Dialogflow to + handle an end-user expression like that, it needs to be provided with + context in order to correctly match an intent. Using contexts, you + can control the flow of a conversation. You can configure contexts for + an intent by setting input and output contexts, which are identified + by string names. When an intent is matched, any configured output + contexts for that intent become active. While any contexts are active, + Dialogflow is more likely to match intents that are configured with + input contexts that correspond to the currently active contexts. For + more information about context, see the `Contexts guide + `__. Attributes: name: @@ -515,39 +547,46 @@ ID>/agent/environments//users//sessions//contexts/``. The ``Context ID`` is always converted to lowercase, may only - contain characters in a-zA-Z0-9\_-% and may be at most 250 + contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If ``Environment ID`` is not specified, we assume - default 'draft' environment. If ``User ID`` is not specified, - we assume default '-' user. The following context names are + default ‘draft’ environment. If ``User ID`` is not specified, + we assume default ‘-’ user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: - ``__system_counters__`` - ``*_id_dialog_context`` - ``*_dialog_params_size`` lifespan_count: Optional. The number of conversational query requests after - which the context expires. If set to ``0`` (the default) the - context expires immediately. Contexts expire automatically - after 20 minutes if there are no matching queries. + which the context expires. The default is ``0``. If set to + ``0``, the context expires immediately. Contexts expire + automatically after 20 minutes if there are no matching + queries. parameters: Optional. The collection of parameters associated with this - context. Refer to `this doc - `__ for syntax. + context. Depending on your protocol or client library + language, this is a map, associative array, symbol table, + dictionary, or JSON object composed of a collection of + (MapKey, MapValue) pairs: - MapKey type: string - MapKey + value: parameter name - MapValue type: - If parameter’s + entity type is a composite entity: map - Else: string or + number, depending on parameter value type - MapValue value: + - If parameter’s entity type is a composite entity: map from + composite entity property names to property values - Else: + parameter value """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Context) - ), + }, ) _sym_db.RegisterMessage(Context) ListContextsRequest = _reflection.GeneratedProtocolMessageType( "ListContextsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTCONTEXTSREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.context_pb2", - __doc__="""The request message for - [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts]. - + { + "DESCRIPTOR": _LISTCONTEXTSREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.context_pb2", + "__doc__": """The request message for [Contexts.ListContexts][google.cloud.dialogflo + w.v2beta1.Contexts.ListContexts]. Attributes: parent: @@ -555,52 +594,50 @@ ``projects//agent/sessions/`` or ``projects//agent/environments//users//sessions/``. If ``Environment - ID`` is not specified, we assume default 'draft' environment. - If ``User ID`` is not specified, we assume default '-' user. + ID`` is not specified, we assume default ‘draft’ environment. + If ``User ID`` is not specified, we assume default ‘-’ user. page_size: Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. page_token: - Optional. The next\_page\_token value returned from a previous + Optional. The next_page_token value returned from a previous list request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListContextsRequest) - ), + }, ) _sym_db.RegisterMessage(ListContextsRequest) ListContextsResponse = _reflection.GeneratedProtocolMessageType( "ListContextsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTCONTEXTSRESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.context_pb2", - __doc__="""The response message for - [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts]. - + { + "DESCRIPTOR": _LISTCONTEXTSRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.context_pb2", + "__doc__": """The response message for [Contexts.ListContexts][google.cloud.dialogfl + ow.v2beta1.Contexts.ListContexts]. Attributes: contexts: The list of contexts. There will be a maximum number of items - returned based on the page\_size field in the request. + returned based on the page_size field in the request. next_page_token: Token to retrieve the next page of results, or empty if there are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListContextsResponse) - ), + }, ) _sym_db.RegisterMessage(ListContextsResponse) GetContextRequest = _reflection.GeneratedProtocolMessageType( "GetContextRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETCONTEXTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.context_pb2", - __doc__="""The request message for - [Contexts.GetContext][google.cloud.dialogflow.v2beta1.Contexts.GetContext]. - + { + "DESCRIPTOR": _GETCONTEXTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.context_pb2", + "__doc__": """The request message for [Contexts.GetContext][google.cloud.dialogflow. + v2beta1.Contexts.GetContext]. Attributes: name: @@ -609,23 +646,22 @@ ``projects//agent/environments//users//sessions//contexts/``. If ``Environment ID`` is not specified, we assume - default 'draft' environment. If ``User ID`` is not specified, - we assume default '-' user. + default ‘draft’ environment. If ``User ID`` is not specified, + we assume default ‘-’ user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.GetContextRequest) - ), + }, ) _sym_db.RegisterMessage(GetContextRequest) CreateContextRequest = _reflection.GeneratedProtocolMessageType( "CreateContextRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATECONTEXTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.context_pb2", - __doc__="""The request message for - [Contexts.CreateContext][google.cloud.dialogflow.v2beta1.Contexts.CreateContext]. - + { + "DESCRIPTOR": _CREATECONTEXTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.context_pb2", + "__doc__": """The request message for [Contexts.CreateContext][google.cloud.dialogfl + ow.v2beta1.Contexts.CreateContext]. Attributes: parent: @@ -633,25 +669,24 @@ ``projects//agent/sessions/`` or ``projects//agent/environments//users//sessions/``. If ``Environment - ID`` is not specified, we assume default 'draft' environment. - If ``User ID`` is not specified, we assume default '-' user. + ID`` is not specified, we assume default ‘draft’ environment. + If ``User ID`` is not specified, we assume default ‘-’ user. context: Required. The context to create. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.CreateContextRequest) - ), + }, ) _sym_db.RegisterMessage(CreateContextRequest) UpdateContextRequest = _reflection.GeneratedProtocolMessageType( "UpdateContextRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATECONTEXTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.context_pb2", - __doc__="""The request message for - [Contexts.UpdateContext][google.cloud.dialogflow.v2beta1.Contexts.UpdateContext]. - + { + "DESCRIPTOR": _UPDATECONTEXTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.context_pb2", + "__doc__": """The request message for [Contexts.UpdateContext][google.cloud.dialogfl + ow.v2beta1.Contexts.UpdateContext]. Attributes: context: @@ -660,19 +695,18 @@ Optional. The mask to control which fields get updated. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.UpdateContextRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateContextRequest) DeleteContextRequest = _reflection.GeneratedProtocolMessageType( "DeleteContextRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETECONTEXTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.context_pb2", - __doc__="""The request message for - [Contexts.DeleteContext][google.cloud.dialogflow.v2beta1.Contexts.DeleteContext]. - + { + "DESCRIPTOR": _DELETECONTEXTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.context_pb2", + "__doc__": """The request message for [Contexts.DeleteContext][google.cloud.dialogfl + ow.v2beta1.Contexts.DeleteContext]. Attributes: name: @@ -681,24 +715,23 @@ ID>/contexts/`` or ``projects//agent/environments//users//sessions//contexts/``. If - ``Environment ID`` is not specified, we assume default 'draft' + ``Environment ID`` is not specified, we assume default ‘draft’ environment. If ``User ID`` is not specified, we assume - default '-' user. + default ‘-’ user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DeleteContextRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteContextRequest) DeleteAllContextsRequest = _reflection.GeneratedProtocolMessageType( "DeleteAllContextsRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEALLCONTEXTSREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.context_pb2", - __doc__="""The request message for - [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContexts]. - + { + "DESCRIPTOR": _DELETEALLCONTEXTSREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.context_pb2", + "__doc__": """The request message for [Contexts.DeleteAllContexts][google.cloud.dial + ogflow.v2beta1.Contexts.DeleteAllContexts]. Attributes: parent: @@ -706,27 +739,35 @@ Format: ``projects//agent/sessions/`` or ``projects//agent/environments//users//sessions/``. If ``Environment - ID`` is not specified we assume default 'draft' environment. - If ``User ID`` is not specified, we assume default '-' user. + ID`` is not specified we assume default ‘draft’ environment. + If ``User ID`` is not specified, we assume default ‘-’ user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteAllContextsRequest) DESCRIPTOR._options = None +_CONTEXT._options = None +_LISTCONTEXTSREQUEST.fields_by_name["parent"]._options = None +_GETCONTEXTREQUEST.fields_by_name["name"]._options = None +_CREATECONTEXTREQUEST.fields_by_name["parent"]._options = None +_CREATECONTEXTREQUEST.fields_by_name["context"]._options = None +_UPDATECONTEXTREQUEST.fields_by_name["context"]._options = None +_UPDATECONTEXTREQUEST.fields_by_name["update_mask"]._options = None +_DELETECONTEXTREQUEST.fields_by_name["name"]._options = None +_DELETEALLCONTEXTSREQUEST.fields_by_name["parent"]._options = None _CONTEXTS = _descriptor.ServiceDescriptor( name="Contexts", full_name="google.cloud.dialogflow.v2beta1.Contexts", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), - serialized_start=867, - serialized_end=3630, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=1454, + serialized_end=4298, methods=[ _descriptor.MethodDescriptor( name="ListContexts", @@ -735,9 +776,8 @@ containing_service=None, input_type=_LISTCONTEXTSREQUEST, output_type=_LISTCONTEXTSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002\254\002\0226/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO\022M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZD\022B/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contextsZ[\022Y/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" - ), + serialized_options=b"\202\323\344\223\002\254\002\0226/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO\022M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZD\022B/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contextsZ[\022Y/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetContext", @@ -746,9 +786,8 @@ containing_service=None, input_type=_GETCONTEXTREQUEST, output_type=_CONTEXT, - serialized_options=_b( - "\202\323\344\223\002\254\002\0226/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}ZO\022M/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}ZD\022B/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}Z[\022Y/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" - ), + serialized_options=b"\202\323\344\223\002\254\002\0226/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}ZO\022M/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}ZD\022B/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}Z[\022Y/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateContext", @@ -757,9 +796,8 @@ containing_service=None, input_type=_CREATECONTEXTREQUEST, output_type=_CONTEXT, - serialized_options=_b( - '\202\323\344\223\002\320\002"6/v2beta1/{parent=projects/*/agent/sessions/*}/contexts:\007contextZX"M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:\007contextZM"B/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contexts:\007contextZd"Y/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts:\007context' - ), + serialized_options=b'\202\323\344\223\002\320\002"6/v2beta1/{parent=projects/*/agent/sessions/*}/contexts:\007contextZX"M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:\007contextZM"B/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contexts:\007contextZd"Y/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts:\007context\332A\016parent,context', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateContext", @@ -768,9 +806,8 @@ containing_service=None, input_type=_UPDATECONTEXTREQUEST, output_type=_CONTEXT, - serialized_options=_b( - "\202\323\344\223\002\360\0022>/v2beta1/{context.name=projects/*/agent/sessions/*/contexts/*}:\007contextZ`2U/v2beta1/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:\007contextZU2J/v2beta1/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}:\007contextZl2a/v2beta1/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}:\007context" - ), + serialized_options=b"\202\323\344\223\002\360\0022>/v2beta1/{context.name=projects/*/agent/sessions/*/contexts/*}:\007contextZ`2U/v2beta1/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:\007contextZU2J/v2beta1/{context.name=projects/*/locations/*/agent/sessions/*/contexts/*}:\007contextZl2a/v2beta1/{context.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}:\007context\332A\023context,update_mask\332A\007context", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteContext", @@ -779,9 +816,8 @@ containing_service=None, input_type=_DELETECONTEXTREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002\254\002*6/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}ZO*M/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}ZD*B/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}Z[*Y/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}" - ), + serialized_options=b"\202\323\344\223\002\254\002*6/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}ZO*M/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}ZD*B/v2beta1/{name=projects/*/locations/*/agent/sessions/*/contexts/*}Z[*Y/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/contexts/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteAllContexts", @@ -790,9 +826,8 @@ containing_service=None, input_type=_DELETEALLCONTEXTSREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002\254\002*6/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO*M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZD*B/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contextsZ[*Y/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts" - ), + serialized_options=b"\202\323\344\223\002\254\002*6/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO*M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsZD*B/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/contextsZ[*Y/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/contexts\332A\006parent", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2beta1/proto/context_pb2_grpc.py b/dialogflow_v2beta1/proto/context_pb2_grpc.py index fd23ab247..154bd4c1e 100644 --- a/dialogflow_v2beta1/proto/context_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/context_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2beta1.proto import ( @@ -8,32 +9,15 @@ class ContextsStub(object): - """A context represents additional information included with user input or with - an intent returned by the Dialogflow API. Contexts are helpful for - differentiating user input which may be vague or have a different meaning - depending on additional details from your application such as user setting - and preferences, previous user input, where the user is in your application, - geographic location, and so on. - - You can include contexts as input parameters of a - [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or - [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) request, - or as output contexts included in the returned intent. - Contexts expire when an intent is matched, after the number of `DetectIntent` - requests specified by the `lifespan_count` parameter, or after 20 minutes - if no intents are matched for a `DetectIntent` request. - - For more information about contexts, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/contexts-overview). - """ + """Service for managing [Contexts][google.cloud.dialogflow.v2beta1.Context]. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.ListContexts = channel.unary_unary( "/google.cloud.dialogflow.v2beta1.Contexts/ListContexts", request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.ListContextsRequest.SerializeToString, @@ -67,36 +51,19 @@ def __init__(self, channel): class ContextsServicer(object): - """A context represents additional information included with user input or with - an intent returned by the Dialogflow API. Contexts are helpful for - differentiating user input which may be vague or have a different meaning - depending on additional details from your application such as user setting - and preferences, previous user input, where the user is in your application, - geographic location, and so on. - - You can include contexts as input parameters of a - [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or - [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) request, - or as output contexts included in the returned intent. - Contexts expire when an intent is matched, after the number of `DetectIntent` - requests specified by the `lifespan_count` parameter, or after 20 minutes - if no intents are matched for a `DetectIntent` request. - - For more information about contexts, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/contexts-overview). - """ + """Service for managing [Contexts][google.cloud.dialogflow.v2beta1.Context]. + """ def ListContexts(self, request, context): """Returns the list of all contexts in the specified session. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetContext(self, request, context): """Retrieves the specified context. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -104,29 +71,29 @@ def GetContext(self, request, context): def CreateContext(self, request, context): """Creates a context. - If the specified context already exists, overrides the context. - """ + If the specified context already exists, overrides the context. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateContext(self, request, context): """Updates the specified context. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteContext(self, request, context): """Deletes the specified context. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteAllContexts(self, request, context): """Deletes all active contexts in the specified session. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -169,3 +136,171 @@ def add_ContextsServicer_to_server(servicer, server): "google.cloud.dialogflow.v2beta1.Contexts", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Contexts(object): + """Service for managing [Contexts][google.cloud.dialogflow.v2beta1.Context]. + """ + + @staticmethod + def ListContexts( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Contexts/ListContexts", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.ListContextsRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.ListContextsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetContext( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Contexts/GetContext", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.GetContextRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.Context.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateContext( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Contexts/CreateContext", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.CreateContextRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.Context.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateContext( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Contexts/UpdateContext", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.UpdateContextRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.Context.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteContext( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Contexts/DeleteContext", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.DeleteContextRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteAllContexts( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Contexts/DeleteAllContexts", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.DeleteAllContextsRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2beta1/proto/document.proto b/dialogflow_v2beta1/proto/document.proto new file mode 100644 index 000000000..d3facb741 --- /dev/null +++ b/dialogflow_v2beta1/proto/document.proto @@ -0,0 +1,396 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2beta1/gcs.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "DocumentProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Service for managing knowledge [Documents][google.cloud.dialogflow.v2beta1.Document]. +service Documents { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all documents of the knowledge base. + // + // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + // only use `projects.knowledgeBases.documents`. + rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents" + additional_bindings { + get: "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified document. + // + // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + // only use `projects.knowledgeBases.documents`. + rpc GetDocument(GetDocumentRequest) returns (Document) { + option (google.api.http) = { + get: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}" + additional_bindings { + get: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new document. + // + // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + // only use `projects.knowledgeBases.documents`. + rpc CreateDocument(CreateDocumentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents" + body: "document" + additional_bindings { + post: "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents" + body: "document" + } + }; + option (google.api.method_signature) = "parent,document"; + option (google.longrunning.operation_info) = { + response_type: "Document" + metadata_type: "KnowledgeOperationMetadata" + }; + } + + // Deletes the specified document. + // + // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + // only use `projects.knowledgeBases.documents`. + rpc DeleteDocument(DeleteDocumentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}" + additional_bindings { + delete: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" + } + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "KnowledgeOperationMetadata" + }; + } + + // Updates the specified document. + // + // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + // only use `projects.knowledgeBases.documents`. + rpc UpdateDocument(UpdateDocumentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}" + body: "document" + additional_bindings { + patch: "/v2beta1/{document.name=projects/*/agent/knowledgeBases/*/documents/*}" + body: "document" + } + }; + option (google.api.method_signature) = "document,update_mask"; + option (google.api.method_signature) = "document"; + option (google.longrunning.operation_info) = { + response_type: "Document" + metadata_type: "KnowledgeOperationMetadata" + }; + } + + // Reloads the specified document from its specified source, content_uri or + // content. The previously loaded content of the document will be deleted. + // Note: Even when the content of the document has not changed, there still + // may be side effects because of internal implementation changes. + // + // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + // only use `projects.knowledgeBases.documents`. + rpc ReloadDocument(ReloadDocumentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload" + body: "*" + additional_bindings { + post: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "Document" + metadata_type: "KnowledgeOperationMetadata" + }; + } +} + +// A knowledge document to be used by a [KnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBase]. +// +// For more information, see the [knowledge base +// guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). +// +// Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; +// only use `projects.knowledgeBases.documents`. +message Document { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Document" + pattern: "projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}" + }; + + // The status of a reload attempt. + message ReloadStatus { + // Output only. The time of a reload attempt. + // This reload may have been triggered automatically or manually and may + // not have succeeded. + google.protobuf.Timestamp time = 1; + + // Output only. The status of a reload attempt or the initial load. + google.rpc.Status status = 2; + } + + // The knowledge type of document content. + enum KnowledgeType { + // The type is unspecified or arbitrary. + KNOWLEDGE_TYPE_UNSPECIFIED = 0; + + // The document content contains question and answer pairs as either HTML or + // CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats + // may fail to be parsed. + // + // CSV must have questions in the first column and answers in the second, + // with no header. Because of this explicit format, they are always parsed + // accurately. + FAQ = 1; + + // Documents for which unstructured text is extracted and used for + // question answering. + EXTRACTIVE_QA = 2; + } + + // Optional. The document resource name. + // The name must be empty when creating a document. + // Format: `projects//knowledgeBases//documents/`. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The display name of the document. The name must be 1024 bytes or + // less; otherwise, the creation request fails. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The MIME type of this document. + string mime_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The knowledge type of document content. + repeated KnowledgeType knowledge_types = 4 [(google.api.field_behavior) = REQUIRED]; + + // The source of this document. + oneof source { + // The URI where the file content is located. + // + // For documents stored in Google Cloud Storage, these URIs must have + // the form `gs:///`. + // + // NOTE: External URLs must correspond to public webpages, i.e., they must + // be indexed by Google Search. In particular, URLs for showing documents in + // Google Cloud Storage (i.e. the URL in your browser) are not supported. + // Instead use the `gs://` format URI described above. + string content_uri = 5; + + // The raw content of the document. This field is only permitted for + // EXTRACTIVE_QA and FAQ knowledge types. + // Note: This field is in the process of being deprecated, please use + // raw_content instead. + string content = 6 [deprecated = true]; + + // The raw content of the document. This field is only permitted for + // EXTRACTIVE_QA and FAQ knowledge types. + bytes raw_content = 9; + } + + // Optional. If true, we try to automatically reload the document every day + // (at a time picked by the system). If false or unspecified, we don't try + // to automatically reload the document. + // + // Currently you can only enable automatic reload for documents sourced from + // a public url, see `source` field for the source types. + // + // Reload status can be tracked in `latest_reload_status`. If a reload + // fails, we will keep the document unchanged. + // + // If a reload fails with internal errors, the system will try to reload the + // document on the next day. + // If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the + // system will not try to reload the document anymore. You need to manually + // reload the document successfully by calling `ReloadDocument` and clear the + // errors. + bool enable_auto_reload = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time and status of the latest reload. + // This reload may have been triggered automatically or manually + // and may not have succeeded. + ReloadStatus latest_reload_status = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for [Documents.GetDocument][google.cloud.dialogflow.v2beta1.Documents.GetDocument]. +message GetDocumentRequest { + // Required. The name of the document to retrieve. + // Format `projects//knowledgeBases//documents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Document" + } + ]; +} + +// Request message for [Documents.ListDocuments][google.cloud.dialogflow.v2beta1.Documents.ListDocuments]. +message ListDocumentsRequest { + // Required. The knowledge base to list all documents for. + // Format: `projects//knowledgeBases/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Document" + } + ]; + + // The maximum number of items to return in a single page. By + // default 10 and at most 100. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// Response message for [Documents.ListDocuments][google.cloud.dialogflow.v2beta1.Documents.ListDocuments]. +message ListDocumentsResponse { + // The list of documents. + repeated Document documents = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// Request message for [Documents.CreateDocument][google.cloud.dialogflow.v2beta1.Documents.CreateDocument]. +message CreateDocumentRequest { + // Required. The knoweldge base to create a document for. + // Format: `projects//knowledgeBases/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Document" + } + ]; + + // Required. The document to create. + Document document = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [Documents.DeleteDocument][google.cloud.dialogflow.v2beta1.Documents.DeleteDocument]. +message DeleteDocumentRequest { + // Required. The name of the document to delete. + // Format: `projects//knowledgeBases//documents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Document" + } + ]; +} + +// Request message for [Documents.UpdateDocument][google.cloud.dialogflow.v2beta1.Documents.UpdateDocument]. +message UpdateDocumentRequest { + // Required. The document to update. + Document document = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Not specified means `update all`. + // Currently, only `display_name` can be updated, an InvalidArgument will be + // returned for attempting to update other fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata in google::longrunning::Operation for Knowledge operations. +message KnowledgeOperationMetadata { + // States of the operation. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // The operation has been created. + PENDING = 1; + + // The operation is currently running. + RUNNING = 2; + + // The operation is done, either cancelled or completed. + DONE = 3; + } + + // Required. Output only. The current state of this operation. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for [Documents.ReloadDocument][google.cloud.dialogflow.v2beta1.Documents.ReloadDocument]. +message ReloadDocumentRequest { + // Required. The name of the document to reload. + // Format: `projects//knowledgeBases//documents/` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Document" + } + ]; + + // The source for document reloading. + // Optional. If provided, the service will load the contents from the source + // and update document in the knowledge base. + oneof source { + // The path for a Cloud Storage source file for reloading document content. + // If not provided, the Document's existing source will be reloaded. + GcsSource gcs_source = 3; + } +} + +// Response message for [Documents.AutoApproveSmartMessagingEntries]. +message AutoApproveSmartMessagingEntriesResponse { + // Number of smart messaging entries enabled. + int32 enabled_count = 1; + + // Number of smart messaging entries disabled. + int32 disabled_count = 2; + + // Number of smart messaging entries unreviewed. + int32 unreviewed_count = 3; +} diff --git a/dialogflow_v2beta1/proto/document_pb2.py b/dialogflow_v2beta1/proto/document_pb2.py index de27fcd11..70850bac8 100644 --- a/dialogflow_v2beta1/proto/document_pb2.py +++ b/dialogflow_v2beta1/proto/document_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/document.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -16,7 +13,9 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from dialogflow_v2beta1.proto import ( gcs_pb2 as google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_gcs__pb2, ) @@ -27,29 +26,26 @@ from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="google/cloud/dialogflow_v2beta1/proto/document.proto", package="google.cloud.dialogflow.v2beta1", syntax="proto3", - serialized_options=_b( - "\n#com.google.cloud.dialogflow.v2beta1B\rDocumentProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1" - ), - serialized_pb=_b( - '\n4google/cloud/dialogflow_v2beta1/proto/document.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a/google/cloud/dialogflow_v2beta1/proto/gcs.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x17google/api/client.proto"\xaf\x02\n\x08\x44ocument\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12P\n\x0fknowledge_types\x18\x04 \x03(\x0e\x32\x37.google.cloud.dialogflow.v2beta1.Document.KnowledgeType\x12\x15\n\x0b\x63ontent_uri\x18\x05 \x01(\tH\x00\x12\x15\n\x07\x63ontent\x18\x06 \x01(\tB\x02\x18\x01H\x00\x12\x15\n\x0braw_content\x18\t \x01(\x0cH\x00"K\n\rKnowledgeType\x12\x1e\n\x1aKNOWLEDGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x46\x41Q\x10\x01\x12\x11\n\rEXTRACTIVE_QA\x10\x02\x42\x08\n\x06source"M\n\x14ListDocumentsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"n\n\x15ListDocumentsResponse\x12<\n\tdocuments\x18\x01 \x03(\x0b\x32).google.cloud.dialogflow.v2beta1.Document\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t""\n\x12GetDocumentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"d\n\x15\x43reateDocumentRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12;\n\x08\x64ocument\x18\x02 \x01(\x0b\x32).google.cloud.dialogflow.v2beta1.Document"%\n\x15\x44\x65leteDocumentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x85\x01\n\x15UpdateDocumentRequest\x12;\n\x08\x64ocument\x18\x01 \x01(\x0b\x32).google.cloud.dialogflow.v2beta1.Document\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"\xb2\x01\n\x1aKnowledgeOperationMetadata\x12P\n\x05state\x18\x01 \x01(\x0e\x32\x41.google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03"q\n\x15ReloadDocumentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\ngcs_source\x18\x03 \x01(\x0b\x32*.google.cloud.dialogflow.v2beta1.GcsSourceH\x00\x42\x08\n\x06source2\x81\r\n\tDocuments\x12\x81\x02\n\rListDocuments\x12\x35.google.cloud.dialogflow.v2beta1.ListDocumentsRequest\x1a\x36.google.cloud.dialogflow.v2beta1.ListDocumentsResponse"\x80\x01\x82\xd3\xe4\x93\x02z\x12\x37/v2beta1/{parent=projects/*/knowledgeBases/*}/documentsZ?\x12=/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents\x12\xf0\x01\n\x0bGetDocument\x12\x33.google.cloud.dialogflow.v2beta1.GetDocumentRequest\x1a).google.cloud.dialogflow.v2beta1.Document"\x80\x01\x82\xd3\xe4\x93\x02z\x12\x37/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}Z?\x12=/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}\x12\xff\x01\n\x0e\x43reateDocument\x12\x36.google.cloud.dialogflow.v2beta1.CreateDocumentRequest\x1a\x1d.google.longrunning.Operation"\x95\x01\x82\xd3\xe4\x93\x02\x8e\x01"7/v2beta1/{parent=projects/*/knowledgeBases/*}/documents:\x08\x64ocumentZI"=/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents:\x08\x64ocument\x12\xea\x01\n\x0e\x44\x65leteDocument\x12\x36.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest\x1a\x1d.google.longrunning.Operation"\x80\x01\x82\xd3\xe4\x93\x02z*7/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}Z?*=/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}\x12\x91\x02\n\x0eUpdateDocument\x12\x36.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest\x1a\x1d.google.longrunning.Operation"\xa7\x01\x82\xd3\xe4\x93\x02\xa0\x01\x32@/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}:\x08\x64ocumentZR2F/v2beta1/{document.name=projects/*/agent/knowledgeBases/*/documents/*}:\x08\x64ocument\x12\xff\x01\n\x0eReloadDocument\x12\x36.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest\x1a\x1d.google.longrunning.Operation"\x95\x01\x82\xd3\xe4\x93\x02\x8e\x01">/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload:\x01*ZI"D/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload:\x01*\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xab\x01\n#com.google.cloud.dialogflow.v2beta1B\rDocumentProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3' - ), + serialized_options=b"\n#com.google.cloud.dialogflow.v2beta1B\rDocumentProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n4google/cloud/dialogflow_v2beta1/proto/document.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/dialogflow_v2beta1/proto/gcs.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto"\x8f\x05\n\x08\x44ocument\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0fknowledge_types\x18\x04 \x03(\x0e\x32\x37.google.cloud.dialogflow.v2beta1.Document.KnowledgeTypeB\x03\xe0\x41\x02\x12\x15\n\x0b\x63ontent_uri\x18\x05 \x01(\tH\x00\x12\x15\n\x07\x63ontent\x18\x06 \x01(\tB\x02\x18\x01H\x00\x12\x15\n\x0braw_content\x18\t \x01(\x0cH\x00\x12\x1f\n\x12\x65nable_auto_reload\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\x12Y\n\x14latest_reload_status\x18\x0c \x01(\x0b\x32\x36.google.cloud.dialogflow.v2beta1.Document.ReloadStatusB\x03\xe0\x41\x03\x1a\\\n\x0cReloadStatus\x12(\n\x04time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status"K\n\rKnowledgeType\x12\x1e\n\x1aKNOWLEDGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x46\x41Q\x10\x01\x12\x11\n\rEXTRACTIVE_QA\x10\x02:p\xea\x41m\n"dialogflow.googleapis.com/Document\x12Gprojects/{project}/knowledgeBases/{knowledge_base}/documents/{document}B\x08\n\x06source"N\n\x12GetDocumentRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"dialogflow.googleapis.com/Document"y\n\x14ListDocumentsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12"dialogflow.googleapis.com/Document\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"n\n\x15ListDocumentsResponse\x12<\n\tdocuments\x18\x01 \x03(\x0b\x32).google.cloud.dialogflow.v2beta1.Document\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x95\x01\n\x15\x43reateDocumentRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12"dialogflow.googleapis.com/Document\x12@\n\x08\x64ocument\x18\x02 \x01(\x0b\x32).google.cloud.dialogflow.v2beta1.DocumentB\x03\xe0\x41\x02"Q\n\x15\x44\x65leteDocumentRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"dialogflow.googleapis.com/Document"\x8f\x01\n\x15UpdateDocumentRequest\x12@\n\x08\x64ocument\x18\x01 \x01(\x0b\x32).google.cloud.dialogflow.v2beta1.DocumentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"\xb7\x01\n\x1aKnowledgeOperationMetadata\x12U\n\x05state\x18\x01 \x01(\x0e\x32\x41.google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.StateB\x03\xe0\x41\x03"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03"\x9d\x01\n\x15ReloadDocumentRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"dialogflow.googleapis.com/Document\x12@\n\ngcs_source\x18\x03 \x01(\x0b\x32*.google.cloud.dialogflow.v2beta1.GcsSourceH\x00\x42\x08\n\x06source"s\n(AutoApproveSmartMessagingEntriesResponse\x12\x15\n\renabled_count\x18\x01 \x01(\x05\x12\x16\n\x0e\x64isabled_count\x18\x02 \x01(\x05\x12\x18\n\x10unreviewed_count\x18\x03 \x01(\x05\x32\xfd\x0e\n\tDocuments\x12\x8a\x02\n\rListDocuments\x12\x35.google.cloud.dialogflow.v2beta1.ListDocumentsRequest\x1a\x36.google.cloud.dialogflow.v2beta1.ListDocumentsResponse"\x89\x01\x82\xd3\xe4\x93\x02z\x12\x37/v2beta1/{parent=projects/*/knowledgeBases/*}/documentsZ?\x12=/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents\xda\x41\x06parent\x12\xf7\x01\n\x0bGetDocument\x12\x33.google.cloud.dialogflow.v2beta1.GetDocumentRequest\x1a).google.cloud.dialogflow.v2beta1.Document"\x87\x01\x82\xd3\xe4\x93\x02z\x12\x37/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}Z?\x12=/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}\xda\x41\x04name\x12\xba\x02\n\x0e\x43reateDocument\x12\x36.google.cloud.dialogflow.v2beta1.CreateDocumentRequest\x1a\x1d.google.longrunning.Operation"\xd0\x01\x82\xd3\xe4\x93\x02\x8e\x01"7/v2beta1/{parent=projects/*/knowledgeBases/*}/documents:\x08\x64ocumentZI"=/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents:\x08\x64ocument\xda\x41\x0fparent,document\xca\x41&\n\x08\x44ocument\x12\x1aKnowledgeOperationMetadata\x12\xa7\x02\n\x0e\x44\x65leteDocument\x12\x36.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest\x1a\x1d.google.longrunning.Operation"\xbd\x01\x82\xd3\xe4\x93\x02z*7/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}Z?*=/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}\xda\x41\x04name\xca\x41\x33\n\x15google.protobuf.Empty\x12\x1aKnowledgeOperationMetadata\x12\xdc\x02\n\x0eUpdateDocument\x12\x36.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest\x1a\x1d.google.longrunning.Operation"\xf2\x01\x82\xd3\xe4\x93\x02\xa0\x01\x32@/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}:\x08\x64ocumentZR2F/v2beta1/{document.name=projects/*/agent/knowledgeBases/*/documents/*}:\x08\x64ocument\xda\x41\x14\x64ocument,update_mask\xda\x41\x08\x64ocument\xca\x41&\n\x08\x44ocument\x12\x1aKnowledgeOperationMetadata\x12\xa8\x02\n\x0eReloadDocument\x12\x36.google.cloud.dialogflow.v2beta1.ReloadDocumentRequest\x1a\x1d.google.longrunning.Operation"\xbe\x01\x82\xd3\xe4\x93\x02\x8e\x01">/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload:\x01*ZI"D/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload:\x01*\xca\x41&\n\x08\x44ocument\x12\x1aKnowledgeOperationMetadata\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xab\x01\n#com.google.cloud.dialogflow.v2beta1B\rDocumentProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_gcs__pb2.DESCRIPTOR, google_dot_longrunning_dot_operations__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, google_dot_rpc_dot_status__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -59,6 +55,7 @@ full_name="google.cloud.dialogflow.v2beta1.Document.KnowledgeType", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="KNOWLEDGE_TYPE_UNSPECIFIED", @@ -66,18 +63,29 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FAQ", index=1, number=1, serialized_options=None, type=None + name="FAQ", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="EXTRACTIVE_QA", index=2, number=2, serialized_options=None, type=None + name="EXTRACTIVE_QA", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=603, - serialized_end=678, + serialized_start=868, + serialized_end=943, ) _sym_db.RegisterEnumDescriptor(_DOCUMENT_KNOWLEDGETYPE) @@ -86,6 +94,7 @@ full_name="google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -93,31 +102,107 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="PENDING", index=1, number=1, serialized_options=None, type=None + name="PENDING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RUNNING", index=2, number=2, serialized_options=None, type=None + name="RUNNING", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="DONE", index=3, number=3, serialized_options=None, type=None + name="DONE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=1307, - serialized_end=1373, + serialized_start=1883, + serialized_end=1949, ) _sym_db.RegisterEnumDescriptor(_KNOWLEDGEOPERATIONMETADATA_STATE) +_DOCUMENT_RELOADSTATUS = _descriptor.Descriptor( + name="ReloadStatus", + full_name="google.cloud.dialogflow.v2beta1.Document.ReloadStatus", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="time", + full_name="google.cloud.dialogflow.v2beta1.Document.ReloadStatus.time", + index=0, + number=1, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="status", + full_name="google.cloud.dialogflow.v2beta1.Document.ReloadStatus.status", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=774, + serialized_end=866, +) + _DOCUMENT = _descriptor.Descriptor( name="Document", full_name="google.cloud.dialogflow.v2beta1.Document", filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -128,14 +213,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -146,14 +232,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="mime_type", @@ -164,14 +251,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="knowledge_types", @@ -188,8 +276,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="content_uri", @@ -200,7 +289,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -208,6 +297,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="content", @@ -218,14 +308,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\030\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="raw_content", @@ -236,7 +327,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -244,12 +335,51 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="enable_auto_reload", + full_name="google.cloud.dialogflow.v2beta1.Document.enable_auto_reload", + index=7, + number=11, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="latest_reload_status", + full_name="google.cloud.dialogflow.v2beta1.Document.latest_reload_status", + index=8, + number=12, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[], + nested_types=[_DOCUMENT_RELOADSTATUS], enum_types=[_DOCUMENT_KNOWLEDGETYPE], - serialized_options=None, + serialized_options=b'\352Am\n"dialogflow.googleapis.com/Document\022Gprojects/{project}/knowledgeBases/{knowledge_base}/documents/{document}', is_extendable=False, syntax="proto3", extension_ranges=[], @@ -259,11 +389,53 @@ full_name="google.cloud.dialogflow.v2beta1.Document.source", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=385, - serialized_end=688, + serialized_start=412, + serialized_end=1067, +) + + +_GETDOCUMENTREQUEST = _descriptor.Descriptor( + name="GetDocumentRequest", + full_name="google.cloud.dialogflow.v2beta1.GetDocumentRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.cloud.dialogflow.v2beta1.GetDocumentRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b'\340A\002\372A$\n"dialogflow.googleapis.com/Document', + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1069, + serialized_end=1147, ) @@ -273,6 +445,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -283,14 +456,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b'\340A\002\372A$\022"dialogflow.googleapis.com/Document', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -309,6 +483,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -319,7 +494,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -327,6 +502,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -337,8 +513,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=690, - serialized_end=767, + serialized_start=1149, + serialized_end=1270, ) @@ -348,6 +524,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="documents", @@ -366,6 +543,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -376,7 +554,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -384,6 +562,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -394,47 +573,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=769, - serialized_end=879, -) - - -_GETDOCUMENTREQUEST = _descriptor.Descriptor( - name="GetDocumentRequest", - full_name="google.cloud.dialogflow.v2beta1.GetDocumentRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.cloud.dialogflow.v2beta1.GetDocumentRequest.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b("").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ) - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=881, - serialized_end=915, + serialized_start=1272, + serialized_end=1382, ) @@ -444,6 +584,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -454,14 +595,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b'\340A\002\372A$\022"dialogflow.googleapis.com/Document', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="document", @@ -478,8 +620,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -490,8 +633,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=917, - serialized_end=1017, + serialized_start=1385, + serialized_end=1534, ) @@ -501,6 +644,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -511,14 +655,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b'\340A\002\372A$\n"dialogflow.googleapis.com/Document', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -529,8 +674,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1019, - serialized_end=1056, + serialized_start=1536, + serialized_end=1617, ) @@ -540,6 +685,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="document", @@ -556,8 +702,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -574,8 +721,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -586,8 +734,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1059, - serialized_end=1192, + serialized_start=1620, + serialized_end=1763, ) @@ -597,6 +745,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="state", @@ -613,8 +762,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -625,8 +775,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1195, - serialized_end=1373, + serialized_start=1766, + serialized_end=1949, ) @@ -636,6 +786,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -646,14 +797,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b'\340A\002\372A$\n"dialogflow.googleapis.com/Document', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="gcs_source", @@ -672,6 +824,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -687,14 +840,102 @@ full_name="google.cloud.dialogflow.v2beta1.ReloadDocumentRequest.source", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=1375, - serialized_end=1488, + serialized_start=1952, + serialized_end=2109, +) + + +_AUTOAPPROVESMARTMESSAGINGENTRIESRESPONSE = _descriptor.Descriptor( + name="AutoApproveSmartMessagingEntriesResponse", + full_name="google.cloud.dialogflow.v2beta1.AutoApproveSmartMessagingEntriesResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="enabled_count", + full_name="google.cloud.dialogflow.v2beta1.AutoApproveSmartMessagingEntriesResponse.enabled_count", + index=0, + number=1, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="disabled_count", + full_name="google.cloud.dialogflow.v2beta1.AutoApproveSmartMessagingEntriesResponse.disabled_count", + index=1, + number=2, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="unreviewed_count", + full_name="google.cloud.dialogflow.v2beta1.AutoApproveSmartMessagingEntriesResponse.unreviewed_count", + index=2, + number=3, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2111, + serialized_end=2226, ) +_DOCUMENT_RELOADSTATUS.fields_by_name[ + "time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_DOCUMENT_RELOADSTATUS.fields_by_name[ + "status" +].message_type = google_dot_rpc_dot_status__pb2._STATUS +_DOCUMENT_RELOADSTATUS.containing_type = _DOCUMENT _DOCUMENT.fields_by_name["knowledge_types"].enum_type = _DOCUMENT_KNOWLEDGETYPE +_DOCUMENT.fields_by_name["latest_reload_status"].message_type = _DOCUMENT_RELOADSTATUS _DOCUMENT_KNOWLEDGETYPE.containing_type = _DOCUMENT _DOCUMENT.oneofs_by_name["source"].fields.append( _DOCUMENT.fields_by_name["content_uri"] @@ -734,9 +975,9 @@ "gcs_source" ].containing_oneof = _RELOADDOCUMENTREQUEST.oneofs_by_name["source"] DESCRIPTOR.message_types_by_name["Document"] = _DOCUMENT +DESCRIPTOR.message_types_by_name["GetDocumentRequest"] = _GETDOCUMENTREQUEST DESCRIPTOR.message_types_by_name["ListDocumentsRequest"] = _LISTDOCUMENTSREQUEST DESCRIPTOR.message_types_by_name["ListDocumentsResponse"] = _LISTDOCUMENTSRESPONSE -DESCRIPTOR.message_types_by_name["GetDocumentRequest"] = _GETDOCUMENTREQUEST DESCRIPTOR.message_types_by_name["CreateDocumentRequest"] = _CREATEDOCUMENTREQUEST DESCRIPTOR.message_types_by_name["DeleteDocumentRequest"] = _DELETEDOCUMENTREQUEST DESCRIPTOR.message_types_by_name["UpdateDocumentRequest"] = _UPDATEDOCUMENTREQUEST @@ -744,24 +985,48 @@ "KnowledgeOperationMetadata" ] = _KNOWLEDGEOPERATIONMETADATA DESCRIPTOR.message_types_by_name["ReloadDocumentRequest"] = _RELOADDOCUMENTREQUEST +DESCRIPTOR.message_types_by_name[ + "AutoApproveSmartMessagingEntriesResponse" +] = _AUTOAPPROVESMARTMESSAGINGENTRIESRESPONSE _sym_db.RegisterFileDescriptor(DESCRIPTOR) Document = _reflection.GeneratedProtocolMessageType( "Document", (_message.Message,), - dict( - DESCRIPTOR=_DOCUMENT, - __module__="google.cloud.dialogflow_v2beta1.proto.document_pb2", - __doc__="""A document resource. - + { + "ReloadStatus": _reflection.GeneratedProtocolMessageType( + "ReloadStatus", + (_message.Message,), + { + "DESCRIPTOR": _DOCUMENT_RELOADSTATUS, + "__module__": "google.cloud.dialogflow_v2beta1.proto.document_pb2", + "__doc__": """The status of a reload attempt. + + Attributes: + time: + Output only. The time of a reload attempt. This reload may + have been triggered automatically or manually and may not have + succeeded. + status: + Output only. The status of a reload attempt or the initial + load. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Document.ReloadStatus) + }, + ), + "DESCRIPTOR": _DOCUMENT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.document_pb2", + "__doc__": """A knowledge document to be used by a + [KnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBase]. For + more information, see the `knowledge base guide + `__. Note: The ``projects.agent.knowledgeBases.documents`` resource is deprecated; only use ``projects.knowledgeBases.documents``. - Attributes: name: - The document resource name. The name must be empty when - creating a document. Format: ``projects//knowledgeBases//documents/``. display_name: @@ -772,39 +1037,78 @@ knowledge_types: Required. The knowledge type of document content. source: - Required. The source of this document. + The source of this document. content_uri: The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form ``gs:///``. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in - Google Cloud Storage (i.e. the URL in your browser) are not + Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the ``gs://`` format URI described above. content: The raw content of the document. This field is only permitted - for EXTRACTIVE\_QA and FAQ knowledge types. Note: This field - is in the process of being deprecated, please use raw\_content + for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is + in the process of being deprecated, please use raw_content instead. raw_content: The raw content of the document. This field is only permitted - for EXTRACTIVE\_QA and FAQ knowledge types. + for EXTRACTIVE_QA and FAQ knowledge types. + enable_auto_reload: + Optional. If true, we try to automatically reload the document + every day (at a time picked by the system). If false or + unspecified, we don’t try to automatically reload the + document. Currently you can only enable automatic reload for + documents sourced from a public url, see ``source`` field for + the source types. Reload status can be tracked in + ``latest_reload_status``. If a reload fails, we will keep the + document unchanged. If a reload fails with internal errors, + the system will try to reload the document on the next day. If + a reload fails with non-retriable errors + (e.g. PERMISION_DENIED), the system will not try to reload the + document anymore. You need to manually reload the document + successfully by calling ``ReloadDocument`` and clear the + errors. + latest_reload_status: + Output only. The time and status of the latest reload. This + reload may have been triggered automatically or manually and + may not have succeeded. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Document) - ), + }, ) _sym_db.RegisterMessage(Document) +_sym_db.RegisterMessage(Document.ReloadStatus) + +GetDocumentRequest = _reflection.GeneratedProtocolMessageType( + "GetDocumentRequest", + (_message.Message,), + { + "DESCRIPTOR": _GETDOCUMENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.document_pb2", + "__doc__": """Request message for [Documents.GetDocument][google.cloud.dialogflow.v2 + beta1.Documents.GetDocument]. + + Attributes: + name: + Required. The name of the document to retrieve. Format + ``projects//knowledgeBases//documents/``. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.GetDocumentRequest) + }, +) +_sym_db.RegisterMessage(GetDocumentRequest) ListDocumentsRequest = _reflection.GeneratedProtocolMessageType( "ListDocumentsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTDOCUMENTSREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.document_pb2", - __doc__="""Request message for - [Documents.ListDocuments][google.cloud.dialogflow.v2beta1.Documents.ListDocuments]. - + { + "DESCRIPTOR": _LISTDOCUMENTSREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.document_pb2", + "__doc__": """Request message for [Documents.ListDocuments][google.cloud.dialogflow. + v2beta1.Documents.ListDocuments]. Attributes: parent: @@ -812,26 +1116,25 @@ Format: ``projects//knowledgeBases/``. page_size: - Optional. The maximum number of items to return in a single - page. By default 10 and at most 100. + The maximum number of items to return in a single page. By + default 10 and at most 100. page_token: - Optional. The next\_page\_token value returned from a previous - list request. + The next_page_token value returned from a previous list + request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListDocumentsRequest) - ), + }, ) _sym_db.RegisterMessage(ListDocumentsRequest) ListDocumentsResponse = _reflection.GeneratedProtocolMessageType( "ListDocumentsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTDOCUMENTSRESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.document_pb2", - __doc__="""Response message for - [Documents.ListDocuments][google.cloud.dialogflow.v2beta1.Documents.ListDocuments]. - + { + "DESCRIPTOR": _LISTDOCUMENTSRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.document_pb2", + "__doc__": """Response message for [Documents.ListDocuments][google.cloud.dialogflow + .v2beta1.Documents.ListDocuments]. Attributes: documents: @@ -841,40 +1144,18 @@ are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListDocumentsResponse) - ), + }, ) _sym_db.RegisterMessage(ListDocumentsResponse) -GetDocumentRequest = _reflection.GeneratedProtocolMessageType( - "GetDocumentRequest", - (_message.Message,), - dict( - DESCRIPTOR=_GETDOCUMENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.document_pb2", - __doc__="""Request message for - [Documents.GetDocument][google.cloud.dialogflow.v2beta1.Documents.GetDocument]. - - - Attributes: - name: - Required. The name of the document to retrieve. Format - ``projects//knowledgeBases//documents/``. - """, - # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.GetDocumentRequest) - ), -) -_sym_db.RegisterMessage(GetDocumentRequest) - CreateDocumentRequest = _reflection.GeneratedProtocolMessageType( "CreateDocumentRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEDOCUMENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.document_pb2", - __doc__="""Request message for - [Documents.CreateDocument][google.cloud.dialogflow.v2beta1.Documents.CreateDocument]. - + { + "DESCRIPTOR": _CREATEDOCUMENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.document_pb2", + "__doc__": """Request message for [Documents.CreateDocument][google.cloud.dialogflow + .v2beta1.Documents.CreateDocument]. Attributes: parent: @@ -884,40 +1165,38 @@ Required. The document to create. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.CreateDocumentRequest) - ), + }, ) _sym_db.RegisterMessage(CreateDocumentRequest) DeleteDocumentRequest = _reflection.GeneratedProtocolMessageType( "DeleteDocumentRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEDOCUMENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.document_pb2", - __doc__="""Request message for - [Documents.DeleteDocument][google.cloud.dialogflow.v2beta1.Documents.DeleteDocument]. - + { + "DESCRIPTOR": _DELETEDOCUMENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.document_pb2", + "__doc__": """Request message for [Documents.DeleteDocument][google.cloud.dialogflow + .v2beta1.Documents.DeleteDocument]. Attributes: name: - The name of the document to delete. Format: + Required. The name of the document to delete. Format: ``projects//knowledgeBases//documents/``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DeleteDocumentRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteDocumentRequest) UpdateDocumentRequest = _reflection.GeneratedProtocolMessageType( "UpdateDocumentRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATEDOCUMENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.document_pb2", - __doc__="""Request message for - [Documents.UpdateDocument][google.cloud.dialogflow.v2beta1.Documents.UpdateDocument]. - + { + "DESCRIPTOR": _UPDATEDOCUMENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.document_pb2", + "__doc__": """Request message for [Documents.UpdateDocument][google.cloud.dialogflow + .v2beta1.Documents.UpdateDocument]. Attributes: document: @@ -928,41 +1207,39 @@ returned for attempting to update other fields. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.UpdateDocumentRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateDocumentRequest) KnowledgeOperationMetadata = _reflection.GeneratedProtocolMessageType( "KnowledgeOperationMetadata", (_message.Message,), - dict( - DESCRIPTOR=_KNOWLEDGEOPERATIONMETADATA, - __module__="google.cloud.dialogflow_v2beta1.proto.document_pb2", - __doc__="""Metadata in google::longrunning::Operation for Knowledge operations. - + { + "DESCRIPTOR": _KNOWLEDGEOPERATIONMETADATA, + "__module__": "google.cloud.dialogflow_v2beta1.proto.document_pb2", + "__doc__": """Metadata in google::longrunning::Operation for Knowledge operations. Attributes: state: - Required. The current state of this operation. + Required. Output only. The current state of this operation. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata) - ), + }, ) _sym_db.RegisterMessage(KnowledgeOperationMetadata) ReloadDocumentRequest = _reflection.GeneratedProtocolMessageType( "ReloadDocumentRequest", (_message.Message,), - dict( - DESCRIPTOR=_RELOADDOCUMENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.document_pb2", - __doc__="""Request message for - [Documents.ReloadDocument][google.cloud.dialogflow.v2beta1.Documents.ReloadDocument]. - + { + "DESCRIPTOR": _RELOADDOCUMENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.document_pb2", + "__doc__": """Request message for [Documents.ReloadDocument][google.cloud.dialogflow + .v2beta1.Documents.ReloadDocument]. Attributes: name: - The name of the document to reload. Format: + Required. The name of the document to reload. Format: ``projects//knowledgeBases//documents/`` source: @@ -970,27 +1247,65 @@ service will load the contents from the source and update document in the knowledge base. gcs_source: - The path of gcs source file for reloading document content. + The path for a Cloud Storage source file for reloading + document content. If not provided, the Document’s existing + source will be reloaded. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ReloadDocumentRequest) - ), + }, ) _sym_db.RegisterMessage(ReloadDocumentRequest) +AutoApproveSmartMessagingEntriesResponse = _reflection.GeneratedProtocolMessageType( + "AutoApproveSmartMessagingEntriesResponse", + (_message.Message,), + { + "DESCRIPTOR": _AUTOAPPROVESMARTMESSAGINGENTRIESRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.document_pb2", + "__doc__": """Response message for [Documents.AutoApproveSmartMessagingEntries]. + + Attributes: + enabled_count: + Number of smart messaging entries enabled. + disabled_count: + Number of smart messaging entries disabled. + unreviewed_count: + Number of smart messaging entries unreviewed. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.AutoApproveSmartMessagingEntriesResponse) + }, +) +_sym_db.RegisterMessage(AutoApproveSmartMessagingEntriesResponse) + DESCRIPTOR._options = None +_DOCUMENT.fields_by_name["name"]._options = None +_DOCUMENT.fields_by_name["display_name"]._options = None +_DOCUMENT.fields_by_name["mime_type"]._options = None +_DOCUMENT.fields_by_name["knowledge_types"]._options = None _DOCUMENT.fields_by_name["content"]._options = None +_DOCUMENT.fields_by_name["enable_auto_reload"]._options = None +_DOCUMENT.fields_by_name["latest_reload_status"]._options = None +_DOCUMENT._options = None +_GETDOCUMENTREQUEST.fields_by_name["name"]._options = None +_LISTDOCUMENTSREQUEST.fields_by_name["parent"]._options = None +_CREATEDOCUMENTREQUEST.fields_by_name["parent"]._options = None +_CREATEDOCUMENTREQUEST.fields_by_name["document"]._options = None +_DELETEDOCUMENTREQUEST.fields_by_name["name"]._options = None +_UPDATEDOCUMENTREQUEST.fields_by_name["document"]._options = None +_UPDATEDOCUMENTREQUEST.fields_by_name["update_mask"]._options = None +_KNOWLEDGEOPERATIONMETADATA.fields_by_name["state"]._options = None +_RELOADDOCUMENTREQUEST.fields_by_name["name"]._options = None _DOCUMENTS = _descriptor.ServiceDescriptor( name="Documents", full_name="google.cloud.dialogflow.v2beta1.Documents", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), - serialized_start=1491, - serialized_end=3156, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=2229, + serialized_end=4146, methods=[ _descriptor.MethodDescriptor( name="ListDocuments", @@ -999,9 +1314,8 @@ containing_service=None, input_type=_LISTDOCUMENTSREQUEST, output_type=_LISTDOCUMENTSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002z\0227/v2beta1/{parent=projects/*/knowledgeBases/*}/documentsZ?\022=/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents" - ), + serialized_options=b"\202\323\344\223\002z\0227/v2beta1/{parent=projects/*/knowledgeBases/*}/documentsZ?\022=/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetDocument", @@ -1010,9 +1324,8 @@ containing_service=None, input_type=_GETDOCUMENTREQUEST, output_type=_DOCUMENT, - serialized_options=_b( - "\202\323\344\223\002z\0227/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}Z?\022=/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" - ), + serialized_options=b"\202\323\344\223\002z\0227/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}Z?\022=/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateDocument", @@ -1021,9 +1334,8 @@ containing_service=None, input_type=_CREATEDOCUMENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002\216\001"7/v2beta1/{parent=projects/*/knowledgeBases/*}/documents:\010documentZI"=/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents:\010document' - ), + serialized_options=b'\202\323\344\223\002\216\001"7/v2beta1/{parent=projects/*/knowledgeBases/*}/documents:\010documentZI"=/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents:\010document\332A\017parent,document\312A&\n\010Document\022\032KnowledgeOperationMetadata', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteDocument", @@ -1032,9 +1344,8 @@ containing_service=None, input_type=_DELETEDOCUMENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - "\202\323\344\223\002z*7/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}Z?*=/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" - ), + serialized_options=b"\202\323\344\223\002z*7/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}Z?*=/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}\332A\004name\312A3\n\025google.protobuf.Empty\022\032KnowledgeOperationMetadata", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateDocument", @@ -1043,9 +1354,8 @@ containing_service=None, input_type=_UPDATEDOCUMENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - "\202\323\344\223\002\240\0012@/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}:\010documentZR2F/v2beta1/{document.name=projects/*/agent/knowledgeBases/*/documents/*}:\010document" - ), + serialized_options=b"\202\323\344\223\002\240\0012@/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}:\010documentZR2F/v2beta1/{document.name=projects/*/agent/knowledgeBases/*/documents/*}:\010document\332A\024document,update_mask\332A\010document\312A&\n\010Document\022\032KnowledgeOperationMetadata", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ReloadDocument", @@ -1054,9 +1364,8 @@ containing_service=None, input_type=_RELOADDOCUMENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002\216\001">/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload:\001*ZI"D/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload:\001*' - ), + serialized_options=b'\202\323\344\223\002\216\001">/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload:\001*ZI"D/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}:reload:\001*\312A&\n\010Document\022\032KnowledgeOperationMetadata', + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2beta1/proto/document_pb2_grpc.py b/dialogflow_v2beta1/proto/document_pb2_grpc.py index e39f710e5..78f166583 100644 --- a/dialogflow_v2beta1/proto/document_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/document_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2beta1.proto import ( @@ -10,15 +11,15 @@ class DocumentsStub(object): - """Manages documents of a knowledge base. - """ + """Service for managing knowledge [Documents][google.cloud.dialogflow.v2beta1.Document]. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.ListDocuments = channel.unary_unary( "/google.cloud.dialogflow.v2beta1.Documents/ListDocuments", request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_document__pb2.ListDocumentsRequest.SerializeToString, @@ -52,15 +53,15 @@ def __init__(self, channel): class DocumentsServicer(object): - """Manages documents of a knowledge base. - """ + """Service for managing knowledge [Documents][google.cloud.dialogflow.v2beta1.Document]. + """ def ListDocuments(self, request, context): """Returns the list of all documents of the knowledge base. - Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - only use `projects.knowledgeBases.documents`. - """ + Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + only use `projects.knowledgeBases.documents`. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -68,9 +69,9 @@ def ListDocuments(self, request, context): def GetDocument(self, request, context): """Retrieves the specified document. - Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - only use `projects.knowledgeBases.documents`. - """ + Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + only use `projects.knowledgeBases.documents`. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -78,12 +79,9 @@ def GetDocument(self, request, context): def CreateDocument(self, request, context): """Creates a new document. - Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - only use `projects.knowledgeBases.documents`. - - Operation - """ + Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + only use `projects.knowledgeBases.documents`. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -91,12 +89,9 @@ def CreateDocument(self, request, context): def DeleteDocument(self, request, context): """Deletes the specified document. - Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - only use `projects.knowledgeBases.documents`. - - Operation - """ + Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + only use `projects.knowledgeBases.documents`. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -104,28 +99,22 @@ def DeleteDocument(self, request, context): def UpdateDocument(self, request, context): """Updates the specified document. - Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - only use `projects.knowledgeBases.documents`. - - Operation - """ + Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + only use `projects.knowledgeBases.documents`. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ReloadDocument(self, request, context): """Reloads the specified document from its specified source, content_uri or - content. The previously loaded content of the document will be deleted. - Note: Even when the content of the document has not changed, there still - may be side effects because of internal implementation changes. + content. The previously loaded content of the document will be deleted. + Note: Even when the content of the document has not changed, there still + may be side effects because of internal implementation changes. - Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; - only use `projects.knowledgeBases.documents`. - - Operation - """ + Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; + only use `projects.knowledgeBases.documents`. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -168,3 +157,171 @@ def add_DocumentsServicer_to_server(servicer, server): "google.cloud.dialogflow.v2beta1.Documents", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Documents(object): + """Service for managing knowledge [Documents][google.cloud.dialogflow.v2beta1.Document]. + """ + + @staticmethod + def ListDocuments( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Documents/ListDocuments", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_document__pb2.ListDocumentsRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_document__pb2.ListDocumentsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetDocument( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Documents/GetDocument", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_document__pb2.GetDocumentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_document__pb2.Document.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateDocument( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Documents/CreateDocument", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_document__pb2.CreateDocumentRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteDocument( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Documents/DeleteDocument", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_document__pb2.DeleteDocumentRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateDocument( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Documents/UpdateDocument", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_document__pb2.UpdateDocumentRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ReloadDocument( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Documents/ReloadDocument", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_document__pb2.ReloadDocumentRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2beta1/proto/entity_type.proto b/dialogflow_v2beta1/proto/entity_type.proto new file mode 100644 index 000000000..457c85916 --- /dev/null +++ b/dialogflow_v2beta1/proto/entity_type.proto @@ -0,0 +1,545 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "EntityTypeProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Service for managing [EntityTypes][google.cloud.dialogflow.v2beta1.EntityType]. +service EntityTypes { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all entity types in the specified agent. + rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*/agent}/entityTypes" + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes" + } + }; + option (google.api.method_signature) = "parent"; + option (google.api.method_signature) = "parent,language_code"; + } + + // Retrieves the specified entity type. + rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) { + option (google.api.http) = { + get: "/v2beta1/{name=projects/*/agent/entityTypes/*}" + additional_bindings { + get: "/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}" + } + }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,language_code"; + } + + // Creates an entity type in the specified agent. + rpc CreateEntityType(CreateEntityTypeRequest) returns (EntityType) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*/agent}/entityTypes" + body: "entity_type" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes" + body: "entity_type" + } + }; + option (google.api.method_signature) = "parent,entity_type"; + option (google.api.method_signature) = "parent,entity_type,language_code"; + } + + // Updates the specified entity type. + rpc UpdateEntityType(UpdateEntityTypeRequest) returns (EntityType) { + option (google.api.http) = { + patch: "/v2beta1/{entity_type.name=projects/*/agent/entityTypes/*}" + body: "entity_type" + additional_bindings { + patch: "/v2beta1/{entity_type.name=projects/*/locations/*/agent/entityTypes/*}" + body: "entity_type" + } + }; + option (google.api.method_signature) = "entity_type"; + option (google.api.method_signature) = "entity_type,language_code"; + option (google.api.method_signature) = "entity_type,language_code,update_mask"; + } + + // Deletes the specified entity type. + rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta1/{name=projects/*/agent/entityTypes/*}" + additional_bindings { + delete: "/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Updates/Creates multiple entity types in the specified agent. + // Operation + rpc BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate" + body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchUpdate" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse" + metadata_type: "google.protobuf.Struct" + }; + } + + // Deletes entity types in the specified agent. + // Operation + rpc BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete" + body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchDelete" + body: "*" + } + }; + option (google.api.method_signature) = "parent,entity_type_names"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Creates multiple new entities in the specified entity type. + // + // Operation + rpc BatchCreateEntities(BatchCreateEntitiesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate" + body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchCreate" + body: "*" + } + }; + option (google.api.method_signature) = "parent,entities"; + option (google.api.method_signature) = "parent,entities,language_code"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Updates or creates multiple entities in the specified entity type. This + // method does not affect entities in the entity type that aren't explicitly + // specified in the request. + // + // Operation + rpc BatchUpdateEntities(BatchUpdateEntitiesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate" + body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchUpdate" + body: "*" + } + }; + option (google.api.method_signature) = "parent,entities"; + option (google.api.method_signature) = "parent,entities,language_code"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Deletes entities in the specified entity type. + // + // Operation + rpc BatchDeleteEntities(BatchDeleteEntitiesRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete" + body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchDelete" + body: "*" + } + }; + option (google.api.method_signature) = "parent,entity_values"; + option (google.api.method_signature) = "parent,entity_values,language_code"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } +} + +// Each intent parameter has a type, called the entity type, which dictates +// exactly how data from an end-user expression is extracted. +// +// Dialogflow provides predefined system entities that can match many common +// types of data. For example, there are system entities for matching dates, +// times, colors, email addresses, and so on. You can also create your own +// custom entities for matching custom data. For example, you could define a +// vegetable entity that can match the types of vegetables available for +// purchase with a grocery store agent. +// +// For more information, see the +// [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview). +message EntityType { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/EntityType" + pattern: "projects/{project}/agent/entityTypes/{entity_type}" + pattern: "projects/{project}/locations/{location}/agent/entityTypes/{entity_type}" + }; + + // An **entity entry** for an associated entity type. + message Entity { + // Required. The primary value associated with this entity entry. + // For example, if the entity type is *vegetable*, the value could be + // *scallions*. + // + // For `KIND_MAP` entity types: + // + // * A reference value to be used in place of synonyms. + // + // For `KIND_LIST` entity types: + // + // * A string that can contain references to other entity types (with or + // without aliases). + string value = 1; + + // Required. A collection of value synonyms. For example, if the entity type + // is *vegetable*, and `value` is *scallions*, a synonym could be *green + // onions*. + // + // For `KIND_LIST` entity types: + // + // * This collection must contain exactly one synonym equal to `value`. + repeated string synonyms = 2; + } + + // Represents kinds of entities. + enum Kind { + // Not specified. This value should be never used. + KIND_UNSPECIFIED = 0; + + // Map entity types allow mapping of a group of synonyms to a reference + // value. + KIND_MAP = 1; + + // List entity types contain a set of entries that do not map to reference + // values. However, list entity types can contain references to other entity + // types (with or without aliases). + KIND_LIST = 2; + + // Regexp entity types allow to specify regular expressions in entries + // values. + KIND_REGEXP = 3; + } + + // Represents different entity type expansion modes. Automated expansion + // allows an agent to recognize values that have not been explicitly listed in + // the entity (for example, new kinds of shopping list items). + enum AutoExpansionMode { + // Auto expansion disabled for the entity. + AUTO_EXPANSION_MODE_UNSPECIFIED = 0; + + // Allows an agent to recognize values that have not been explicitly + // listed in the entity. + AUTO_EXPANSION_MODE_DEFAULT = 1; + } + + // The unique identifier of the entity type. + // Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType] and + // [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes] methods. + // Format: `projects//agent/entityTypes/`. + string name = 1; + + // Required. The name of the entity type. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Indicates the kind of entity type. + Kind kind = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates whether the entity type can be automatically + // expanded. + AutoExpansionMode auto_expansion_mode = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of entity entries associated with the entity type. + repeated Entity entities = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Enables fuzzy entity extraction during classification. + bool enable_fuzzy_extraction = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes]. +message ListEntityTypesRequest { + // Required. The agent to list all entity types from. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes]. +message ListEntityTypesResponse { + // The list of agent entity types. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated EntityType entity_types = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType]. +message GetEntityTypeRequest { + // Required. The name of the entity type. + // Format: `projects//agent/entityTypes/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.CreateEntityType]. +message CreateEntityTypeRequest { + // Required. The agent to create a entity type for. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The entity type to create. + EntityType entity_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType]. +message UpdateEntityTypeRequest { + // Required. The entity type to update. + EntityType entity_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.DeleteEntityType]. +message DeleteEntityTypeRequest { + // Required. The name of the entity type to delete. + // Format: `projects//agent/entityTypes/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; +} + +// The request message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]. +message BatchUpdateEntityTypesRequest { + // Required. The name of the agent to update or create entity types in. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // The source of the entity type batch. + // + // For each entity type in the batch: + // + // * If `name` is specified, we update an existing entity type. + // * If `name` is not specified, we create a new entity type. + oneof entity_type_batch { + // The URI to a Google Cloud Storage file containing entity types to update + // or create. The file format can either be a serialized proto (of + // EntityBatch type) or a JSON object. Note: The URI must start with + // "gs://". + string entity_type_batch_uri = 2; + + // The collection of entity types to update or create. + EntityTypeBatch entity_type_batch_inline = 3; + } + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]. +message BatchUpdateEntityTypesResponse { + // The collection of updated or created entity types. + repeated EntityType entity_types = 1; +} + +// The request message for [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypes]. +message BatchDeleteEntityTypesRequest { + // Required. The name of the agent to delete all entities types for. Format: + // `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The names entity types to delete. All names must point to the + // same agent as `parent`. + repeated string entity_type_names = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntities]. +message BatchCreateEntitiesRequest { + // Required. The name of the entity type to create entities in. Format: + // `projects//agent/entityTypes/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The entities to create. + repeated EntityType.Entity entities = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntities]. +message BatchUpdateEntitiesRequest { + // Required. The name of the entity type to update or create entities in. + // Format: `projects//agent/entityTypes/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The entities to update or create. + repeated EntityType.Entity entities = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 4; +} + +// The request message for [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntities]. +message BatchDeleteEntitiesRequest { + // Required. The name of the entity type to delete entries for. Format: + // `projects//agent/entityTypes/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The reference `values` of the entities to delete. Note that + // these are not fully-qualified names, i.e. they don't start with + // `projects/`. + repeated string entity_values = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// This message is a wrapper around a collection of entity types. +message EntityTypeBatch { + // A collection of entity types. + repeated EntityType entity_types = 1; +} diff --git a/dialogflow_v2beta1/proto/entity_type_pb2.py b/dialogflow_v2beta1/proto/entity_type_pb2.py index 160313efb..3037fecec 100644 --- a/dialogflow_v2beta1/proto/entity_type_pb2.py +++ b/dialogflow_v2beta1/proto/entity_type_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/entity_type.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -16,6 +13,7 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.longrunning import ( @@ -23,27 +21,23 @@ ) from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="google/cloud/dialogflow_v2beta1/proto/entity_type.proto", package="google.cloud.dialogflow.v2beta1", syntax="proto3", - serialized_options=_b( - "\n#com.google.cloud.dialogflow.v2beta1B\017EntityTypeProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1" - ), - serialized_pb=_b( - '\n7google/cloud/dialogflow_v2beta1/proto/entity_type.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/api/client.proto"\x85\x04\n\nEntityType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12>\n\x04kind\x18\x03 \x01(\x0e\x32\x30.google.cloud.dialogflow.v2beta1.EntityType.Kind\x12Z\n\x13\x61uto_expansion_mode\x18\x04 \x01(\x0e\x32=.google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode\x12\x44\n\x08\x65ntities\x18\x06 \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.EntityType.Entity\x12\x1f\n\x17\x65nable_fuzzy_extraction\x18\x07 \x01(\x08\x1a)\n\x06\x45ntity\x12\r\n\x05value\x18\x01 \x01(\t\x12\x10\n\x08synonyms\x18\x02 \x03(\t"J\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x0c\n\x08KIND_MAP\x10\x01\x12\r\n\tKIND_LIST\x10\x02\x12\x0f\n\x0bKIND_REGEXP\x10\x03"Y\n\x11\x41utoExpansionMode\x12#\n\x1f\x41UTO_EXPANSION_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x41UTO_EXPANSION_MODE_DEFAULT\x10\x01"f\n\x16ListEntityTypesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t"u\n\x17ListEntityTypesResponse\x12\x41\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32+.google.cloud.dialogflow.v2beta1.EntityType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t";\n\x14GetEntityTypeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t"\x82\x01\n\x17\x43reateEntityTypeRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12@\n\x0b\x65ntity_type\x18\x02 \x01(\x0b\x32+.google.cloud.dialogflow.v2beta1.EntityType\x12\x15\n\rlanguage_code\x18\x03 \x01(\t"\xa3\x01\n\x17UpdateEntityTypeRequest\x12@\n\x0b\x65ntity_type\x18\x01 \x01(\x0b\x32+.google.cloud.dialogflow.v2beta1.EntityType\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"\'\n\x17\x44\x65leteEntityTypeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x83\x02\n\x1d\x42\x61tchUpdateEntityTypesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x1f\n\x15\x65ntity_type_batch_uri\x18\x02 \x01(\tH\x00\x12T\n\x18\x65ntity_type_batch_inline\x18\x03 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2beta1.EntityTypeBatchH\x00\x12\x15\n\rlanguage_code\x18\x04 \x01(\t\x12/\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x13\n\x11\x65ntity_type_batch"c\n\x1e\x42\x61tchUpdateEntityTypesResponse\x12\x41\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32+.google.cloud.dialogflow.v2beta1.EntityType"J\n\x1d\x42\x61tchDeleteEntityTypesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x19\n\x11\x65ntity_type_names\x18\x02 \x03(\t"\x89\x01\n\x1a\x42\x61tchCreateEntitiesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x44\n\x08\x65ntities\x18\x02 \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.EntityType.Entity\x12\x15\n\rlanguage_code\x18\x03 \x01(\t"\xba\x01\n\x1a\x42\x61tchUpdateEntitiesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x44\n\x08\x65ntities\x18\x02 \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.EntityType.Entity\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"Z\n\x1a\x42\x61tchDeleteEntitiesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x15\n\rentity_values\x18\x02 \x03(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t"T\n\x0f\x45ntityTypeBatch\x12\x41\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32+.google.cloud.dialogflow.v2beta1.EntityType2\x81\x16\n\x0b\x45ntityTypes\x12\xfa\x01\n\x0fListEntityTypes\x12\x37.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest\x1a\x38.google.cloud.dialogflow.v2beta1.ListEntityTypesResponse"t\x82\xd3\xe4\x93\x02n\x12./v2beta1/{parent=projects/*/agent}/entityTypesZ<\x12:/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes\x12\xe9\x01\n\rGetEntityType\x12\x35.google.cloud.dialogflow.v2beta1.GetEntityTypeRequest\x1a+.google.cloud.dialogflow.v2beta1.EntityType"t\x82\xd3\xe4\x93\x02n\x12./v2beta1/{name=projects/*/agent/entityTypes/*}Z<\x12:/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}\x12\x8b\x02\n\x10\x43reateEntityType\x12\x38.google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest\x1a+.google.cloud.dialogflow.v2beta1.EntityType"\x8f\x01\x82\xd3\xe4\x93\x02\x88\x01"./v2beta1/{parent=projects/*/agent}/entityTypes:\x0b\x65ntity_typeZI":/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:\x0b\x65ntity_type\x12\xa3\x02\n\x10UpdateEntityType\x12\x38.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest\x1a+.google.cloud.dialogflow.v2beta1.EntityType"\xa7\x01\x82\xd3\xe4\x93\x02\xa0\x01\x32:/v2beta1/{entity_type.name=projects/*/agent/entityTypes/*}:\x0b\x65ntity_typeZU2F/v2beta1/{entity_type.name=projects/*/locations/*/agent/entityTypes/*}:\x0b\x65ntity_type\x12\xda\x01\n\x10\x44\x65leteEntityType\x12\x38.google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest\x1a\x16.google.protobuf.Empty"t\x82\xd3\xe4\x93\x02n*./v2beta1/{name=projects/*/agent/entityTypes/*}Z<*:/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}\x12\x8d\x02\n\x16\x42\x61tchUpdateEntityTypes\x12>.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest\x1a\x1d.google.longrunning.Operation"\x93\x01\x82\xd3\xe4\x93\x02\x8c\x01":/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate:\x01*ZK"F/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchUpdate:\x01*\x12\x8d\x02\n\x16\x42\x61tchDeleteEntityTypes\x12>.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest\x1a\x1d.google.longrunning.Operation"\x93\x01\x82\xd3\xe4\x93\x02\x8c\x01":/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete:\x01*ZK"F/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchDelete:\x01*\x12\x9d\x02\n\x13\x42\x61tchCreateEntities\x12;.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest\x1a\x1d.google.longrunning.Operation"\xa9\x01\x82\xd3\xe4\x93\x02\xa2\x01"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate:\x01*ZV"Q/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchCreate:\x01*\x12\x9d\x02\n\x13\x42\x61tchUpdateEntities\x12;.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest\x1a\x1d.google.longrunning.Operation"\xa9\x01\x82\xd3\xe4\x93\x02\xa2\x01"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\x01*ZV"Q/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchUpdate:\x01*\x12\x9d\x02\n\x13\x42\x61tchDeleteEntities\x12;.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest\x1a\x1d.google.longrunning.Operation"\xa9\x01\x82\xd3\xe4\x93\x02\xa2\x01"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\x01*ZV"Q/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchDelete:\x01*\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xad\x01\n#com.google.cloud.dialogflow.v2beta1B\x0f\x45ntityTypeProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3' - ), + serialized_options=b"\n#com.google.cloud.dialogflow.v2beta1B\017EntityTypeProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n7google/cloud/dialogflow_v2beta1/proto/entity_type.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\xc8\x05\n\nEntityType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x04kind\x18\x03 \x01(\x0e\x32\x30.google.cloud.dialogflow.v2beta1.EntityType.KindB\x03\xe0\x41\x02\x12_\n\x13\x61uto_expansion_mode\x18\x04 \x01(\x0e\x32=.google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionModeB\x03\xe0\x41\x01\x12I\n\x08\x65ntities\x18\x06 \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.EntityType.EntityB\x03\xe0\x41\x01\x12$\n\x17\x65nable_fuzzy_extraction\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x1a)\n\x06\x45ntity\x12\r\n\x05value\x18\x01 \x01(\t\x12\x10\n\x08synonyms\x18\x02 \x03(\t"J\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x0c\n\x08KIND_MAP\x10\x01\x12\r\n\tKIND_LIST\x10\x02\x12\x0f\n\x0bKIND_REGEXP\x10\x03"Y\n\x11\x41utoExpansionMode\x12#\n\x1f\x41UTO_EXPANSION_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x41UTO_EXPANSION_MODE_DEFAULT\x10\x01:\xa7\x01\xea\x41\xa3\x01\n$dialogflow.googleapis.com/EntityType\x12\x32projects/{project}/agent/entityTypes/{entity_type}\x12Gprojects/{project}/locations/{location}/agent/entityTypes/{entity_type}"\xa3\x01\n\x16ListEntityTypesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dialogflow.googleapis.com/EntityType\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01"u\n\x17ListEntityTypesResponse\x12\x41\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32+.google.cloud.dialogflow.v2beta1.EntityType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"n\n\x14GetEntityTypeRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01"\xba\x01\n\x17\x43reateEntityTypeRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dialogflow.googleapis.com/EntityType\x12\x45\n\x0b\x65ntity_type\x18\x02 \x01(\x0b\x32+.google.cloud.dialogflow.v2beta1.EntityTypeB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01"\xb2\x01\n\x17UpdateEntityTypeRequest\x12\x45\n\x0b\x65ntity_type\x18\x01 \x01(\x0b\x32+.google.cloud.dialogflow.v2beta1.EntityTypeB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01"U\n\x17\x44\x65leteEntityTypeRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType"\xbb\x02\n\x1d\x42\x61tchUpdateEntityTypesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dialogflow.googleapis.com/EntityType\x12\x1f\n\x15\x65ntity_type_batch_uri\x18\x02 \x01(\tH\x00\x12T\n\x18\x65ntity_type_batch_inline\x18\x03 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2beta1.EntityTypeBatchH\x00\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x42\x13\n\x11\x65ntity_type_batch"c\n\x1e\x42\x61tchUpdateEntityTypesResponse\x12\x41\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32+.google.cloud.dialogflow.v2beta1.EntityType"}\n\x1d\x42\x61tchDeleteEntityTypesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$dialogflow.googleapis.com/EntityType\x12\x1e\n\x11\x65ntity_type_names\x18\x02 \x03(\tB\x03\xe0\x41\x02"\xc1\x01\n\x1a\x42\x61tchCreateEntitiesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12I\n\x08\x65ntities\x18\x02 \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.EntityType.EntityB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01"\xf2\x01\n\x1a\x42\x61tchUpdateEntitiesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12I\n\x08\x65ntities\x18\x02 \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.EntityType.EntityB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"\x92\x01\n\x1a\x42\x61tchDeleteEntitiesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dialogflow.googleapis.com/EntityType\x12\x1a\n\rentity_values\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01"T\n\x0f\x45ntityTypeBatch\x12\x41\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32+.google.cloud.dialogflow.v2beta1.EntityType2\xae\x1b\n\x0b\x45ntityTypes\x12\x9b\x02\n\x0fListEntityTypes\x12\x37.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest\x1a\x38.google.cloud.dialogflow.v2beta1.ListEntityTypesResponse"\x94\x01\x82\xd3\xe4\x93\x02n\x12./v2beta1/{parent=projects/*/agent}/entityTypesZ<\x12:/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes\xda\x41\x06parent\xda\x41\x14parent,language_code\x12\x86\x02\n\rGetEntityType\x12\x35.google.cloud.dialogflow.v2beta1.GetEntityTypeRequest\x1a+.google.cloud.dialogflow.v2beta1.EntityType"\x90\x01\x82\xd3\xe4\x93\x02n\x12./v2beta1/{name=projects/*/agent/entityTypes/*}Z<\x12:/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}\xda\x41\x04name\xda\x41\x12name,language_code\x12\xc3\x02\n\x10\x43reateEntityType\x12\x38.google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest\x1a+.google.cloud.dialogflow.v2beta1.EntityType"\xc7\x01\x82\xd3\xe4\x93\x02\x88\x01"./v2beta1/{parent=projects/*/agent}/entityTypes:\x0b\x65ntity_typeZI":/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:\x0b\x65ntity_type\xda\x41\x12parent,entity_type\xda\x41 parent,entity_type,language_code\x12\xf5\x02\n\x10UpdateEntityType\x12\x38.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest\x1a+.google.cloud.dialogflow.v2beta1.EntityType"\xf9\x01\x82\xd3\xe4\x93\x02\xa0\x01\x32:/v2beta1/{entity_type.name=projects/*/agent/entityTypes/*}:\x0b\x65ntity_typeZU2F/v2beta1/{entity_type.name=projects/*/locations/*/agent/entityTypes/*}:\x0b\x65ntity_type\xda\x41\x0b\x65ntity_type\xda\x41\x19\x65ntity_type,language_code\xda\x41%entity_type,language_code,update_mask\x12\xe1\x01\n\x10\x44\x65leteEntityType\x12\x38.google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest\x1a\x16.google.protobuf.Empty"{\x82\xd3\xe4\x93\x02n*./v2beta1/{name=projects/*/agent/entityTypes/*}Z<*:/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}\xda\x41\x04name\x12\xe8\x02\n\x16\x42\x61tchUpdateEntityTypes\x12>.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest\x1a\x1d.google.longrunning.Operation"\xee\x01\x82\xd3\xe4\x93\x02\x8c\x01":/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate:\x01*ZK"F/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchUpdate:\x01*\xca\x41X\n>google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse\x12\x16google.protobuf.Struct\x12\xda\x02\n\x16\x42\x61tchDeleteEntityTypes\x12>.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest\x1a\x1d.google.longrunning.Operation"\xe0\x01\x82\xd3\xe4\x93\x02\x8c\x01":/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete:\x01*ZK"F/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchDelete:\x01*\xda\x41\x18parent,entity_type_names\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\x81\x03\n\x13\x42\x61tchCreateEntities\x12;.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest\x1a\x1d.google.longrunning.Operation"\x8d\x02\x82\xd3\xe4\x93\x02\xa2\x01"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate:\x01*ZV"Q/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchCreate:\x01*\xda\x41\x0fparent,entities\xda\x41\x1dparent,entities,language_code\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\x81\x03\n\x13\x42\x61tchUpdateEntities\x12;.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest\x1a\x1d.google.longrunning.Operation"\x8d\x02\x82\xd3\xe4\x93\x02\xa2\x01"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\x01*ZV"Q/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchUpdate:\x01*\xda\x41\x0fparent,entities\xda\x41\x1dparent,entities,language_code\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x12\x8b\x03\n\x13\x42\x61tchDeleteEntities\x12;.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest\x1a\x1d.google.longrunning.Operation"\x97\x02\x82\xd3\xe4\x93\x02\xa2\x01"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\x01*ZV"Q/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchDelete:\x01*\xda\x41\x14parent,entity_values\xda\x41"parent,entity_values,language_code\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xad\x01\n#com.google.cloud.dialogflow.v2beta1B\x0f\x45ntityTypeProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_longrunning_dot_operations__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -53,6 +47,7 @@ full_name="google.cloud.dialogflow.v2beta1.EntityType.Kind", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="KIND_UNSPECIFIED", @@ -60,21 +55,37 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="KIND_MAP", index=1, number=1, serialized_options=None, type=None + name="KIND_MAP", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="KIND_LIST", index=2, number=2, serialized_options=None, type=None + name="KIND_LIST", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="KIND_REGEXP", index=3, number=3, serialized_options=None, type=None + name="KIND_REGEXP", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=660, - serialized_end=734, + serialized_start=685, + serialized_end=759, ) _sym_db.RegisterEnumDescriptor(_ENTITYTYPE_KIND) @@ -83,6 +94,7 @@ full_name="google.cloud.dialogflow.v2beta1.EntityType.AutoExpansionMode", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="AUTO_EXPANSION_MODE_UNSPECIFIED", @@ -90,6 +102,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="AUTO_EXPANSION_MODE_DEFAULT", @@ -97,12 +110,13 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=736, - serialized_end=825, + serialized_start=761, + serialized_end=850, ) _sym_db.RegisterEnumDescriptor(_ENTITYTYPE_AUTOEXPANSIONMODE) @@ -113,6 +127,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="value", @@ -123,7 +138,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -131,6 +146,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="synonyms", @@ -149,6 +165,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -159,8 +176,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=617, - serialized_end=658, + serialized_start=642, + serialized_end=683, ) _ENTITYTYPE = _descriptor.Descriptor( @@ -169,6 +186,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -179,7 +197,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -187,6 +205,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -197,14 +216,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="kind", @@ -221,8 +241,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="auto_expansion_mode", @@ -239,8 +260,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entities", @@ -257,8 +279,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="enable_fuzzy_extraction", @@ -275,20 +298,21 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[_ENTITYTYPE_ENTITY], enum_types=[_ENTITYTYPE_KIND, _ENTITYTYPE_AUTOEXPANSIONMODE], - serialized_options=None, + serialized_options=b"\352A\243\001\n$dialogflow.googleapis.com/EntityType\0222projects/{project}/agent/entityTypes/{entity_type}\022Gprojects/{project}/locations/{location}/agent/entityTypes/{entity_type}", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], serialized_start=308, - serialized_end=825, + serialized_end=1020, ) @@ -298,6 +322,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -308,14 +333,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A&\022$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -326,14 +352,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -350,8 +377,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -362,14 +390,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -380,8 +409,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=827, - serialized_end=929, + serialized_start=1023, + serialized_end=1186, ) @@ -391,6 +420,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entity_types", @@ -409,6 +439,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -419,7 +450,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -427,6 +458,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -437,8 +469,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=931, - serialized_end=1048, + serialized_start=1188, + serialized_end=1305, ) @@ -448,6 +480,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -458,14 +491,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -476,14 +510,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -494,8 +529,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1050, - serialized_end=1109, + serialized_start=1307, + serialized_end=1417, ) @@ -505,6 +540,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -515,14 +551,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A&\022$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_type", @@ -539,8 +576,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -551,14 +589,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -569,8 +608,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1112, - serialized_end=1242, + serialized_start=1420, + serialized_end=1606, ) @@ -580,6 +619,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entity_type", @@ -596,8 +636,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -608,14 +649,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -632,8 +674,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -644,8 +687,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1245, - serialized_end=1408, + serialized_start=1609, + serialized_end=1787, ) @@ -655,6 +698,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -665,14 +709,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -683,8 +728,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1410, - serialized_end=1449, + serialized_start=1789, + serialized_end=1874, ) @@ -694,6 +739,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -704,14 +750,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A&\022$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_type_batch_uri", @@ -722,7 +769,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -730,6 +777,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_type_batch_inline", @@ -748,6 +796,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -758,14 +807,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -782,8 +832,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -799,11 +850,12 @@ full_name="google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.entity_type_batch", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=1452, - serialized_end=1711, + serialized_start=1877, + serialized_end=2192, ) @@ -813,6 +865,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entity_types", @@ -831,6 +884,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -841,8 +895,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1713, - serialized_end=1812, + serialized_start=2194, + serialized_end=2293, ) @@ -852,6 +906,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -862,14 +917,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A&\022$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_type_names", @@ -886,8 +942,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -898,8 +955,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1814, - serialized_end=1888, + serialized_start=2295, + serialized_end=2420, ) @@ -909,6 +966,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -919,14 +977,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entities", @@ -943,8 +1002,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -955,14 +1015,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -973,8 +1034,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1891, - serialized_end=2028, + serialized_start=2423, + serialized_end=2616, ) @@ -984,6 +1045,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -994,14 +1056,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entities", @@ -1018,8 +1081,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -1030,14 +1094,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1056,6 +1121,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1066,8 +1132,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2031, - serialized_end=2217, + serialized_start=2619, + serialized_end=2861, ) @@ -1077,6 +1143,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1087,14 +1154,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A&\n$dialogflow.googleapis.com/EntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_values", @@ -1111,8 +1179,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -1123,14 +1192,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1141,8 +1211,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2219, - serialized_end=2309, + serialized_start=2864, + serialized_end=3010, ) @@ -1152,6 +1222,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entity_types", @@ -1170,6 +1241,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1180,8 +1252,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2311, - serialized_end=2395, + serialized_start=3012, + serialized_end=3096, ) _ENTITYTYPE_ENTITY.containing_type = _ENTITYTYPE @@ -1256,15 +1328,14 @@ EntityType = _reflection.GeneratedProtocolMessageType( "EntityType", (_message.Message,), - dict( - Entity=_reflection.GeneratedProtocolMessageType( + { + "Entity": _reflection.GeneratedProtocolMessageType( "Entity", (_message.Message,), - dict( - DESCRIPTOR=_ENTITYTYPE_ENTITY, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""An **entity entry** for an associated entity type. - + { + "DESCRIPTOR": _ENTITYTYPE_ENTITY, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """An **entity entry** for an associated entity type. Attributes: value: @@ -1282,13 +1353,20 @@ equal to ``value``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.EntityType.Entity) - ), + }, ), - DESCRIPTOR=_ENTITYTYPE, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""Represents an entity type. Entity types serve as a tool - for extracting parameter values from natural language queries. - + "DESCRIPTOR": _ENTITYTYPE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """Each intent parameter has a type, called the entity type, which + dictates exactly how data from an end-user expression is extracted. + Dialogflow provides predefined system entities that can match many + common types of data. For example, there are system entities for + matching dates, times, colors, email addresses, and so on. You can + also create your own custom entities for matching custom data. For + example, you could define a vegetable entity that can match the types + of vegetables available for purchase with a grocery store agent. For + more information, see the `Entity guide + `__. Attributes: name: @@ -1313,7 +1391,7 @@ classification. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.EntityType) - ), + }, ) _sym_db.RegisterMessage(EntityType) _sym_db.RegisterMessage(EntityType.Entity) @@ -1321,94 +1399,89 @@ ListEntityTypesRequest = _reflection.GeneratedProtocolMessageType( "ListEntityTypesRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTENTITYTYPESREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes]. - + { + "DESCRIPTOR": _LISTENTITYTYPESREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.ListEntityTypes][google.cloud.dia + logflow.v2beta1.EntityTypes.ListEntityTypes]. Attributes: parent: Required. The agent to list all entity types from. Format: ``projects//agent``. language_code: - Optional. The language to list entity synonyms for. If not - specified, the agent's default language is used. `Many - languages `__ are supported. Note: languages must be enabled in - the agent before they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. page_size: Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. page_token: - Optional. The next\_page\_token value returned from a previous + Optional. The next_page_token value returned from a previous list request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListEntityTypesRequest) - ), + }, ) _sym_db.RegisterMessage(ListEntityTypesRequest) ListEntityTypesResponse = _reflection.GeneratedProtocolMessageType( "ListEntityTypesResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTENTITYTYPESRESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""The response message for - [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes]. - + { + "DESCRIPTOR": _LISTENTITYTYPESRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """The response message for [EntityTypes.ListEntityTypes][google.cloud.di + alogflow.v2beta1.EntityTypes.ListEntityTypes]. Attributes: entity_types: The list of agent entity types. There will be a maximum number - of items returned based on the page\_size field in the - request. + of items returned based on the page_size field in the request. next_page_token: Token to retrieve the next page of results, or empty if there are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListEntityTypesResponse) - ), + }, ) _sym_db.RegisterMessage(ListEntityTypesResponse) GetEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "GetEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.GetEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType]. - + { + "DESCRIPTOR": _GETENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.GetEntityType][google.cloud.dialo + gflow.v2beta1.EntityTypes.GetEntityType]. Attributes: name: Required. The name of the entity type. Format: ``projects//agent/entityTypes/``. language_code: - Optional. The language to retrieve entity synonyms for. If not - specified, the agent's default language is used. `Many - languages `__ are supported. Note: languages must be enabled in - the agent before they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.GetEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(GetEntityTypeRequest) CreateEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "CreateEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.CreateEntityType]. - + { + "DESCRIPTOR": _CREATEENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.CreateEntityType][google.cloud.di + alogflow.v2beta1.EntityTypes.CreateEntityType]. Attributes: parent: @@ -1417,55 +1490,51 @@ entity_type: Required. The entity type to create. language_code: - Optional. The language of entity synonyms defined in - ``entity_type``. If not specified, the agent's default - language is used. `Many languages `__ are supported. Note: - languages must be enabled in the agent before they can be - used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(CreateEntityTypeRequest) UpdateEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "UpdateEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATEENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType]. - + { + "DESCRIPTOR": _UPDATEENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.UpdateEntityType][google.cloud.di + alogflow.v2beta1.EntityTypes.UpdateEntityType]. Attributes: entity_type: Required. The entity type to update. language_code: - Optional. The language of entity synonyms defined in - ``entity_type``. If not specified, the agent's default - language is used. `Many languages `__ are supported. Note: - languages must be enabled in the agent before they can be - used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. update_mask: Optional. The mask to control which fields get updated. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateEntityTypeRequest) DeleteEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "DeleteEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.DeleteEntityType]. - + { + "DESCRIPTOR": _DELETEENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.DeleteEntityType][google.cloud.di + alogflow.v2beta1.EntityTypes.DeleteEntityType]. Attributes: name: @@ -1473,79 +1542,75 @@ ``projects//agent/entityTypes/``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteEntityTypeRequest) BatchUpdateEntityTypesRequest = _reflection.GeneratedProtocolMessageType( "BatchUpdateEntityTypesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHUPDATEENTITYTYPESREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]. - + { + "DESCRIPTOR": _BATCHUPDATEENTITYTYPESREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.BatchUpdateEntityTypes][google.cl + oud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]. Attributes: parent: Required. The name of the agent to update or create entity types in. Format: ``projects//agent``. entity_type_batch: - Required. The source of the entity type batch. For each - entity type in the batch: - If ``name`` is specified, we - update an existing entity type. - If ``name`` is not - specified, we create a new entity type. + The source of the entity type batch. For each entity type in + the batch: - If ``name`` is specified, we update an existing + entity type. - If ``name`` is not specified, we create a new + entity type. entity_type_batch_uri: The URI to a Google Cloud Storage file containing entity types to update or create. The file format can either be a serialized proto (of EntityBatch type) or a JSON object. Note: - The URI must start with "gs://". + The URI must start with “gs://”. entity_type_batch_inline: The collection of entity types to update or create. language_code: - Optional. The language of entity synonyms defined in - ``entity_types``. If not specified, the agent's default - language is used. `Many languages `__ are supported. Note: - languages must be enabled in the agent before they can be - used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. update_mask: Optional. The mask to control which fields get updated. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchUpdateEntityTypesRequest) BatchUpdateEntityTypesResponse = _reflection.GeneratedProtocolMessageType( "BatchUpdateEntityTypesResponse", (_message.Message,), - dict( - DESCRIPTOR=_BATCHUPDATEENTITYTYPESRESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""The response message for - [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]. - + { + "DESCRIPTOR": _BATCHUPDATEENTITYTYPESRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """The response message for [EntityTypes.BatchUpdateEntityTypes][google.c + loud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]. Attributes: entity_types: The collection of updated or created entity types. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse) - ), + }, ) _sym_db.RegisterMessage(BatchUpdateEntityTypesResponse) BatchDeleteEntityTypesRequest = _reflection.GeneratedProtocolMessageType( "BatchDeleteEntityTypesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHDELETEENTITYTYPESREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypes]. - + { + "DESCRIPTOR": _BATCHDELETEENTITYTYPESREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.BatchDeleteEntityTypes][google.cl + oud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypes]. Attributes: parent: @@ -1556,19 +1621,18 @@ point to the same agent as ``parent``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchDeleteEntityTypesRequest) BatchCreateEntitiesRequest = _reflection.GeneratedProtocolMessageType( "BatchCreateEntitiesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHCREATEENTITIESREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntities]. - + { + "DESCRIPTOR": _BATCHCREATEENTITIESREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.BatchCreateEntities][google.cloud + .dialogflow.v2beta1.EntityTypes.BatchCreateEntities]. Attributes: parent: @@ -1578,26 +1642,25 @@ entities: Required. The entities to create. language_code: - Optional. The language of entity synonyms defined in - ``entities``. If not specified, the agent's default language - is used. `Many languages `__ are supported. Note: languages - must be enabled in the agent before they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchCreateEntitiesRequest) BatchUpdateEntitiesRequest = _reflection.GeneratedProtocolMessageType( "BatchUpdateEntitiesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHUPDATEENTITIESREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntities]. - + { + "DESCRIPTOR": _BATCHUPDATEENTITIESREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.BatchUpdateEntities][google.cloud + .dialogflow.v2beta1.EntityTypes.BatchUpdateEntities]. Attributes: parent: @@ -1607,28 +1670,27 @@ entities: Required. The entities to update or create. language_code: - Optional. The language of entity synonyms defined in - ``entities``. If not specified, the agent's default language - is used. `Many languages `__ are supported. Note: languages - must be enabled in the agent before they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. update_mask: Optional. The mask to control which fields get updated. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchUpdateEntitiesRequest) BatchDeleteEntitiesRequest = _reflection.GeneratedProtocolMessageType( "BatchDeleteEntitiesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHDELETEENTITIESREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""The request message for - [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntities]. - + { + "DESCRIPTOR": _BATCHDELETEENTITIESREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """The request message for [EntityTypes.BatchDeleteEntities][google.cloud + .dialogflow.v2beta1.EntityTypes.BatchDeleteEntities]. Attributes: parent: @@ -1637,52 +1699,82 @@ ID>``. entity_values: Required. The reference ``values`` of the entities to delete. - Note that these are not fully-qualified names, i.e. they don't + Note that these are not fully-qualified names, i.e. they don’t start with ``projects/``. language_code: - Optional. The language of entity synonyms defined in - ``entities``. If not specified, the agent's default language - is used. `Many languages `__ are supported. Note: languages - must be enabled in the agent before they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchDeleteEntitiesRequest) EntityTypeBatch = _reflection.GeneratedProtocolMessageType( "EntityTypeBatch", (_message.Message,), - dict( - DESCRIPTOR=_ENTITYTYPEBATCH, - __module__="google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", - __doc__="""This message is a wrapper around a collection of entity - types. - + { + "DESCRIPTOR": _ENTITYTYPEBATCH, + "__module__": "google.cloud.dialogflow_v2beta1.proto.entity_type_pb2", + "__doc__": """This message is a wrapper around a collection of entity types. Attributes: entity_types: A collection of entity types. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.EntityTypeBatch) - ), + }, ) _sym_db.RegisterMessage(EntityTypeBatch) DESCRIPTOR._options = None +_ENTITYTYPE.fields_by_name["display_name"]._options = None +_ENTITYTYPE.fields_by_name["kind"]._options = None +_ENTITYTYPE.fields_by_name["auto_expansion_mode"]._options = None +_ENTITYTYPE.fields_by_name["entities"]._options = None +_ENTITYTYPE.fields_by_name["enable_fuzzy_extraction"]._options = None +_ENTITYTYPE._options = None +_LISTENTITYTYPESREQUEST.fields_by_name["parent"]._options = None +_LISTENTITYTYPESREQUEST.fields_by_name["language_code"]._options = None +_LISTENTITYTYPESREQUEST.fields_by_name["page_size"]._options = None +_LISTENTITYTYPESREQUEST.fields_by_name["page_token"]._options = None +_GETENTITYTYPEREQUEST.fields_by_name["name"]._options = None +_GETENTITYTYPEREQUEST.fields_by_name["language_code"]._options = None +_CREATEENTITYTYPEREQUEST.fields_by_name["parent"]._options = None +_CREATEENTITYTYPEREQUEST.fields_by_name["entity_type"]._options = None +_CREATEENTITYTYPEREQUEST.fields_by_name["language_code"]._options = None +_UPDATEENTITYTYPEREQUEST.fields_by_name["entity_type"]._options = None +_UPDATEENTITYTYPEREQUEST.fields_by_name["language_code"]._options = None +_UPDATEENTITYTYPEREQUEST.fields_by_name["update_mask"]._options = None +_DELETEENTITYTYPEREQUEST.fields_by_name["name"]._options = None +_BATCHUPDATEENTITYTYPESREQUEST.fields_by_name["parent"]._options = None +_BATCHUPDATEENTITYTYPESREQUEST.fields_by_name["language_code"]._options = None +_BATCHUPDATEENTITYTYPESREQUEST.fields_by_name["update_mask"]._options = None +_BATCHDELETEENTITYTYPESREQUEST.fields_by_name["parent"]._options = None +_BATCHDELETEENTITYTYPESREQUEST.fields_by_name["entity_type_names"]._options = None +_BATCHCREATEENTITIESREQUEST.fields_by_name["parent"]._options = None +_BATCHCREATEENTITIESREQUEST.fields_by_name["entities"]._options = None +_BATCHCREATEENTITIESREQUEST.fields_by_name["language_code"]._options = None +_BATCHUPDATEENTITIESREQUEST.fields_by_name["parent"]._options = None +_BATCHUPDATEENTITIESREQUEST.fields_by_name["entities"]._options = None +_BATCHUPDATEENTITIESREQUEST.fields_by_name["language_code"]._options = None +_BATCHDELETEENTITIESREQUEST.fields_by_name["parent"]._options = None +_BATCHDELETEENTITIESREQUEST.fields_by_name["entity_values"]._options = None +_BATCHDELETEENTITIESREQUEST.fields_by_name["language_code"]._options = None _ENTITYTYPES = _descriptor.ServiceDescriptor( name="EntityTypes", full_name="google.cloud.dialogflow.v2beta1.EntityTypes", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), - serialized_start=2398, - serialized_end=5215, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=3099, + serialized_end=6601, methods=[ _descriptor.MethodDescriptor( name="ListEntityTypes", @@ -1691,9 +1783,8 @@ containing_service=None, input_type=_LISTENTITYTYPESREQUEST, output_type=_LISTENTITYTYPESRESPONSE, - serialized_options=_b( - "\202\323\344\223\002n\022./v2beta1/{parent=projects/*/agent}/entityTypesZ<\022:/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes" - ), + serialized_options=b"\202\323\344\223\002n\022./v2beta1/{parent=projects/*/agent}/entityTypesZ<\022:/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes\332A\006parent\332A\024parent,language_code", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetEntityType", @@ -1702,9 +1793,8 @@ containing_service=None, input_type=_GETENTITYTYPEREQUEST, output_type=_ENTITYTYPE, - serialized_options=_b( - "\202\323\344\223\002n\022./v2beta1/{name=projects/*/agent/entityTypes/*}Z<\022:/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}" - ), + serialized_options=b"\202\323\344\223\002n\022./v2beta1/{name=projects/*/agent/entityTypes/*}Z<\022:/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}\332A\004name\332A\022name,language_code", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateEntityType", @@ -1713,9 +1803,8 @@ containing_service=None, input_type=_CREATEENTITYTYPEREQUEST, output_type=_ENTITYTYPE, - serialized_options=_b( - '\202\323\344\223\002\210\001"./v2beta1/{parent=projects/*/agent}/entityTypes:\013entity_typeZI":/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:\013entity_type' - ), + serialized_options=b'\202\323\344\223\002\210\001"./v2beta1/{parent=projects/*/agent}/entityTypes:\013entity_typeZI":/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:\013entity_type\332A\022parent,entity_type\332A parent,entity_type,language_code', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateEntityType", @@ -1724,9 +1813,8 @@ containing_service=None, input_type=_UPDATEENTITYTYPEREQUEST, output_type=_ENTITYTYPE, - serialized_options=_b( - "\202\323\344\223\002\240\0012:/v2beta1/{entity_type.name=projects/*/agent/entityTypes/*}:\013entity_typeZU2F/v2beta1/{entity_type.name=projects/*/locations/*/agent/entityTypes/*}:\013entity_type" - ), + serialized_options=b"\202\323\344\223\002\240\0012:/v2beta1/{entity_type.name=projects/*/agent/entityTypes/*}:\013entity_typeZU2F/v2beta1/{entity_type.name=projects/*/locations/*/agent/entityTypes/*}:\013entity_type\332A\013entity_type\332A\031entity_type,language_code\332A%entity_type,language_code,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteEntityType", @@ -1735,9 +1823,8 @@ containing_service=None, input_type=_DELETEENTITYTYPEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002n*./v2beta1/{name=projects/*/agent/entityTypes/*}Z<*:/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}" - ), + serialized_options=b"\202\323\344\223\002n*./v2beta1/{name=projects/*/agent/entityTypes/*}Z<*:/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchUpdateEntityTypes", @@ -1746,9 +1833,8 @@ containing_service=None, input_type=_BATCHUPDATEENTITYTYPESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002\214\001":/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate:\001*ZK"F/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchUpdate:\001*' - ), + serialized_options=b'\202\323\344\223\002\214\001":/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate:\001*ZK"F/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchUpdate:\001*\312AX\n>google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchDeleteEntityTypes", @@ -1757,9 +1843,8 @@ containing_service=None, input_type=_BATCHDELETEENTITYTYPESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002\214\001":/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete:\001*ZK"F/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchDelete:\001*' - ), + serialized_options=b'\202\323\344\223\002\214\001":/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete:\001*ZK"F/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchDelete:\001*\332A\030parent,entity_type_names\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchCreateEntities", @@ -1768,9 +1853,8 @@ containing_service=None, input_type=_BATCHCREATEENTITIESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002\242\001"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate:\001*ZV"Q/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchCreate:\001*' - ), + serialized_options=b'\202\323\344\223\002\242\001"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate:\001*ZV"Q/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchCreate:\001*\332A\017parent,entities\332A\035parent,entities,language_code\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchUpdateEntities", @@ -1779,9 +1863,8 @@ containing_service=None, input_type=_BATCHUPDATEENTITIESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002\242\001"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\001*ZV"Q/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchUpdate:\001*' - ), + serialized_options=b'\202\323\344\223\002\242\001"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\001*ZV"Q/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchUpdate:\001*\332A\017parent,entities\332A\035parent,entities,language_code\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchDeleteEntities", @@ -1790,9 +1873,8 @@ containing_service=None, input_type=_BATCHDELETEENTITIESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002\242\001"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\001*ZV"Q/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchDelete:\001*' - ), + serialized_options=b'\202\323\344\223\002\242\001"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\001*ZV"Q/v2beta1/{parent=projects/*/locations/*/agent/entityTypes/*}/entities:batchDelete:\001*\332A\024parent,entity_values\332A"parent,entity_values,language_code\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2beta1/proto/entity_type_pb2_grpc.py b/dialogflow_v2beta1/proto/entity_type_pb2_grpc.py index 7cfbe394c..eeb501526 100644 --- a/dialogflow_v2beta1/proto/entity_type_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/entity_type_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2beta1.proto import ( @@ -11,42 +12,15 @@ class EntityTypesStub(object): - """Entities are extracted from user input and represent parameters that are - meaningful to your application. For example, a date range, a proper name - such as a geographic location or landmark, and so on. Entities represent - actionable data for your application. - - When you define an entity, you can also include synonyms that all map to - that entity. For example, "soft drink", "soda", "pop", and so on. - - There are three types of entities: - - * **System** - entities that are defined by the Dialogflow API for common - data types such as date, time, currency, and so on. A system entity is - represented by the `EntityType` type. - - * **Custom** - entities that are defined by you that represent - actionable data that is meaningful to your application. For example, - you could define a `pizza.sauce` entity for red or white pizza sauce, - a `pizza.cheese` entity for the different types of cheese on a pizza, - a `pizza.topping` entity for different toppings, and so on. A custom - entity is represented by the `EntityType` type. - - * **User** - entities that are built for an individual user such as - favorites, preferences, playlists, and so on. A user entity is - represented by the [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] type. - - For more information about entity types, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/entities-overview). - """ + """Service for managing [EntityTypes][google.cloud.dialogflow.v2beta1.EntityType]. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.ListEntityTypes = channel.unary_unary( "/google.cloud.dialogflow.v2beta1.EntityTypes/ListEntityTypes", request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.ListEntityTypesRequest.SerializeToString, @@ -100,85 +74,56 @@ def __init__(self, channel): class EntityTypesServicer(object): - """Entities are extracted from user input and represent parameters that are - meaningful to your application. For example, a date range, a proper name - such as a geographic location or landmark, and so on. Entities represent - actionable data for your application. - - When you define an entity, you can also include synonyms that all map to - that entity. For example, "soft drink", "soda", "pop", and so on. - - There are three types of entities: - - * **System** - entities that are defined by the Dialogflow API for common - data types such as date, time, currency, and so on. A system entity is - represented by the `EntityType` type. - - * **Custom** - entities that are defined by you that represent - actionable data that is meaningful to your application. For example, - you could define a `pizza.sauce` entity for red or white pizza sauce, - a `pizza.cheese` entity for the different types of cheese on a pizza, - a `pizza.topping` entity for different toppings, and so on. A custom - entity is represented by the `EntityType` type. - - * **User** - entities that are built for an individual user such as - favorites, preferences, playlists, and so on. A user entity is - represented by the [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] type. - - For more information about entity types, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/entities-overview). - """ + """Service for managing [EntityTypes][google.cloud.dialogflow.v2beta1.EntityType]. + """ def ListEntityTypes(self, request, context): """Returns the list of all entity types in the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetEntityType(self, request, context): """Retrieves the specified entity type. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def CreateEntityType(self, request, context): """Creates an entity type in the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateEntityType(self, request, context): """Updates the specified entity type. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteEntityType(self, request, context): """Deletes the specified entity type. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def BatchUpdateEntityTypes(self, request, context): """Updates/Creates multiple entity types in the specified agent. - - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def BatchDeleteEntityTypes(self, request, context): """Deletes entity types in the specified agent. - - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -186,19 +131,19 @@ def BatchDeleteEntityTypes(self, request, context): def BatchCreateEntities(self, request, context): """Creates multiple new entities in the specified entity type. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def BatchUpdateEntities(self, request, context): """Updates or creates multiple entities in the specified entity type. This - method does not affect entities in the entity type that aren't explicitly - specified in the request. + method does not affect entities in the entity type that aren't explicitly + specified in the request. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -206,8 +151,8 @@ def BatchUpdateEntities(self, request, context): def BatchDeleteEntities(self, request, context): """Deletes entities in the specified entity type. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -270,3 +215,279 @@ def add_EntityTypesServicer_to_server(servicer, server): "google.cloud.dialogflow.v2beta1.EntityTypes", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class EntityTypes(object): + """Service for managing [EntityTypes][google.cloud.dialogflow.v2beta1.EntityType]. + """ + + @staticmethod + def ListEntityTypes( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.EntityTypes/ListEntityTypes", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.ListEntityTypesRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.ListEntityTypesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.EntityTypes/GetEntityType", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.GetEntityTypeRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.EntityType.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.EntityTypes/CreateEntityType", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.CreateEntityTypeRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.EntityType.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.EntityTypes/UpdateEntityType", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.UpdateEntityTypeRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.EntityType.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.EntityTypes/DeleteEntityType", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.DeleteEntityTypeRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchUpdateEntityTypes( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.EntityTypes/BatchUpdateEntityTypes", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.BatchUpdateEntityTypesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchDeleteEntityTypes( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.EntityTypes/BatchDeleteEntityTypes", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.BatchDeleteEntityTypesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchCreateEntities( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.EntityTypes/BatchCreateEntities", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.BatchCreateEntitiesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchUpdateEntities( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.EntityTypes/BatchUpdateEntities", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.BatchUpdateEntitiesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchDeleteEntities( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.EntityTypes/BatchDeleteEntities", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.BatchDeleteEntitiesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2beta1/proto/environment.proto b/dialogflow_v2beta1/proto/environment.proto new file mode 100644 index 000000000..73f4e2980 --- /dev/null +++ b/dialogflow_v2beta1/proto/environment.proto @@ -0,0 +1,154 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2beta1/audio_config.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "EnvironmentProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Service for managing [Environments][google.cloud.dialogflow.v2beta1.Environment]. +service Environments { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all non-draft environments of the specified agent. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*/agent}/environments" + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent}/environments" + } + }; + option (google.api.method_signature) = "parent"; + } +} + +// You can create multiple versions of your agent and publish them to separate +// environments. +// +// When you edit an agent, you are editing the draft agent. At any point, you +// can save the draft agent as an agent version, which is an immutable snapshot +// of your agent. +// +// When you save the draft agent, it is published to the default environment. +// When you create agent versions, you can publish them to custom environments. +// You can create a variety of custom environments for: +// +// - testing +// - development +// - production +// - etc. +// +// For more information, see the [versions and environments +// guide](https://cloud.google.com/dialogflow/docs/agents-versions). +message Environment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Environment" + pattern: "projects/{project}/agent/environments/{environment}" + pattern: "projects/{project}/locations/{location}/agent/environments/{environment}" + }; + + // Represents an environment state. When an environment is pointed to a new + // agent version, the environment is temporarily set to the `LOADING` state. + // During that time, the environment keeps on serving the previous version of + // the agent. After the new agent version is done loading, the environment is + // set back to the `RUNNING` state. + enum State { + // Not specified. This value is not used. + STATE_UNSPECIFIED = 0; + + // Stopped. + STOPPED = 1; + + // Loading. + LOADING = 2; + + // Running. + RUNNING = 3; + } + + // Output only. The unique identifier of this agent environment. + // Format: + // - `projects//agent/environments/` + // - `projects//locations//agent/environments/` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The developer-provided description for this environment. + // The maximum length is 500 characters. If exceeded, the request is rejected. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The agent version loaded into this environment. + // Format: `projects//agent/versions/`. + string agent_version = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The state of this environment. This field is read-only, i.e., it cannot be + // set by create and update methods. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time of this environment. This field is read-only, i.e., it + // cannot be set by create and update methods. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments]. +message ListEnvironmentsRequest { + // Required. The agent to list all environments from. + // Format: + // - `projects//agent` + // - `projects//locations//agent + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Environment" + } + ]; + + // Optional. The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments]. +message ListEnvironmentsResponse { + // The list of agent environments. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated Environment environments = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} diff --git a/dialogflow_v2beta1/proto/environment_pb2.py b/dialogflow_v2beta1/proto/environment_pb2.py new file mode 100644 index 000000000..9f8684a9b --- /dev/null +++ b/dialogflow_v2beta1/proto/environment_pb2.py @@ -0,0 +1,492 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dialogflow_v2beta1/proto/environment.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 +from dialogflow_v2beta1.proto import ( + audio_config_pb2 as google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_audio__config__pb2, +) +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name="google/cloud/dialogflow_v2beta1/proto/environment.proto", + package="google.cloud.dialogflow.v2beta1", + syntax="proto3", + serialized_options=b"\n#com.google.cloud.dialogflow.v2beta1B\020EnvironmentProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n7google/cloud/dialogflow_v2beta1/proto/environment.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/dialogflow_v2beta1/proto/audio_config.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xc8\x03\n\x0b\x45nvironment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\ragent_version\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x46\n\x05state\x18\x04 \x01(\x0e\x32\x32.google.cloud.dialogflow.v2beta1.Environment.StateB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STOPPED\x10\x01\x12\x0b\n\x07LOADING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03:\xaa\x01\xea\x41\xa6\x01\n%dialogflow.googleapis.com/Environment\x12\x33projects/{project}/agent/environments/{environment}\x12Hprojects/{project}/locations/{location}/agent/environments/{environment}"\x89\x01\n\x17ListEnvironmentsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%dialogflow.googleapis.com/Environment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01"w\n\x18ListEnvironmentsResponse\x12\x42\n\x0c\x65nvironments\x18\x01 \x03(\x0b\x32,.google.cloud.dialogflow.v2beta1.Environment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x93\x03\n\x0c\x45nvironments\x12\x88\x02\n\x10ListEnvironments\x12\x38.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest\x1a\x39.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse"\x7f\x82\xd3\xe4\x93\x02p\x12//v2beta1/{parent=projects/*/agent}/environmentsZ=\x12;/v2beta1/{parent=projects/*/locations/*/agent}/environments\xda\x41\x06parent\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xae\x01\n#com.google.cloud.dialogflow.v2beta1B\x10\x45nvironmentProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3', + dependencies=[ + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_audio__config__pb2.DESCRIPTOR, + google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, + google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, + google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, + ], +) + + +_ENVIRONMENT_STATE = _descriptor.EnumDescriptor( + name="State", + full_name="google.cloud.dialogflow.v2beta1.Environment.State", + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name="STATE_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="STOPPED", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="LOADING", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.EnumValueDescriptor( + name="RUNNING", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=576, + serialized_end=645, +) +_sym_db.RegisterEnumDescriptor(_ENVIRONMENT_STATE) + + +_ENVIRONMENT = _descriptor.Descriptor( + name="Environment", + full_name="google.cloud.dialogflow.v2beta1.Environment", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.cloud.dialogflow.v2beta1.Environment.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.cloud.dialogflow.v2beta1.Environment.description", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="agent_version", + full_name="google.cloud.dialogflow.v2beta1.Environment.agent_version", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="state", + full_name="google.cloud.dialogflow.v2beta1.Environment.state", + index=3, + number=4, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="update_time", + full_name="google.cloud.dialogflow.v2beta1.Environment.update_time", + index=4, + number=5, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\003", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[_ENVIRONMENT_STATE], + serialized_options=b"\352A\246\001\n%dialogflow.googleapis.com/Environment\0223projects/{project}/agent/environments/{environment}\022Hprojects/{project}/locations/{location}/agent/environments/{environment}", + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=362, + serialized_end=818, +) + + +_LISTENVIRONMENTSREQUEST = _descriptor.Descriptor( + name="ListEnvironmentsRequest", + full_name="google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\002\372A'\022%dialogflow.googleapis.com/Environment", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.page_size", + index=1, + number=2, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.page_token", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=b"\340A\001", + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=821, + serialized_end=958, +) + + +_LISTENVIRONMENTSRESPONSE = _descriptor.Descriptor( + name="ListEnvironmentsResponse", + full_name="google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name="environments", + full_name="google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.environments", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=b"".decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=960, + serialized_end=1079, +) + +_ENVIRONMENT.fields_by_name["state"].enum_type = _ENVIRONMENT_STATE +_ENVIRONMENT.fields_by_name[ + "update_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_ENVIRONMENT_STATE.containing_type = _ENVIRONMENT +_LISTENVIRONMENTSRESPONSE.fields_by_name["environments"].message_type = _ENVIRONMENT +DESCRIPTOR.message_types_by_name["Environment"] = _ENVIRONMENT +DESCRIPTOR.message_types_by_name["ListEnvironmentsRequest"] = _LISTENVIRONMENTSREQUEST +DESCRIPTOR.message_types_by_name["ListEnvironmentsResponse"] = _LISTENVIRONMENTSRESPONSE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Environment = _reflection.GeneratedProtocolMessageType( + "Environment", + (_message.Message,), + { + "DESCRIPTOR": _ENVIRONMENT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.environment_pb2", + "__doc__": """You can create multiple versions of your agent and publish them to + separate environments. When you edit an agent, you are editing the + draft agent. At any point, you can save the draft agent as an agent + version, which is an immutable snapshot of your agent. When you save + the draft agent, it is published to the default environment. When you + create agent versions, you can publish them to custom environments. + You can create a variety of custom environments for: - testing - + development - production - etc. For more information, see the + `versions and environments guide + `__. + + Attributes: + name: + Output only. The unique identifier of this agent environment. + Format: - ``projects//agent/environments/`` - + ``projects//locations//agent/environments/`` + description: + Optional. The developer-provided description for this + environment. The maximum length is 500 characters. If + exceeded, the request is rejected. + agent_version: + Optional. The agent version loaded into this environment. + Format: ``projects//agent/versions/``. + state: + Output only. The state of this environment. This field is + read-only, i.e., it cannot be set by create and update + methods. + update_time: + Output only. The last update time of this environment. This + field is read-only, i.e., it cannot be set by create and + update methods. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Environment) + }, +) +_sym_db.RegisterMessage(Environment) + +ListEnvironmentsRequest = _reflection.GeneratedProtocolMessageType( + "ListEnvironmentsRequest", + (_message.Message,), + { + "DESCRIPTOR": _LISTENVIRONMENTSREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.environment_pb2", + "__doc__": """The request message for [Environments.ListEnvironments][google.cloud.d + ialogflow.v2beta1.Environments.ListEnvironments]. + + Attributes: + parent: + Required. The agent to list all environments from. Format: - + ``projects//agent`` - + \`projects//locations//agent + page_size: + Optional. The maximum number of items to return in a single + page. By default 100 and at most 1000. + page_token: + Optional. The next_page_token value returned from a previous + list request. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest) + }, +) +_sym_db.RegisterMessage(ListEnvironmentsRequest) + +ListEnvironmentsResponse = _reflection.GeneratedProtocolMessageType( + "ListEnvironmentsResponse", + (_message.Message,), + { + "DESCRIPTOR": _LISTENVIRONMENTSRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.environment_pb2", + "__doc__": """The response message for [Environments.ListEnvironments][google.cloud. + dialogflow.v2beta1.Environments.ListEnvironments]. + + Attributes: + environments: + The list of agent environments. There will be a maximum number + of items returned based on the page_size field in the request. + next_page_token: + Token to retrieve the next page of results, or empty if there + are no more results in the list. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse) + }, +) +_sym_db.RegisterMessage(ListEnvironmentsResponse) + + +DESCRIPTOR._options = None +_ENVIRONMENT.fields_by_name["name"]._options = None +_ENVIRONMENT.fields_by_name["description"]._options = None +_ENVIRONMENT.fields_by_name["agent_version"]._options = None +_ENVIRONMENT.fields_by_name["state"]._options = None +_ENVIRONMENT.fields_by_name["update_time"]._options = None +_ENVIRONMENT._options = None +_LISTENVIRONMENTSREQUEST.fields_by_name["parent"]._options = None +_LISTENVIRONMENTSREQUEST.fields_by_name["page_size"]._options = None +_LISTENVIRONMENTSREQUEST.fields_by_name["page_token"]._options = None + +_ENVIRONMENTS = _descriptor.ServiceDescriptor( + name="Environments", + full_name="google.cloud.dialogflow.v2beta1.Environments", + file=DESCRIPTOR, + index=0, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=1082, + serialized_end=1485, + methods=[ + _descriptor.MethodDescriptor( + name="ListEnvironments", + full_name="google.cloud.dialogflow.v2beta1.Environments.ListEnvironments", + index=0, + containing_service=None, + input_type=_LISTENVIRONMENTSREQUEST, + output_type=_LISTENVIRONMENTSRESPONSE, + serialized_options=b"\202\323\344\223\002p\022//v2beta1/{parent=projects/*/agent}/environmentsZ=\022;/v2beta1/{parent=projects/*/locations/*/agent}/environments\332A\006parent", + create_key=_descriptor._internal_create_key, + ) + ], +) +_sym_db.RegisterServiceDescriptor(_ENVIRONMENTS) + +DESCRIPTOR.services_by_name["Environments"] = _ENVIRONMENTS + +# @@protoc_insertion_point(module_scope) diff --git a/dialogflow_v2beta1/proto/environment_pb2_grpc.py b/dialogflow_v2beta1/proto/environment_pb2_grpc.py new file mode 100644 index 000000000..311b1e87c --- /dev/null +++ b/dialogflow_v2beta1/proto/environment_pb2_grpc.py @@ -0,0 +1,83 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from dialogflow_v2beta1.proto import ( + environment_pb2 as google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_environment__pb2, +) + + +class EnvironmentsStub(object): + """Service for managing [Environments][google.cloud.dialogflow.v2beta1.Environment]. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListEnvironments = channel.unary_unary( + "/google.cloud.dialogflow.v2beta1.Environments/ListEnvironments", + request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_environment__pb2.ListEnvironmentsRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_environment__pb2.ListEnvironmentsResponse.FromString, + ) + + +class EnvironmentsServicer(object): + """Service for managing [Environments][google.cloud.dialogflow.v2beta1.Environment]. + """ + + def ListEnvironments(self, request, context): + """Returns the list of all non-draft environments of the specified agent. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + +def add_EnvironmentsServicer_to_server(servicer, server): + rpc_method_handlers = { + "ListEnvironments": grpc.unary_unary_rpc_method_handler( + servicer.ListEnvironments, + request_deserializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_environment__pb2.ListEnvironmentsRequest.FromString, + response_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_environment__pb2.ListEnvironmentsResponse.SerializeToString, + ) + } + generic_handler = grpc.method_handlers_generic_handler( + "google.cloud.dialogflow.v2beta1.Environments", rpc_method_handlers + ) + server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Environments(object): + """Service for managing [Environments][google.cloud.dialogflow.v2beta1.Environment]. + """ + + @staticmethod + def ListEnvironments( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Environments/ListEnvironments", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_environment__pb2.ListEnvironmentsRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_environment__pb2.ListEnvironmentsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2beta1/proto/gcs.proto b/dialogflow_v2beta1/proto/gcs.proto new file mode 100644 index 000000000..866b81cb0 --- /dev/null +++ b/dialogflow_v2beta1/proto/gcs.proto @@ -0,0 +1,36 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "GcsProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Google Cloud Storage location for single input. +message GcsSource { + // Required. The Google Cloud Storage URIs for the inputs. A URI is of the + // form: + // gs://bucket/object-prefix-or-name + // Whether a prefix or name is used depends on the use case. + string uri = 1; +} diff --git a/dialogflow_v2beta1/proto/gcs_pb2.py b/dialogflow_v2beta1/proto/gcs_pb2.py index 82ae3f41d..125a0a9e9 100644 --- a/dialogflow_v2beta1/proto/gcs_pb2.py +++ b/dialogflow_v2beta1/proto/gcs_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/gcs.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -22,12 +19,9 @@ name="google/cloud/dialogflow_v2beta1/proto/gcs.proto", package="google.cloud.dialogflow.v2beta1", syntax="proto3", - serialized_options=_b( - "\n#com.google.cloud.dialogflow.v2beta1B\010GcsProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1" - ), - serialized_pb=_b( - '\n/google/cloud/dialogflow_v2beta1/proto/gcs.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto"\x18\n\tGcsSource\x12\x0b\n\x03uri\x18\x01 \x01(\tB\xa6\x01\n#com.google.cloud.dialogflow.v2beta1B\x08GcsProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3' - ), + serialized_options=b"\n#com.google.cloud.dialogflow.v2beta1B\010GcsProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n/google/cloud/dialogflow_v2beta1/proto/gcs.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto"\x18\n\tGcsSource\x12\x0b\n\x03uri\x18\x01 \x01(\tB\xa6\x01\n#com.google.cloud.dialogflow.v2beta1B\x08GcsProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3', dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR], ) @@ -38,6 +32,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -48,7 +43,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -56,6 +51,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -76,11 +72,10 @@ GcsSource = _reflection.GeneratedProtocolMessageType( "GcsSource", (_message.Message,), - dict( - DESCRIPTOR=_GCSSOURCE, - __module__="google.cloud.dialogflow_v2beta1.proto.gcs_pb2", - __doc__="""Google Cloud Storage location for single input. - + { + "DESCRIPTOR": _GCSSOURCE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.gcs_pb2", + "__doc__": """Google Cloud Storage location for single input. Attributes: uri: @@ -89,7 +84,7 @@ prefix or name is used depends on the use case. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.GcsSource) - ), + }, ) _sym_db.RegisterMessage(GcsSource) diff --git a/dialogflow_v2beta1/proto/gcs_pb2_grpc.py b/dialogflow_v2beta1/proto/gcs_pb2_grpc.py index 07cb78fe0..8a9393943 100644 --- a/dialogflow_v2beta1/proto/gcs_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/gcs_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/dialogflow_v2beta1/proto/intent.proto b/dialogflow_v2beta1/proto/intent.proto new file mode 100644 index 000000000..cfecbc142 --- /dev/null +++ b/dialogflow_v2beta1/proto/intent.proto @@ -0,0 +1,1377 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2beta1/audio_config.proto"; +import "google/cloud/dialogflow/v2beta1/context.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "IntentProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Service for managing [Intents][google.cloud.dialogflow.v2beta1.Intent]. +service Intents { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all intents in the specified agent. + rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*/agent}/intents" + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent}/intents" + } + }; + option (google.api.method_signature) = "parent"; + option (google.api.method_signature) = "parent,language_code"; + } + + // Retrieves the specified intent. + rpc GetIntent(GetIntentRequest) returns (Intent) { + option (google.api.http) = { + get: "/v2beta1/{name=projects/*/agent/intents/*}" + additional_bindings { + get: "/v2beta1/{name=projects/*/locations/*/agent/intents/*}" + } + }; + option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,language_code"; + } + + // Creates an intent in the specified agent. + rpc CreateIntent(CreateIntentRequest) returns (Intent) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*/agent}/intents" + body: "intent" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent}/intents" + body: "intent" + } + }; + option (google.api.method_signature) = "parent,intent"; + option (google.api.method_signature) = "parent,intent,language_code"; + } + + // Updates the specified intent. + rpc UpdateIntent(UpdateIntentRequest) returns (Intent) { + option (google.api.http) = { + patch: "/v2beta1/{intent.name=projects/*/agent/intents/*}" + body: "intent" + additional_bindings { + patch: "/v2beta1/{intent.name=projects/*/locations/*/agent/intents/*}" + body: "intent" + } + }; + option (google.api.method_signature) = "intent,update_mask"; + option (google.api.method_signature) = "intent"; + option (google.api.method_signature) = "intent,language_code"; + option (google.api.method_signature) = "intent,language_code,update_mask"; + } + + // Deletes the specified intent and its direct or indirect followup intents. + rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta1/{name=projects/*/agent/intents/*}" + additional_bindings { + delete: "/v2beta1/{name=projects/*/locations/*/agent/intents/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Updates/Creates multiple intents in the specified agent. + // + // Operation + rpc BatchUpdateIntents(BatchUpdateIntentsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*/agent}/intents:batchUpdate" + body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchUpdate" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse" + metadata_type: "google.protobuf.Struct" + }; + } + + // Deletes intents in the specified agent. + // + // Operation + rpc BatchDeleteIntents(BatchDeleteIntentsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*/agent}/intents:batchDelete" + body: "*" + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchDelete" + body: "*" + } + }; + option (google.api.method_signature) = "parent,intents"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } +} + +// An intent categorizes an end-user's intention for one conversation turn. For +// each agent, you define many intents, where your combined intents can handle a +// complete conversation. When an end-user writes or says something, referred to +// as an end-user expression or end-user input, Dialogflow matches the end-user +// input to the best intent in your agent. Matching an intent is also known as +// intent classification. +// +// For more information, see the [intent +// guide](https://cloud.google.com/dialogflow/docs/intents-overview). +message Intent { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Intent" + pattern: "projects/{project}/agent/intents/{intent}" + pattern: "projects/{project}/locations/{location}/agent/intents/{intent}" + }; + + // Represents an example that the agent is trained on. + message TrainingPhrase { + // Represents a part of a training phrase. + message Part { + // Required. The text for this part. + string text = 1; + + // Optional. The entity type name prefixed with `@`. + // This field is required for annotated parts of the training phrase. + string entity_type = 2; + + // Optional. The parameter name for the value extracted from the + // annotated part of the example. + // This field is required for annotated parts of the training phrase. + string alias = 3; + + // Optional. Indicates whether the text was manually annotated. + // This field is set to true when the Dialogflow Console is used to + // manually annotate the part. When creating an annotated part with the + // API, you must set this to true. + bool user_defined = 4; + } + + // Represents different types of training phrases. + enum Type { + // Not specified. This value should never be used. + TYPE_UNSPECIFIED = 0; + + // Examples do not contain @-prefixed entity type names, but example parts + // can be annotated with entity types. + EXAMPLE = 1; + + // Templates are not annotated with entity types, but they can contain + // @-prefixed entity type names as substrings. + // Template mode has been deprecated. Example mode is the only supported + // way to create new training phrases. If you have existing training + // phrases that you've created in template mode, those will continue to + // work. + TEMPLATE = 2 [deprecated = true]; + } + + // Output only. The unique identifier of this training phrase. + string name = 1; + + // Required. The type of the training phrase. + Type type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ordered list of training phrase parts. + // The parts are concatenated in order to form the training phrase. + // + // Note: The API does not automatically annotate training phrases like the + // Dialogflow Console does. + // + // Note: Do not forget to include whitespace at part boundaries, + // so the training phrase is well formatted when the parts are concatenated. + // + // If the training phrase does not need to be annotated with parameters, + // you just need a single part with only the [Part.text][google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.text] field set. + // + // If you want to annotate the training phrase, you must create multiple + // parts, where the fields of each part are populated in one of two ways: + // + // - `Part.text` is set to a part of the phrase that has no parameters. + // - `Part.text` is set to a part of the phrase that you want to annotate, + // and the `entity_type`, `alias`, and `user_defined` fields are all + // set. + repeated Part parts = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates how many times this example was added to + // the intent. Each time a developer adds an existing sample by editing an + // intent or training, this counter is increased. + int32 times_added_count = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents intent parameters. + message Parameter { + // The unique identifier of this parameter. + string name = 1; + + // Required. The name of the parameter. + string display_name = 2; + + // Optional. The definition of the parameter value. It can be: + // + // - a constant string, + // - a parameter value defined as `$parameter_name`, + // - an original parameter value defined as `$parameter_name.original`, + // - a parameter value from some context defined as + // `#context_name.parameter_name`. + string value = 3; + + // Optional. The default value to use when the `value` yields an empty + // result. + // Default values can be extracted from contexts by using the following + // syntax: `#context_name.parameter_name`. + string default_value = 4; + + // Optional. The name of the entity type, prefixed with `@`, that + // describes values of the parameter. If the parameter is + // required, this must be provided. + string entity_type_display_name = 5; + + // Optional. Indicates whether the parameter is required. That is, + // whether the intent cannot be completed without collecting the parameter + // value. + bool mandatory = 6; + + // Optional. The collection of prompts that the agent can present to the + // user in order to collect a value for the parameter. + repeated string prompts = 7; + + // Optional. Indicates whether the parameter represents a list of values. + bool is_list = 8; + } + + // Corresponds to the `Response` field in the Dialogflow console. + message Message { + // The text response message. + message Text { + // Optional. The collection of the agent's responses. + repeated string text = 1; + } + + // The image response message. + message Image { + // Optional. The public URI to an image file. + string image_uri = 1; + + // A text description of the image to be used for accessibility, + // e.g., screen readers. Required if image_uri is set for CarouselSelect. + string accessibility_text = 2; + } + + // The quick replies response message. + message QuickReplies { + // Optional. The title of the collection of quick replies. + string title = 1; + + // Optional. The collection of quick replies. + repeated string quick_replies = 2; + } + + // The card response message. + message Card { + // Optional. Contains information about a button. + message Button { + // Optional. The text to show on the button. + string text = 1; + + // Optional. The text to send back to the Dialogflow API or a URI to + // open. + string postback = 2; + } + + // Optional. The title of the card. + string title = 1; + + // Optional. The subtitle of the card. + string subtitle = 2; + + // Optional. The public URI to an image file for the card. + string image_uri = 3; + + // Optional. The collection of card buttons. + repeated Button buttons = 4; + } + + // The simple response message containing speech or text. + message SimpleResponse { + // One of text_to_speech or ssml must be provided. The plain text of the + // speech output. Mutually exclusive with ssml. + string text_to_speech = 1; + + // One of text_to_speech or ssml must be provided. Structured spoken + // response to the user in the SSML format. Mutually exclusive with + // text_to_speech. + string ssml = 2; + + // Optional. The text to display. + string display_text = 3; + } + + // The collection of simple response candidates. + // This message in `QueryResult.fulfillment_messages` and + // `WebhookResponse.fulfillment_messages` should contain only one + // `SimpleResponse`. + message SimpleResponses { + // Required. The list of simple responses. + repeated SimpleResponse simple_responses = 1; + } + + // The basic card message. Useful for displaying information. + message BasicCard { + // The button object that appears at the bottom of a card. + message Button { + // Opens the given URI. + message OpenUriAction { + // Required. The HTTP or HTTPS scheme URI. + string uri = 1; + } + + // Required. The title of the button. + string title = 1; + + // Required. Action to take when a user taps on the button. + OpenUriAction open_uri_action = 2; + } + + // Optional. The title of the card. + string title = 1; + + // Optional. The subtitle of the card. + string subtitle = 2; + + // Required, unless image is present. The body text of the card. + string formatted_text = 3; + + // Optional. The image for the card. + Image image = 4; + + // Optional. The collection of card buttons. + repeated Button buttons = 5; + } + + // The suggestion chip message that the user can tap to quickly post a reply + // to the conversation. + message Suggestion { + // Required. The text shown the in the suggestion chip. + string title = 1; + } + + // The collection of suggestions. + message Suggestions { + // Required. The list of suggested replies. + repeated Suggestion suggestions = 1; + } + + // The suggestion chip message that allows the user to jump out to the app + // or website associated with this agent. + message LinkOutSuggestion { + // Required. The name of the app or site this chip is linking to. + string destination_name = 1; + + // Required. The URI of the app or site to open when the user taps the + // suggestion chip. + string uri = 2; + } + + // The card for presenting a list of options to select from. + message ListSelect { + // An item in the list. + message Item { + // Required. Additional information about this option. + SelectItemInfo info = 1; + + // Required. The title of the list item. + string title = 2; + + // Optional. The main text describing the item. + string description = 3; + + // Optional. The image to display. + Image image = 4; + } + + // Optional. The overall title of the list. + string title = 1; + + // Required. List items. + repeated Item items = 2; + + // Optional. Subtitle of the list. + string subtitle = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // The card for presenting a carousel of options to select from. + message CarouselSelect { + // An item in the carousel. + message Item { + // Required. Additional info about the option item. + SelectItemInfo info = 1; + + // Required. Title of the carousel item. + string title = 2; + + // Optional. The body text of the card. + string description = 3; + + // Optional. The image to display. + Image image = 4; + } + + // Required. Carousel items. + repeated Item items = 1; + } + + // Additional info about the select item for when it is triggered in a + // dialog. + message SelectItemInfo { + // Required. A unique key that will be sent back to the agent if this + // response is given. + string key = 1; + + // Optional. A list of synonyms that can also be used to trigger this + // item in dialog. + repeated string synonyms = 2; + } + + // Plays audio from a file in Telephony Gateway. + message TelephonyPlayAudio { + // Required. URI to a Google Cloud Storage object containing the audio to + // play, e.g., "gs://bucket/object". The object must contain a single + // channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz. + // + // This object must be readable by the `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` service account + // where is the number of the Telephony Gateway project + // (usually the same as the Dialogflow agent project). If the Google Cloud + // Storage bucket is in the Telephony Gateway project, this permission is + // added by default when enabling the Dialogflow V2 API. + // + // For audio from other sources, consider using the + // `TelephonySynthesizeSpeech` message with SSML. + string audio_uri = 1; + } + + // Synthesizes speech and plays back the synthesized audio to the caller in + // Telephony Gateway. + // + // Telephony Gateway takes the synthesizer settings from + // `DetectIntentResponse.output_audio_config` which can either be set + // at request-level or can come from the agent-level synthesizer config. + message TelephonySynthesizeSpeech { + // Required. The source to be synthesized. + oneof source { + // The raw text to be synthesized. + string text = 1; + + // The SSML to be synthesized. For more information, see + // [SSML](https://developers.google.com/actions/reference/ssml). + string ssml = 2; + } + } + + // Transfers the call in Telephony Gateway. + message TelephonyTransferCall { + // Required. The phone number to transfer the call to + // in [E.164 format](https://en.wikipedia.org/wiki/E.164). + // + // We currently only allow transferring to US numbers (+1xxxyyyzzzz). + string phone_number = 1; + } + + // Rich Business Messaging (RBM) text response with suggestions. + message RbmText { + // Required. Text sent and displayed to the user. + string text = 1; + + // Optional. One or more suggestions to show to the user. + repeated RbmSuggestion rbm_suggestion = 2; + } + + // Carousel Rich Business Messaging (RBM) rich card. + // + // Rich cards allow you to respond to users with more vivid content, e.g. + // with media and suggestions. + // + // If you want to show a single card with more control over the layout, + // please use [RbmStandaloneCard][google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard] instead. + message RbmCarouselCard { + // The width of the cards in the carousel. + enum CardWidth { + // Not specified. + CARD_WIDTH_UNSPECIFIED = 0; + + // 120 DP. Note that tall media cannot be used. + SMALL = 1; + + // 232 DP. + MEDIUM = 2; + } + + // Required. The width of the cards in the carousel. + CardWidth card_width = 1; + + // Required. The cards in the carousel. A carousel must have at least + // 2 cards and at most 10. + repeated RbmCardContent card_contents = 2; + } + + // Standalone Rich Business Messaging (RBM) rich card. + // + // Rich cards allow you to respond to users with more vivid content, e.g. + // with media and suggestions. + // + // You can group multiple rich cards into one using [RbmCarouselCard][google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard] but + // carousel cards will give you less control over the card layout. + message RbmStandaloneCard { + // Orientation of the card. + enum CardOrientation { + // Not specified. + CARD_ORIENTATION_UNSPECIFIED = 0; + + // Horizontal layout. + HORIZONTAL = 1; + + // Vertical layout. + VERTICAL = 2; + } + + // Thumbnail preview alignment for standalone cards with horizontal + // layout. + enum ThumbnailImageAlignment { + // Not specified. + THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED = 0; + + // Thumbnail preview is left-aligned. + LEFT = 1; + + // Thumbnail preview is right-aligned. + RIGHT = 2; + } + + // Required. Orientation of the card. + CardOrientation card_orientation = 1; + + // Required if orientation is horizontal. + // Image preview alignment for standalone cards with horizontal layout. + ThumbnailImageAlignment thumbnail_image_alignment = 2; + + // Required. Card content. + RbmCardContent card_content = 3; + } + + // Rich Business Messaging (RBM) Card content + message RbmCardContent { + // Rich Business Messaging (RBM) Media displayed in Cards + // The following media-types are currently supported: + // + // Image Types + // + // * image/jpeg + // * image/jpg' + // * image/gif + // * image/png + // + // Video Types + // + // * video/h263 + // * video/m4v + // * video/mp4 + // * video/mpeg + // * video/mpeg4 + // * video/webm + message RbmMedia { + // Media height + enum Height { + // Not specified. + HEIGHT_UNSPECIFIED = 0; + + // 112 DP. + SHORT = 1; + + // 168 DP. + MEDIUM = 2; + + // 264 DP. Not available for rich card carousels when the card width + // is set to small. + TALL = 3; + } + + // Required. Publicly reachable URI of the file. The RBM platform + // determines the MIME type of the file from the content-type field in + // the HTTP headers when the platform fetches the file. The content-type + // field must be present and accurate in the HTTP response from the URL. + string file_uri = 1; + + // Optional. Publicly reachable URI of the thumbnail.If you don't + // provide a thumbnail URI, the RBM platform displays a blank + // placeholder thumbnail until the user's device downloads the file. + // Depending on the user's setting, the file may not download + // automatically and may require the user to tap a download button. + string thumbnail_uri = 2; + + // Required for cards with vertical orientation. The height of the media + // within a rich card with a vertical layout. + // For a standalone card with horizontal layout, height is not + // customizable, and this field is ignored. + Height height = 3; + } + + // Optional. Title of the card (at most 200 bytes). + // + // At least one of the title, description or media must be set. + string title = 1; + + // Optional. Description of the card (at most 2000 bytes). + // + // At least one of the title, description or media must be set. + string description = 2; + + // Optional. However at least one of the title, description or media must + // be set. Media (image, GIF or a video) to include in the card. + RbmMedia media = 3; + + // Optional. List of suggestions to include in the card. + repeated RbmSuggestion suggestions = 4; + } + + // Rich Business Messaging (RBM) suggestion. Suggestions allow user to + // easily select/click a predefined response or perform an action (like + // opening a web uri). + message RbmSuggestion { + // Predefined suggested response or action for user to choose + oneof suggestion { + // Predefined replies for user to select instead of typing + RbmSuggestedReply reply = 1; + + // Predefined client side actions that user can choose + RbmSuggestedAction action = 2; + } + } + + // Rich Business Messaging (RBM) suggested reply that the user can click + // instead of typing in their own response. + message RbmSuggestedReply { + // Suggested reply text. + string text = 1; + + // Opaque payload that the Dialogflow receives in a user event + // when the user taps the suggested reply. This data will be also + // forwarded to webhook to allow performing custom business logic. + string postback_data = 2; + } + + // Rich Business Messaging (RBM) suggested client-side action that the user + // can choose from the card. + message RbmSuggestedAction { + // Opens the user's default dialer app with the specified phone number + // but does not dial automatically. + message RbmSuggestedActionDial { + // Required. The phone number to fill in the default dialer app. + // This field should be in [E.164](https://en.wikipedia.org/wiki/E.164) + // format. An example of a correctly formatted phone number: + // +15556767888. + string phone_number = 1; + } + + // Opens the user's default web browser app to the specified uri + // If the user has an app installed that is + // registered as the default handler for the URL, then this app will be + // opened instead, and its icon will be used in the suggested action UI. + message RbmSuggestedActionOpenUri { + // Required. The uri to open on the user device + string uri = 1; + } + + // Opens the device's location chooser so the user can pick a location + // to send back to the agent. + message RbmSuggestedActionShareLocation { + + } + + // Text to display alongside the action. + string text = 1; + + // Opaque payload that the Dialogflow receives in a user event + // when the user taps the suggested action. This data will be also + // forwarded to webhook to allow performing custom business logic. + string postback_data = 2; + + // Action that needs to be triggered. + oneof action { + // Suggested client side action: Dial a phone number + RbmSuggestedActionDial dial = 3; + + // Suggested client side action: Open a URI on device + RbmSuggestedActionOpenUri open_url = 4; + + // Suggested client side action: Share user location + RbmSuggestedActionShareLocation share_location = 5; + } + } + + // The media content card for Actions on Google. + message MediaContent { + // Response media object for media content card. + message ResponseMediaObject { + // Required. Name of media card. + string name = 1; + + // Optional. Description of media card. + string description = 2; + + // Image to show with the media card. + oneof image { + // Optional. Image to display above media content. + Image large_image = 3; + + // Optional. Icon to display above media content. + Image icon = 4; + } + + // Required. Url where the media is stored. + string content_url = 5; + } + + // Format of response media type. + enum ResponseMediaType { + // Unspecified. + RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0; + + // Response media type is audio. + AUDIO = 1; + } + + // Optional. What type of media is the content (ie "audio"). + ResponseMediaType media_type = 1; + + // Required. List of media objects. + repeated ResponseMediaObject media_objects = 2; + } + + // Browse Carousel Card for Actions on Google. + // https://developers.google.com/actions/assistant/responses#browsing_carousel + message BrowseCarouselCard { + // Browsing carousel tile + message BrowseCarouselCardItem { + // Actions on Google action to open a given url. + message OpenUrlAction { + // Type of the URI. + enum UrlTypeHint { + // Unspecified + URL_TYPE_HINT_UNSPECIFIED = 0; + + // Url would be an amp action + AMP_ACTION = 1; + + // URL that points directly to AMP content, or to a canonical URL + // which refers to AMP content via . + AMP_CONTENT = 2; + } + + // Required. URL + string url = 1; + + // Optional. Specifies the type of viewer that is used when opening + // the URL. Defaults to opening via web browser. + UrlTypeHint url_type_hint = 3; + } + + // Required. Action to present to the user. + OpenUrlAction open_uri_action = 1; + + // Required. Title of the carousel item. Maximum of two lines of text. + string title = 2; + + // Optional. Description of the carousel item. Maximum of four lines of + // text. + string description = 3; + + // Optional. Hero image for the carousel item. + Image image = 4; + + // Optional. Text that appears at the bottom of the Browse Carousel + // Card. Maximum of one line of text. + string footer = 5; + } + + // Image display options for Actions on Google. This should be used for + // when the image's aspect ratio does not match the image container's + // aspect ratio. + enum ImageDisplayOptions { + // Fill the gaps between the image and the image container with gray + // bars. + IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0; + + // Fill the gaps between the image and the image container with gray + // bars. + GRAY = 1; + + // Fill the gaps between the image and the image container with white + // bars. + WHITE = 2; + + // Image is scaled such that the image width and height match or exceed + // the container dimensions. This may crop the top and bottom of the + // image if the scaled image height is greater than the container + // height, or crop the left and right of the image if the scaled image + // width is greater than the container width. This is similar to "Zoom + // Mode" on a widescreen TV when playing a 4:3 video. + CROPPED = 3; + + // Pad the gaps between image and image frame with a blurred copy of the + // same image. + BLURRED_BACKGROUND = 4; + } + + // Required. List of items in the Browse Carousel Card. Minimum of two + // items, maximum of ten. + repeated BrowseCarouselCardItem items = 1; + + // Optional. Settings for displaying the image. Applies to every image in + // [items][google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.items]. + ImageDisplayOptions image_display_options = 2; + } + + // Table card for Actions on Google. + message TableCard { + // Required. Title of the card. + string title = 1; + + // Optional. Subtitle to the title. + string subtitle = 2; + + // Optional. Image which should be displayed on the card. + Image image = 3; + + // Optional. Display properties for the columns in this table. + repeated ColumnProperties column_properties = 4; + + // Optional. Rows in this table of data. + repeated TableCardRow rows = 5; + + // Optional. List of buttons for the card. + repeated BasicCard.Button buttons = 6; + } + + // Column properties for [TableCard][google.cloud.dialogflow.v2beta1.Intent.Message.TableCard]. + message ColumnProperties { + // Text alignments within a cell. + enum HorizontalAlignment { + // Text is aligned to the leading edge of the column. + HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; + + // Text is aligned to the leading edge of the column. + LEADING = 1; + + // Text is centered in the column. + CENTER = 2; + + // Text is aligned to the trailing edge of the column. + TRAILING = 3; + } + + // Required. Column heading. + string header = 1; + + // Optional. Defines text alignment for all cells in this column. + HorizontalAlignment horizontal_alignment = 2; + } + + // Row of [TableCard][google.cloud.dialogflow.v2beta1.Intent.Message.TableCard]. + message TableCardRow { + // Optional. List of cells that make up this row. + repeated TableCardCell cells = 1; + + // Optional. Whether to add a visual divider after this row. + bool divider_after = 2; + } + + // Cell of [TableCardRow][google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow]. + message TableCardCell { + // Required. Text in this cell. + string text = 1; + } + + // Represents different platforms that a rich message can be intended for. + enum Platform { + // Not specified. + PLATFORM_UNSPECIFIED = 0; + + // Facebook. + FACEBOOK = 1; + + // Slack. + SLACK = 2; + + // Telegram. + TELEGRAM = 3; + + // Kik. + KIK = 4; + + // Skype. + SKYPE = 5; + + // Line. + LINE = 6; + + // Viber. + VIBER = 7; + + // Google Assistant + // See [Dialogflow webhook + // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) + ACTIONS_ON_GOOGLE = 8; + + // Telephony Gateway. + TELEPHONY = 10; + + // Google Hangouts. + GOOGLE_HANGOUTS = 11; + } + + // Required. The rich response message. + oneof message { + // Returns a text response. + Text text = 1; + + // Displays an image. + Image image = 2; + + // Displays quick replies. + QuickReplies quick_replies = 3; + + // Displays a card. + Card card = 4; + + // A custom platform-specific response. + google.protobuf.Struct payload = 5; + + // Returns a voice or text-only response for Actions on Google. + SimpleResponses simple_responses = 7; + + // Displays a basic card for Actions on Google. + BasicCard basic_card = 8; + + // Displays suggestion chips for Actions on Google. + Suggestions suggestions = 9; + + // Displays a link out suggestion chip for Actions on Google. + LinkOutSuggestion link_out_suggestion = 10; + + // Displays a list card for Actions on Google. + ListSelect list_select = 11; + + // Displays a carousel card for Actions on Google. + CarouselSelect carousel_select = 12; + + // Plays audio from a file in Telephony Gateway. + TelephonyPlayAudio telephony_play_audio = 13; + + // Synthesizes speech in Telephony Gateway. + TelephonySynthesizeSpeech telephony_synthesize_speech = 14; + + // Transfers the call in Telephony Gateway. + TelephonyTransferCall telephony_transfer_call = 15; + + // Rich Business Messaging (RBM) text response. + // + // RBM allows businesses to send enriched and branded versions of SMS. See + // https://jibe.google.com/business-messaging. + RbmText rbm_text = 18; + + // Standalone Rich Business Messaging (RBM) rich card response. + RbmStandaloneCard rbm_standalone_rich_card = 19; + + // Rich Business Messaging (RBM) carousel rich card response. + RbmCarouselCard rbm_carousel_rich_card = 20; + + // Browse carousel card for Actions on Google. + BrowseCarouselCard browse_carousel_card = 22; + + // Table card for Actions on Google. + TableCard table_card = 23; + + // The media content card for Actions on Google. + MediaContent media_content = 24; + } + + // Optional. The platform that this message is intended for. + Platform platform = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents a single followup intent in the chain. + message FollowupIntentInfo { + // The unique identifier of the followup intent. + // Format: `projects//agent/intents/`. + string followup_intent_name = 1; + + // The unique identifier of the followup intent's parent. + // Format: `projects//agent/intents/`. + string parent_followup_intent_name = 2; + } + + // Represents the different states that webhooks can be in. + enum WebhookState { + // Webhook is disabled in the agent and in the intent. + WEBHOOK_STATE_UNSPECIFIED = 0; + + // Webhook is enabled in the agent and in the intent. + WEBHOOK_STATE_ENABLED = 1; + + // Webhook is enabled in the agent and in the intent. Also, each slot + // filling prompt is forwarded to the webhook. + WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; + } + + // Optional. The unique identifier of this intent. + // Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents] + // methods. + // Format: `projects//agent/intents/`. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The name of this intent. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates whether webhooks are enabled for the intent. + WebhookState webhook_state = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The priority of this intent. Higher numbers represent higher + // priorities. + // + // - If the supplied value is unspecified or 0, the service + // translates the value to 500,000, which corresponds to the + // `Normal` priority in the console. + // - If the supplied value is negative, the intent is ignored + // in runtime detect intent requests. + int32 priority = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether this is a fallback intent. + bool is_fallback = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether Machine Learning is enabled for the intent. + // Note: If `ml_enabled` setting is set to false, then this intent is not + // taken into account during inference in `ML ONLY` match mode. Also, + // auto-markup in the UI is turned off. + // DEPRECATED! Please use `ml_disabled` field instead. + // NOTE: If both `ml_enabled` and `ml_disabled` are either not set or false, + // then the default value is determined as follows: + // - Before April 15th, 2018 the default is: + // ml_enabled = false / ml_disabled = true. + // - After April 15th, 2018 the default is: + // ml_enabled = true / ml_disabled = false. + bool ml_enabled = 5 [ + deprecated = true, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Indicates whether Machine Learning is disabled for the intent. + // Note: If `ml_disabled` setting is set to true, then this intent is not + // taken into account during inference in `ML ONLY` match mode. Also, + // auto-markup in the UI is turned off. + bool ml_disabled = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates that this intent ends an interaction. Some integrations + // (e.g., Actions on Google or Dialogflow phone gateway) use this information + // to close interaction with an end user. Default is false. + bool end_interaction = 21 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of context names required for this intent to be + // triggered. + // Format: `projects//agent/sessions/-/contexts/`. + repeated string input_context_names = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of event names that trigger the intent. + // If the collection of input contexts is not empty, all of the contexts must + // be present in the active user session for an event to trigger this intent. + // Event names are limited to 150 characters. + repeated string events = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of examples that the agent is + // trained on. + repeated TrainingPhrase training_phrases = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the action associated with the intent. + // Note: The action name must not contain whitespaces. + string action = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of contexts that are activated when the intent + // is matched. Context messages in this collection should not set the + // parameters field. Setting the `lifespan_count` to 0 will reset the context + // when the intent is matched. + // Format: `projects//agent/sessions/-/contexts/`. + repeated Context output_contexts = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether to delete all contexts in the current + // session when this intent is matched. + bool reset_contexts = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of parameters associated with the intent. + repeated Parameter parameters = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The collection of rich messages corresponding to the + // `Response` field in the Dialogflow console. + repeated Message messages = 14; + + // Optional. The list of platforms for which the first responses will be + // copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + repeated Message.Platform default_response_platforms = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The unique identifier of the root intent in the chain of + // followup intents. It identifies the correct followup intents chain for + // this intent. + // + // Format: `projects//agent/intents/`. + string root_followup_intent_name = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The unique identifier of the parent intent in the + // chain of followup intents. You can set this field when creating an intent, + // for example with [CreateIntent][google.cloud.dialogflow.v2beta1.Intents.CreateIntent] or + // [BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents], in order to make this + // intent a followup intent. + // + // It identifies the parent followup intent. + // Format: `projects//agent/intents/`. + string parent_followup_intent_name = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Information about all followup intents that have this intent as + // a direct or indirect parent. We populate this field only in the output. + repeated FollowupIntentInfo followup_intent_info = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents]. +message ListIntentsRequest { + // Required. The agent to list all intents from. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource view to apply to the returned intent. + IntentView intent_view = 3; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 4; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 5; +} + +// The response message for [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents]. +message ListIntentsResponse { + // The list of agent intents. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated Intent intents = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [Intents.GetIntent][google.cloud.dialogflow.v2beta1.Intents.GetIntent]. +message GetIntentRequest { + // Required. The name of the intent. + // Format: `projects//agent/intents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Intent" + } + ]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource view to apply to the returned intent. + IntentView intent_view = 3; +} + +// The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2beta1.Intents.CreateIntent]. +message CreateIntentRequest { + // Required. The agent to create a intent for. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; + + // Required. The intent to create. + Intent intent = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource view to apply to the returned intent. + IntentView intent_view = 4; +} + +// The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent]. +message UpdateIntentRequest { + // Required. The intent to update. + Intent intent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3; + + // Optional. The resource view to apply to the returned intent. + IntentView intent_view = 4; +} + +// The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2beta1.Intents.DeleteIntent]. +message DeleteIntentRequest { + // Required. The name of the intent to delete. If this intent has direct or + // indirect followup intents, we also delete them. + // + // Format: `projects//agent/intents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Intent" + } + ]; +} + +// The request message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents]. +message BatchUpdateIntentsRequest { + // Required. The name of the agent to update or create intents in. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; + + // Required. The source of the intent batch. + // + // For each intent in the batch: + // + // * If `name` is specified, we update an existing intent. + // * If `name` is not specified, we create a new intent. + oneof intent_batch { + // The URI to a Google Cloud Storage file containing intents to update or + // create. The file format can either be a serialized proto (of IntentBatch + // type) or JSON object. Note: The URI must start with "gs://". + string intent_batch_uri = 2; + + // The collection of intents to update or create. + IntentBatch intent_batch_inline = 3; + } + + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 5; + + // Optional. The resource view to apply to the returned intent. + IntentView intent_view = 6; +} + +// The response message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents]. +message BatchUpdateIntentsResponse { + // The collection of updated or created intents. + repeated Intent intents = 1; +} + +// The request message for [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntents]. +message BatchDeleteIntentsRequest { + // Required. The name of the agent to delete all entities types for. Format: + // `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; + + // Required. The collection of intents to delete. Only intent `name` must be + // filled in. + repeated Intent intents = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// This message is a wrapper around a collection of intents. +message IntentBatch { + // A collection of intents. + repeated Intent intents = 1; +} + +// Represents the options for views of an intent. +// An intent can be a sizable object. Therefore, we provide a resource view that +// does not return training phrases in the response by default. +enum IntentView { + // Training phrases field is not populated in the response. + INTENT_VIEW_UNSPECIFIED = 0; + + // All fields are populated. + INTENT_VIEW_FULL = 1; +} diff --git a/dialogflow_v2beta1/proto/intent_pb2.py b/dialogflow_v2beta1/proto/intent_pb2.py index 24cad84b5..867267cbc 100644 --- a/dialogflow_v2beta1/proto/intent_pb2.py +++ b/dialogflow_v2beta1/proto/intent_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/intent.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -17,6 +14,7 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from dialogflow_v2beta1.proto import ( @@ -32,21 +30,18 @@ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="google/cloud/dialogflow_v2beta1/proto/intent.proto", package="google.cloud.dialogflow.v2beta1", syntax="proto3", - serialized_options=_b( - "\n#com.google.cloud.dialogflow.v2beta1B\013IntentProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1" - ), - serialized_pb=_b( - '\n2google/cloud/dialogflow_v2beta1/proto/intent.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/dialogflow_v2beta1/proto/audio_config.proto\x1a\x33google/cloud/dialogflow_v2beta1/proto/context.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/api/client.proto"\x8cN\n\x06Intent\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12K\n\rwebhook_state\x18\x06 \x01(\x0e\x32\x34.google.cloud.dialogflow.v2beta1.Intent.WebhookState\x12\x10\n\x08priority\x18\x03 \x01(\x05\x12\x13\n\x0bis_fallback\x18\x04 \x01(\x08\x12\x16\n\nml_enabled\x18\x05 \x01(\x08\x42\x02\x18\x01\x12\x13\n\x0bml_disabled\x18\x13 \x01(\x08\x12\x17\n\x0f\x65nd_interaction\x18\x15 \x01(\x08\x12\x1b\n\x13input_context_names\x18\x07 \x03(\t\x12\x0e\n\x06\x65vents\x18\x08 \x03(\t\x12P\n\x10training_phrases\x18\t \x03(\x0b\x32\x36.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase\x12\x0e\n\x06\x61\x63tion\x18\n \x01(\t\x12\x41\n\x0foutput_contexts\x18\x0b \x03(\x0b\x32(.google.cloud.dialogflow.v2beta1.Context\x12\x16\n\x0ereset_contexts\x18\x0c \x01(\x08\x12\x45\n\nparameters\x18\r \x03(\x0b\x32\x31.google.cloud.dialogflow.v2beta1.Intent.Parameter\x12\x41\n\x08messages\x18\x0e \x03(\x0b\x32/.google.cloud.dialogflow.v2beta1.Intent.Message\x12\\\n\x1a\x64\x65\x66\x61ult_response_platforms\x18\x0f \x03(\x0e\x32\x38.google.cloud.dialogflow.v2beta1.Intent.Message.Platform\x12!\n\x19root_followup_intent_name\x18\x10 \x01(\t\x12#\n\x1bparent_followup_intent_name\x18\x11 \x01(\t\x12X\n\x14\x66ollowup_intent_info\x18\x12 \x03(\x0b\x32:.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo\x1a\xdd\x02\n\x0eTrainingPhrase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12I\n\x04type\x18\x02 \x01(\x0e\x32;.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type\x12J\n\x05parts\x18\x03 \x03(\x0b\x32;.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part\x12\x19\n\x11times_added_count\x18\x04 \x01(\x05\x1aN\n\x04Part\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x13\n\x0b\x65ntity_type\x18\x02 \x01(\t\x12\r\n\x05\x61lias\x18\x03 \x01(\t\x12\x14\n\x0cuser_defined\x18\x04 \x01(\x08";\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45XAMPLE\x10\x01\x12\x10\n\x08TEMPLATE\x10\x02\x1a\x02\x08\x01\x1a\xac\x01\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\x12\x15\n\rdefault_value\x18\x04 \x01(\t\x12 \n\x18\x65ntity_type_display_name\x18\x05 \x01(\t\x12\x11\n\tmandatory\x18\x06 \x01(\x08\x12\x0f\n\x07prompts\x18\x07 \x03(\t\x12\x0f\n\x07is_list\x18\x08 \x01(\x08\x1a\xbd@\n\x07Message\x12\x44\n\x04text\x18\x01 \x01(\x0b\x32\x34.google.cloud.dialogflow.v2beta1.Intent.Message.TextH\x00\x12\x46\n\x05image\x18\x02 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.ImageH\x00\x12U\n\rquick_replies\x18\x03 \x01(\x0b\x32<.google.cloud.dialogflow.v2beta1.Intent.Message.QuickRepliesH\x00\x12\x44\n\x04\x63\x61rd\x18\x04 \x01(\x0b\x32\x34.google.cloud.dialogflow.v2beta1.Intent.Message.CardH\x00\x12*\n\x07payload\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12[\n\x10simple_responses\x18\x07 \x01(\x0b\x32?.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponsesH\x00\x12O\n\nbasic_card\x18\x08 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCardH\x00\x12R\n\x0bsuggestions\x18\t \x01(\x0b\x32;.google.cloud.dialogflow.v2beta1.Intent.Message.SuggestionsH\x00\x12`\n\x13link_out_suggestion\x18\n \x01(\x0b\x32\x41.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestionH\x00\x12Q\n\x0blist_select\x18\x0b \x01(\x0b\x32:.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelectH\x00\x12Y\n\x0f\x63\x61rousel_select\x18\x0c \x01(\x0b\x32>.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelectH\x00\x12\x62\n\x14telephony_play_audio\x18\r \x01(\x0b\x32\x42.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudioH\x00\x12p\n\x1btelephony_synthesize_speech\x18\x0e \x01(\x0b\x32I.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeechH\x00\x12h\n\x17telephony_transfer_call\x18\x0f \x01(\x0b\x32\x45.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCallH\x00\x12K\n\x08rbm_text\x18\x12 \x01(\x0b\x32\x37.google.cloud.dialogflow.v2beta1.Intent.Message.RbmTextH\x00\x12\x65\n\x18rbm_standalone_rich_card\x18\x13 \x01(\x0b\x32\x41.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCardH\x00\x12\x61\n\x16rbm_carousel_rich_card\x18\x14 \x01(\x0b\x32?.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCardH\x00\x12\x62\n\x14\x62rowse_carousel_card\x18\x16 \x01(\x0b\x32\x42.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCardH\x00\x12O\n\ntable_card\x18\x17 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardH\x00\x12U\n\rmedia_content\x18\x18 \x01(\x0b\x32<.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContentH\x00\x12J\n\x08platform\x18\x06 \x01(\x0e\x32\x38.google.cloud.dialogflow.v2beta1.Intent.Message.Platform\x1a\x14\n\x04Text\x12\x0c\n\x04text\x18\x01 \x03(\t\x1a\x36\n\x05Image\x12\x11\n\timage_uri\x18\x01 \x01(\t\x12\x1a\n\x12\x61\x63\x63\x65ssibility_text\x18\x02 \x01(\t\x1a\x34\n\x0cQuickReplies\x12\r\n\x05title\x18\x01 \x01(\t\x12\x15\n\rquick_replies\x18\x02 \x03(\t\x1a\xb2\x01\n\x04\x43\x61rd\x12\r\n\x05title\x18\x01 \x01(\t\x12\x10\n\x08subtitle\x18\x02 \x01(\t\x12\x11\n\timage_uri\x18\x03 \x01(\t\x12L\n\x07\x62uttons\x18\x04 \x03(\x0b\x32;.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button\x1a(\n\x06\x42utton\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x10\n\x08postback\x18\x02 \x01(\t\x1aL\n\x0eSimpleResponse\x12\x16\n\x0etext_to_speech\x18\x01 \x01(\t\x12\x0c\n\x04ssml\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_text\x18\x03 \x01(\t\x1ak\n\x0fSimpleResponses\x12X\n\x10simple_responses\x18\x01 \x03(\x0b\x32>.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse\x1a\xfe\x02\n\tBasicCard\x12\r\n\x05title\x18\x01 \x01(\t\x12\x10\n\x08subtitle\x18\x02 \x01(\t\x12\x16\n\x0e\x66ormatted_text\x18\x03 \x01(\t\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.Image\x12Q\n\x07\x62uttons\x18\x05 \x03(\x0b\x32@.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button\x1a\x9e\x01\n\x06\x42utton\x12\r\n\x05title\x18\x01 \x01(\t\x12g\n\x0fopen_uri_action\x18\x02 \x01(\x0b\x32N.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction\x1a\x1c\n\rOpenUriAction\x12\x0b\n\x03uri\x18\x01 \x01(\t\x1a\x1b\n\nSuggestion\x12\r\n\x05title\x18\x01 \x01(\t\x1a^\n\x0bSuggestions\x12O\n\x0bsuggestions\x18\x01 \x03(\x0b\x32:.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion\x1a:\n\x11LinkOutSuggestion\x12\x18\n\x10\x64\x65stination_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x1a\xc3\x02\n\nListSelect\x12\r\n\x05title\x18\x01 \x01(\t\x12N\n\x05items\x18\x02 \x03(\x0b\x32?.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item\x12\x15\n\x08subtitle\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\xbe\x01\n\x04Item\x12L\n\x04info\x18\x01 \x01(\x0b\x32>.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.Image\x1a\xa5\x02\n\x0e\x43\x61rouselSelect\x12R\n\x05items\x18\x01 \x03(\x0b\x32\x43.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item\x1a\xbe\x01\n\x04Item\x12L\n\x04info\x18\x01 \x01(\x0b\x32>.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.Image\x1a/\n\x0eSelectItemInfo\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x10\n\x08synonyms\x18\x02 \x03(\t\x1a\'\n\x12TelephonyPlayAudio\x12\x11\n\taudio_uri\x18\x01 \x01(\t\x1a\x45\n\x19TelephonySynthesizeSpeech\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\x0e\n\x04ssml\x18\x02 \x01(\tH\x00\x42\x08\n\x06source\x1a-\n\x15TelephonyTransferCall\x12\x14\n\x0cphone_number\x18\x01 \x01(\t\x1an\n\x07RbmText\x12\x0c\n\x04text\x18\x01 \x01(\t\x12U\n\x0erbm_suggestion\x18\x02 \x03(\x0b\x32=.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion\x1a\x87\x02\n\x0fRbmCarouselCard\x12]\n\ncard_width\x18\x01 \x01(\x0e\x32I.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth\x12U\n\rcard_contents\x18\x02 \x03(\x0b\x32>.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent">\n\tCardWidth\x12\x1a\n\x16\x43\x41RD_WIDTH_UNSPECIFIED\x10\x00\x12\t\n\x05SMALL\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x1a\x82\x04\n\x11RbmStandaloneCard\x12k\n\x10\x63\x61rd_orientation\x18\x01 \x01(\x0e\x32Q.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation\x12|\n\x19thumbnail_image_alignment\x18\x02 \x01(\x0e\x32Y.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment\x12T\n\x0c\x63\x61rd_content\x18\x03 \x01(\x0b\x32>.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent"Q\n\x0f\x43\x61rdOrientation\x12 \n\x1c\x43\x41RD_ORIENTATION_UNSPECIFIED\x10\x00\x12\x0e\n\nHORIZONTAL\x10\x01\x12\x0c\n\x08VERTICAL\x10\x02"Y\n\x17ThumbnailImageAlignment\x12)\n%THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED\x10\x00\x12\x08\n\x04LEFT\x10\x01\x12\t\n\x05RIGHT\x10\x02\x1a\xb9\x03\n\x0eRbmCardContent\x12\r\n\x05title\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12V\n\x05media\x18\x03 \x01(\x0b\x32G.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia\x12R\n\x0bsuggestions\x18\x04 \x03(\x0b\x32=.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion\x1a\xd6\x01\n\x08RbmMedia\x12\x10\n\x08\x66ile_uri\x18\x01 \x01(\t\x12\x15\n\rthumbnail_uri\x18\x02 \x01(\t\x12^\n\x06height\x18\x03 \x01(\x0e\x32N.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height"A\n\x06Height\x12\x16\n\x12HEIGHT_UNSPECIFIED\x10\x00\x12\t\n\x05SHORT\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04TALL\x10\x03\x1a\xc7\x01\n\rRbmSuggestion\x12R\n\x05reply\x18\x01 \x01(\x0b\x32\x41.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReplyH\x00\x12T\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x42.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedActionH\x00\x42\x0c\n\nsuggestion\x1a\x38\n\x11RbmSuggestedReply\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x15\n\rpostback_data\x18\x02 \x01(\t\x1a\x9b\x04\n\x12RbmSuggestedAction\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x15\n\rpostback_data\x18\x02 \x01(\t\x12i\n\x04\x64ial\x18\x03 \x01(\x0b\x32Y.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDialH\x00\x12p\n\x08open_url\x18\x04 \x01(\x0b\x32\\.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUriH\x00\x12|\n\x0eshare_location\x18\x05 \x01(\x0b\x32\x62.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocationH\x00\x1a.\n\x16RbmSuggestedActionDial\x12\x14\n\x0cphone_number\x18\x01 \x01(\t\x1a(\n\x19RbmSuggestedActionOpenUri\x12\x0b\n\x03uri\x18\x01 \x01(\t\x1a!\n\x1fRbmSuggestedActionShareLocationB\x08\n\x06\x61\x63tion\x1a\x8e\x04\n\x0cMediaContent\x12\x62\n\nmedia_type\x18\x01 \x01(\x0e\x32N.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType\x12g\n\rmedia_objects\x18\x02 \x03(\x0b\x32P.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject\x1a\xeb\x01\n\x13ResponseMediaObject\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12L\n\x0blarge_image\x18\x03 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.ImageH\x00\x12\x45\n\x04icon\x18\x04 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.ImageH\x00\x12\x13\n\x0b\x63ontent_url\x18\x05 \x01(\tB\x07\n\x05image"C\n\x11ResponseMediaType\x12#\n\x1fRESPONSE_MEDIA_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41UDIO\x10\x01\x1a\x80\x07\n\x12\x42rowseCarouselCard\x12h\n\x05items\x18\x01 \x03(\x0b\x32Y.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem\x12u\n\x15image_display_options\x18\x02 \x01(\x0e\x32V.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions\x1a\x90\x04\n\x16\x42rowseCarouselCardItem\x12\x80\x01\n\x0fopen_uri_action\x18\x01 \x01(\x0b\x32g.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.Image\x12\x0e\n\x06\x66ooter\x18\x05 \x01(\t\x1a\xf8\x01\n\rOpenUrlAction\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x8a\x01\n\rurl_type_hint\x18\x03 \x01(\x0e\x32s.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint"M\n\x0bUrlTypeHint\x12\x1d\n\x19URL_TYPE_HINT_UNSPECIFIED\x10\x00\x12\x0e\n\nAMP_ACTION\x10\x01\x12\x0f\n\x0b\x41MP_CONTENT\x10\x02"v\n\x13ImageDisplayOptions\x12%\n!IMAGE_DISPLAY_OPTIONS_UNSPECIFIED\x10\x00\x12\x08\n\x04GRAY\x10\x01\x12\t\n\x05WHITE\x10\x02\x12\x0b\n\x07\x43ROPPED\x10\x03\x12\x16\n\x12\x42LURRED_BACKGROUND\x10\x04\x1a\xee\x02\n\tTableCard\x12\r\n\x05title\x18\x01 \x01(\t\x12\x10\n\x08subtitle\x18\x02 \x01(\t\x12\x44\n\x05image\x18\x03 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.Image\x12[\n\x11\x63olumn_properties\x18\x04 \x03(\x0b\x32@.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties\x12J\n\x04rows\x18\x05 \x03(\x0b\x32<.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow\x12Q\n\x07\x62uttons\x18\x06 \x03(\x0b\x32@.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button\x1a\xfa\x01\n\x10\x43olumnProperties\x12\x0e\n\x06header\x18\x01 \x01(\t\x12r\n\x14horizontal_alignment\x18\x02 \x01(\x0e\x32T.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment"b\n\x13HorizontalAlignment\x12$\n HORIZONTAL_ALIGNMENT_UNSPECIFIED\x10\x00\x12\x0b\n\x07LEADING\x10\x01\x12\n\n\x06\x43\x45NTER\x10\x02\x12\x0c\n\x08TRAILING\x10\x03\x1as\n\x0cTableCardRow\x12L\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32=.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell\x12\x15\n\rdivider_after\x18\x02 \x01(\x08\x1a\x1d\n\rTableCardCell\x12\x0c\n\x04text\x18\x01 \x01(\t"\xaf\x01\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x46\x41\x43\x45\x42OOK\x10\x01\x12\t\n\x05SLACK\x10\x02\x12\x0c\n\x08TELEGRAM\x10\x03\x12\x07\n\x03KIK\x10\x04\x12\t\n\x05SKYPE\x10\x05\x12\x08\n\x04LINE\x10\x06\x12\t\n\x05VIBER\x10\x07\x12\x15\n\x11\x41\x43TIONS_ON_GOOGLE\x10\x08\x12\r\n\tTELEPHONY\x10\n\x12\x13\n\x0fGOOGLE_HANGOUTS\x10\x0b\x42\t\n\x07message\x1aW\n\x12\x46ollowupIntentInfo\x12\x1c\n\x14\x66ollowup_intent_name\x18\x01 \x01(\t\x12#\n\x1bparent_followup_intent_name\x18\x02 \x01(\t"t\n\x0cWebhookState\x12\x1d\n\x19WEBHOOK_STATE_UNSPECIFIED\x10\x00\x12\x19\n\x15WEBHOOK_STATE_ENABLED\x10\x01\x12*\n&WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING\x10\x02:\x91\x01\xea\x41\x8d\x01\n dialogflow.googleapis.com/Intent\x12)projects/{project}/agent/intents/{intent}\x12>projects/{project}/locations/{location}/agent/intents/{intent}"\xa4\x01\n\x12ListIntentsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12@\n\x0bintent_view\x18\x03 \x01(\x0e\x32+.google.cloud.dialogflow.v2beta1.IntentView\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t"h\n\x13ListIntentsResponse\x12\x38\n\x07intents\x18\x01 \x03(\x0b\x32\'.google.cloud.dialogflow.v2beta1.Intent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"y\n\x10GetIntentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12@\n\x0bintent_view\x18\x03 \x01(\x0e\x32+.google.cloud.dialogflow.v2beta1.IntentView"\xb7\x01\n\x13\x43reateIntentRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x37\n\x06intent\x18\x02 \x01(\x0b\x32\'.google.cloud.dialogflow.v2beta1.Intent\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\x12@\n\x0bintent_view\x18\x04 \x01(\x0e\x32+.google.cloud.dialogflow.v2beta1.IntentView"\xd8\x01\n\x13UpdateIntentRequest\x12\x37\n\x06intent\x18\x01 \x01(\x0b\x32\'.google.cloud.dialogflow.v2beta1.Intent\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12@\n\x0bintent_view\x18\x04 \x01(\x0e\x32+.google.cloud.dialogflow.v2beta1.IntentView"#\n\x13\x44\x65leteIntentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\xae\x02\n\x19\x42\x61tchUpdateIntentsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x1a\n\x10intent_batch_uri\x18\x02 \x01(\tH\x00\x12K\n\x13intent_batch_inline\x18\x03 \x01(\x0b\x32,.google.cloud.dialogflow.v2beta1.IntentBatchH\x00\x12\x15\n\rlanguage_code\x18\x04 \x01(\t\x12/\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12@\n\x0bintent_view\x18\x06 \x01(\x0e\x32+.google.cloud.dialogflow.v2beta1.IntentViewB\x0e\n\x0cintent_batch"V\n\x1a\x42\x61tchUpdateIntentsResponse\x12\x38\n\x07intents\x18\x01 \x03(\x0b\x32\'.google.cloud.dialogflow.v2beta1.Intent"e\n\x19\x42\x61tchDeleteIntentsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x38\n\x07intents\x18\x02 \x03(\x0b\x32\'.google.cloud.dialogflow.v2beta1.Intent"G\n\x0bIntentBatch\x12\x38\n\x07intents\x18\x01 \x03(\x0b\x32\'.google.cloud.dialogflow.v2beta1.Intent*?\n\nIntentView\x12\x1b\n\x17INTENT_VIEW_UNSPECIFIED\x10\x00\x12\x14\n\x10INTENT_VIEW_FULL\x10\x01\x32\xfd\r\n\x07Intents\x12\xe6\x01\n\x0bListIntents\x12\x33.google.cloud.dialogflow.v2beta1.ListIntentsRequest\x1a\x34.google.cloud.dialogflow.v2beta1.ListIntentsResponse"l\x82\xd3\xe4\x93\x02\x66\x12*/v2beta1/{parent=projects/*/agent}/intentsZ8\x12\x36/v2beta1/{parent=projects/*/locations/*/agent}/intents\x12\xd5\x01\n\tGetIntent\x12\x31.google.cloud.dialogflow.v2beta1.GetIntentRequest\x1a\'.google.cloud.dialogflow.v2beta1.Intent"l\x82\xd3\xe4\x93\x02\x66\x12*/v2beta1/{name=projects/*/agent/intents/*}Z8\x12\x36/v2beta1/{name=projects/*/locations/*/agent/intents/*}\x12\xeb\x01\n\x0c\x43reateIntent\x12\x34.google.cloud.dialogflow.v2beta1.CreateIntentRequest\x1a\'.google.cloud.dialogflow.v2beta1.Intent"|\x82\xd3\xe4\x93\x02v"*/v2beta1/{parent=projects/*/agent}/intents:\x06intentZ@"6/v2beta1/{parent=projects/*/locations/*/agent}/intents:\x06intent\x12\xfb\x01\n\x0cUpdateIntent\x12\x34.google.cloud.dialogflow.v2beta1.UpdateIntentRequest\x1a\'.google.cloud.dialogflow.v2beta1.Intent"\x8b\x01\x82\xd3\xe4\x93\x02\x84\x01\x32\x31/v2beta1/{intent.name=projects/*/agent/intents/*}:\x06intentZG2=/v2beta1/{intent.name=projects/*/locations/*/agent/intents/*}:\x06intent\x12\xca\x01\n\x0c\x44\x65leteIntent\x12\x34.google.cloud.dialogflow.v2beta1.DeleteIntentRequest\x1a\x16.google.protobuf.Empty"l\x82\xd3\xe4\x93\x02\x66**/v2beta1/{name=projects/*/agent/intents/*}Z8*6/v2beta1/{name=projects/*/locations/*/agent/intents/*}\x12\xfd\x01\n\x12\x42\x61tchUpdateIntents\x12:.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest\x1a\x1d.google.longrunning.Operation"\x8b\x01\x82\xd3\xe4\x93\x02\x84\x01"6/v2beta1/{parent=projects/*/agent}/intents:batchUpdate:\x01*ZG"B/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchUpdate:\x01*\x12\xfd\x01\n\x12\x42\x61tchDeleteIntents\x12:.google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest\x1a\x1d.google.longrunning.Operation"\x8b\x01\x82\xd3\xe4\x93\x02\x84\x01"6/v2beta1/{parent=projects/*/agent}/intents:batchDelete:\x01*ZG"B/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchDelete:\x01*\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xa9\x01\n#com.google.cloud.dialogflow.v2beta1B\x0bIntentProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3' - ), + serialized_options=b"\n#com.google.cloud.dialogflow.v2beta1B\013IntentProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n2google/cloud/dialogflow_v2beta1/proto/intent.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/dialogflow_v2beta1/proto/audio_config.proto\x1a\x33google/cloud/dialogflow_v2beta1/proto/context.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto"\xfdN\n\x06Intent\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\rwebhook_state\x18\x06 \x01(\x0e\x32\x34.google.cloud.dialogflow.v2beta1.Intent.WebhookStateB\x03\xe0\x41\x01\x12\x15\n\x08priority\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x18\n\x0bis_fallback\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\nml_enabled\x18\x05 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x18\n\x0bml_disabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x65nd_interaction\x18\x15 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13input_context_names\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x65vents\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12U\n\x10training_phrases\x18\t \x03(\x0b\x32\x36.google.cloud.dialogflow.v2beta1.Intent.TrainingPhraseB\x03\xe0\x41\x01\x12\x13\n\x06\x61\x63tion\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x46\n\x0foutput_contexts\x18\x0b \x03(\x0b\x32(.google.cloud.dialogflow.v2beta1.ContextB\x03\xe0\x41\x01\x12\x1b\n\x0ereset_contexts\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01\x12J\n\nparameters\x18\r \x03(\x0b\x32\x31.google.cloud.dialogflow.v2beta1.Intent.ParameterB\x03\xe0\x41\x01\x12\x41\n\x08messages\x18\x0e \x03(\x0b\x32/.google.cloud.dialogflow.v2beta1.Intent.Message\x12\x61\n\x1a\x64\x65\x66\x61ult_response_platforms\x18\x0f \x03(\x0e\x32\x38.google.cloud.dialogflow.v2beta1.Intent.Message.PlatformB\x03\xe0\x41\x01\x12&\n\x19root_followup_intent_name\x18\x10 \x01(\tB\x03\xe0\x41\x03\x12(\n\x1bparent_followup_intent_name\x18\x11 \x01(\tB\x03\xe0\x41\x01\x12]\n\x14\x66ollowup_intent_info\x18\x12 \x03(\x0b\x32:.google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfoB\x03\xe0\x41\x03\x1a\xec\x02\n\x0eTrainingPhrase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12N\n\x04type\x18\x02 \x01(\x0e\x32;.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.TypeB\x03\xe0\x41\x02\x12O\n\x05parts\x18\x03 \x03(\x0b\x32;.google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.PartB\x03\xe0\x41\x02\x12\x1e\n\x11times_added_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x1aN\n\x04Part\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x13\n\x0b\x65ntity_type\x18\x02 \x01(\t\x12\r\n\x05\x61lias\x18\x03 \x01(\t\x12\x14\n\x0cuser_defined\x18\x04 \x01(\x08";\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45XAMPLE\x10\x01\x12\x10\n\x08TEMPLATE\x10\x02\x1a\x02\x08\x01\x1a\xac\x01\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\x12\x15\n\rdefault_value\x18\x04 \x01(\t\x12 \n\x18\x65ntity_type_display_name\x18\x05 \x01(\t\x12\x11\n\tmandatory\x18\x06 \x01(\x08\x12\x0f\n\x07prompts\x18\x07 \x03(\t\x12\x0f\n\x07is_list\x18\x08 \x01(\x08\x1a\xc2@\n\x07Message\x12\x44\n\x04text\x18\x01 \x01(\x0b\x32\x34.google.cloud.dialogflow.v2beta1.Intent.Message.TextH\x00\x12\x46\n\x05image\x18\x02 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.ImageH\x00\x12U\n\rquick_replies\x18\x03 \x01(\x0b\x32<.google.cloud.dialogflow.v2beta1.Intent.Message.QuickRepliesH\x00\x12\x44\n\x04\x63\x61rd\x18\x04 \x01(\x0b\x32\x34.google.cloud.dialogflow.v2beta1.Intent.Message.CardH\x00\x12*\n\x07payload\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12[\n\x10simple_responses\x18\x07 \x01(\x0b\x32?.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponsesH\x00\x12O\n\nbasic_card\x18\x08 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCardH\x00\x12R\n\x0bsuggestions\x18\t \x01(\x0b\x32;.google.cloud.dialogflow.v2beta1.Intent.Message.SuggestionsH\x00\x12`\n\x13link_out_suggestion\x18\n \x01(\x0b\x32\x41.google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestionH\x00\x12Q\n\x0blist_select\x18\x0b \x01(\x0b\x32:.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelectH\x00\x12Y\n\x0f\x63\x61rousel_select\x18\x0c \x01(\x0b\x32>.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelectH\x00\x12\x62\n\x14telephony_play_audio\x18\r \x01(\x0b\x32\x42.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudioH\x00\x12p\n\x1btelephony_synthesize_speech\x18\x0e \x01(\x0b\x32I.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeechH\x00\x12h\n\x17telephony_transfer_call\x18\x0f \x01(\x0b\x32\x45.google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCallH\x00\x12K\n\x08rbm_text\x18\x12 \x01(\x0b\x32\x37.google.cloud.dialogflow.v2beta1.Intent.Message.RbmTextH\x00\x12\x65\n\x18rbm_standalone_rich_card\x18\x13 \x01(\x0b\x32\x41.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCardH\x00\x12\x61\n\x16rbm_carousel_rich_card\x18\x14 \x01(\x0b\x32?.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCardH\x00\x12\x62\n\x14\x62rowse_carousel_card\x18\x16 \x01(\x0b\x32\x42.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCardH\x00\x12O\n\ntable_card\x18\x17 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardH\x00\x12U\n\rmedia_content\x18\x18 \x01(\x0b\x32<.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContentH\x00\x12O\n\x08platform\x18\x06 \x01(\x0e\x32\x38.google.cloud.dialogflow.v2beta1.Intent.Message.PlatformB\x03\xe0\x41\x01\x1a\x14\n\x04Text\x12\x0c\n\x04text\x18\x01 \x03(\t\x1a\x36\n\x05Image\x12\x11\n\timage_uri\x18\x01 \x01(\t\x12\x1a\n\x12\x61\x63\x63\x65ssibility_text\x18\x02 \x01(\t\x1a\x34\n\x0cQuickReplies\x12\r\n\x05title\x18\x01 \x01(\t\x12\x15\n\rquick_replies\x18\x02 \x03(\t\x1a\xb2\x01\n\x04\x43\x61rd\x12\r\n\x05title\x18\x01 \x01(\t\x12\x10\n\x08subtitle\x18\x02 \x01(\t\x12\x11\n\timage_uri\x18\x03 \x01(\t\x12L\n\x07\x62uttons\x18\x04 \x03(\x0b\x32;.google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button\x1a(\n\x06\x42utton\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x10\n\x08postback\x18\x02 \x01(\t\x1aL\n\x0eSimpleResponse\x12\x16\n\x0etext_to_speech\x18\x01 \x01(\t\x12\x0c\n\x04ssml\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_text\x18\x03 \x01(\t\x1ak\n\x0fSimpleResponses\x12X\n\x10simple_responses\x18\x01 \x03(\x0b\x32>.google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse\x1a\xfe\x02\n\tBasicCard\x12\r\n\x05title\x18\x01 \x01(\t\x12\x10\n\x08subtitle\x18\x02 \x01(\t\x12\x16\n\x0e\x66ormatted_text\x18\x03 \x01(\t\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.Image\x12Q\n\x07\x62uttons\x18\x05 \x03(\x0b\x32@.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button\x1a\x9e\x01\n\x06\x42utton\x12\r\n\x05title\x18\x01 \x01(\t\x12g\n\x0fopen_uri_action\x18\x02 \x01(\x0b\x32N.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction\x1a\x1c\n\rOpenUriAction\x12\x0b\n\x03uri\x18\x01 \x01(\t\x1a\x1b\n\nSuggestion\x12\r\n\x05title\x18\x01 \x01(\t\x1a^\n\x0bSuggestions\x12O\n\x0bsuggestions\x18\x01 \x03(\x0b\x32:.google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion\x1a:\n\x11LinkOutSuggestion\x12\x18\n\x10\x64\x65stination_name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x1a\xc3\x02\n\nListSelect\x12\r\n\x05title\x18\x01 \x01(\t\x12N\n\x05items\x18\x02 \x03(\x0b\x32?.google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item\x12\x15\n\x08subtitle\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\xbe\x01\n\x04Item\x12L\n\x04info\x18\x01 \x01(\x0b\x32>.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.Image\x1a\xa5\x02\n\x0e\x43\x61rouselSelect\x12R\n\x05items\x18\x01 \x03(\x0b\x32\x43.google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item\x1a\xbe\x01\n\x04Item\x12L\n\x04info\x18\x01 \x01(\x0b\x32>.google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.Image\x1a/\n\x0eSelectItemInfo\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x10\n\x08synonyms\x18\x02 \x03(\t\x1a\'\n\x12TelephonyPlayAudio\x12\x11\n\taudio_uri\x18\x01 \x01(\t\x1a\x45\n\x19TelephonySynthesizeSpeech\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\x0e\n\x04ssml\x18\x02 \x01(\tH\x00\x42\x08\n\x06source\x1a-\n\x15TelephonyTransferCall\x12\x14\n\x0cphone_number\x18\x01 \x01(\t\x1an\n\x07RbmText\x12\x0c\n\x04text\x18\x01 \x01(\t\x12U\n\x0erbm_suggestion\x18\x02 \x03(\x0b\x32=.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion\x1a\x87\x02\n\x0fRbmCarouselCard\x12]\n\ncard_width\x18\x01 \x01(\x0e\x32I.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth\x12U\n\rcard_contents\x18\x02 \x03(\x0b\x32>.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent">\n\tCardWidth\x12\x1a\n\x16\x43\x41RD_WIDTH_UNSPECIFIED\x10\x00\x12\t\n\x05SMALL\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x1a\x82\x04\n\x11RbmStandaloneCard\x12k\n\x10\x63\x61rd_orientation\x18\x01 \x01(\x0e\x32Q.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation\x12|\n\x19thumbnail_image_alignment\x18\x02 \x01(\x0e\x32Y.google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment\x12T\n\x0c\x63\x61rd_content\x18\x03 \x01(\x0b\x32>.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent"Q\n\x0f\x43\x61rdOrientation\x12 \n\x1c\x43\x41RD_ORIENTATION_UNSPECIFIED\x10\x00\x12\x0e\n\nHORIZONTAL\x10\x01\x12\x0c\n\x08VERTICAL\x10\x02"Y\n\x17ThumbnailImageAlignment\x12)\n%THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED\x10\x00\x12\x08\n\x04LEFT\x10\x01\x12\t\n\x05RIGHT\x10\x02\x1a\xb9\x03\n\x0eRbmCardContent\x12\r\n\x05title\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12V\n\x05media\x18\x03 \x01(\x0b\x32G.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia\x12R\n\x0bsuggestions\x18\x04 \x03(\x0b\x32=.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion\x1a\xd6\x01\n\x08RbmMedia\x12\x10\n\x08\x66ile_uri\x18\x01 \x01(\t\x12\x15\n\rthumbnail_uri\x18\x02 \x01(\t\x12^\n\x06height\x18\x03 \x01(\x0e\x32N.google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height"A\n\x06Height\x12\x16\n\x12HEIGHT_UNSPECIFIED\x10\x00\x12\t\n\x05SHORT\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04TALL\x10\x03\x1a\xc7\x01\n\rRbmSuggestion\x12R\n\x05reply\x18\x01 \x01(\x0b\x32\x41.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReplyH\x00\x12T\n\x06\x61\x63tion\x18\x02 \x01(\x0b\x32\x42.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedActionH\x00\x42\x0c\n\nsuggestion\x1a\x38\n\x11RbmSuggestedReply\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x15\n\rpostback_data\x18\x02 \x01(\t\x1a\x9b\x04\n\x12RbmSuggestedAction\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x15\n\rpostback_data\x18\x02 \x01(\t\x12i\n\x04\x64ial\x18\x03 \x01(\x0b\x32Y.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDialH\x00\x12p\n\x08open_url\x18\x04 \x01(\x0b\x32\\.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUriH\x00\x12|\n\x0eshare_location\x18\x05 \x01(\x0b\x32\x62.google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocationH\x00\x1a.\n\x16RbmSuggestedActionDial\x12\x14\n\x0cphone_number\x18\x01 \x01(\t\x1a(\n\x19RbmSuggestedActionOpenUri\x12\x0b\n\x03uri\x18\x01 \x01(\t\x1a!\n\x1fRbmSuggestedActionShareLocationB\x08\n\x06\x61\x63tion\x1a\x8e\x04\n\x0cMediaContent\x12\x62\n\nmedia_type\x18\x01 \x01(\x0e\x32N.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType\x12g\n\rmedia_objects\x18\x02 \x03(\x0b\x32P.google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject\x1a\xeb\x01\n\x13ResponseMediaObject\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12L\n\x0blarge_image\x18\x03 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.ImageH\x00\x12\x45\n\x04icon\x18\x04 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.ImageH\x00\x12\x13\n\x0b\x63ontent_url\x18\x05 \x01(\tB\x07\n\x05image"C\n\x11ResponseMediaType\x12#\n\x1fRESPONSE_MEDIA_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41UDIO\x10\x01\x1a\x80\x07\n\x12\x42rowseCarouselCard\x12h\n\x05items\x18\x01 \x03(\x0b\x32Y.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem\x12u\n\x15image_display_options\x18\x02 \x01(\x0e\x32V.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions\x1a\x90\x04\n\x16\x42rowseCarouselCardItem\x12\x80\x01\n\x0fopen_uri_action\x18\x01 \x01(\x0b\x32g.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x44\n\x05image\x18\x04 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.Image\x12\x0e\n\x06\x66ooter\x18\x05 \x01(\t\x1a\xf8\x01\n\rOpenUrlAction\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x8a\x01\n\rurl_type_hint\x18\x03 \x01(\x0e\x32s.google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint"M\n\x0bUrlTypeHint\x12\x1d\n\x19URL_TYPE_HINT_UNSPECIFIED\x10\x00\x12\x0e\n\nAMP_ACTION\x10\x01\x12\x0f\n\x0b\x41MP_CONTENT\x10\x02"v\n\x13ImageDisplayOptions\x12%\n!IMAGE_DISPLAY_OPTIONS_UNSPECIFIED\x10\x00\x12\x08\n\x04GRAY\x10\x01\x12\t\n\x05WHITE\x10\x02\x12\x0b\n\x07\x43ROPPED\x10\x03\x12\x16\n\x12\x42LURRED_BACKGROUND\x10\x04\x1a\xee\x02\n\tTableCard\x12\r\n\x05title\x18\x01 \x01(\t\x12\x10\n\x08subtitle\x18\x02 \x01(\t\x12\x44\n\x05image\x18\x03 \x01(\x0b\x32\x35.google.cloud.dialogflow.v2beta1.Intent.Message.Image\x12[\n\x11\x63olumn_properties\x18\x04 \x03(\x0b\x32@.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties\x12J\n\x04rows\x18\x05 \x03(\x0b\x32<.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow\x12Q\n\x07\x62uttons\x18\x06 \x03(\x0b\x32@.google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button\x1a\xfa\x01\n\x10\x43olumnProperties\x12\x0e\n\x06header\x18\x01 \x01(\t\x12r\n\x14horizontal_alignment\x18\x02 \x01(\x0e\x32T.google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment"b\n\x13HorizontalAlignment\x12$\n HORIZONTAL_ALIGNMENT_UNSPECIFIED\x10\x00\x12\x0b\n\x07LEADING\x10\x01\x12\n\n\x06\x43\x45NTER\x10\x02\x12\x0c\n\x08TRAILING\x10\x03\x1as\n\x0cTableCardRow\x12L\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32=.google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell\x12\x15\n\rdivider_after\x18\x02 \x01(\x08\x1a\x1d\n\rTableCardCell\x12\x0c\n\x04text\x18\x01 \x01(\t"\xaf\x01\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x46\x41\x43\x45\x42OOK\x10\x01\x12\t\n\x05SLACK\x10\x02\x12\x0c\n\x08TELEGRAM\x10\x03\x12\x07\n\x03KIK\x10\x04\x12\t\n\x05SKYPE\x10\x05\x12\x08\n\x04LINE\x10\x06\x12\t\n\x05VIBER\x10\x07\x12\x15\n\x11\x41\x43TIONS_ON_GOOGLE\x10\x08\x12\r\n\tTELEPHONY\x10\n\x12\x13\n\x0fGOOGLE_HANGOUTS\x10\x0b\x42\t\n\x07message\x1aW\n\x12\x46ollowupIntentInfo\x12\x1c\n\x14\x66ollowup_intent_name\x18\x01 \x01(\t\x12#\n\x1bparent_followup_intent_name\x18\x02 \x01(\t"t\n\x0cWebhookState\x12\x1d\n\x19WEBHOOK_STATE_UNSPECIFIED\x10\x00\x12\x19\n\x15WEBHOOK_STATE_ENABLED\x10\x01\x12*\n&WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING\x10\x02:\x91\x01\xea\x41\x8d\x01\n dialogflow.googleapis.com/Intent\x12)projects/{project}/agent/intents/{intent}\x12>projects/{project}/locations/{location}/agent/intents/{intent}"\xd3\x01\n\x12ListIntentsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 dialogflow.googleapis.com/Intent\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12@\n\x0bintent_view\x18\x03 \x01(\x0e\x32+.google.cloud.dialogflow.v2beta1.IntentView\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t"h\n\x13ListIntentsResponse\x12\x38\n\x07intents\x18\x01 \x03(\x0b\x32\'.google.cloud.dialogflow.v2beta1.Intent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\xa8\x01\n\x10GetIntentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n dialogflow.googleapis.com/Intent\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12@\n\x0bintent_view\x18\x03 \x01(\x0e\x32+.google.cloud.dialogflow.v2beta1.IntentView"\xeb\x01\n\x13\x43reateIntentRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 dialogflow.googleapis.com/Intent\x12<\n\x06intent\x18\x02 \x01(\x0b\x32\'.google.cloud.dialogflow.v2beta1.IntentB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12@\n\x0bintent_view\x18\x04 \x01(\x0e\x32+.google.cloud.dialogflow.v2beta1.IntentView"\xe2\x01\n\x13UpdateIntentRequest\x12<\n\x06intent\x18\x01 \x01(\x0b\x32\'.google.cloud.dialogflow.v2beta1.IntentB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12@\n\x0bintent_view\x18\x04 \x01(\x0e\x32+.google.cloud.dialogflow.v2beta1.IntentView"M\n\x13\x44\x65leteIntentRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n dialogflow.googleapis.com/Intent"\xdd\x02\n\x19\x42\x61tchUpdateIntentsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 dialogflow.googleapis.com/Intent\x12\x1a\n\x10intent_batch_uri\x18\x02 \x01(\tH\x00\x12K\n\x13intent_batch_inline\x18\x03 \x01(\x0b\x32,.google.cloud.dialogflow.v2beta1.IntentBatchH\x00\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12/\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12@\n\x0bintent_view\x18\x06 \x01(\x0e\x32+.google.cloud.dialogflow.v2beta1.IntentViewB\x0e\n\x0cintent_batch"V\n\x1a\x42\x61tchUpdateIntentsResponse\x12\x38\n\x07intents\x18\x01 \x03(\x0b\x32\'.google.cloud.dialogflow.v2beta1.Intent"\x94\x01\n\x19\x42\x61tchDeleteIntentsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\x12 dialogflow.googleapis.com/Intent\x12=\n\x07intents\x18\x02 \x03(\x0b\x32\'.google.cloud.dialogflow.v2beta1.IntentB\x03\xe0\x41\x02"G\n\x0bIntentBatch\x12\x38\n\x07intents\x18\x01 \x03(\x0b\x32\'.google.cloud.dialogflow.v2beta1.Intent*?\n\nIntentView\x12\x1b\n\x17INTENT_VIEW_UNSPECIFIED\x10\x00\x12\x14\n\x10INTENT_VIEW_FULL\x10\x01\x32\xe3\x10\n\x07Intents\x12\x87\x02\n\x0bListIntents\x12\x33.google.cloud.dialogflow.v2beta1.ListIntentsRequest\x1a\x34.google.cloud.dialogflow.v2beta1.ListIntentsResponse"\x8c\x01\x82\xd3\xe4\x93\x02\x66\x12*/v2beta1/{parent=projects/*/agent}/intentsZ8\x12\x36/v2beta1/{parent=projects/*/locations/*/agent}/intents\xda\x41\x06parent\xda\x41\x14parent,language_code\x12\xf2\x01\n\tGetIntent\x12\x31.google.cloud.dialogflow.v2beta1.GetIntentRequest\x1a\'.google.cloud.dialogflow.v2beta1.Intent"\x88\x01\x82\xd3\xe4\x93\x02\x66\x12*/v2beta1/{name=projects/*/agent/intents/*}Z8\x12\x36/v2beta1/{name=projects/*/locations/*/agent/intents/*}\xda\x41\x04name\xda\x41\x12name,language_code\x12\x9a\x02\n\x0c\x43reateIntent\x12\x34.google.cloud.dialogflow.v2beta1.CreateIntentRequest\x1a\'.google.cloud.dialogflow.v2beta1.Intent"\xaa\x01\x82\xd3\xe4\x93\x02v"*/v2beta1/{parent=projects/*/agent}/intents:\x06intentZ@"6/v2beta1/{parent=projects/*/locations/*/agent}/intents:\x06intent\xda\x41\rparent,intent\xda\x41\x1bparent,intent,language_code\x12\xd3\x02\n\x0cUpdateIntent\x12\x34.google.cloud.dialogflow.v2beta1.UpdateIntentRequest\x1a\'.google.cloud.dialogflow.v2beta1.Intent"\xe3\x01\x82\xd3\xe4\x93\x02\x84\x01\x32\x31/v2beta1/{intent.name=projects/*/agent/intents/*}:\x06intentZG2=/v2beta1/{intent.name=projects/*/locations/*/agent/intents/*}:\x06intent\xda\x41\x12intent,update_mask\xda\x41\x06intent\xda\x41\x14intent,language_code\xda\x41 intent,language_code,update_mask\x12\xd1\x01\n\x0c\x44\x65leteIntent\x12\x34.google.cloud.dialogflow.v2beta1.DeleteIntentRequest\x1a\x16.google.protobuf.Empty"s\x82\xd3\xe4\x93\x02\x66**/v2beta1/{name=projects/*/agent/intents/*}Z8*6/v2beta1/{name=projects/*/locations/*/agent/intents/*}\xda\x41\x04name\x12\xd4\x02\n\x12\x42\x61tchUpdateIntents\x12:.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest\x1a\x1d.google.longrunning.Operation"\xe2\x01\x82\xd3\xe4\x93\x02\x84\x01"6/v2beta1/{parent=projects/*/agent}/intents:batchUpdate:\x01*ZG"B/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchUpdate:\x01*\xca\x41T\n:google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse\x12\x16google.protobuf.Struct\x12\xc0\x02\n\x12\x42\x61tchDeleteIntents\x12:.google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest\x1a\x1d.google.longrunning.Operation"\xce\x01\x82\xd3\xe4\x93\x02\x84\x01"6/v2beta1/{parent=projects/*/agent}/intents:batchDelete:\x01*ZG"B/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchDelete:\x01*\xda\x41\x0eparent,intents\xca\x41/\n\x15google.protobuf.Empty\x12\x16google.protobuf.Struct\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xa9\x01\n#com.google.cloud.dialogflow.v2beta1B\x0bIntentProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_audio__config__pb2.DESCRIPTOR, @@ -56,7 +51,6 @@ google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, google_dot_protobuf_dot_struct__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -65,6 +59,7 @@ full_name="google.cloud.dialogflow.v2beta1.IntentView", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="INTENT_VIEW_UNSPECIFIED", @@ -72,6 +67,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="INTENT_VIEW_FULL", @@ -79,12 +75,13 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=11881, - serialized_end=11944, + serialized_start=12288, + serialized_end=12351, ) _sym_db.RegisterEnumDescriptor(_INTENTVIEW) @@ -98,6 +95,7 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Type", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="TYPE_UNSPECIFIED", @@ -105,22 +103,29 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="EXAMPLE", index=1, number=1, serialized_options=None, type=None + name="EXAMPLE", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="TEMPLATE", index=2, number=2, - serialized_options=_b("\010\001"), + serialized_options=b"\010\001", type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=1627, - serialized_end=1686, + serialized_start=1735, + serialized_end=1794, ) _sym_db.RegisterEnumDescriptor(_INTENT_TRAININGPHRASE_TYPE) @@ -129,6 +134,7 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="CARD_WIDTH_UNSPECIFIED", @@ -136,18 +142,29 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SMALL", index=1, number=1, serialized_options=None, type=None + name="SMALL", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MEDIUM", index=2, number=2, serialized_options=None, type=None + name="MEDIUM", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=5905, - serialized_end=5967, + serialized_start=6018, + serialized_end=6080, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_RBMCAROUSELCARD_CARDWIDTH) @@ -156,6 +173,7 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="CARD_ORIENTATION_UNSPECIFIED", @@ -163,18 +181,29 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="HORIZONTAL", index=1, number=1, serialized_options=None, type=None + name="HORIZONTAL", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="VERTICAL", index=2, number=2, serialized_options=None, type=None + name="VERTICAL", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=6312, - serialized_end=6393, + serialized_start=6425, + serialized_end=6506, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_RBMSTANDALONECARD_CARDORIENTATION) @@ -183,6 +212,7 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED", @@ -190,18 +220,29 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LEFT", index=1, number=1, serialized_options=None, type=None + name="LEFT", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RIGHT", index=2, number=2, serialized_options=None, type=None + name="RIGHT", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=6395, - serialized_end=6484, + serialized_start=6508, + serialized_end=6597, ) _sym_db.RegisterEnumDescriptor( _INTENT_MESSAGE_RBMSTANDALONECARD_THUMBNAILIMAGEALIGNMENT @@ -212,6 +253,7 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="HEIGHT_UNSPECIFIED", @@ -219,21 +261,37 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SHORT", index=1, number=1, serialized_options=None, type=None + name="SHORT", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MEDIUM", index=2, number=2, serialized_options=None, type=None + name="MEDIUM", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TALL", index=3, number=3, serialized_options=None, type=None + name="TALL", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=6863, - serialized_end=6928, + serialized_start=6976, + serialized_end=7041, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA_HEIGHT) @@ -242,6 +300,7 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="RESPONSE_MEDIA_TYPE_UNSPECIFIED", @@ -249,15 +308,21 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="AUDIO", index=1, number=1, serialized_options=None, type=None + name="AUDIO", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=8192, - serialized_end=8259, + serialized_start=8305, + serialized_end=8372, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIATYPE) @@ -266,6 +331,7 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="URL_TYPE_HINT_UNSPECIFIED", @@ -273,18 +339,29 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="AMP_ACTION", index=1, number=1, serialized_options=None, type=None + name="AMP_ACTION", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="AMP_CONTENT", index=2, number=2, serialized_options=None, type=None + name="AMP_CONTENT", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=8961, - serialized_end=9038, + serialized_start=9074, + serialized_end=9151, ) _sym_db.RegisterEnumDescriptor( _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION_URLTYPEHINT @@ -295,6 +372,7 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="IMAGE_DISPLAY_OPTIONS_UNSPECIFIED", @@ -302,15 +380,31 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="GRAY", index=1, number=1, serialized_options=None, type=None + name="GRAY", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="WHITE", index=2, number=2, serialized_options=None, type=None + name="WHITE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CROPPED", index=3, number=3, serialized_options=None, type=None + name="CROPPED", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="BLURRED_BACKGROUND", @@ -318,12 +412,13 @@ number=4, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=9040, - serialized_end=9158, + serialized_start=9153, + serialized_end=9271, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_BROWSECAROUSELCARD_IMAGEDISPLAYOPTIONS) @@ -332,6 +427,7 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="HORIZONTAL_ALIGNMENT_UNSPECIFIED", @@ -339,21 +435,37 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LEADING", index=1, number=1, serialized_options=None, type=None + name="LEADING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CENTER", index=2, number=2, serialized_options=None, type=None + name="CENTER", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TRAILING", index=3, number=3, serialized_options=None, type=None + name="TRAILING", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=9682, - serialized_end=9780, + serialized_start=9795, + serialized_end=9893, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_COLUMNPROPERTIES_HORIZONTALALIGNMENT) @@ -362,6 +474,7 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.Platform", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="PLATFORM_UNSPECIFIED", @@ -369,27 +482,63 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FACEBOOK", index=1, number=1, serialized_options=None, type=None + name="FACEBOOK", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SLACK", index=2, number=2, serialized_options=None, type=None + name="SLACK", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TELEGRAM", index=3, number=3, serialized_options=None, type=None + name="TELEGRAM", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="KIK", index=4, number=4, serialized_options=None, type=None + name="KIK", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SKYPE", index=5, number=5, serialized_options=None, type=None + name="SKYPE", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LINE", index=6, number=6, serialized_options=None, type=None + name="LINE", + index=6, + number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="VIBER", index=7, number=7, serialized_options=None, type=None + name="VIBER", + index=7, + number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="ACTIONS_ON_GOOGLE", @@ -397,9 +546,15 @@ number=8, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TELEPHONY", index=9, number=10, serialized_options=None, type=None + name="TELEPHONY", + index=9, + number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="GOOGLE_HANGOUTS", @@ -407,12 +562,13 @@ number=11, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=9931, - serialized_end=10106, + serialized_start=10044, + serialized_end=10219, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_PLATFORM) @@ -421,6 +577,7 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.WebhookState", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="WEBHOOK_STATE_UNSPECIFIED", @@ -428,6 +585,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="WEBHOOK_STATE_ENABLED", @@ -435,6 +593,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING", @@ -442,12 +601,13 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=10208, - serialized_end=10324, + serialized_start=10321, + serialized_end=10437, ) _sym_db.RegisterEnumDescriptor(_INTENT_WEBHOOKSTATE) @@ -458,6 +618,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -468,7 +629,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -476,6 +637,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_type", @@ -486,7 +648,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -494,6 +656,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="alias", @@ -504,7 +667,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -512,6 +675,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="user_defined", @@ -530,6 +694,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -540,8 +705,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1547, - serialized_end=1625, + serialized_start=1655, + serialized_end=1733, ) _INTENT_TRAININGPHRASE = _descriptor.Descriptor( @@ -550,6 +715,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -560,7 +726,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -568,6 +734,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="type", @@ -584,8 +751,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parts", @@ -602,8 +770,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="times_added_count", @@ -620,8 +789,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -632,8 +802,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1337, - serialized_end=1686, + serialized_start=1430, + serialized_end=1794, ) _INTENT_PARAMETER = _descriptor.Descriptor( @@ -642,6 +812,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -652,7 +823,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -660,6 +831,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -670,7 +842,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -678,6 +850,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -688,7 +861,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -696,6 +869,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="default_value", @@ -706,7 +880,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -714,6 +888,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_type_display_name", @@ -724,7 +899,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -732,6 +907,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="mandatory", @@ -750,6 +926,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="prompts", @@ -768,6 +945,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="is_list", @@ -786,6 +964,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -796,8 +975,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1689, - serialized_end=1861, + serialized_start=1797, + serialized_end=1969, ) _INTENT_MESSAGE_TEXT = _descriptor.Descriptor( @@ -806,6 +985,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -824,6 +1004,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -834,8 +1015,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3691, - serialized_end=3711, + serialized_start=3804, + serialized_end=3824, ) _INTENT_MESSAGE_IMAGE = _descriptor.Descriptor( @@ -844,6 +1025,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="image_uri", @@ -854,7 +1036,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -862,6 +1044,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="accessibility_text", @@ -872,7 +1055,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -880,6 +1063,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -890,8 +1074,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3713, - serialized_end=3767, + serialized_start=3826, + serialized_end=3880, ) _INTENT_MESSAGE_QUICKREPLIES = _descriptor.Descriptor( @@ -900,6 +1084,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -910,7 +1095,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -918,6 +1103,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="quick_replies", @@ -936,6 +1122,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -946,8 +1133,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3769, - serialized_end=3821, + serialized_start=3882, + serialized_end=3934, ) _INTENT_MESSAGE_CARD_BUTTON = _descriptor.Descriptor( @@ -956,6 +1143,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -966,7 +1154,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -974,6 +1162,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="postback", @@ -984,7 +1173,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -992,6 +1181,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1002,8 +1192,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3962, - serialized_end=4002, + serialized_start=4075, + serialized_end=4115, ) _INTENT_MESSAGE_CARD = _descriptor.Descriptor( @@ -1012,6 +1202,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -1022,7 +1213,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1030,6 +1221,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="subtitle", @@ -1040,7 +1232,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1048,6 +1240,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_uri", @@ -1058,7 +1251,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1066,6 +1259,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="buttons", @@ -1084,6 +1278,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1094,8 +1289,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3824, - serialized_end=4002, + serialized_start=3937, + serialized_end=4115, ) _INTENT_MESSAGE_SIMPLERESPONSE = _descriptor.Descriptor( @@ -1104,6 +1299,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text_to_speech", @@ -1114,7 +1310,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1122,6 +1318,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="ssml", @@ -1132,7 +1329,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1140,6 +1337,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_text", @@ -1150,7 +1348,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1158,6 +1356,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1168,8 +1367,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4004, - serialized_end=4080, + serialized_start=4117, + serialized_end=4193, ) _INTENT_MESSAGE_SIMPLERESPONSES = _descriptor.Descriptor( @@ -1178,6 +1377,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="simple_responses", @@ -1196,6 +1396,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1206,8 +1407,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4082, - serialized_end=4189, + serialized_start=4195, + serialized_end=4302, ) _INTENT_MESSAGE_BASICCARD_BUTTON_OPENURIACTION = _descriptor.Descriptor( @@ -1216,6 +1417,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -1226,7 +1428,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1234,6 +1436,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1244,8 +1447,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4546, - serialized_end=4574, + serialized_start=4659, + serialized_end=4687, ) _INTENT_MESSAGE_BASICCARD_BUTTON = _descriptor.Descriptor( @@ -1254,6 +1457,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -1264,7 +1468,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1272,6 +1476,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="open_uri_action", @@ -1290,6 +1495,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1300,8 +1506,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4416, - serialized_end=4574, + serialized_start=4529, + serialized_end=4687, ) _INTENT_MESSAGE_BASICCARD = _descriptor.Descriptor( @@ -1310,6 +1516,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -1320,7 +1527,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1328,6 +1535,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="subtitle", @@ -1338,7 +1546,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1346,6 +1554,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="formatted_text", @@ -1356,7 +1565,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1364,6 +1573,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -1382,6 +1592,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="buttons", @@ -1400,6 +1611,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1410,8 +1622,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4192, - serialized_end=4574, + serialized_start=4305, + serialized_end=4687, ) _INTENT_MESSAGE_SUGGESTION = _descriptor.Descriptor( @@ -1420,6 +1632,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -1430,7 +1643,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1438,6 +1651,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1448,8 +1662,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4576, - serialized_end=4603, + serialized_start=4689, + serialized_end=4716, ) _INTENT_MESSAGE_SUGGESTIONS = _descriptor.Descriptor( @@ -1458,6 +1672,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="suggestions", @@ -1476,6 +1691,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1486,8 +1702,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4605, - serialized_end=4699, + serialized_start=4718, + serialized_end=4812, ) _INTENT_MESSAGE_LINKOUTSUGGESTION = _descriptor.Descriptor( @@ -1496,6 +1712,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="destination_name", @@ -1506,7 +1723,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1514,6 +1731,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="uri", @@ -1524,7 +1742,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1532,6 +1750,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1542,8 +1761,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4701, - serialized_end=4759, + serialized_start=4814, + serialized_end=4872, ) _INTENT_MESSAGE_LISTSELECT_ITEM = _descriptor.Descriptor( @@ -1552,6 +1771,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="info", @@ -1570,6 +1790,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="title", @@ -1580,7 +1801,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1588,6 +1809,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -1598,7 +1820,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1606,6 +1828,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -1624,6 +1847,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1634,8 +1858,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4895, - serialized_end=5085, + serialized_start=5008, + serialized_end=5198, ) _INTENT_MESSAGE_LISTSELECT = _descriptor.Descriptor( @@ -1644,6 +1868,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -1654,7 +1879,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1662,6 +1887,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="items", @@ -1680,6 +1906,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="subtitle", @@ -1690,14 +1917,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1708,8 +1936,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4762, - serialized_end=5085, + serialized_start=4875, + serialized_end=5198, ) _INTENT_MESSAGE_CAROUSELSELECT_ITEM = _descriptor.Descriptor( @@ -1718,6 +1946,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="info", @@ -1736,6 +1965,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="title", @@ -1746,7 +1976,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1754,6 +1984,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -1764,7 +1995,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1772,6 +2003,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -1790,6 +2022,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1800,8 +2033,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4895, - serialized_end=5085, + serialized_start=5008, + serialized_end=5198, ) _INTENT_MESSAGE_CAROUSELSELECT = _descriptor.Descriptor( @@ -1810,6 +2043,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="items", @@ -1828,6 +2062,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1838,8 +2073,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5088, - serialized_end=5381, + serialized_start=5201, + serialized_end=5494, ) _INTENT_MESSAGE_SELECTITEMINFO = _descriptor.Descriptor( @@ -1848,6 +2083,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -1858,7 +2094,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1866,6 +2102,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="synonyms", @@ -1884,6 +2121,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1894,8 +2132,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5383, - serialized_end=5430, + serialized_start=5496, + serialized_end=5543, ) _INTENT_MESSAGE_TELEPHONYPLAYAUDIO = _descriptor.Descriptor( @@ -1904,6 +2142,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="audio_uri", @@ -1914,7 +2153,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1922,6 +2161,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1932,8 +2172,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5432, - serialized_end=5471, + serialized_start=5545, + serialized_end=5584, ) _INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH = _descriptor.Descriptor( @@ -1942,6 +2182,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -1952,7 +2193,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1960,6 +2201,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="ssml", @@ -1970,7 +2212,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1978,6 +2220,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1993,11 +2236,12 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech.source", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=5473, - serialized_end=5542, + serialized_start=5586, + serialized_end=5655, ) _INTENT_MESSAGE_TELEPHONYTRANSFERCALL = _descriptor.Descriptor( @@ -2006,6 +2250,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="phone_number", @@ -2016,7 +2261,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2024,6 +2269,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -2034,8 +2280,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5544, - serialized_end=5589, + serialized_start=5657, + serialized_end=5702, ) _INTENT_MESSAGE_RBMTEXT = _descriptor.Descriptor( @@ -2044,6 +2290,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -2054,7 +2301,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2062,6 +2309,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="rbm_suggestion", @@ -2080,6 +2328,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2090,8 +2339,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5591, - serialized_end=5701, + serialized_start=5704, + serialized_end=5814, ) _INTENT_MESSAGE_RBMCAROUSELCARD = _descriptor.Descriptor( @@ -2100,6 +2349,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="card_width", @@ -2118,6 +2368,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="card_contents", @@ -2136,6 +2387,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2146,8 +2398,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5704, - serialized_end=5967, + serialized_start=5817, + serialized_end=6080, ) _INTENT_MESSAGE_RBMSTANDALONECARD = _descriptor.Descriptor( @@ -2156,6 +2408,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="card_orientation", @@ -2174,6 +2427,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="thumbnail_image_alignment", @@ -2192,6 +2446,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="card_content", @@ -2210,6 +2465,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2223,8 +2479,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5970, - serialized_end=6484, + serialized_start=6083, + serialized_end=6597, ) _INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA = _descriptor.Descriptor( @@ -2233,6 +2489,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="file_uri", @@ -2243,7 +2500,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2251,6 +2508,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="thumbnail_uri", @@ -2261,7 +2519,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2269,6 +2527,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="height", @@ -2287,6 +2546,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2297,8 +2557,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6714, - serialized_end=6928, + serialized_start=6827, + serialized_end=7041, ) _INTENT_MESSAGE_RBMCARDCONTENT = _descriptor.Descriptor( @@ -2307,6 +2567,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -2317,7 +2578,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2325,6 +2586,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -2335,7 +2597,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2343,6 +2605,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="media", @@ -2361,6 +2624,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="suggestions", @@ -2379,6 +2643,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2389,8 +2654,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6487, - serialized_end=6928, + serialized_start=6600, + serialized_end=7041, ) _INTENT_MESSAGE_RBMSUGGESTION = _descriptor.Descriptor( @@ -2399,6 +2664,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="reply", @@ -2417,6 +2683,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="action", @@ -2435,6 +2702,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2450,11 +2718,12 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.suggestion", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=6931, - serialized_end=7130, + serialized_start=7044, + serialized_end=7243, ) _INTENT_MESSAGE_RBMSUGGESTEDREPLY = _descriptor.Descriptor( @@ -2463,6 +2732,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -2473,7 +2743,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2481,6 +2751,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="postback_data", @@ -2491,7 +2762,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2499,6 +2770,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2509,8 +2781,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7132, - serialized_end=7188, + serialized_start=7245, + serialized_end=7301, ) _INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONDIAL = _descriptor.Descriptor( @@ -2519,6 +2791,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="phone_number", @@ -2529,7 +2802,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2537,6 +2810,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -2547,8 +2821,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7597, - serialized_end=7643, + serialized_start=7710, + serialized_end=7756, ) _INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONOPENURI = _descriptor.Descriptor( @@ -2557,6 +2831,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -2567,7 +2842,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2575,6 +2850,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -2585,8 +2861,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7645, - serialized_end=7685, + serialized_start=7758, + serialized_end=7798, ) _INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONSHARELOCATION = _descriptor.Descriptor( @@ -2595,6 +2871,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], extensions=[], nested_types=[], @@ -2604,8 +2881,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7687, - serialized_end=7720, + serialized_start=7800, + serialized_end=7833, ) _INTENT_MESSAGE_RBMSUGGESTEDACTION = _descriptor.Descriptor( @@ -2614,6 +2891,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -2624,7 +2902,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2632,6 +2910,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="postback_data", @@ -2642,7 +2921,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2650,6 +2929,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="dial", @@ -2668,6 +2948,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="open_url", @@ -2686,6 +2967,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="share_location", @@ -2704,6 +2986,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2723,11 +3006,12 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.action", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=7191, - serialized_end=7730, + serialized_start=7304, + serialized_end=7843, ) _INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT = _descriptor.Descriptor( @@ -2736,6 +3020,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -2746,7 +3031,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2754,6 +3039,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -2764,7 +3050,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2772,6 +3058,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="large_image", @@ -2790,6 +3077,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="icon", @@ -2808,6 +3096,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="content_url", @@ -2818,7 +3107,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2826,6 +3115,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2841,11 +3131,12 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.image", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=7955, - serialized_end=8190, + serialized_start=8068, + serialized_end=8303, ) _INTENT_MESSAGE_MEDIACONTENT = _descriptor.Descriptor( @@ -2854,6 +3145,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="media_type", @@ -2872,6 +3164,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="media_objects", @@ -2890,6 +3183,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2900,8 +3194,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7733, - serialized_end=8259, + serialized_start=7846, + serialized_end=8372, ) _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION = _descriptor.Descriptor( @@ -2910,6 +3204,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="url", @@ -2920,7 +3215,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2928,6 +3223,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="url_type_hint", @@ -2946,6 +3242,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2958,8 +3255,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8790, - serialized_end=9038, + serialized_start=8903, + serialized_end=9151, ) _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM = _descriptor.Descriptor( @@ -2968,6 +3265,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="open_uri_action", @@ -2986,6 +3284,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="title", @@ -2996,7 +3295,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3004,6 +3303,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -3014,7 +3314,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3022,6 +3322,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -3040,6 +3341,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="footer", @@ -3050,7 +3352,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3058,6 +3360,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3070,8 +3373,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8510, - serialized_end=9038, + serialized_start=8623, + serialized_end=9151, ) _INTENT_MESSAGE_BROWSECAROUSELCARD = _descriptor.Descriptor( @@ -3080,6 +3383,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="items", @@ -3098,6 +3402,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_display_options", @@ -3116,6 +3421,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3126,8 +3432,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8262, - serialized_end=9158, + serialized_start=8375, + serialized_end=9271, ) _INTENT_MESSAGE_TABLECARD = _descriptor.Descriptor( @@ -3136,6 +3442,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="title", @@ -3146,7 +3453,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3154,6 +3461,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="subtitle", @@ -3164,7 +3472,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3172,6 +3480,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -3190,6 +3499,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="column_properties", @@ -3208,6 +3518,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="rows", @@ -3226,6 +3537,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="buttons", @@ -3244,6 +3556,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3254,8 +3567,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=9161, - serialized_end=9527, + serialized_start=9274, + serialized_end=9640, ) _INTENT_MESSAGE_COLUMNPROPERTIES = _descriptor.Descriptor( @@ -3264,6 +3577,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="header", @@ -3274,7 +3588,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3282,6 +3596,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="horizontal_alignment", @@ -3300,6 +3615,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3310,8 +3626,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=9530, - serialized_end=9780, + serialized_start=9643, + serialized_end=9893, ) _INTENT_MESSAGE_TABLECARDROW = _descriptor.Descriptor( @@ -3320,6 +3636,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="cells", @@ -3338,6 +3655,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="divider_after", @@ -3356,6 +3674,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3366,8 +3685,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=9782, - serialized_end=9897, + serialized_start=9895, + serialized_end=10010, ) _INTENT_MESSAGE_TABLECARDCELL = _descriptor.Descriptor( @@ -3376,6 +3695,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -3386,7 +3706,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3394,6 +3714,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -3404,8 +3725,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=9899, - serialized_end=9928, + serialized_start=10012, + serialized_end=10041, ) _INTENT_MESSAGE = _descriptor.Descriptor( @@ -3414,6 +3735,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -3432,6 +3754,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -3450,6 +3773,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="quick_replies", @@ -3468,6 +3792,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="card", @@ -3486,6 +3811,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="payload", @@ -3504,6 +3830,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="simple_responses", @@ -3522,6 +3849,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="basic_card", @@ -3540,6 +3868,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="suggestions", @@ -3558,6 +3887,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="link_out_suggestion", @@ -3576,6 +3906,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="list_select", @@ -3594,6 +3925,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="carousel_select", @@ -3612,6 +3944,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="telephony_play_audio", @@ -3630,6 +3963,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="telephony_synthesize_speech", @@ -3648,6 +3982,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="telephony_transfer_call", @@ -3666,6 +4001,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="rbm_text", @@ -3684,6 +4020,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="rbm_standalone_rich_card", @@ -3702,6 +4039,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="rbm_carousel_rich_card", @@ -3720,6 +4058,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="browse_carousel_card", @@ -3738,6 +4077,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="table_card", @@ -3756,6 +4096,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="media_content", @@ -3774,6 +4115,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="platform", @@ -3790,8 +4132,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3837,11 +4180,12 @@ full_name="google.cloud.dialogflow.v2beta1.Intent.Message.message", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=1864, - serialized_end=10117, + serialized_start=1972, + serialized_end=10230, ) _INTENT_FOLLOWUPINTENTINFO = _descriptor.Descriptor( @@ -3850,6 +4194,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="followup_intent_name", @@ -3860,7 +4205,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3868,6 +4213,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parent_followup_intent_name", @@ -3878,7 +4224,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3886,6 +4232,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3896,8 +4243,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=10119, - serialized_end=10206, + serialized_start=10232, + serialized_end=10319, ) _INTENT = _descriptor.Descriptor( @@ -3906,6 +4253,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -3916,14 +4264,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -3934,14 +4283,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="webhook_state", @@ -3958,8 +4308,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="priority", @@ -3976,8 +4327,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="is_fallback", @@ -3994,8 +4346,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="ml_enabled", @@ -4012,8 +4365,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\030\001\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="ml_disabled", @@ -4030,8 +4384,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="end_interaction", @@ -4048,8 +4403,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_context_names", @@ -4066,8 +4422,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="events", @@ -4084,8 +4441,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="training_phrases", @@ -4102,8 +4460,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="action", @@ -4114,14 +4473,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_contexts", @@ -4138,8 +4498,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="reset_contexts", @@ -4156,8 +4517,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parameters", @@ -4174,8 +4536,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="messages", @@ -4194,6 +4557,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="default_response_platforms", @@ -4210,8 +4574,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="root_followup_intent_name", @@ -4222,14 +4587,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parent_followup_intent_name", @@ -4240,14 +4606,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="followup_intent_info", @@ -4264,8 +4631,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -4276,15 +4644,13 @@ _INTENT_FOLLOWUPINTENTINFO, ], enum_types=[_INTENT_WEBHOOKSTATE], - serialized_options=_b( - "\352A\215\001\n dialogflow.googleapis.com/Intent\022)projects/{project}/agent/intents/{intent}\022>projects/{project}/locations/{location}/agent/intents/{intent}" - ), + serialized_options=b"\352A\215\001\n dialogflow.googleapis.com/Intent\022)projects/{project}/agent/intents/{intent}\022>projects/{project}/locations/{location}/agent/intents/{intent}", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], serialized_start=476, - serialized_end=10472, + serialized_end=10585, ) @@ -4294,6 +4660,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -4304,14 +4671,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b'\340A\002\372A"\022 dialogflow.googleapis.com/Intent', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -4322,14 +4690,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_view", @@ -4348,6 +4717,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -4366,6 +4736,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -4376,7 +4747,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -4384,6 +4755,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -4394,8 +4766,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=10475, - serialized_end=10639, + serialized_start=10588, + serialized_end=10799, ) @@ -4405,6 +4777,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="intents", @@ -4423,6 +4796,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -4433,7 +4807,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -4441,6 +4815,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -4451,8 +4826,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=10641, - serialized_end=10745, + serialized_start=10801, + serialized_end=10905, ) @@ -4462,6 +4837,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -4472,14 +4848,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b'\340A\002\372A"\n dialogflow.googleapis.com/Intent', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -4490,14 +4867,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_view", @@ -4516,6 +4894,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -4526,8 +4905,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=10747, - serialized_end=10868, + serialized_start=10908, + serialized_end=11076, ) @@ -4537,6 +4916,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -4547,14 +4927,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b'\340A\002\372A"\022 dialogflow.googleapis.com/Intent', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent", @@ -4571,8 +4952,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -4583,14 +4965,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_view", @@ -4609,6 +4992,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -4619,8 +5003,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=10871, - serialized_end=11054, + serialized_start=11079, + serialized_end=11314, ) @@ -4630,6 +5014,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="intent", @@ -4646,8 +5031,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -4658,14 +5044,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -4684,6 +5071,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_view", @@ -4702,6 +5090,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -4712,8 +5101,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=11057, - serialized_end=11273, + serialized_start=11317, + serialized_end=11543, ) @@ -4723,6 +5112,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -4733,14 +5123,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b'\340A\002\372A"\n dialogflow.googleapis.com/Intent', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -4751,8 +5142,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=11275, - serialized_end=11310, + serialized_start=11545, + serialized_end=11622, ) @@ -4762,6 +5153,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -4772,14 +5164,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b'\340A\002\372A"\022 dialogflow.googleapis.com/Intent', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_batch_uri", @@ -4790,7 +5183,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -4798,6 +5191,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_batch_inline", @@ -4816,6 +5210,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -4826,14 +5221,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -4852,6 +5248,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_view", @@ -4870,6 +5267,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -4885,11 +5283,12 @@ full_name="google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.intent_batch", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=11313, - serialized_end=11615, + serialized_start=11625, + serialized_end=11974, ) @@ -4899,6 +5298,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="intents", @@ -4917,6 +5317,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -4927,8 +5328,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=11617, - serialized_end=11703, + serialized_start=11976, + serialized_end=12062, ) @@ -4938,6 +5339,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -4948,14 +5350,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b'\340A\002\372A"\022 dialogflow.googleapis.com/Intent', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intents", @@ -4972,8 +5375,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -4984,8 +5388,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=11705, - serialized_end=11806, + serialized_start=12065, + serialized_end=12213, ) @@ -4995,6 +5399,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="intents", @@ -5013,6 +5418,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -5023,8 +5429,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=11808, - serialized_end=11879, + serialized_start=12215, + serialized_end=12286, ) _INTENT_TRAININGPHRASE_PART.containing_type = _INTENT_TRAININGPHRASE @@ -5530,19 +5936,18 @@ Intent = _reflection.GeneratedProtocolMessageType( "Intent", (_message.Message,), - dict( - TrainingPhrase=_reflection.GeneratedProtocolMessageType( + { + "TrainingPhrase": _reflection.GeneratedProtocolMessageType( "TrainingPhrase", (_message.Message,), - dict( - Part=_reflection.GeneratedProtocolMessageType( + { + "Part": _reflection.GeneratedProtocolMessageType( "Part", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_TRAININGPHRASE_PART, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Represents a part of a training phrase. - + { + "DESCRIPTOR": _INTENT_TRAININGPHRASE_PART, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Represents a part of a training phrase. Attributes: text: @@ -5561,12 +5966,11 @@ with the API, you must set this to true. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part) - ), + }, ), - DESCRIPTOR=_INTENT_TRAININGPHRASE, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Represents an example that the agent is trained on. - + "DESCRIPTOR": _INTENT_TRAININGPHRASE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Represents an example that the agent is trained on. Attributes: name: @@ -5596,16 +6000,15 @@ editing an intent or training, this counter is increased. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase) - ), + }, ), - Parameter=_reflection.GeneratedProtocolMessageType( + "Parameter": _reflection.GeneratedProtocolMessageType( "Parameter", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_PARAMETER, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Represents intent parameters. - + { + "DESCRIPTOR": _INTENT_PARAMETER, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Represents intent parameters. Attributes: name: @@ -5613,11 +6016,11 @@ display_name: Required. The name of the parameter. value: - Optional. The definition of the parameter value. It can be: - - a constant string, - a parameter value defined as - ``$parameter_name``, - an original parameter value defined as - ``$parameter_name.original``, - a parameter value from some - context defined as ``#context_name.parameter_name``. + Optional. The definition of the parameter value. It can be: - + a constant string, - a parameter value defined as + ``$parameter_name``, - an original parameter value defined as + ``$parameter_name.original``, - a parameter value from some + context defined as ``#context_name.parameter_name``. default_value: Optional. The default value to use when the ``value`` yields an empty result. Default values can be extracted from contexts @@ -5639,56 +6042,53 @@ values. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Parameter) - ), + }, ), - Message=_reflection.GeneratedProtocolMessageType( + "Message": _reflection.GeneratedProtocolMessageType( "Message", (_message.Message,), - dict( - Text=_reflection.GeneratedProtocolMessageType( + { + "Text": _reflection.GeneratedProtocolMessageType( "Text", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_TEXT, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The text response message. - + { + "DESCRIPTOR": _INTENT_MESSAGE_TEXT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The text response message. Attributes: text: - Optional. The collection of the agent's responses. + Optional. The collection of the agent’s responses. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.Text) - ), + }, ), - Image=_reflection.GeneratedProtocolMessageType( + "Image": _reflection.GeneratedProtocolMessageType( "Image", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_IMAGE, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The image response message. - + { + "DESCRIPTOR": _INTENT_MESSAGE_IMAGE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The image response message. Attributes: image_uri: Optional. The public URI to an image file. accessibility_text: A text description of the image to be used for accessibility, - e.g., screen readers. Required if image\_uri is set for + e.g., screen readers. Required if image_uri is set for CarouselSelect. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.Image) - ), + }, ), - QuickReplies=_reflection.GeneratedProtocolMessageType( + "QuickReplies": _reflection.GeneratedProtocolMessageType( "QuickReplies", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_QUICKREPLIES, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The quick replies response message. - + { + "DESCRIPTOR": _INTENT_MESSAGE_QUICKREPLIES, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The quick replies response message. Attributes: title: @@ -5697,20 +6097,19 @@ Optional. The collection of quick replies. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies) - ), + }, ), - Card=_reflection.GeneratedProtocolMessageType( + "Card": _reflection.GeneratedProtocolMessageType( "Card", (_message.Message,), - dict( - Button=_reflection.GeneratedProtocolMessageType( + { + "Button": _reflection.GeneratedProtocolMessageType( "Button", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_CARD_BUTTON, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Optional. Contains information about a button. - + { + "DESCRIPTOR": _INTENT_MESSAGE_CARD_BUTTON, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Optional. Contains information about a button. Attributes: text: @@ -5720,12 +6119,11 @@ to open. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_CARD, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The card response message. - + "DESCRIPTOR": _INTENT_MESSAGE_CARD, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The card response message. Attributes: title: @@ -5738,78 +6136,74 @@ Optional. The collection of card buttons. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.Card) - ), + }, ), - SimpleResponse=_reflection.GeneratedProtocolMessageType( + "SimpleResponse": _reflection.GeneratedProtocolMessageType( "SimpleResponse", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_SIMPLERESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The simple response message containing speech or text. - + { + "DESCRIPTOR": _INTENT_MESSAGE_SIMPLERESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The simple response message containing speech or text. Attributes: text_to_speech: - One of text\_to\_speech or ssml must be provided. The plain - text of the speech output. Mutually exclusive with ssml. + One of text_to_speech or ssml must be provided. The plain text + of the speech output. Mutually exclusive with ssml. ssml: - One of text\_to\_speech or ssml must be provided. Structured + One of text_to_speech or ssml must be provided. Structured spoken response to the user in the SSML format. Mutually - exclusive with text\_to\_speech. + exclusive with text_to_speech. display_text: Optional. The text to display. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse) - ), + }, ), - SimpleResponses=_reflection.GeneratedProtocolMessageType( + "SimpleResponses": _reflection.GeneratedProtocolMessageType( "SimpleResponses", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_SIMPLERESPONSES, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The collection of simple response candidates. This message - in ``QueryResult.fulfillment_messages`` and + { + "DESCRIPTOR": _INTENT_MESSAGE_SIMPLERESPONSES, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The collection of simple response candidates. This message in + ``QueryResult.fulfillment_messages`` and ``WebhookResponse.fulfillment_messages`` should contain only one ``SimpleResponse``. - Attributes: simple_responses: Required. The list of simple responses. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponses) - ), + }, ), - BasicCard=_reflection.GeneratedProtocolMessageType( + "BasicCard": _reflection.GeneratedProtocolMessageType( "BasicCard", (_message.Message,), - dict( - Button=_reflection.GeneratedProtocolMessageType( + { + "Button": _reflection.GeneratedProtocolMessageType( "Button", (_message.Message,), - dict( - OpenUriAction=_reflection.GeneratedProtocolMessageType( + { + "OpenUriAction": _reflection.GeneratedProtocolMessageType( "OpenUriAction", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_BASICCARD_BUTTON_OPENURIACTION, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Opens the given URI. - + { + "DESCRIPTOR": _INTENT_MESSAGE_BASICCARD_BUTTON_OPENURIACTION, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Opens the given URI. Attributes: uri: Required. The HTTP or HTTPS scheme URI. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.OpenUriAction) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_BASICCARD_BUTTON, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The button object that appears at the bottom of a card. - + "DESCRIPTOR": _INTENT_MESSAGE_BASICCARD_BUTTON, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The button object that appears at the bottom of a card. Attributes: title: @@ -5818,12 +6212,11 @@ Required. Action to take when a user taps on the button. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_BASICCARD, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The basic card message. Useful for displaying information. - + "DESCRIPTOR": _INTENT_MESSAGE_BASICCARD, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The basic card message. Useful for displaying information. Attributes: title: @@ -5838,50 +6231,47 @@ Optional. The collection of card buttons. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard) - ), + }, ), - Suggestion=_reflection.GeneratedProtocolMessageType( + "Suggestion": _reflection.GeneratedProtocolMessageType( "Suggestion", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_SUGGESTION, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The suggestion chip message that the user can tap to - quickly post a reply to the conversation. - + { + "DESCRIPTOR": _INTENT_MESSAGE_SUGGESTION, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The suggestion chip message that the user can tap to quickly post a + reply to the conversation. Attributes: title: Required. The text shown the in the suggestion chip. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.Suggestion) - ), + }, ), - Suggestions=_reflection.GeneratedProtocolMessageType( + "Suggestions": _reflection.GeneratedProtocolMessageType( "Suggestions", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_SUGGESTIONS, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The collection of suggestions. - + { + "DESCRIPTOR": _INTENT_MESSAGE_SUGGESTIONS, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The collection of suggestions. Attributes: suggestions: Required. The list of suggested replies. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.Suggestions) - ), + }, ), - LinkOutSuggestion=_reflection.GeneratedProtocolMessageType( + "LinkOutSuggestion": _reflection.GeneratedProtocolMessageType( "LinkOutSuggestion", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_LINKOUTSUGGESTION, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The suggestion chip message that allows the user to jump - out to the app or website associated with this agent. - + { + "DESCRIPTOR": _INTENT_MESSAGE_LINKOUTSUGGESTION, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The suggestion chip message that allows the user to jump out to the + app or website associated with this agent. Attributes: destination_name: @@ -5891,20 +6281,19 @@ taps the suggestion chip. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion) - ), + }, ), - ListSelect=_reflection.GeneratedProtocolMessageType( + "ListSelect": _reflection.GeneratedProtocolMessageType( "ListSelect", (_message.Message,), - dict( - Item=_reflection.GeneratedProtocolMessageType( + { + "Item": _reflection.GeneratedProtocolMessageType( "Item", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_LISTSELECT_ITEM, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""An item in the list. - + { + "DESCRIPTOR": _INTENT_MESSAGE_LISTSELECT_ITEM, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """An item in the list. Attributes: info: @@ -5917,12 +6306,11 @@ Optional. The image to display. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_LISTSELECT, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The card for presenting a list of options to select from. - + "DESCRIPTOR": _INTENT_MESSAGE_LISTSELECT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The card for presenting a list of options to select from. Attributes: title: @@ -5933,20 +6321,19 @@ Optional. Subtitle of the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect) - ), + }, ), - CarouselSelect=_reflection.GeneratedProtocolMessageType( + "CarouselSelect": _reflection.GeneratedProtocolMessageType( "CarouselSelect", (_message.Message,), - dict( - Item=_reflection.GeneratedProtocolMessageType( + { + "Item": _reflection.GeneratedProtocolMessageType( "Item", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_CAROUSELSELECT_ITEM, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""An item in the carousel. - + { + "DESCRIPTOR": _INTENT_MESSAGE_CAROUSELSELECT_ITEM, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """An item in the carousel. Attributes: info: @@ -5959,30 +6346,27 @@ Optional. The image to display. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_CAROUSELSELECT, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The card for presenting a carousel of options to select - from. - + "DESCRIPTOR": _INTENT_MESSAGE_CAROUSELSELECT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The card for presenting a carousel of options to select from. Attributes: items: Required. Carousel items. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect) - ), + }, ), - SelectItemInfo=_reflection.GeneratedProtocolMessageType( + "SelectItemInfo": _reflection.GeneratedProtocolMessageType( "SelectItemInfo", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_SELECTITEMINFO, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Additional info about the select item for when it is - triggered in a dialog. - + { + "DESCRIPTOR": _INTENT_MESSAGE_SELECTITEMINFO, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Additional info about the select item for when it is triggered in a + dialog. Attributes: key: @@ -5993,21 +6377,20 @@ this item in dialog. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo) - ), + }, ), - TelephonyPlayAudio=_reflection.GeneratedProtocolMessageType( + "TelephonyPlayAudio": _reflection.GeneratedProtocolMessageType( "TelephonyPlayAudio", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_TELEPHONYPLAYAUDIO, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Plays audio from a file in Telephony Gateway. - + { + "DESCRIPTOR": _INTENT_MESSAGE_TELEPHONYPLAYAUDIO, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Plays audio from a file in Telephony Gateway. Attributes: audio_uri: Required. URI to a Google Cloud Storage object containing the - audio to play, e.g., "gs://bucket/object". The object must + audio to play, e.g., “gs://bucket/object”. The object must contain a single channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz. This object must be readable by the ``service-@gcp-sa- @@ -6020,21 +6403,19 @@ ``TelephonySynthesizeSpeech`` message with SSML. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyPlayAudio) - ), + }, ), - TelephonySynthesizeSpeech=_reflection.GeneratedProtocolMessageType( + "TelephonySynthesizeSpeech": _reflection.GeneratedProtocolMessageType( "TelephonySynthesizeSpeech", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Synthesizes speech and plays back the synthesized audio to - the caller in Telephony Gateway. - - Telephony Gateway takes the synthesizer settings from - ``DetectIntentResponse.output_audio_config`` which can either be set at - request-level or can come from the agent-level synthesizer config. - + { + "DESCRIPTOR": _INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Synthesizes speech and plays back the synthesized audio to the caller + in Telephony Gateway. Telephony Gateway takes the synthesizer + settings from ``DetectIntentResponse.output_audio_config`` which can + either be set at request-level or can come from the agent-level + synthesizer config. Attributes: source: @@ -6046,16 +6427,15 @@ `__. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.TelephonySynthesizeSpeech) - ), + }, ), - TelephonyTransferCall=_reflection.GeneratedProtocolMessageType( + "TelephonyTransferCall": _reflection.GeneratedProtocolMessageType( "TelephonyTransferCall", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_TELEPHONYTRANSFERCALL, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Transfers the call in Telephony Gateway. - + { + "DESCRIPTOR": _INTENT_MESSAGE_TELEPHONYTRANSFERCALL, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Transfers the call in Telephony Gateway. Attributes: phone_number: @@ -6064,17 +6444,15 @@ only allow transferring to US numbers (+1xxxyyyzzzz). """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall) - ), + }, ), - RbmText=_reflection.GeneratedProtocolMessageType( + "RbmText": _reflection.GeneratedProtocolMessageType( "RbmText", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_RBMTEXT, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Rich Business Messaging (RBM) text response with - suggestions. - + { + "DESCRIPTOR": _INTENT_MESSAGE_RBMTEXT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Rich Business Messaging (RBM) text response with suggestions. Attributes: text: @@ -6083,26 +6461,19 @@ Optional. One or more suggestions to show to the user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmText) - ), + }, ), - RbmCarouselCard=_reflection.GeneratedProtocolMessageType( + "RbmCarouselCard": _reflection.GeneratedProtocolMessageType( "RbmCarouselCard", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_RBMCAROUSELCARD, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Carousel Rich Business Messaging (RBM) rich card. - - Rich cards allow you to respond to users with more vivid content, e.g. - with media and suggestions. - - For more details about RBM rich cards, please see: - https://developers.google.com/rcs-business-messaging/rbm/guides/build/send-messages#rich-cards. - If you want to show a single card with more control over the layout, - please use - [RbmStandaloneCard][google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard] - instead. - + { + "DESCRIPTOR": _INTENT_MESSAGE_RBMCAROUSELCARD, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Carousel Rich Business Messaging (RBM) rich card. Rich cards allow + you to respond to users with more vivid content, e.g. with media and + suggestions. If you want to show a single card with more control over + the layout, please use [RbmStandaloneCard][google.cloud.dialogflow.v2b + eta1.Intent.Message.RbmStandaloneCard] instead. Attributes: card_width: @@ -6112,25 +6483,20 @@ least 2 cards and at most 10. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard) - ), + }, ), - RbmStandaloneCard=_reflection.GeneratedProtocolMessageType( + "RbmStandaloneCard": _reflection.GeneratedProtocolMessageType( "RbmStandaloneCard", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_RBMSTANDALONECARD, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Standalone Rich Business Messaging (RBM) rich card. - - Rich cards allow you to respond to users with more vivid content, e.g. - with media and suggestions. - - For more details about RBM rich cards, please see: - https://developers.google.com/rcs-business-messaging/rbm/guides/build/send-messages#rich-cards. - You can group multiple rich cards into one using - [RbmCarouselCard][google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard] - but carousel cards will give you less control over the card layout. - + { + "DESCRIPTOR": _INTENT_MESSAGE_RBMSTANDALONECARD, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Standalone Rich Business Messaging (RBM) rich card. Rich cards allow + you to respond to users with more vivid content, e.g. with media and + suggestions. You can group multiple rich cards into one using [RbmCar + ouselCard][google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselC + ard] but carousel cards will give you less control over the card + layout. Attributes: card_orientation: @@ -6142,29 +6508,22 @@ Required. Card content. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard) - ), + }, ), - RbmCardContent=_reflection.GeneratedProtocolMessageType( + "RbmCardContent": _reflection.GeneratedProtocolMessageType( "RbmCardContent", (_message.Message,), - dict( - RbmMedia=_reflection.GeneratedProtocolMessageType( + { + "RbmMedia": _reflection.GeneratedProtocolMessageType( "RbmMedia", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Rich Business Messaging (RBM) Media displayed in Cards The - following media-types are currently supported: - - Image Types - - image/jpeg image/jpg' image/gif image/png - - Video Types - - video/h263 video/m4v video/mp4 video/mpeg video/mpeg4 video/webm - + { + "DESCRIPTOR": _INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Rich Business Messaging (RBM) Media displayed in Cards The following + media-types are currently supported: Image Types - image/jpeg - + image/jpg’ - image/gif - image/png Video Types - video/h263 - + video/m4v - video/mp4 - video/mpeg - video/mpeg4 - video/webm Attributes: file_uri: @@ -6174,25 +6533,24 @@ The content-type field must be present and accurate in the HTTP response from the URL. thumbnail_uri: - Optional. Publicly reachable URI of the thumbnail.If you don't + Optional. Publicly reachable URI of the thumbnail.If you don’t provide a thumbnail URI, the RBM platform displays a blank - placeholder thumbnail until the user's device downloads the - file. Depending on the user's setting, the file may not + placeholder thumbnail until the user’s device downloads the + file. Depending on the user’s setting, the file may not download automatically and may require the user to tap a download button. height: Required for cards with vertical orientation. The height of - the media within a rich card with a vertical layout. - (https://goo.gl/NeFCjz). For a standalone card with horizontal - layout, height is not customizable, and this field is ignored. + the media within a rich card with a vertical layout. For a + standalone card with horizontal layout, height is not + customizable, and this field is ignored. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_RBMCARDCONTENT, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Rich Business Messaging (RBM) Card content - + "DESCRIPTOR": _INTENT_MESSAGE_RBMCARDCONTENT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Rich Business Messaging (RBM) Card content Attributes: title: @@ -6209,18 +6567,17 @@ Optional. List of suggestions to include in the card. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent) - ), + }, ), - RbmSuggestion=_reflection.GeneratedProtocolMessageType( + "RbmSuggestion": _reflection.GeneratedProtocolMessageType( "RbmSuggestion", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_RBMSUGGESTION, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Rich Business Messaging (RBM) suggestion. Suggestions - allow user to easily select/click a predefined response or perform an - action (like opening a web uri). - + { + "DESCRIPTOR": _INTENT_MESSAGE_RBMSUGGESTION, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Rich Business Messaging (RBM) suggestion. Suggestions allow user to + easily select/click a predefined response or perform an action (like + opening a web uri). Attributes: suggestion: @@ -6231,17 +6588,16 @@ Predefined client side actions that user can choose """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion) - ), + }, ), - RbmSuggestedReply=_reflection.GeneratedProtocolMessageType( + "RbmSuggestedReply": _reflection.GeneratedProtocolMessageType( "RbmSuggestedReply", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_RBMSUGGESTEDREPLY, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Rich Business Messaging (RBM) suggested reply that the - user can click instead of typing in their own response. - + { + "DESCRIPTOR": _INTENT_MESSAGE_RBMSUGGESTEDREPLY, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Rich Business Messaging (RBM) suggested reply that the user can click + instead of typing in their own response. Attributes: text: @@ -6253,21 +6609,20 @@ logic. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply) - ), + }, ), - RbmSuggestedAction=_reflection.GeneratedProtocolMessageType( + "RbmSuggestedAction": _reflection.GeneratedProtocolMessageType( "RbmSuggestedAction", (_message.Message,), - dict( - RbmSuggestedActionDial=_reflection.GeneratedProtocolMessageType( + { + "RbmSuggestedActionDial": _reflection.GeneratedProtocolMessageType( "RbmSuggestedActionDial", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONDIAL, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Opens the user's default dialer app with the specified - phone number but does not dial automatically (https://goo.gl/ergbB2). - + { + "DESCRIPTOR": _INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONDIAL, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Opens the user’s default dialer app with the specified phone number + but does not dial automatically. Attributes: phone_number: @@ -6277,45 +6632,41 @@ a correctly formatted phone number: +15556767888. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial) - ), + }, ), - RbmSuggestedActionOpenUri=_reflection.GeneratedProtocolMessageType( + "RbmSuggestedActionOpenUri": _reflection.GeneratedProtocolMessageType( "RbmSuggestedActionOpenUri", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONOPENURI, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Opens the user's default web browser app to the specified - uri (https://goo.gl/6GLJD2). If the user has an app installed that is - registered as the default handler for the URL, then this app will be - opened instead, and its icon will be used in the suggested action UI. - + { + "DESCRIPTOR": _INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONOPENURI, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Opens the user’s default web browser app to the specified uri If the + user has an app installed that is registered as the default handler + for the URL, then this app will be opened instead, and its icon will + be used in the suggested action UI. Attributes: uri: Required. The uri to open on the user device """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri) - ), + }, ), - RbmSuggestedActionShareLocation=_reflection.GeneratedProtocolMessageType( + "RbmSuggestedActionShareLocation": _reflection.GeneratedProtocolMessageType( "RbmSuggestedActionShareLocation", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONSHARELOCATION, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Opens the device's location chooser so the user can pick a - location to send back to the agent (https://goo.gl/GXotJW). - - """, + { + "DESCRIPTOR": _INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONSHARELOCATION, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Opens the device’s location chooser so the user can pick a location to + send back to the agent.""", # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_RBMSUGGESTEDACTION, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Rich Business Messaging (RBM) suggested client-side action - that the user can choose from the card. - + "DESCRIPTOR": _INTENT_MESSAGE_RBMSUGGESTEDACTION, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Rich Business Messaging (RBM) suggested client-side action that the + user can choose from the card. Attributes: text: @@ -6335,20 +6686,19 @@ Suggested client side action: Share user location """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction) - ), + }, ), - MediaContent=_reflection.GeneratedProtocolMessageType( + "MediaContent": _reflection.GeneratedProtocolMessageType( "MediaContent", (_message.Message,), - dict( - ResponseMediaObject=_reflection.GeneratedProtocolMessageType( + { + "ResponseMediaObject": _reflection.GeneratedProtocolMessageType( "ResponseMediaObject", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Response media object for media content card. - + { + "DESCRIPTOR": _INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Response media object for media content card. Attributes: name: @@ -6365,38 +6715,36 @@ Required. Url where the media is stored. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_MEDIACONTENT, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The media content card for Actions on Google. - + "DESCRIPTOR": _INTENT_MESSAGE_MEDIACONTENT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The media content card for Actions on Google. Attributes: media_type: - Optional. What type of media is the content (ie "audio"). + Optional. What type of media is the content (ie “audio”). media_objects: Required. List of media objects. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent) - ), + }, ), - BrowseCarouselCard=_reflection.GeneratedProtocolMessageType( + "BrowseCarouselCard": _reflection.GeneratedProtocolMessageType( "BrowseCarouselCard", (_message.Message,), - dict( - BrowseCarouselCardItem=_reflection.GeneratedProtocolMessageType( + { + "BrowseCarouselCardItem": _reflection.GeneratedProtocolMessageType( "BrowseCarouselCardItem", (_message.Message,), - dict( - OpenUrlAction=_reflection.GeneratedProtocolMessageType( + { + "OpenUrlAction": _reflection.GeneratedProtocolMessageType( "OpenUrlAction", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Actions on Google action to open a given url. - + { + "DESCRIPTOR": _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Actions on Google action to open a given url. Attributes: url: @@ -6406,12 +6754,11 @@ opening the URL. Defaults to opening via web browser. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Browsing carousel tile - + "DESCRIPTOR": _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Browsing carousel tile Attributes: open_uri_action: @@ -6429,13 +6776,12 @@ Carousel Card. Maximum of one line of text. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE_BROWSECAROUSELCARD, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Browse Carousel Card for Actions on Google. - https://developers.google.com/actions/assistant/responses#browsing\_carousel - + "DESCRIPTOR": _INTENT_MESSAGE_BROWSECAROUSELCARD, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Browse Carousel Card for Actions on Google. https://developers.google. + com/actions/assistant/responses#browsing_carousel Attributes: items: @@ -6447,16 +6793,15 @@ e.BrowseCarouselCard.items]. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard) - ), + }, ), - TableCard=_reflection.GeneratedProtocolMessageType( + "TableCard": _reflection.GeneratedProtocolMessageType( "TableCard", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_TABLECARD, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Table card for Actions on Google. - + { + "DESCRIPTOR": _INTENT_MESSAGE_TABLECARD, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Table card for Actions on Google. Attributes: title: @@ -6473,18 +6818,17 @@ Optional. List of buttons for the card. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.TableCard) - ), + }, ), - ColumnProperties=_reflection.GeneratedProtocolMessageType( + "ColumnProperties": _reflection.GeneratedProtocolMessageType( "ColumnProperties", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_COLUMNPROPERTIES, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Column properties for + { + "DESCRIPTOR": _INTENT_MESSAGE_COLUMNPROPERTIES, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Column properties for [TableCard][google.cloud.dialogflow.v2beta1.Intent.Message.TableCard]. - Attributes: header: Required. Column heading. @@ -6492,18 +6836,17 @@ Optional. Defines text alignment for all cells in this column. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties) - ), + }, ), - TableCardRow=_reflection.GeneratedProtocolMessageType( + "TableCardRow": _reflection.GeneratedProtocolMessageType( "TableCardRow", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_TABLECARDROW, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Row of + { + "DESCRIPTOR": _INTENT_MESSAGE_TABLECARDROW, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Row of [TableCard][google.cloud.dialogflow.v2beta1.Intent.Message.TableCard]. - Attributes: cells: Optional. List of cells that make up this row. @@ -6511,30 +6854,27 @@ Optional. Whether to add a visual divider after this row. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow) - ), + }, ), - TableCardCell=_reflection.GeneratedProtocolMessageType( + "TableCardCell": _reflection.GeneratedProtocolMessageType( "TableCardCell", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_MESSAGE_TABLECARDCELL, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Cell of - [TableCardRow][google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow]. - + { + "DESCRIPTOR": _INTENT_MESSAGE_TABLECARDCELL, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Cell of [TableCardRow][google.cloud.dialogflow.v2beta1.Intent.Message. + TableCardRow]. Attributes: text: Required. Text in this cell. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell) - ), + }, ), - DESCRIPTOR=_INTENT_MESSAGE, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Corresponds to the ``Response`` field in the Dialogflow - console. - + "DESCRIPTOR": _INTENT_MESSAGE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Corresponds to the ``Response`` field in the Dialogflow console. Attributes: message: @@ -6548,10 +6888,7 @@ card: Displays a card. payload: - Returns a response containing a custom, platform-specific - payload. See the Intent.Message.Platform type for a - description of the structure that may be required for your - platform. + A custom platform-specific response. simple_responses: Returns a voice or text-only response for Actions on Google. basic_card: @@ -6588,41 +6925,44 @@ Optional. The platform that this message is intended for. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message) - ), + }, ), - FollowupIntentInfo=_reflection.GeneratedProtocolMessageType( + "FollowupIntentInfo": _reflection.GeneratedProtocolMessageType( "FollowupIntentInfo", (_message.Message,), - dict( - DESCRIPTOR=_INTENT_FOLLOWUPINTENTINFO, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Represents a single followup intent in the chain. - + { + "DESCRIPTOR": _INTENT_FOLLOWUPINTENTINFO, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """Represents a single followup intent in the chain. Attributes: followup_intent_name: The unique identifier of the followup intent. Format: ``projects//agent/intents/``. parent_followup_intent_name: - The unique identifier of the followup intent's parent. Format: + The unique identifier of the followup intent’s parent. Format: ``projects//agent/intents/``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo) - ), - ), - DESCRIPTOR=_INTENT, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""Represents an intent. Intents convert a number of user - expressions or patterns into an action. An action is an extraction of a - user command or sentence semantics. - + }, + ), + "DESCRIPTOR": _INTENT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """An intent categorizes an end-user’s intention for one conversation + turn. For each agent, you define many intents, where your combined + intents can handle a complete conversation. When an end-user writes or + says something, referred to as an end-user expression or end-user + input, Dialogflow matches the end-user input to the best intent in + your agent. Matching an intent is also known as intent classification. + For more information, see the `intent guide + `__. Attributes: name: - The unique identifier of this intent. Required for [Intents.Up - dateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateInte - nt] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v - 2beta1.Intents.BatchUpdateIntents] methods. Format: + Optional. The unique identifier of this intent. Required for [ + Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents. + UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.di + alogflow.v2beta1.Intents.BatchUpdateIntents] methods. Format: ``projects//agent/intents/``. display_name: Required. The name of this intent. @@ -6630,12 +6970,12 @@ Optional. Indicates whether webhooks are enabled for the intent. priority: - The priority of this intent. Higher numbers represent higher - priorities. - If the supplied value is unspecified or 0, the - service translates the value to 500,000, which corresponds - to the ``Normal`` priority in the console. - If the - supplied value is negative, the intent is ignored in runtime - detect intent requests. + Optional. The priority of this intent. Higher numbers + represent higher priorities. - If the supplied value is + unspecified or 0, the service translates the value to + 500,000, which corresponds to the ``Normal`` priority in the + console. - If the supplied value is negative, the intent is + ignored in runtime detect intent requests. is_fallback: Optional. Indicates whether this is a fallback intent. ml_enabled: @@ -6646,9 +6986,9 @@ off. DEPRECATED! Please use ``ml_disabled`` field instead. NOTE: If both ``ml_enabled`` and ``ml_disabled`` are either not set or false, then the default value is determined as - follows: - Before April 15th, 2018 the default is: ml\_enabled - = false / ml\_disabled = true. - After April 15th, 2018 the - default is: ml\_enabled = true / ml\_disabled = false. + follows: - Before April 15th, 2018 the default is: ml_enabled + = false / ml_disabled = true. - After April 15th, 2018 the + default is: ml_enabled = true / ml_disabled = false. ml_disabled: Optional. Indicates whether Machine Learning is disabled for the intent. Note: If ``ml_disabled`` setting is set to true, @@ -6668,7 +7008,8 @@ Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for - an event to trigger this intent. + an event to trigger this intent. Event names are limited to + 150 characters. training_phrases: Optional. The collection of examples that the agent is trained on. @@ -6693,30 +7034,29 @@ ``Response`` field in the Dialogflow console. default_response_platforms: Optional. The list of platforms for which the first responses - will be copied from the messages in PLATFORM\_UNSPECIFIED - (i.e. default platform). + will be copied from the messages in PLATFORM_UNSPECIFIED + (i.e. default platform). root_followup_intent_name: - Read-only. The unique identifier of the root intent in the + Output only. The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup - intents chain for this intent. We populate this field only in - the output. Format: ``projects//agent/intents/``. parent_followup_intent_name: - Read-only after creation. The unique identifier of the parent - intent in the chain of followup intents. You can set this - field when creating an intent, for example with [CreateIntent] - [google.cloud.dialogflow.v2beta1.Intents.CreateIntent] or [Bat - chUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.Batch - UpdateIntents], in order to make this intent a followup - intent. It identifies the parent followup intent. Format: + Optional. The unique identifier of the parent intent in the + chain of followup intents. You can set this field when + creating an intent, for example with [CreateIntent][google.clo + ud.dialogflow.v2beta1.Intents.CreateIntent] or [BatchUpdateInt + ents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateInten + ts], in order to make this intent a followup intent. It + identifies the parent followup intent. Format: ``projects//agent/intents/``. followup_intent_info: - Read-only. Information about all followup intents that have + Output only. Information about all followup intents that have this intent as a direct or indirect parent. We populate this field only in the output. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent) - ), + }, ) _sym_db.RegisterMessage(Intent) _sym_db.RegisterMessage(Intent.TrainingPhrase) @@ -6773,99 +7113,93 @@ ListIntentsRequest = _reflection.GeneratedProtocolMessageType( "ListIntentsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTINTENTSREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The request message for - [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents]. - + { + "DESCRIPTOR": _LISTINTENTSREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The request message for [Intents.ListIntents][google.cloud.dialogflow. + v2beta1.Intents.ListIntents]. Attributes: parent: Required. The agent to list all intents from. Format: ``projects//agent``. language_code: - Optional. The language to list training phrases, parameters - and rich messages for. If not specified, the agent's default - language is used. `Many languages `__ are supported. Note: - languages must be enabled in the agent before they can be - used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. intent_view: Optional. The resource view to apply to the returned intent. page_size: Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. page_token: - Optional. The next\_page\_token value returned from a previous + Optional. The next_page_token value returned from a previous list request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListIntentsRequest) - ), + }, ) _sym_db.RegisterMessage(ListIntentsRequest) ListIntentsResponse = _reflection.GeneratedProtocolMessageType( "ListIntentsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTINTENTSRESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The response message for - [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents]. - + { + "DESCRIPTOR": _LISTINTENTSRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The response message for [Intents.ListIntents][google.cloud.dialogflow + .v2beta1.Intents.ListIntents]. Attributes: intents: The list of agent intents. There will be a maximum number of - items returned based on the page\_size field in the request. + items returned based on the page_size field in the request. next_page_token: Token to retrieve the next page of results, or empty if there are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListIntentsResponse) - ), + }, ) _sym_db.RegisterMessage(ListIntentsResponse) GetIntentRequest = _reflection.GeneratedProtocolMessageType( "GetIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETINTENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The request message for - [Intents.GetIntent][google.cloud.dialogflow.v2beta1.Intents.GetIntent]. - + { + "DESCRIPTOR": _GETINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The request message for [Intents.GetIntent][google.cloud.dialogflow.v2 + beta1.Intents.GetIntent]. Attributes: name: Required. The name of the intent. Format: ``projects//agent/intents/``. language_code: - Optional. The language to retrieve training phrases, - parameters and rich messages for. If not specified, the - agent's default language is used. `Many languages `__ are - supported. Note: languages must be enabled in the agent before - they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. intent_view: Optional. The resource view to apply to the returned intent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.GetIntentRequest) - ), + }, ) _sym_db.RegisterMessage(GetIntentRequest) CreateIntentRequest = _reflection.GeneratedProtocolMessageType( "CreateIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEINTENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The request message for - [Intents.CreateIntent][google.cloud.dialogflow.v2beta1.Intents.CreateIntent]. - + { + "DESCRIPTOR": _CREATEINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The request message for [Intents.CreateIntent][google.cloud.dialogflow + .v2beta1.Intents.CreateIntent]. Attributes: parent: @@ -6874,59 +7208,55 @@ intent: Required. The intent to create. language_code: - Optional. The language of training phrases, parameters and - rich messages defined in ``intent``. If not specified, the - agent's default language is used. `Many languages `__ are - supported. Note: languages must be enabled in the agent before - they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. intent_view: Optional. The resource view to apply to the returned intent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.CreateIntentRequest) - ), + }, ) _sym_db.RegisterMessage(CreateIntentRequest) UpdateIntentRequest = _reflection.GeneratedProtocolMessageType( "UpdateIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATEINTENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The request message for - [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent]. - + { + "DESCRIPTOR": _UPDATEINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The request message for [Intents.UpdateIntent][google.cloud.dialogflow + .v2beta1.Intents.UpdateIntent]. Attributes: intent: Required. The intent to update. language_code: - Optional. The language of training phrases, parameters and - rich messages defined in ``intent``. If not specified, the - agent's default language is used. `Many languages `__ are - supported. Note: languages must be enabled in the agent before - they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. update_mask: Optional. The mask to control which fields get updated. intent_view: Optional. The resource view to apply to the returned intent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.UpdateIntentRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateIntentRequest) DeleteIntentRequest = _reflection.GeneratedProtocolMessageType( "DeleteIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEINTENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The request message for - [Intents.DeleteIntent][google.cloud.dialogflow.v2beta1.Intents.DeleteIntent]. - + { + "DESCRIPTOR": _DELETEINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The request message for [Intents.DeleteIntent][google.cloud.dialogflow + .v2beta1.Intents.DeleteIntent]. Attributes: name: @@ -6935,19 +7265,18 @@ Format: ``projects//agent/intents/``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DeleteIntentRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteIntentRequest) BatchUpdateIntentsRequest = _reflection.GeneratedProtocolMessageType( "BatchUpdateIntentsRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHUPDATEINTENTSREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The request message for - [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents]. - + { + "DESCRIPTOR": _BATCHUPDATEINTENTSREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The request message for [Intents.BatchUpdateIntents][google.cloud.dial + ogflow.v2beta1.Intents.BatchUpdateIntents]. Attributes: parent: @@ -6962,54 +7291,51 @@ The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must - start with "gs://". + start with “gs://”. intent_batch_inline: The collection of intents to update or create. language_code: - Optional. The language of training phrases, parameters and - rich messages defined in ``intents``. If not specified, the - agent's default language is used. `Many languages `__ are - supported. Note: languages must be enabled in the agent before - they can be used. + Optional. The language used to access language-specific data. + If not specified, the agent’s default language is used. For + more information, see `Multilingual intent and entity data + `__. update_mask: Optional. The mask to control which fields get updated. intent_view: Optional. The resource view to apply to the returned intent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest) - ), + }, ) _sym_db.RegisterMessage(BatchUpdateIntentsRequest) BatchUpdateIntentsResponse = _reflection.GeneratedProtocolMessageType( "BatchUpdateIntentsResponse", (_message.Message,), - dict( - DESCRIPTOR=_BATCHUPDATEINTENTSRESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The response message for - [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents]. - + { + "DESCRIPTOR": _BATCHUPDATEINTENTSRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The response message for [Intents.BatchUpdateIntents][google.cloud.dia + logflow.v2beta1.Intents.BatchUpdateIntents]. Attributes: intents: The collection of updated or created intents. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse) - ), + }, ) _sym_db.RegisterMessage(BatchUpdateIntentsResponse) BatchDeleteIntentsRequest = _reflection.GeneratedProtocolMessageType( "BatchDeleteIntentsRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHDELETEINTENTSREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""The request message for - [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntents]. - + { + "DESCRIPTOR": _BATCHDELETEINTENTSREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """The request message for [Intents.BatchDeleteIntents][google.cloud.dial + ogflow.v2beta1.Intents.BatchDeleteIntents]. Attributes: parent: @@ -7020,45 +7346,79 @@ ``name`` must be filled in. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest) - ), + }, ) _sym_db.RegisterMessage(BatchDeleteIntentsRequest) IntentBatch = _reflection.GeneratedProtocolMessageType( "IntentBatch", (_message.Message,), - dict( - DESCRIPTOR=_INTENTBATCH, - __module__="google.cloud.dialogflow_v2beta1.proto.intent_pb2", - __doc__="""This message is a wrapper around a collection of intents. - + { + "DESCRIPTOR": _INTENTBATCH, + "__module__": "google.cloud.dialogflow_v2beta1.proto.intent_pb2", + "__doc__": """This message is a wrapper around a collection of intents. Attributes: intents: A collection of intents. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.IntentBatch) - ), + }, ) _sym_db.RegisterMessage(IntentBatch) DESCRIPTOR._options = None _INTENT_TRAININGPHRASE_TYPE.values_by_name["TEMPLATE"]._options = None +_INTENT_TRAININGPHRASE.fields_by_name["type"]._options = None +_INTENT_TRAININGPHRASE.fields_by_name["parts"]._options = None +_INTENT_TRAININGPHRASE.fields_by_name["times_added_count"]._options = None _INTENT_MESSAGE_LISTSELECT.fields_by_name["subtitle"]._options = None +_INTENT_MESSAGE.fields_by_name["platform"]._options = None +_INTENT.fields_by_name["name"]._options = None +_INTENT.fields_by_name["display_name"]._options = None +_INTENT.fields_by_name["webhook_state"]._options = None +_INTENT.fields_by_name["priority"]._options = None +_INTENT.fields_by_name["is_fallback"]._options = None _INTENT.fields_by_name["ml_enabled"]._options = None +_INTENT.fields_by_name["ml_disabled"]._options = None +_INTENT.fields_by_name["end_interaction"]._options = None +_INTENT.fields_by_name["input_context_names"]._options = None +_INTENT.fields_by_name["events"]._options = None +_INTENT.fields_by_name["training_phrases"]._options = None +_INTENT.fields_by_name["action"]._options = None +_INTENT.fields_by_name["output_contexts"]._options = None +_INTENT.fields_by_name["reset_contexts"]._options = None +_INTENT.fields_by_name["parameters"]._options = None +_INTENT.fields_by_name["default_response_platforms"]._options = None +_INTENT.fields_by_name["root_followup_intent_name"]._options = None +_INTENT.fields_by_name["parent_followup_intent_name"]._options = None +_INTENT.fields_by_name["followup_intent_info"]._options = None _INTENT._options = None +_LISTINTENTSREQUEST.fields_by_name["parent"]._options = None +_LISTINTENTSREQUEST.fields_by_name["language_code"]._options = None +_GETINTENTREQUEST.fields_by_name["name"]._options = None +_GETINTENTREQUEST.fields_by_name["language_code"]._options = None +_CREATEINTENTREQUEST.fields_by_name["parent"]._options = None +_CREATEINTENTREQUEST.fields_by_name["intent"]._options = None +_CREATEINTENTREQUEST.fields_by_name["language_code"]._options = None +_UPDATEINTENTREQUEST.fields_by_name["intent"]._options = None +_UPDATEINTENTREQUEST.fields_by_name["language_code"]._options = None +_DELETEINTENTREQUEST.fields_by_name["name"]._options = None +_BATCHUPDATEINTENTSREQUEST.fields_by_name["parent"]._options = None +_BATCHUPDATEINTENTSREQUEST.fields_by_name["language_code"]._options = None +_BATCHDELETEINTENTSREQUEST.fields_by_name["parent"]._options = None +_BATCHDELETEINTENTSREQUEST.fields_by_name["intents"]._options = None _INTENTS = _descriptor.ServiceDescriptor( name="Intents", full_name="google.cloud.dialogflow.v2beta1.Intents", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), - serialized_start=11947, - serialized_end=13736, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=12354, + serialized_end=14501, methods=[ _descriptor.MethodDescriptor( name="ListIntents", @@ -7067,9 +7427,8 @@ containing_service=None, input_type=_LISTINTENTSREQUEST, output_type=_LISTINTENTSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002f\022*/v2beta1/{parent=projects/*/agent}/intentsZ8\0226/v2beta1/{parent=projects/*/locations/*/agent}/intents" - ), + serialized_options=b"\202\323\344\223\002f\022*/v2beta1/{parent=projects/*/agent}/intentsZ8\0226/v2beta1/{parent=projects/*/locations/*/agent}/intents\332A\006parent\332A\024parent,language_code", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetIntent", @@ -7078,9 +7437,8 @@ containing_service=None, input_type=_GETINTENTREQUEST, output_type=_INTENT, - serialized_options=_b( - "\202\323\344\223\002f\022*/v2beta1/{name=projects/*/agent/intents/*}Z8\0226/v2beta1/{name=projects/*/locations/*/agent/intents/*}" - ), + serialized_options=b"\202\323\344\223\002f\022*/v2beta1/{name=projects/*/agent/intents/*}Z8\0226/v2beta1/{name=projects/*/locations/*/agent/intents/*}\332A\004name\332A\022name,language_code", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateIntent", @@ -7089,9 +7447,8 @@ containing_service=None, input_type=_CREATEINTENTREQUEST, output_type=_INTENT, - serialized_options=_b( - '\202\323\344\223\002v"*/v2beta1/{parent=projects/*/agent}/intents:\006intentZ@"6/v2beta1/{parent=projects/*/locations/*/agent}/intents:\006intent' - ), + serialized_options=b'\202\323\344\223\002v"*/v2beta1/{parent=projects/*/agent}/intents:\006intentZ@"6/v2beta1/{parent=projects/*/locations/*/agent}/intents:\006intent\332A\rparent,intent\332A\033parent,intent,language_code', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateIntent", @@ -7100,9 +7457,8 @@ containing_service=None, input_type=_UPDATEINTENTREQUEST, output_type=_INTENT, - serialized_options=_b( - "\202\323\344\223\002\204\00121/v2beta1/{intent.name=projects/*/agent/intents/*}:\006intentZG2=/v2beta1/{intent.name=projects/*/locations/*/agent/intents/*}:\006intent" - ), + serialized_options=b"\202\323\344\223\002\204\00121/v2beta1/{intent.name=projects/*/agent/intents/*}:\006intentZG2=/v2beta1/{intent.name=projects/*/locations/*/agent/intents/*}:\006intent\332A\022intent,update_mask\332A\006intent\332A\024intent,language_code\332A intent,language_code,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteIntent", @@ -7111,9 +7467,8 @@ containing_service=None, input_type=_DELETEINTENTREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002f**/v2beta1/{name=projects/*/agent/intents/*}Z8*6/v2beta1/{name=projects/*/locations/*/agent/intents/*}" - ), + serialized_options=b"\202\323\344\223\002f**/v2beta1/{name=projects/*/agent/intents/*}Z8*6/v2beta1/{name=projects/*/locations/*/agent/intents/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchUpdateIntents", @@ -7122,9 +7477,8 @@ containing_service=None, input_type=_BATCHUPDATEINTENTSREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002\204\001"6/v2beta1/{parent=projects/*/agent}/intents:batchUpdate:\001*ZG"B/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchUpdate:\001*' - ), + serialized_options=b'\202\323\344\223\002\204\001"6/v2beta1/{parent=projects/*/agent}/intents:batchUpdate:\001*ZG"B/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchUpdate:\001*\312AT\n:google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchDeleteIntents", @@ -7133,9 +7487,8 @@ containing_service=None, input_type=_BATCHDELETEINTENTSREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002\204\001"6/v2beta1/{parent=projects/*/agent}/intents:batchDelete:\001*ZG"B/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchDelete:\001*' - ), + serialized_options=b'\202\323\344\223\002\204\001"6/v2beta1/{parent=projects/*/agent}/intents:batchDelete:\001*ZG"B/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchDelete:\001*\332A\016parent,intents\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct', + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2beta1/proto/intent_pb2_grpc.py b/dialogflow_v2beta1/proto/intent_pb2_grpc.py index cc94fca45..d60206cec 100644 --- a/dialogflow_v2beta1/proto/intent_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/intent_pb2_grpc.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2beta1.proto import ( @@ -12,46 +13,15 @@ class IntentsStub(object): - """An intent represents a mapping between input from a user and an action to - be taken by your application. When you pass user input to the - [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or - [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) method, the - Dialogflow API analyzes the input and searches - for a matching intent. If no match is found, the Dialogflow API returns a - fallback intent (`is_fallback` = true). - - You can provide additional information for the Dialogflow API to use to - match user input to an intent by adding the following to your intent. - - * **Contexts** - provide additional context for intent analysis. For - example, if an intent is related to an object in your application that - plays music, you can provide a context to determine when to match the - intent if the user input is "turn it off". You can include a context - that matches the intent when there is previous user input of - "play music", and not when there is previous user input of - "turn on the light". - - * **Events** - allow for matching an intent by using an event name - instead of user input. Your application can provide an event name and - related parameters to the Dialogflow API to match an intent. For - example, when your application starts, you can send a welcome event - with a user name parameter to the Dialogflow API to match an intent with - a personalized welcome message for the user. - - * **Training phrases** - provide examples of user input to train the - Dialogflow API agent to better match intents. - - For more information about intents, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/intents-overview). - """ + """Service for managing [Intents][google.cloud.dialogflow.v2beta1.Intent]. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.ListIntents = channel.unary_unary( "/google.cloud.dialogflow.v2beta1.Intents/ListIntents", request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.ListIntentsRequest.SerializeToString, @@ -90,71 +60,40 @@ def __init__(self, channel): class IntentsServicer(object): - """An intent represents a mapping between input from a user and an action to - be taken by your application. When you pass user input to the - [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or - [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) method, the - Dialogflow API analyzes the input and searches - for a matching intent. If no match is found, the Dialogflow API returns a - fallback intent (`is_fallback` = true). - - You can provide additional information for the Dialogflow API to use to - match user input to an intent by adding the following to your intent. - - * **Contexts** - provide additional context for intent analysis. For - example, if an intent is related to an object in your application that - plays music, you can provide a context to determine when to match the - intent if the user input is "turn it off". You can include a context - that matches the intent when there is previous user input of - "play music", and not when there is previous user input of - "turn on the light". - - * **Events** - allow for matching an intent by using an event name - instead of user input. Your application can provide an event name and - related parameters to the Dialogflow API to match an intent. For - example, when your application starts, you can send a welcome event - with a user name parameter to the Dialogflow API to match an intent with - a personalized welcome message for the user. - - * **Training phrases** - provide examples of user input to train the - Dialogflow API agent to better match intents. - - For more information about intents, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/intents-overview). - """ + """Service for managing [Intents][google.cloud.dialogflow.v2beta1.Intent]. + """ def ListIntents(self, request, context): """Returns the list of all intents in the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetIntent(self, request, context): """Retrieves the specified intent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def CreateIntent(self, request, context): """Creates an intent in the specified agent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateIntent(self, request, context): """Updates the specified intent. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteIntent(self, request, context): """Deletes the specified intent and its direct or indirect followup intents. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -162,8 +101,8 @@ def DeleteIntent(self, request, context): def BatchUpdateIntents(self, request, context): """Updates/Creates multiple intents in the specified agent. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -171,8 +110,8 @@ def BatchUpdateIntents(self, request, context): def BatchDeleteIntents(self, request, context): """Deletes intents in the specified agent. - Operation - """ + Operation + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -220,3 +159,198 @@ def add_IntentsServicer_to_server(servicer, server): "google.cloud.dialogflow.v2beta1.Intents", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Intents(object): + """Service for managing [Intents][google.cloud.dialogflow.v2beta1.Intent]. + """ + + @staticmethod + def ListIntents( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Intents/ListIntents", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.ListIntentsRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.ListIntentsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetIntent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Intents/GetIntent", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.GetIntentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.Intent.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateIntent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Intents/CreateIntent", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.CreateIntentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.Intent.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateIntent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Intents/UpdateIntent", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.UpdateIntentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.Intent.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteIntent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Intents/DeleteIntent", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.DeleteIntentRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchUpdateIntents( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Intents/BatchUpdateIntents", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.BatchUpdateIntentsRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchDeleteIntents( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Intents/BatchDeleteIntents", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.BatchDeleteIntentsRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2beta1/proto/knowledge_base.proto b/dialogflow_v2beta1/proto/knowledge_base.proto new file mode 100644 index 000000000..71e72dcc5 --- /dev/null +++ b/dialogflow_v2beta1/proto/knowledge_base.proto @@ -0,0 +1,229 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "KnowledgeBaseProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Service for managing [KnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBase]. +service KnowledgeBases { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all knowledge bases of the specified agent. + // + // Note: The `projects.agent.knowledgeBases` resource is deprecated; + // only use `projects.knowledgeBases`. + rpc ListKnowledgeBases(ListKnowledgeBasesRequest) returns (ListKnowledgeBasesResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*}/knowledgeBases" + additional_bindings { + get: "/v2beta1/{parent=projects/*/agent}/knowledgeBases" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified knowledge base. + // + // Note: The `projects.agent.knowledgeBases` resource is deprecated; + // only use `projects.knowledgeBases`. + rpc GetKnowledgeBase(GetKnowledgeBaseRequest) returns (KnowledgeBase) { + option (google.api.http) = { + get: "/v2beta1/{name=projects/*/knowledgeBases/*}" + additional_bindings { + get: "/v2beta1/{name=projects/*/agent/knowledgeBases/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a knowledge base. + // + // Note: The `projects.agent.knowledgeBases` resource is deprecated; + // only use `projects.knowledgeBases`. + rpc CreateKnowledgeBase(CreateKnowledgeBaseRequest) returns (KnowledgeBase) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*}/knowledgeBases" + body: "knowledge_base" + additional_bindings { + post: "/v2beta1/{parent=projects/*/agent}/knowledgeBases" + body: "knowledge_base" + } + }; + option (google.api.method_signature) = "parent,knowledge_base"; + } + + // Deletes the specified knowledge base. + // + // Note: The `projects.agent.knowledgeBases` resource is deprecated; + // only use `projects.knowledgeBases`. + rpc DeleteKnowledgeBase(DeleteKnowledgeBaseRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta1/{name=projects/*/knowledgeBases/*}" + additional_bindings { + delete: "/v2beta1/{name=projects/*/agent/knowledgeBases/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Updates the specified knowledge base. + // + // Note: The `projects.agent.knowledgeBases` resource is deprecated; + // only use `projects.knowledgeBases`. + rpc UpdateKnowledgeBase(UpdateKnowledgeBaseRequest) returns (KnowledgeBase) { + option (google.api.http) = { + patch: "/v2beta1/{knowledge_base.name=projects/*/knowledgeBases/*}" + body: "knowledge_base" + additional_bindings { + patch: "/v2beta1/{knowledge_base.name=projects/*/agent/knowledgeBases/*}" + body: "knowledge_base" + } + }; + option (google.api.method_signature) = "knowledge_base,update_mask"; + option (google.api.method_signature) = "knowledge_base"; + } +} + +// A knowledge base represents a collection of knowledge documents that you +// provide to Dialogflow. Your knowledge documents contain information that may +// be useful during conversations with end-users. Some Dialogflow features use +// knowledge bases when looking for a response to an end-user input. +// +// For more information, see the [knowledge base +// guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). +// +// Note: The `projects.agent.knowledgeBases` resource is deprecated; +// only use `projects.knowledgeBases`. +message KnowledgeBase { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/KnowledgeBase" + pattern: "projects/{project}/knowledgeBases/{knowledge_base}" + }; + + // The knowledge base resource name. + // The name must be empty when creating a knowledge base. + // Format: `projects//knowledgeBases/`. + string name = 1; + + // Required. The display name of the knowledge base. The name must be 1024 + // bytes or less; otherwise, the creation request fails. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Language which represents the KnowledgeBase. When the KnowledgeBase is + // created/updated, this is populated for all non en-us languages. If not + // populated, the default language en-us applies. + string language_code = 4; +} + +// Request message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases]. +message ListKnowledgeBasesRequest { + // Required. The project to list of knowledge bases for. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/KnowledgeBase" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 10 and at most 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases]. +message ListKnowledgeBasesResponse { + // The list of knowledge bases. + repeated KnowledgeBase knowledge_bases = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// Request message for [KnowledgeBases.GetKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.GetKnowledgeBase]. +message GetKnowledgeBaseRequest { + // Required. The name of the knowledge base to retrieve. + // Format `projects//knowledgeBases/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/KnowledgeBase" + } + ]; +} + +// Request message for [KnowledgeBases.CreateKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.CreateKnowledgeBase]. +message CreateKnowledgeBaseRequest { + // Required. The project to create a knowledge base for. + // Format: `projects/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/KnowledgeBase" + } + ]; + + // Required. The knowledge base to create. + KnowledgeBase knowledge_base = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [KnowledgeBases.DeleteKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.DeleteKnowledgeBase]. +message DeleteKnowledgeBaseRequest { + // Required. The name of the knowledge base to delete. + // Format: `projects//knowledgeBases/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/KnowledgeBase" + } + ]; + + // Optional. Force deletes the knowledge base. When set to true, any documents + // in the knowledge base are also deleted. + bool force = 2; +} + +// Request message for [KnowledgeBases.UpdateKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.UpdateKnowledgeBase]. +message UpdateKnowledgeBaseRequest { + // Required. The knowledge base to update. + KnowledgeBase knowledge_base = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Not specified means `update all`. + // Currently, only `display_name` can be updated, an InvalidArgument will be + // returned for attempting to update other fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/dialogflow_v2beta1/proto/knowledge_base_pb2.py b/dialogflow_v2beta1/proto/knowledge_base_pb2.py index f3bf14ca1..e9785057e 100644 --- a/dialogflow_v2beta1/proto/knowledge_base_pb2.py +++ b/dialogflow_v2beta1/proto/knowledge_base_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/knowledge_base.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -16,26 +13,27 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="google/cloud/dialogflow_v2beta1/proto/knowledge_base.proto", package="google.cloud.dialogflow.v2beta1", syntax="proto3", - serialized_options=_b( - "\n#com.google.cloud.dialogflow.v2beta1B\022KnowledgeBaseProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1" - ), - serialized_pb=_b( - '\n:google/cloud/dialogflow_v2beta1/proto/knowledge_base.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/api/client.proto"J\n\rKnowledgeBase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x04 \x01(\t"R\n\x19ListKnowledgeBasesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"~\n\x1aListKnowledgeBasesResponse\x12G\n\x0fknowledge_bases\x18\x01 \x03(\x0b\x32..google.cloud.dialogflow.v2beta1.KnowledgeBase\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\'\n\x17GetKnowledgeBaseRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"t\n\x1a\x43reateKnowledgeBaseRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x46\n\x0eknowledge_base\x18\x02 \x01(\x0b\x32..google.cloud.dialogflow.v2beta1.KnowledgeBase"9\n\x1a\x44\x65leteKnowledgeBaseRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66orce\x18\x02 \x01(\x08"\x95\x01\n\x1aUpdateKnowledgeBaseRequest\x12\x46\n\x0eknowledge_base\x18\x01 \x01(\x0b\x32..google.cloud.dialogflow.v2beta1.KnowledgeBase\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask2\x84\x0b\n\x0eKnowledgeBases\x12\xf7\x01\n\x12ListKnowledgeBases\x12:.google.cloud.dialogflow.v2beta1.ListKnowledgeBasesRequest\x1a;.google.cloud.dialogflow.v2beta1.ListKnowledgeBasesResponse"h\x82\xd3\xe4\x93\x02\x62\x12+/v2beta1/{parent=projects/*}/knowledgeBasesZ3\x12\x31/v2beta1/{parent=projects/*/agent}/knowledgeBases\x12\xe6\x01\n\x10GetKnowledgeBase\x12\x38.google.cloud.dialogflow.v2beta1.GetKnowledgeBaseRequest\x1a..google.cloud.dialogflow.v2beta1.KnowledgeBase"h\x82\xd3\xe4\x93\x02\x62\x12+/v2beta1/{name=projects/*/knowledgeBases/*}Z3\x12\x31/v2beta1/{name=projects/*/agent/knowledgeBases/*}\x12\x8e\x02\n\x13\x43reateKnowledgeBase\x12;.google.cloud.dialogflow.v2beta1.CreateKnowledgeBaseRequest\x1a..google.cloud.dialogflow.v2beta1.KnowledgeBase"\x89\x01\x82\xd3\xe4\x93\x02\x82\x01"+/v2beta1/{parent=projects/*}/knowledgeBases:\x0eknowledge_baseZC"1/v2beta1/{parent=projects/*/agent}/knowledgeBases:\x0eknowledge_base\x12\xd4\x01\n\x13\x44\x65leteKnowledgeBase\x12;.google.cloud.dialogflow.v2beta1.DeleteKnowledgeBaseRequest\x1a\x16.google.protobuf.Empty"h\x82\xd3\xe4\x93\x02\x62*+/v2beta1/{name=projects/*/knowledgeBases/*}Z3*1/v2beta1/{name=projects/*/agent/knowledgeBases/*}\x12\xac\x02\n\x13UpdateKnowledgeBase\x12;.google.cloud.dialogflow.v2beta1.UpdateKnowledgeBaseRequest\x1a..google.cloud.dialogflow.v2beta1.KnowledgeBase"\xa7\x01\x82\xd3\xe4\x93\x02\xa0\x01\x32:/v2beta1/{knowledge_base.name=projects/*/knowledgeBases/*}:\x0eknowledge_baseZR2@/v2beta1/{knowledge_base.name=projects/*/agent/knowledgeBases/*}:\x0eknowledge_base\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xb0\x01\n#com.google.cloud.dialogflow.v2beta1B\x12KnowledgeBaseProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3' - ), + serialized_options=b"\n#com.google.cloud.dialogflow.v2beta1B\022KnowledgeBaseProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n:google/cloud/dialogflow_v2beta1/proto/knowledge_base.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\xb1\x01\n\rKnowledgeBase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\rlanguage_code\x18\x04 \x01(\t:`\xea\x41]\n\'dialogflow.googleapis.com/KnowledgeBase\x12\x32projects/{project}/knowledgeBases/{knowledge_base}"\x8d\x01\n\x19ListKnowledgeBasesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'dialogflow.googleapis.com/KnowledgeBase\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01"~\n\x1aListKnowledgeBasesResponse\x12G\n\x0fknowledge_bases\x18\x01 \x03(\x0b\x32..google.cloud.dialogflow.v2beta1.KnowledgeBase\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"X\n\x17GetKnowledgeBaseRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'dialogflow.googleapis.com/KnowledgeBase"\xaa\x01\n\x1a\x43reateKnowledgeBaseRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'dialogflow.googleapis.com/KnowledgeBase\x12K\n\x0eknowledge_base\x18\x02 \x01(\x0b\x32..google.cloud.dialogflow.v2beta1.KnowledgeBaseB\x03\xe0\x41\x02"j\n\x1a\x44\x65leteKnowledgeBaseRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'dialogflow.googleapis.com/KnowledgeBase\x12\r\n\x05\x66orce\x18\x02 \x01(\x08"\x9f\x01\n\x1aUpdateKnowledgeBaseRequest\x12K\n\x0eknowledge_base\x18\x01 \x01(\x0b\x32..google.cloud.dialogflow.v2beta1.KnowledgeBaseB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\xe1\x0b\n\x0eKnowledgeBases\x12\x80\x02\n\x12ListKnowledgeBases\x12:.google.cloud.dialogflow.v2beta1.ListKnowledgeBasesRequest\x1a;.google.cloud.dialogflow.v2beta1.ListKnowledgeBasesResponse"q\x82\xd3\xe4\x93\x02\x62\x12+/v2beta1/{parent=projects/*}/knowledgeBasesZ3\x12\x31/v2beta1/{parent=projects/*/agent}/knowledgeBases\xda\x41\x06parent\x12\xed\x01\n\x10GetKnowledgeBase\x12\x38.google.cloud.dialogflow.v2beta1.GetKnowledgeBaseRequest\x1a..google.cloud.dialogflow.v2beta1.KnowledgeBase"o\x82\xd3\xe4\x93\x02\x62\x12+/v2beta1/{name=projects/*/knowledgeBases/*}Z3\x12\x31/v2beta1/{name=projects/*/agent/knowledgeBases/*}\xda\x41\x04name\x12\xa6\x02\n\x13\x43reateKnowledgeBase\x12;.google.cloud.dialogflow.v2beta1.CreateKnowledgeBaseRequest\x1a..google.cloud.dialogflow.v2beta1.KnowledgeBase"\xa1\x01\x82\xd3\xe4\x93\x02\x82\x01"+/v2beta1/{parent=projects/*}/knowledgeBases:\x0eknowledge_baseZC"1/v2beta1/{parent=projects/*/agent}/knowledgeBases:\x0eknowledge_base\xda\x41\x15parent,knowledge_base\x12\xdb\x01\n\x13\x44\x65leteKnowledgeBase\x12;.google.cloud.dialogflow.v2beta1.DeleteKnowledgeBaseRequest\x1a\x16.google.protobuf.Empty"o\x82\xd3\xe4\x93\x02\x62*+/v2beta1/{name=projects/*/knowledgeBases/*}Z3*1/v2beta1/{name=projects/*/agent/knowledgeBases/*}\xda\x41\x04name\x12\xda\x02\n\x13UpdateKnowledgeBase\x12;.google.cloud.dialogflow.v2beta1.UpdateKnowledgeBaseRequest\x1a..google.cloud.dialogflow.v2beta1.KnowledgeBase"\xd5\x01\x82\xd3\xe4\x93\x02\xa0\x01\x32:/v2beta1/{knowledge_base.name=projects/*/knowledgeBases/*}:\x0eknowledge_baseZR2@/v2beta1/{knowledge_base.name=projects/*/agent/knowledgeBases/*}:\x0eknowledge_base\xda\x41\x1aknowledge_base,update_mask\xda\x41\x0eknowledge_base\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xb0\x01\n#com.google.cloud.dialogflow.v2beta1B\x12KnowledgeBaseProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -46,6 +44,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -56,7 +55,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -64,6 +63,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -74,14 +74,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -92,7 +93,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -100,18 +101,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=b"\352A]\n'dialogflow.googleapis.com/KnowledgeBase\0222projects/{project}/knowledgeBases/{knowledge_base}", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=213, - serialized_end=287, + serialized_start=274, + serialized_end=451, ) @@ -121,6 +123,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -131,14 +134,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A)\022'dialogflow.googleapis.com/KnowledgeBase", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -155,8 +159,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -167,14 +172,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -185,8 +191,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=289, - serialized_end=371, + serialized_start=454, + serialized_end=595, ) @@ -196,6 +202,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="knowledge_bases", @@ -214,6 +221,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -224,7 +232,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -232,6 +240,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -242,8 +251,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=373, - serialized_end=499, + serialized_start=597, + serialized_end=723, ) @@ -253,6 +262,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -263,14 +273,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A)\n'dialogflow.googleapis.com/KnowledgeBase", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -281,8 +292,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=501, - serialized_end=540, + serialized_start=725, + serialized_end=813, ) @@ -292,6 +303,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -302,14 +314,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A)\022'dialogflow.googleapis.com/KnowledgeBase", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="knowledge_base", @@ -326,8 +339,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -338,8 +352,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=542, - serialized_end=658, + serialized_start=816, + serialized_end=986, ) @@ -349,6 +363,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -359,14 +374,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A)\n'dialogflow.googleapis.com/KnowledgeBase", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="force", @@ -385,6 +401,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -395,8 +412,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=660, - serialized_end=717, + serialized_start=988, + serialized_end=1094, ) @@ -406,6 +423,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="knowledge_base", @@ -422,8 +440,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -440,8 +459,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -452,8 +472,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=720, - serialized_end=869, + serialized_start=1097, + serialized_end=1256, ) _LISTKNOWLEDGEBASESRESPONSE.fields_by_name[ @@ -490,14 +510,18 @@ KnowledgeBase = _reflection.GeneratedProtocolMessageType( "KnowledgeBase", (_message.Message,), - dict( - DESCRIPTOR=_KNOWLEDGEBASE, - __module__="google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", - __doc__="""Represents knowledge base resource. - - Note: The ``projects.agent.knowledgeBases`` resource is deprecated; only - use ``projects.knowledgeBases``. - + { + "DESCRIPTOR": _KNOWLEDGEBASE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", + "__doc__": """A knowledge base represents a collection of knowledge documents that + you provide to Dialogflow. Your knowledge documents contain + information that may be useful during conversations with end-users. + Some Dialogflow features use knowledge bases when looking for a + response to an end-user input. For more information, see the + `knowledge base guide + `__. + Note: The ``projects.agent.knowledgeBases`` resource is deprecated; + only use ``projects.knowledgeBases``. Attributes: name: @@ -515,19 +539,18 @@ en-us applies. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.KnowledgeBase) - ), + }, ) _sym_db.RegisterMessage(KnowledgeBase) ListKnowledgeBasesRequest = _reflection.GeneratedProtocolMessageType( "ListKnowledgeBasesRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTKNOWLEDGEBASESREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", - __doc__="""Request message for - [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases]. - + { + "DESCRIPTOR": _LISTKNOWLEDGEBASESREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", + "__doc__": """Request message for [KnowledgeBases.ListKnowledgeBases][google.cloud.d + ialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases]. Attributes: parent: @@ -537,23 +560,22 @@ Optional. The maximum number of items to return in a single page. By default 10 and at most 100. page_token: - Optional. The next\_page\_token value returned from a previous + Optional. The next_page_token value returned from a previous list request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListKnowledgeBasesRequest) - ), + }, ) _sym_db.RegisterMessage(ListKnowledgeBasesRequest) ListKnowledgeBasesResponse = _reflection.GeneratedProtocolMessageType( "ListKnowledgeBasesResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTKNOWLEDGEBASESRESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", - __doc__="""Response message for - [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases]. - + { + "DESCRIPTOR": _LISTKNOWLEDGEBASESRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", + "__doc__": """Response message for [KnowledgeBases.ListKnowledgeBases][google.cloud. + dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases]. Attributes: knowledge_bases: @@ -563,19 +585,18 @@ are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListKnowledgeBasesResponse) - ), + }, ) _sym_db.RegisterMessage(ListKnowledgeBasesResponse) GetKnowledgeBaseRequest = _reflection.GeneratedProtocolMessageType( "GetKnowledgeBaseRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETKNOWLEDGEBASEREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", - __doc__="""Request message for - [KnowledgeBases.GetKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.GetKnowledgeBase]. - + { + "DESCRIPTOR": _GETKNOWLEDGEBASEREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", + "__doc__": """Request message for [KnowledgeBases.GetKnowledgeBase][google.cloud.dia + logflow.v2beta1.KnowledgeBases.GetKnowledgeBase]. Attributes: name: @@ -583,19 +604,18 @@ ``projects//knowledgeBases/``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.GetKnowledgeBaseRequest) - ), + }, ) _sym_db.RegisterMessage(GetKnowledgeBaseRequest) CreateKnowledgeBaseRequest = _reflection.GeneratedProtocolMessageType( "CreateKnowledgeBaseRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEKNOWLEDGEBASEREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", - __doc__="""Request message for - [KnowledgeBases.CreateKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.CreateKnowledgeBase]. - + { + "DESCRIPTOR": _CREATEKNOWLEDGEBASEREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", + "__doc__": """Request message for [KnowledgeBases.CreateKnowledgeBase][google.cloud. + dialogflow.v2beta1.KnowledgeBases.CreateKnowledgeBase]. Attributes: parent: @@ -605,19 +625,18 @@ Required. The knowledge base to create. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.CreateKnowledgeBaseRequest) - ), + }, ) _sym_db.RegisterMessage(CreateKnowledgeBaseRequest) DeleteKnowledgeBaseRequest = _reflection.GeneratedProtocolMessageType( "DeleteKnowledgeBaseRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEKNOWLEDGEBASEREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", - __doc__="""Request message for - [KnowledgeBases.DeleteKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.DeleteKnowledgeBase]. - + { + "DESCRIPTOR": _DELETEKNOWLEDGEBASEREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", + "__doc__": """Request message for [KnowledgeBases.DeleteKnowledgeBase][google.cloud. + dialogflow.v2beta1.KnowledgeBases.DeleteKnowledgeBase]. Attributes: name: @@ -628,19 +647,18 @@ any documents in the knowledge base are also deleted. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DeleteKnowledgeBaseRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteKnowledgeBaseRequest) UpdateKnowledgeBaseRequest = _reflection.GeneratedProtocolMessageType( "UpdateKnowledgeBaseRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATEKNOWLEDGEBASEREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", - __doc__="""Request message for - [KnowledgeBases.UpdateKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.UpdateKnowledgeBase]. - + { + "DESCRIPTOR": _UPDATEKNOWLEDGEBASEREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", + "__doc__": """Request message for [KnowledgeBases.UpdateKnowledgeBase][google.cloud. + dialogflow.v2beta1.KnowledgeBases.UpdateKnowledgeBase]. Attributes: knowledge_base: @@ -651,23 +669,33 @@ returned for attempting to update other fields. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.UpdateKnowledgeBaseRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateKnowledgeBaseRequest) DESCRIPTOR._options = None +_KNOWLEDGEBASE.fields_by_name["display_name"]._options = None +_KNOWLEDGEBASE._options = None +_LISTKNOWLEDGEBASESREQUEST.fields_by_name["parent"]._options = None +_LISTKNOWLEDGEBASESREQUEST.fields_by_name["page_size"]._options = None +_LISTKNOWLEDGEBASESREQUEST.fields_by_name["page_token"]._options = None +_GETKNOWLEDGEBASEREQUEST.fields_by_name["name"]._options = None +_CREATEKNOWLEDGEBASEREQUEST.fields_by_name["parent"]._options = None +_CREATEKNOWLEDGEBASEREQUEST.fields_by_name["knowledge_base"]._options = None +_DELETEKNOWLEDGEBASEREQUEST.fields_by_name["name"]._options = None +_UPDATEKNOWLEDGEBASEREQUEST.fields_by_name["knowledge_base"]._options = None +_UPDATEKNOWLEDGEBASEREQUEST.fields_by_name["update_mask"]._options = None _KNOWLEDGEBASES = _descriptor.ServiceDescriptor( name="KnowledgeBases", full_name="google.cloud.dialogflow.v2beta1.KnowledgeBases", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), - serialized_start=872, - serialized_end=2284, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=1259, + serialized_end=2764, methods=[ _descriptor.MethodDescriptor( name="ListKnowledgeBases", @@ -676,9 +704,8 @@ containing_service=None, input_type=_LISTKNOWLEDGEBASESREQUEST, output_type=_LISTKNOWLEDGEBASESRESPONSE, - serialized_options=_b( - "\202\323\344\223\002b\022+/v2beta1/{parent=projects/*}/knowledgeBasesZ3\0221/v2beta1/{parent=projects/*/agent}/knowledgeBases" - ), + serialized_options=b"\202\323\344\223\002b\022+/v2beta1/{parent=projects/*}/knowledgeBasesZ3\0221/v2beta1/{parent=projects/*/agent}/knowledgeBases\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetKnowledgeBase", @@ -687,9 +714,8 @@ containing_service=None, input_type=_GETKNOWLEDGEBASEREQUEST, output_type=_KNOWLEDGEBASE, - serialized_options=_b( - "\202\323\344\223\002b\022+/v2beta1/{name=projects/*/knowledgeBases/*}Z3\0221/v2beta1/{name=projects/*/agent/knowledgeBases/*}" - ), + serialized_options=b"\202\323\344\223\002b\022+/v2beta1/{name=projects/*/knowledgeBases/*}Z3\0221/v2beta1/{name=projects/*/agent/knowledgeBases/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateKnowledgeBase", @@ -698,9 +724,8 @@ containing_service=None, input_type=_CREATEKNOWLEDGEBASEREQUEST, output_type=_KNOWLEDGEBASE, - serialized_options=_b( - '\202\323\344\223\002\202\001"+/v2beta1/{parent=projects/*}/knowledgeBases:\016knowledge_baseZC"1/v2beta1/{parent=projects/*/agent}/knowledgeBases:\016knowledge_base' - ), + serialized_options=b'\202\323\344\223\002\202\001"+/v2beta1/{parent=projects/*}/knowledgeBases:\016knowledge_baseZC"1/v2beta1/{parent=projects/*/agent}/knowledgeBases:\016knowledge_base\332A\025parent,knowledge_base', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteKnowledgeBase", @@ -709,9 +734,8 @@ containing_service=None, input_type=_DELETEKNOWLEDGEBASEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002b*+/v2beta1/{name=projects/*/knowledgeBases/*}Z3*1/v2beta1/{name=projects/*/agent/knowledgeBases/*}" - ), + serialized_options=b"\202\323\344\223\002b*+/v2beta1/{name=projects/*/knowledgeBases/*}Z3*1/v2beta1/{name=projects/*/agent/knowledgeBases/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateKnowledgeBase", @@ -720,9 +744,8 @@ containing_service=None, input_type=_UPDATEKNOWLEDGEBASEREQUEST, output_type=_KNOWLEDGEBASE, - serialized_options=_b( - "\202\323\344\223\002\240\0012:/v2beta1/{knowledge_base.name=projects/*/knowledgeBases/*}:\016knowledge_baseZR2@/v2beta1/{knowledge_base.name=projects/*/agent/knowledgeBases/*}:\016knowledge_base" - ), + serialized_options=b"\202\323\344\223\002\240\0012:/v2beta1/{knowledge_base.name=projects/*/knowledgeBases/*}:\016knowledge_baseZR2@/v2beta1/{knowledge_base.name=projects/*/agent/knowledgeBases/*}:\016knowledge_base\332A\032knowledge_base,update_mask\332A\016knowledge_base", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2beta1/proto/knowledge_base_pb2_grpc.py b/dialogflow_v2beta1/proto/knowledge_base_pb2_grpc.py index 2ef1967a4..907b88fda 100644 --- a/dialogflow_v2beta1/proto/knowledge_base_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/knowledge_base_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2beta1.proto import ( @@ -8,17 +9,15 @@ class KnowledgeBasesStub(object): - """Manages knowledge bases. - - Allows users to setup and maintain knowledge bases with their knowledge data. - """ + """Service for managing [KnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBase]. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.ListKnowledgeBases = channel.unary_unary( "/google.cloud.dialogflow.v2beta1.KnowledgeBases/ListKnowledgeBases", request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_knowledge__base__pb2.ListKnowledgeBasesRequest.SerializeToString, @@ -47,17 +46,15 @@ def __init__(self, channel): class KnowledgeBasesServicer(object): - """Manages knowledge bases. - - Allows users to setup and maintain knowledge bases with their knowledge data. - """ + """Service for managing [KnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBase]. + """ def ListKnowledgeBases(self, request, context): """Returns the list of all knowledge bases of the specified agent. - Note: The `projects.agent.knowledgeBases` resource is deprecated; - only use `projects.knowledgeBases`. - """ + Note: The `projects.agent.knowledgeBases` resource is deprecated; + only use `projects.knowledgeBases`. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -65,9 +62,9 @@ def ListKnowledgeBases(self, request, context): def GetKnowledgeBase(self, request, context): """Retrieves the specified knowledge base. - Note: The `projects.agent.knowledgeBases` resource is deprecated; - only use `projects.knowledgeBases`. - """ + Note: The `projects.agent.knowledgeBases` resource is deprecated; + only use `projects.knowledgeBases`. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -75,9 +72,9 @@ def GetKnowledgeBase(self, request, context): def CreateKnowledgeBase(self, request, context): """Creates a knowledge base. - Note: The `projects.agent.knowledgeBases` resource is deprecated; - only use `projects.knowledgeBases`. - """ + Note: The `projects.agent.knowledgeBases` resource is deprecated; + only use `projects.knowledgeBases`. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -85,9 +82,9 @@ def CreateKnowledgeBase(self, request, context): def DeleteKnowledgeBase(self, request, context): """Deletes the specified knowledge base. - Note: The `projects.agent.knowledgeBases` resource is deprecated; - only use `projects.knowledgeBases`. - """ + Note: The `projects.agent.knowledgeBases` resource is deprecated; + only use `projects.knowledgeBases`. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -95,9 +92,9 @@ def DeleteKnowledgeBase(self, request, context): def UpdateKnowledgeBase(self, request, context): """Updates the specified knowledge base. - Note: The `projects.agent.knowledgeBases` resource is deprecated; - only use `projects.knowledgeBases`. - """ + Note: The `projects.agent.knowledgeBases` resource is deprecated; + only use `projects.knowledgeBases`. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -135,3 +132,144 @@ def add_KnowledgeBasesServicer_to_server(servicer, server): "google.cloud.dialogflow.v2beta1.KnowledgeBases", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class KnowledgeBases(object): + """Service for managing [KnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBase]. + """ + + @staticmethod + def ListKnowledgeBases( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.KnowledgeBases/ListKnowledgeBases", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_knowledge__base__pb2.ListKnowledgeBasesRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_knowledge__base__pb2.ListKnowledgeBasesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetKnowledgeBase( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.KnowledgeBases/GetKnowledgeBase", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_knowledge__base__pb2.GetKnowledgeBaseRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_knowledge__base__pb2.KnowledgeBase.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateKnowledgeBase( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.KnowledgeBases/CreateKnowledgeBase", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_knowledge__base__pb2.CreateKnowledgeBaseRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_knowledge__base__pb2.KnowledgeBase.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteKnowledgeBase( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.KnowledgeBases/DeleteKnowledgeBase", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_knowledge__base__pb2.DeleteKnowledgeBaseRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateKnowledgeBase( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.KnowledgeBases/UpdateKnowledgeBase", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_knowledge__base__pb2.UpdateKnowledgeBaseRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_knowledge__base__pb2.KnowledgeBase.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2beta1/proto/session.proto b/dialogflow_v2beta1/proto/session.proto new file mode 100644 index 000000000..ef882e190 --- /dev/null +++ b/dialogflow_v2beta1/proto/session.proto @@ -0,0 +1,752 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2beta1/agent.proto"; +import "google/cloud/dialogflow/v2beta1/audio_config.proto"; +import "google/cloud/dialogflow/v2beta1/context.proto"; +import "google/cloud/dialogflow/v2beta1/intent.proto"; +import "google/cloud/dialogflow/v2beta1/session_entity_type.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/rpc/status.proto"; +import "google/type/latlng.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "SessionProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; +option (google.api.resource_definition) = { + type: "dialogflow.googleapis.com/Session" + pattern: "projects/{project}/agent/sessions/{session}" + pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}" + pattern: "projects/{project}/locations/{location}/agent/sessions/{session}" +}; + +// A service used for session interactions. +// +// For more information, see the [API interactions +// guide](https://cloud.google.com/dialogflow/docs/api-overview). +service Sessions { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Processes a natural language query and returns structured, actionable data + // as a result. This method is not idempotent, because it may cause contexts + // and session entity types to be updated, which in turn might affect + // results of future queries. + rpc DetectIntent(DetectIntentRequest) returns (DetectIntentResponse) { + option (google.api.http) = { + post: "/v2beta1/{session=projects/*/agent/sessions/*}:detectIntent" + body: "*" + additional_bindings { + post: "/v2beta1/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent" + body: "*" + } + additional_bindings { + post: "/v2beta1/{session=projects/*/locations/*/agent/sessions/*}:detectIntent" + body: "*" + } + additional_bindings { + post: "/v2beta1/{session=projects/*/locations/*/agent/environments/*/users/*/sessions/*}:detectIntent" + body: "*" + } + }; + option (google.api.method_signature) = "session,query_input"; + } + + // Processes a natural language query in audio format in a streaming fashion + // and returns structured, actionable data as a result. This method is only + // available via the gRPC API (not REST). + rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) { + } +} + +// The request to detect user's intent. +message DetectIntentRequest { + // Required. The name of the session this query is sent to. Format: + // `projects//agent/sessions/`, or + // `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + // default 'draft' environment. If `User ID` is not specified, we are using + // "-". It's up to the API caller to choose an appropriate `Session ID` and + // `User Id`. They can be a random number or some type of user and session + // identifiers (preferably hashed). The length of the `Session ID` and + // `User ID` must not exceed 36 characters. + // + // For more information, see the [API interactions + // guide](https://cloud.google.com/dialogflow/docs/api-overview). + string session = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Session" + } + ]; + + // The parameters of this query. + QueryParameters query_params = 2; + + // Required. The input specification. It can be set to: + // + // 1. an audio config + // which instructs the speech recognizer how to process the speech audio, + // + // 2. a conversational query in the form of text, or + // + // 3. an event that specifies which intent to trigger. + QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED]; + + // Instructs the speech synthesizer how to generate the output + // audio. If this field is not set and agent-level speech synthesizer is not + // configured, no output audio is generated. + OutputAudioConfig output_audio_config = 4; + + // Mask for [output_audio_config][google.cloud.dialogflow.v2beta1.DetectIntentRequest.output_audio_config] indicating which settings in this + // request-level config should override speech synthesizer settings defined at + // agent-level. + // + // If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2beta1.DetectIntentRequest.output_audio_config] replaces the agent-level + // config in its entirety. + google.protobuf.FieldMask output_audio_config_mask = 7; + + // The natural language speech audio to be processed. This field + // should be populated iff `query_input` is set to an input audio config. + // A single request can contain up to 1 minute of speech audio data. + bytes input_audio = 5; +} + +// The message returned from the DetectIntent method. +message DetectIntentResponse { + // The unique identifier of the response. It can be used to + // locate a response in the training example set or for reporting issues. + string response_id = 1; + + // The selected results of the conversational query or event processing. + // See `alternative_query_results` for additional potential results. + QueryResult query_result = 2; + + // If Knowledge Connectors are enabled, there could be more than one result + // returned for a given query or event, and this field will contain all + // results except for the top one, which is captured in query_result. The + // alternative results are ordered by decreasing + // `QueryResult.intent_detection_confidence`. If Knowledge Connectors are + // disabled, this field will be empty until multiple responses for regular + // intents are supported, at which point those additional results will be + // surfaced here. + repeated QueryResult alternative_query_results = 5; + + // Specifies the status of the webhook request. + google.rpc.Status webhook_status = 3; + + // The audio data bytes encoded as specified in the request. + // Note: The output audio is generated based on the values of default platform + // text responses found in the `query_result.fulfillment_messages` field. If + // multiple default text responses exist, they will be concatenated when + // generating audio. If no default platform text responses exist, the + // generated audio content will be empty. + // + // In some scenarios, multiple output audio fields may be present in the + // response structure. In these cases, only the top-most-level audio output + // has content. + bytes output_audio = 4; + + // The config used by the speech synthesizer to generate the output audio. + OutputAudioConfig output_audio_config = 6; +} + +// Represents the parameters of the conversational query. +message QueryParameters { + // The time zone of this conversational query from the + // [time zone database](https://www.iana.org/time-zones), e.g., + // America/New_York, Europe/Paris. If not provided, the time zone specified in + // agent settings is used. + string time_zone = 1; + + // The geo location of this conversational query. + google.type.LatLng geo_location = 2; + + // The collection of contexts to be activated before this query is + // executed. + repeated Context contexts = 3; + + // Specifies whether to delete all contexts in the current session + // before the new ones are activated. + bool reset_contexts = 4; + + // Additional session entity types to replace or extend developer + // entity types with. The entity synonyms apply to all languages and persist + // for the session of this query. + repeated SessionEntityType session_entity_types = 5; + + // This field can be used to pass custom data to your webhook. + // Arbitrary JSON objects are supported. + // If supplied, the value is used to populate the + // `WebhookRequest.original_detect_intent_request.payload` + // field sent to your webhook. + google.protobuf.Struct payload = 6; + + // KnowledgeBases to get alternative results from. If not set, the + // KnowledgeBases enabled in the agent (through UI) will be used. + // Format: `projects//knowledgeBases/`. + repeated string knowledge_base_names = 12; + + // Configures the type of sentiment analysis to perform. If not + // provided, sentiment analysis is not performed. + // Note: Sentiment Analysis is only currently available for Enterprise Edition + // agents. + SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10; + + // For mega agent query, directly specify which sub agents to query. + // If any specified sub agent is not linked to the mega agent, an error will + // be returned. If empty, Dialogflow will decide which sub agents to query. + // If specified for a non-mega-agent query, will be silently ignored. + repeated SubAgent sub_agents = 13; + + // This field can be used to pass HTTP headers for a webhook + // call. These headers will be sent to webhook alone with the headers that + // have been configured through Dialogflow web console. The headers defined + // within this field will overwrite the headers configured through Dialogflow + // console if there is a conflict. Header names are case-insensitive. + // Google's specified headers are not allowed. Including: "Host", + // "Content-Length", "Connection", "From", "User-Agent", "Accept-Encoding", + // "If-Modified-Since", "If-None-Match", "X-Forwarded-For", etc. + map webhook_headers = 14; +} + +// Represents the query input. It can contain either: +// +// 1. An audio config which +// instructs the speech recognizer how to process the speech audio. +// +// 2. A conversational query in the form of text. +// +// 3. An event that specifies which intent to trigger. +message QueryInput { + // Required. The input specification. + oneof input { + // Instructs the speech recognizer how to process the speech audio. + InputAudioConfig audio_config = 1; + + // The natural language text to be processed. + TextInput text = 2; + + // The event to be processed. + EventInput event = 3; + } +} + +// Represents the result of conversational query or event processing. +message QueryResult { + // The original conversational query text: + // + // - If natural language text was provided as input, `query_text` contains + // a copy of the input. + // - If natural language speech audio was provided as input, `query_text` + // contains the speech recognition result. If speech recognizer produced + // multiple alternatives, a particular one is picked. + // - If automatic spell correction is enabled, `query_text` will contain the + // corrected user input. + string query_text = 1; + + // The language that was triggered during intent detection. + // See [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // for a list of the currently supported language codes. + string language_code = 15; + + // The Speech recognition confidence between 0.0 and 1.0. A higher number + // indicates an estimated greater likelihood that the recognized words are + // correct. The default of 0.0 is a sentinel value indicating that confidence + // was not set. + // + // This field is not guaranteed to be accurate or set. In particular this + // field isn't set for StreamingDetectIntent since the streaming endpoint has + // separate confidence estimates per portion of the audio in + // StreamingRecognitionResult. + float speech_recognition_confidence = 2; + + // The action name from the matched intent. + string action = 3; + + // The collection of extracted parameters. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value + google.protobuf.Struct parameters = 4; + + // This field is set to: + // + // - `false` if the matched intent has required parameters and not all of + // the required parameter values have been collected. + // - `true` if all required parameter values have been collected, or if the + // matched intent doesn't contain any required parameters. + bool all_required_params_present = 5; + + // The text to be pronounced to the user or shown on the screen. + // Note: This is a legacy field, `fulfillment_messages` should be preferred. + string fulfillment_text = 6; + + // The collection of rich messages to present to the user. + repeated Intent.Message fulfillment_messages = 7; + + // If the query was fulfilled by a webhook call, this field is set to the + // value of the `source` field returned in the webhook response. + string webhook_source = 8; + + // If the query was fulfilled by a webhook call, this field is set to the + // value of the `payload` field returned in the webhook response. + google.protobuf.Struct webhook_payload = 9; + + // The collection of output contexts. If applicable, + // `output_contexts.parameters` contains entries with name + // `.original` containing the original parameter values + // before the query. + repeated Context output_contexts = 10; + + // The intent that matched the conversational query. Some, not + // all fields are filled in this message, including but not limited to: + // `name`, `display_name`, `end_interaction` and `is_fallback`. + Intent intent = 11; + + // The intent detection confidence. Values range from 0.0 + // (completely uncertain) to 1.0 (completely certain). + // This value is for informational purpose only and is only used to + // help match the best intent within the classification threshold. + // This value may change for the same end-user expression at any time due to a + // model retraining or change in implementation. + // If there are `multiple knowledge_answers` messages, this value is set to + // the greatest `knowledgeAnswers.match_confidence` value in the list. + float intent_detection_confidence = 12; + + // Free-form diagnostic information for the associated detect intent request. + // The fields of this data can change without notice, so you should not write + // code that depends on its structure. + // The data may contain: + // + // - webhook call latency + // - webhook errors + google.protobuf.Struct diagnostic_info = 14; + + // The sentiment analysis result, which depends on the + // `sentiment_analysis_request_config` specified in the request. + SentimentAnalysisResult sentiment_analysis_result = 17; + + // The result from Knowledge Connector (if any), ordered by decreasing + // `KnowledgeAnswers.match_confidence`. + KnowledgeAnswers knowledge_answers = 18; +} + +// Represents the result of querying a Knowledge base. +message KnowledgeAnswers { + // An answer from Knowledge Connector. + message Answer { + // Represents the system's confidence that this knowledge answer is a good + // match for this conversational query. + enum MatchConfidenceLevel { + // Not specified. + MATCH_CONFIDENCE_LEVEL_UNSPECIFIED = 0; + + // Indicates that the confidence is low. + LOW = 1; + + // Indicates our confidence is medium. + MEDIUM = 2; + + // Indicates our confidence is high. + HIGH = 3; + } + + // Indicates which Knowledge Document this answer was extracted from. + // Format: `projects//knowledgeBases//documents/`. + string source = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Document" + }]; + + // The corresponding FAQ question if the answer was extracted from a FAQ + // Document, empty otherwise. + string faq_question = 2; + + // The piece of text from the `source` knowledge base document that answers + // this conversational query. + string answer = 3; + + // The system's confidence level that this knowledge answer is a good match + // for this conversational query. + // NOTE: The confidence level for a given `` pair may change + // without notice, as it depends on models that are constantly being + // improved. However, it will change less frequently than the confidence + // score below, and should be preferred for referencing the quality of an + // answer. + MatchConfidenceLevel match_confidence_level = 4; + + // The system's confidence score that this Knowledge answer is a good match + // for this conversational query. + // The range is from 0.0 (completely uncertain) to 1.0 (completely certain). + // Note: The confidence score is likely to vary somewhat (possibly even for + // identical requests), as the underlying model is under constant + // improvement. It may be deprecated in the future. We recommend using + // `match_confidence_level` which should be generally more stable. + float match_confidence = 5; + } + + // A list of answers from Knowledge Connector. + repeated Answer answers = 1; +} + +// The top-level message sent by the client to the +// [Sessions.StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent] method. +// +// Multiple request messages should be sent in order: +// +// 1. The first message must contain +// [session][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.session], +// [query_input][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_input] plus optionally +// [query_params][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_params]. If the client +// wants to receive an audio response, it should also contain +// [output_audio_config][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.output_audio_config]. +// The message must not contain +// [input_audio][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.input_audio]. +// 2. If [query_input][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_input] was set to +// [query_input.audio_config][google.cloud.dialogflow.v2beta1.InputAudioConfig], all subsequent +// messages must contain +// [input_audio][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.input_audio] to continue with +// Speech recognition. +// If you decide to rather detect an intent from text input after you +// already started Speech recognition, please send a message with +// [query_input.text][google.cloud.dialogflow.v2beta1.QueryInput.text]. +// +// However, note that: +// +// * Dialogflow will bill you for the audio duration so far. +// * Dialogflow discards all Speech recognition results in favor of the +// input text. +// * Dialogflow will use the language code from the first message. +// +// After you sent all input, you must half-close or abort the request stream. +message StreamingDetectIntentRequest { + // Required. The name of the session the query is sent to. + // Format of the session name: + // `projects//agent/sessions/`, or + // `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + // default 'draft' environment. If `User ID` is not specified, we are using + // "-". It's up to the API caller to choose an appropriate `Session ID` and + // `User Id`. They can be a random number or some type of user and session + // identifiers (preferably hashed). The length of the `Session ID` and + // `User ID` must not exceed 36 characters. + // + // For more information, see the [API interactions + // guide](https://cloud.google.com/dialogflow/docs/api-overview). + string session = 1 [(google.api.field_behavior) = REQUIRED]; + + // The parameters of this query. + QueryParameters query_params = 2; + + // Required. The input specification. It can be set to: + // + // 1. an audio config which instructs the speech recognizer how to process + // the speech audio, + // + // 2. a conversational query in the form of text, or + // + // 3. an event that specifies which intent to trigger. + QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED]; + + // DEPRECATED. Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2beta1.InputAudioConfig.single_utterance] instead. + // If `false` (default), recognition does not cease until the + // client closes the stream. + // If `true`, the recognizer will detect a single spoken utterance in input + // audio. Recognition ceases when it detects the audio's voice has + // stopped or paused. In this case, once a detected intent is received, the + // client should close the stream and start a new request with a new stream as + // needed. + // This setting is ignored when `query_input` is a piece of text or an event. + bool single_utterance = 4; + + // Instructs the speech synthesizer how to generate the output + // audio. If this field is not set and agent-level speech synthesizer is not + // configured, no output audio is generated. + OutputAudioConfig output_audio_config = 5; + + // Mask for [output_audio_config][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.output_audio_config] indicating which settings in this + // request-level config should override speech synthesizer settings defined at + // agent-level. + // + // If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.output_audio_config] replaces the agent-level + // config in its entirety. + google.protobuf.FieldMask output_audio_config_mask = 7; + + // The input audio content to be recognized. Must be sent if + // `query_input` was set to a streaming input audio config. The complete audio + // over all streaming messages must not exceed 1 minute. + bytes input_audio = 6; +} + +// The top-level message returned from the +// `StreamingDetectIntent` method. +// +// Multiple response messages can be returned in order: +// +// 1. If the input was set to streaming audio, the first one or more messages +// contain `recognition_result`. Each `recognition_result` represents a more +// complete transcript of what the user said. The last `recognition_result` +// has `is_final` set to `true`. +// +// 2. The next message contains `response_id`, `query_result`, +// `alternative_query_results` and optionally `webhook_status` if a WebHook +// was called. +// +// 3. If `output_audio_config` was specified in the request or agent-level +// speech synthesizer is configured, all subsequent messages contain +// `output_audio` and `output_audio_config`. +message StreamingDetectIntentResponse { + // The unique identifier of the response. It can be used to + // locate a response in the training example set or for reporting issues. + string response_id = 1; + + // The result of speech recognition. + StreamingRecognitionResult recognition_result = 2; + + // The selected results of the conversational query or event processing. + // See `alternative_query_results` for additional potential results. + QueryResult query_result = 3; + + // If Knowledge Connectors are enabled, there could be more than one result + // returned for a given query or event, and this field will contain all + // results except for the top one, which is captured in query_result. The + // alternative results are ordered by decreasing + // `QueryResult.intent_detection_confidence`. If Knowledge Connectors are + // disabled, this field will be empty until multiple responses for regular + // intents are supported, at which point those additional results will be + // surfaced here. + repeated QueryResult alternative_query_results = 7; + + // Specifies the status of the webhook request. + google.rpc.Status webhook_status = 4; + + // The audio data bytes encoded as specified in the request. + // Note: The output audio is generated based on the values of default platform + // text responses found in the `query_result.fulfillment_messages` field. If + // multiple default text responses exist, they will be concatenated when + // generating audio. If no default platform text responses exist, the + // generated audio content will be empty. + // + // In some scenarios, multiple output audio fields may be present in the + // response structure. In these cases, only the top-most-level audio output + // has content. + bytes output_audio = 5; + + // The config used by the speech synthesizer to generate the output audio. + OutputAudioConfig output_audio_config = 6; +} + +// Contains a speech recognition result corresponding to a portion of the audio +// that is currently being processed or an indication that this is the end +// of the single requested utterance. +// +// Example: +// +// 1. transcript: "tube" +// +// 2. transcript: "to be a" +// +// 3. transcript: "to be" +// +// 4. transcript: "to be or not to be" +// is_final: true +// +// 5. transcript: " that's" +// +// 6. transcript: " that is" +// +// 7. message_type: `END_OF_SINGLE_UTTERANCE` +// +// 8. transcript: " that is the question" +// is_final: true +// +// Only two of the responses contain final results (#4 and #8 indicated by +// `is_final: true`). Concatenating these generates the full transcript: "to be +// or not to be that is the question". +// +// In each response we populate: +// +// * for `TRANSCRIPT`: `transcript` and possibly `is_final`. +// +// * for `END_OF_SINGLE_UTTERANCE`: only `message_type`. +message StreamingRecognitionResult { + // Type of the response message. + enum MessageType { + // Not specified. Should never be used. + MESSAGE_TYPE_UNSPECIFIED = 0; + + // Message contains a (possibly partial) transcript. + TRANSCRIPT = 1; + + // Event indicates that the server has detected the end of the user's speech + // utterance and expects no additional speech. Therefore, the server will + // not process additional audio (although it may subsequently return + // additional results). The client should stop sending additional audio + // data, half-close the gRPC connection, and wait for any additional results + // until the server closes the gRPC connection. This message is only sent if + // `single_utterance` was set to `true`, and is not used otherwise. + END_OF_SINGLE_UTTERANCE = 2; + } + + // Type of the result message. + MessageType message_type = 1; + + // Transcript text representing the words that the user spoke. + // Populated if and only if `message_type` = `TRANSCRIPT`. + string transcript = 2; + + // If `false`, the `StreamingRecognitionResult` represents an + // interim result that may change. If `true`, the recognizer will not return + // any further hypotheses about this piece of the audio. May only be populated + // for `message_type` = `TRANSCRIPT`. + bool is_final = 3; + + // The Speech confidence between 0.0 and 1.0 for the current portion of audio. + // A higher number indicates an estimated greater likelihood that the + // recognized words are correct. The default of 0.0 is a sentinel value + // indicating that confidence was not set. + // + // This field is typically only provided if `is_final` is true and you should + // not rely on it being accurate or even set. + float confidence = 4; + + // An estimate of the likelihood that the speech recognizer will + // not change its guess about this interim recognition result: + // + // * If the value is unspecified or 0.0, Dialogflow didn't compute the + // stability. In particular, Dialogflow will only provide stability for + // `TRANSCRIPT` results with `is_final = false`. + // * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely + // unstable and 1.0 means completely stable. + float stability = 6; + + // Word-specific information for the words recognized by Speech in + // [transcript][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and + // [InputAudioConfig.enable_word_info] is set. + repeated SpeechWordInfo speech_word_info = 7; + + // Time offset of the end of this Speech recognition result relative to the + // beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`. + google.protobuf.Duration speech_end_offset = 8; +} + +// Represents the natural language text to be processed. +message TextInput { + // Required. The UTF-8 encoded natural language text to be processed. + // Text length must not exceed 256 characters. + string text = 1; + + // Required. The language of this conversational query. See [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // for a list of the currently supported language codes. Note that queries in + // the same session do not necessarily need to specify the same language. + string language_code = 2; +} + +// Events allow for matching intents by event name instead of the natural +// language input. For instance, input `` can trigger a personalized welcome response. +// The parameter `name` may be used by the agent in the response: +// `"Hello #welcome_event.name! What can I do for you today?"`. +message EventInput { + // Required. The unique identifier of the event. + string name = 1; + + // The collection of parameters associated with the event. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value + google.protobuf.Struct parameters = 2; + + // Required. The language of this query. See [Language + // Support](https://cloud.google.com/dialogflow/docs/reference/language) + // for a list of the currently supported language codes. Note that queries in + // the same session do not necessarily need to specify the same language. + string language_code = 3; +} + +// Configures the types of sentiment analysis to perform. +message SentimentAnalysisRequestConfig { + // Instructs the service to perform sentiment analysis on + // `query_text`. If not provided, sentiment analysis is not performed on + // `query_text`. + bool analyze_query_text_sentiment = 1; +} + +// The result of sentiment analysis. Sentiment analysis inspects user input +// and identifies the prevailing subjective opinion, especially to determine a +// user's attitude as positive, negative, or neutral. +// For [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent], it needs to be configured in +// [DetectIntentRequest.query_params][google.cloud.dialogflow.v2beta1.DetectIntentRequest.query_params]. For +// [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent], it needs to be configured in +// [StreamingDetectIntentRequest.query_params][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_params]. +// And for [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] and +// [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent], it needs to be configured in +// [ConversationProfile.human_agent_assistant_config][google.cloud.dialogflow.v2beta1.ConversationProfile.human_agent_assistant_config] +message SentimentAnalysisResult { + // The sentiment analysis result for `query_text`. + Sentiment query_text_sentiment = 1; +} + +// The sentiment, such as positive/negative feeling or association, for a unit +// of analysis, such as the query text. +message Sentiment { + // Sentiment score between -1.0 (negative sentiment) and 1.0 (positive + // sentiment). + float score = 1; + + // A non-negative number in the [0, +inf) range, which represents the absolute + // magnitude of sentiment, regardless of score (positive or negative). + float magnitude = 2; +} diff --git a/dialogflow_v2beta1/proto/session_entity_type.proto b/dialogflow_v2beta1/proto/session_entity_type.proto new file mode 100644 index 000000000..07b73530e --- /dev/null +++ b/dialogflow_v2beta1/proto/session_entity_type.proto @@ -0,0 +1,310 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2beta1/entity_type.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "SessionEntityTypeProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityType]. +service SessionEntityTypes { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all session entity types in the specified session. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. + rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes" + additional_bindings { + get: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes" + } + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes" + } + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. + rpc GetSessionEntityType(GetSessionEntityTypeRequest) returns (SessionEntityType) { + option (google.api.http) = { + get: "/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}" + additional_bindings { + get: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + } + additional_bindings { + get: "/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}" + } + additional_bindings { + get: "/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a session entity type. + // + // If the specified session entity type already exists, overrides the + // session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. + rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes" + body: "session_entity_type" + additional_bindings { + post: "/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes" + body: "session_entity_type" + } + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes" + body: "session_entity_type" + } + additional_bindings { + post: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes" + body: "session_entity_type" + } + }; + option (google.api.method_signature) = "parent,session_entity_type"; + } + + // Updates the specified session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. + rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest) returns (SessionEntityType) { + option (google.api.http) = { + patch: "/v2beta1/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}" + body: "session_entity_type" + additional_bindings { + patch: "/v2beta1/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + body: "session_entity_type" + } + additional_bindings { + patch: "/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/sessions/*/entityTypes/*}" + body: "session_entity_type" + } + additional_bindings { + patch: "/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + body: "session_entity_type" + } + }; + option (google.api.method_signature) = "session_entity_type"; + option (google.api.method_signature) = "session_entity_type,update_mask"; + } + + // Deletes the specified session entity type. + // + // This method doesn't work with Google Assistant integration. + // Contact Dialogflow support if you need to use session entities + // with Google Assistant integration. + rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}" + additional_bindings { + delete: "/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + } + additional_bindings { + delete: "/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}" + } + additional_bindings { + delete: "/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// A session represents a conversation between a Dialogflow agent and an +// end-user. You can create special entities, called session entities, during a +// session. Session entities can extend or replace custom entity types and only +// exist during the session that they were created for. All session data, +// including session entities, is stored by Dialogflow for 20 minutes. +// +// For more information, see the [session entity +// guide](https://cloud.google.com/dialogflow/docs/entities-session). +message SessionEntityType { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/SessionEntityType" + pattern: "projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}" + pattern: "projects/{project}/locations/{location}/agent/sessions/{session}/entityTypes/{entity_type}" + pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}" + }; + + // The types of modifications for a session entity type. + enum EntityOverrideMode { + // Not specified. This value should be never used. + ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0; + + // The collection of session entities overrides the collection of entities + // in the corresponding custom entity type. + ENTITY_OVERRIDE_MODE_OVERRIDE = 1; + + // The collection of session entities extends the collection of entities in + // the corresponding custom entity type. + // + // Note: Even in this override mode calls to `ListSessionEntityTypes`, + // `GetSessionEntityType`, `CreateSessionEntityType` and + // `UpdateSessionEntityType` only return the additional entities added in + // this session entity type. If you want to get the supplemented list, + // please call [EntityTypes.GetEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType] on the custom entity type + // and merge. + ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; + } + + // Required. The unique identifier of this session entity type. Format: + // `projects//agent/sessions//entityTypes/`, or + // `projects//agent/environments//users//sessions//entityTypes/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + // + // `` must be the display name of an existing entity + // type in the same agent that will be overridden or supplemented. + string name = 1; + + // Required. Indicates whether the additional data should override or + // supplement the custom entity type definition. + EntityOverrideMode entity_override_mode = 2; + + // Required. The collection of entities associated with this session entity + // type. + repeated EntityType.Entity entities = 3; +} + +// The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes]. +message ListSessionEntityTypesRequest { + // Required. The session to list all session entity types from. + // Format: `projects//agent/sessions/` or + // `projects//agent/environments//users// + // sessions/`. + // If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/SessionEntityType" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes]. +message ListSessionEntityTypesResponse { + // The list of session entity types. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated SessionEntityType session_entity_types = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityType]. +message GetSessionEntityTypeRequest { + // Required. The name of the session entity type. Format: + // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/SessionEntityType" + } + ]; +} + +// The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityType]. +message CreateSessionEntityTypeRequest { + // Required. The session to create a session entity type for. + // Format: `projects//agent/sessions/` or + // `projects//agent/environments//users// + // sessions/`. If `Environment ID` is not specified, we assume + // default 'draft' environment. If `User ID` is not specified, we assume + // default '-' user. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/SessionEntityType" + } + ]; + + // Required. The session entity type to create. + SessionEntityType session_entity_type = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType]. +message UpdateSessionEntityTypeRequest { + // Required. The session entity type to update. + SessionEntityType session_entity_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityType]. +message DeleteSessionEntityTypeRequest { + // Required. The name of the entity type to delete. Format: + // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' + // environment. If `User ID` is not specified, we assume default '-' user. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/SessionEntityType" + } + ]; +} diff --git a/dialogflow_v2beta1/proto/session_entity_type_pb2.py b/dialogflow_v2beta1/proto/session_entity_type_pb2.py index 1fdbe691f..c4345692c 100644 --- a/dialogflow_v2beta1/proto/session_entity_type_pb2.py +++ b/dialogflow_v2beta1/proto/session_entity_type_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -16,30 +13,31 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from dialogflow_v2beta1.proto import ( entity_type_pb2 as google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2, ) from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto", package="google.cloud.dialogflow.v2beta1", syntax="proto3", - serialized_options=_b( - "\n#com.google.cloud.dialogflow.v2beta1B\026SessionEntityTypeProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1" - ), - serialized_pb=_b( - '\n?google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x37google/cloud/dialogflow_v2beta1/proto/entity_type.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/api/client.proto"\xd1\x02\n\x11SessionEntityType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x63\n\x14\x65ntity_override_mode\x18\x02 \x01(\x0e\x32\x45.google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode\x12\x44\n\x08\x65ntities\x18\x03 \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.EntityType.Entity"\x82\x01\n\x12\x45ntityOverrideMode\x12$\n ENTITY_OVERRIDE_MODE_UNSPECIFIED\x10\x00\x12!\n\x1d\x45NTITY_OVERRIDE_MODE_OVERRIDE\x10\x01\x12#\n\x1f\x45NTITY_OVERRIDE_MODE_SUPPLEMENT\x10\x02"V\n\x1dListSessionEntityTypesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"\x8b\x01\n\x1eListSessionEntityTypesResponse\x12P\n\x14session_entity_types\x18\x01 \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.SessionEntityType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"+\n\x1bGetSessionEntityTypeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x81\x01\n\x1e\x43reateSessionEntityTypeRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12O\n\x13session_entity_type\x18\x02 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.SessionEntityType"\xa2\x01\n\x1eUpdateSessionEntityTypeRequest\x12O\n\x13session_entity_type\x18\x01 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.SessionEntityType\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask".\n\x1e\x44\x65leteSessionEntityTypeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t2\x8f\x15\n\x12SessionEntityTypes\x12\xdb\x03\n\x16ListSessionEntityTypes\x12>.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest\x1a?.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse"\xbf\x02\x82\xd3\xe4\x93\x02\xb8\x02\x12\x39/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypesZR\x12P/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypesZG\x12\x45/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypesZ^\x12\\/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes\x12\xca\x03\n\x14GetSessionEntityType\x12<.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest\x1a\x32.google.cloud.dialogflow.v2beta1.SessionEntityType"\xbf\x02\x82\xd3\xe4\x93\x02\xb8\x02\x12\x39/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}ZR\x12P/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}ZG\x12\x45/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}Z^\x12\\/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\x12\xa4\x04\n\x17\x43reateSessionEntityType\x12?.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest\x1a\x32.google.cloud.dialogflow.v2beta1.SessionEntityType"\x93\x03\x82\xd3\xe4\x93\x02\x8c\x03"9/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes:\x13session_entity_typeZg"P/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes:\x13session_entity_typeZ\\"E/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes:\x13session_entity_typeZs"\\/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes:\x13session_entity_type\x12\xf5\x04\n\x17UpdateSessionEntityType\x12?.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest\x1a\x32.google.cloud.dialogflow.v2beta1.SessionEntityType"\xe4\x03\x82\xd3\xe4\x93\x02\xdd\x03\x32M/v2beta1/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}:\x13session_entity_typeZ{2d/v2beta1/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}:\x13session_entity_typeZp2Y/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/sessions/*/entityTypes/*}:\x13session_entity_typeZ\x87\x01\x32p/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}:\x13session_entity_type\x12\xb4\x03\n\x17\x44\x65leteSessionEntityType\x12?.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest\x1a\x16.google.protobuf.Empty"\xbf\x02\x82\xd3\xe4\x93\x02\xb8\x02*9/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}ZR*P/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}ZG*E/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}Z^*\\/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xb4\x01\n#com.google.cloud.dialogflow.v2beta1B\x16SessionEntityTypeProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3' - ), + serialized_options=b"\n#com.google.cloud.dialogflow.v2beta1B\026SessionEntityTypeProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n?google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x37google/cloud/dialogflow_v2beta1/proto/entity_type.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\x97\x05\n\x11SessionEntityType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x63\n\x14\x65ntity_override_mode\x18\x02 \x01(\x0e\x32\x45.google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode\x12\x44\n\x08\x65ntities\x18\x03 \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.EntityType.Entity"\x82\x01\n\x12\x45ntityOverrideMode\x12$\n ENTITY_OVERRIDE_MODE_UNSPECIFIED\x10\x00\x12!\n\x1d\x45NTITY_OVERRIDE_MODE_OVERRIDE\x10\x01\x12#\n\x1f\x45NTITY_OVERRIDE_MODE_SUPPLEMENT\x10\x02:\xc3\x02\xea\x41\xbf\x02\n+dialogflow.googleapis.com/SessionEntityType\x12\x45projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}\x12Zprojects/{project}/locations/{location}/agent/sessions/{session}/entityTypes/{entity_type}\x12mprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}"\x8b\x01\n\x1dListSessionEntityTypesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+dialogflow.googleapis.com/SessionEntityType\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"\x8b\x01\n\x1eListSessionEntityTypesResponse\x12P\n\x14session_entity_types\x18\x01 \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.SessionEntityType\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"`\n\x1bGetSessionEntityTypeRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+dialogflow.googleapis.com/SessionEntityType"\xbb\x01\n\x1e\x43reateSessionEntityTypeRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+dialogflow.googleapis.com/SessionEntityType\x12T\n\x13session_entity_type\x18\x02 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.SessionEntityTypeB\x03\xe0\x41\x02"\xa7\x01\n\x1eUpdateSessionEntityTypeRequest\x12T\n\x13session_entity_type\x18\x01 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.SessionEntityTypeB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"c\n\x1e\x44\x65leteSessionEntityTypeRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+dialogflow.googleapis.com/SessionEntityType2\xfb\x15\n\x12SessionEntityTypes\x12\xe4\x03\n\x16ListSessionEntityTypes\x12>.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest\x1a?.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse"\xc8\x02\x82\xd3\xe4\x93\x02\xb8\x02\x12\x39/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypesZR\x12P/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypesZG\x12\x45/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypesZ^\x12\\/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes\xda\x41\x06parent\x12\xd1\x03\n\x14GetSessionEntityType\x12<.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest\x1a\x32.google.cloud.dialogflow.v2beta1.SessionEntityType"\xc6\x02\x82\xd3\xe4\x93\x02\xb8\x02\x12\x39/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}ZR\x12P/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}ZG\x12\x45/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}Z^\x12\\/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\xda\x41\x04name\x12\xc1\x04\n\x17\x43reateSessionEntityType\x12?.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest\x1a\x32.google.cloud.dialogflow.v2beta1.SessionEntityType"\xb0\x03\x82\xd3\xe4\x93\x02\x8c\x03"9/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes:\x13session_entity_typeZg"P/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes:\x13session_entity_typeZ\\"E/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes:\x13session_entity_typeZs"\\/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes:\x13session_entity_type\xda\x41\x1aparent,session_entity_type\x12\xad\x05\n\x17UpdateSessionEntityType\x12?.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest\x1a\x32.google.cloud.dialogflow.v2beta1.SessionEntityType"\x9c\x04\x82\xd3\xe4\x93\x02\xdd\x03\x32M/v2beta1/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}:\x13session_entity_typeZ{2d/v2beta1/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}:\x13session_entity_typeZp2Y/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/sessions/*/entityTypes/*}:\x13session_entity_typeZ\x87\x01\x32p/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}:\x13session_entity_type\xda\x41\x13session_entity_type\xda\x41\x1fsession_entity_type,update_mask\x12\xbb\x03\n\x17\x44\x65leteSessionEntityType\x12?.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest\x1a\x16.google.protobuf.Empty"\xc6\x02\x82\xd3\xe4\x93\x02\xb8\x02*9/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}ZR*P/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}ZG*E/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}Z^*\\/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\xda\x41\x04name\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xb4\x01\n#com.google.cloud.dialogflow.v2beta1B\x16SessionEntityTypeProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_entity__type__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -49,6 +47,7 @@ full_name="google.cloud.dialogflow.v2beta1.SessionEntityType.EntityOverrideMode", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="ENTITY_OVERRIDE_MODE_UNSPECIFIED", @@ -56,6 +55,7 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="ENTITY_OVERRIDE_MODE_OVERRIDE", @@ -63,6 +63,7 @@ number=1, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="ENTITY_OVERRIDE_MODE_SUPPLEMENT", @@ -70,12 +71,13 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=483, - serialized_end=613, + serialized_start=543, + serialized_end=673, ) _sym_db.RegisterEnumDescriptor(_SESSIONENTITYTYPE_ENTITYOVERRIDEMODE) @@ -86,6 +88,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -96,7 +99,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -104,6 +107,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entity_override_mode", @@ -122,6 +126,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entities", @@ -140,18 +145,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[_SESSIONENTITYTYPE_ENTITYOVERRIDEMODE], - serialized_options=None, + serialized_options=b"\352A\277\002\n+dialogflow.googleapis.com/SessionEntityType\022Eprojects/{project}/agent/sessions/{session}/entityTypes/{entity_type}\022Zprojects/{project}/locations/{location}/agent/sessions/{session}/entityTypes/{entity_type}\022mprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=276, - serialized_end=613, + serialized_start=336, + serialized_end=999, ) @@ -161,6 +167,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -171,14 +178,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A-\022+dialogflow.googleapis.com/SessionEntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -197,6 +205,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -207,7 +216,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -215,6 +224,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -225,8 +235,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=615, - serialized_end=701, + serialized_start=1002, + serialized_end=1141, ) @@ -236,6 +246,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="session_entity_types", @@ -254,6 +265,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -264,7 +276,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -272,6 +284,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -282,8 +295,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=704, - serialized_end=843, + serialized_start=1144, + serialized_end=1283, ) @@ -293,6 +306,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -303,14 +317,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A-\n+dialogflow.googleapis.com/SessionEntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -321,8 +336,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=845, - serialized_end=888, + serialized_start=1285, + serialized_end=1381, ) @@ -332,6 +347,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -342,14 +358,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A-\022+dialogflow.googleapis.com/SessionEntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="session_entity_type", @@ -366,8 +383,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -378,8 +396,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=891, - serialized_end=1020, + serialized_start=1384, + serialized_end=1571, ) @@ -389,6 +407,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="session_entity_type", @@ -405,8 +424,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -425,6 +445,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -435,8 +456,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1023, - serialized_end=1185, + serialized_start=1574, + serialized_end=1741, ) @@ -446,6 +467,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -456,14 +478,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002\372A-\n+dialogflow.googleapis.com/SessionEntityType", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -474,8 +497,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1187, - serialized_end=1233, + serialized_start=1743, + serialized_end=1842, ) _SESSIONENTITYTYPE.fields_by_name[ @@ -523,18 +546,16 @@ SessionEntityType = _reflection.GeneratedProtocolMessageType( "SessionEntityType", (_message.Message,), - dict( - DESCRIPTOR=_SESSIONENTITYTYPE, - __module__="google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", - __doc__="""Represents a session entity type. - - Extends or replaces a custom entity type at the user session level (we - refer to the entity types defined at the agent level as "custom entity - types"). - - Note: session entity types apply to all queries, regardless of the - language. - + { + "DESCRIPTOR": _SESSIONENTITYTYPE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", + "__doc__": """A session represents a conversation between a Dialogflow agent and an + end-user. You can create special entities, called session entities, + during a session. Session entities can extend or replace custom entity + types and only exist during the session that they were created for. + All session data, including session entities, is stored by Dialogflow + for 20 minutes. For more information, see the `session entity guide + `__. Attributes: name: @@ -544,8 +565,8 @@ ``projects//agent/environments//users//sessions//entityTypes/``. If ``Environment ID`` is not specified, - we assume default 'draft' environment. If ``User ID`` is not - specified, we assume default '-' user. ```` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. entity_override_mode: @@ -556,19 +577,19 @@ session entity type. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SessionEntityType) - ), + }, ) _sym_db.RegisterMessage(SessionEntityType) ListSessionEntityTypesRequest = _reflection.GeneratedProtocolMessageType( "ListSessionEntityTypesRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTSESSIONENTITYTYPESREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", - __doc__="""The request message for - [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes]. - + { + "DESCRIPTOR": _LISTSESSIONENTITYTYPESREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", + "__doc__": """The request message for [SessionEntityTypes.ListSessionEntityTypes][go + ogle.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityType + s]. Attributes: parent: @@ -576,53 +597,52 @@ Format: ``projects//agent/sessions/`` or ``projects//agent/environments//users// sessions/``. If ``Environment - ID`` is not specified, we assume default 'draft' environment. - If ``User ID`` is not specified, we assume default '-' user. + ID`` is not specified, we assume default ‘draft’ environment. + If ``User ID`` is not specified, we assume default ‘-’ user. page_size: Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. page_token: - Optional. The next\_page\_token value returned from a previous + Optional. The next_page_token value returned from a previous list request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest) - ), + }, ) _sym_db.RegisterMessage(ListSessionEntityTypesRequest) ListSessionEntityTypesResponse = _reflection.GeneratedProtocolMessageType( "ListSessionEntityTypesResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTSESSIONENTITYTYPESRESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", - __doc__="""The response message for - [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes]. - + { + "DESCRIPTOR": _LISTSESSIONENTITYTYPESRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", + "__doc__": """The response message for [SessionEntityTypes.ListSessionEntityTypes][g + oogle.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTyp + es]. Attributes: session_entity_types: The list of session entity types. There will be a maximum - number of items returned based on the page\_size field in the + number of items returned based on the page_size field in the request. next_page_token: Token to retrieve the next page of results, or empty if there are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse) - ), + }, ) _sym_db.RegisterMessage(ListSessionEntityTypesResponse) GetSessionEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "GetSessionEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETSESSIONENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", - __doc__="""The request message for - [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityType]. - + { + "DESCRIPTOR": _GETSESSIONENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", + "__doc__": """The request message for [SessionEntityTypes.GetSessionEntityType][goog + le.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityType]. Attributes: name: @@ -632,23 +652,23 @@ ``projects//agent/environments//users//sessions//entityTypes/``. If ``Environment ID`` is not specified, - we assume default 'draft' environment. If ``User ID`` is not - specified, we assume default '-' user. + we assume default ‘draft’ environment. If ``User ID`` is not + specified, we assume default ‘-’ user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(GetSessionEntityTypeRequest) CreateSessionEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "CreateSessionEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATESESSIONENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", - __doc__="""The request message for - [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityType]. - + { + "DESCRIPTOR": _CREATESESSIONENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", + "__doc__": """The request message for [SessionEntityTypes.CreateSessionEntityType][g + oogle.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityT + ype]. Attributes: parent: @@ -656,53 +676,46 @@ Format: ``projects//agent/sessions/`` or ``projects//agent/environments//users// sessions/``. If ``Environment - ID`` is not specified, we assume default 'draft' environment. - If ``User ID`` is not specified, we assume default '-' user. + ID`` is not specified, we assume default ‘draft’ environment. + If ``User ID`` is not specified, we assume default ‘-’ user. session_entity_type: Required. The session entity type to create. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(CreateSessionEntityTypeRequest) UpdateSessionEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "UpdateSessionEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATESESSIONENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", - __doc__="""The request message for - [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType]. - + { + "DESCRIPTOR": _UPDATESESSIONENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", + "__doc__": """The request message for [SessionEntityTypes.UpdateSessionEntityType][g + oogle.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityT + ype]. Attributes: session_entity_type: - Required. The entity type to update. Format: - ``projects//agent/sessions//entityTypes/`` or - ``projects//agent/environments//users//sessions//entityTypes/``. If ``Environment ID`` is not specified, - we assume default 'draft' environment. If ``User ID`` is not - specified, we assume default '-' user. + Required. The session entity type to update. update_mask: Optional. The mask to control which fields get updated. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateSessionEntityTypeRequest) DeleteSessionEntityTypeRequest = _reflection.GeneratedProtocolMessageType( "DeleteSessionEntityTypeRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETESESSIONENTITYTYPEREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", - __doc__="""The request message for - [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityType]. - + { + "DESCRIPTOR": _DELETESESSIONENTITYTYPEREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2", + "__doc__": """The request message for [SessionEntityTypes.DeleteSessionEntityType][g + oogle.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityT + ype]. Attributes: name: @@ -712,27 +725,33 @@ ``projects//agent/environments//users//sessions//entityTypes/``. If ``Environment ID`` is not specified, - we assume default 'draft' environment. If ``User ID`` is not - specified, we assume default '-' user. + we assume default ‘draft’ environment. If ``User ID`` is not + specified, we assume default ‘-’ user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteSessionEntityTypeRequest) DESCRIPTOR._options = None +_SESSIONENTITYTYPE._options = None +_LISTSESSIONENTITYTYPESREQUEST.fields_by_name["parent"]._options = None +_GETSESSIONENTITYTYPEREQUEST.fields_by_name["name"]._options = None +_CREATESESSIONENTITYTYPEREQUEST.fields_by_name["parent"]._options = None +_CREATESESSIONENTITYTYPEREQUEST.fields_by_name["session_entity_type"]._options = None +_UPDATESESSIONENTITYTYPEREQUEST.fields_by_name["session_entity_type"]._options = None +_DELETESESSIONENTITYTYPEREQUEST.fields_by_name["name"]._options = None _SESSIONENTITYTYPES = _descriptor.ServiceDescriptor( name="SessionEntityTypes", full_name="google.cloud.dialogflow.v2beta1.SessionEntityTypes", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), - serialized_start=1236, - serialized_end=3939, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=1845, + serialized_end=4656, methods=[ _descriptor.MethodDescriptor( name="ListSessionEntityTypes", @@ -741,9 +760,8 @@ containing_service=None, input_type=_LISTSESSIONENTITYTYPESREQUEST, output_type=_LISTSESSIONENTITYTYPESRESPONSE, - serialized_options=_b( - "\202\323\344\223\002\270\002\0229/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypesZR\022P/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypesZG\022E/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypesZ^\022\\/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes" - ), + serialized_options=b"\202\323\344\223\002\270\002\0229/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypesZR\022P/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypesZG\022E/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypesZ^\022\\/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetSessionEntityType", @@ -752,9 +770,8 @@ containing_service=None, input_type=_GETSESSIONENTITYTYPEREQUEST, output_type=_SESSIONENTITYTYPE, - serialized_options=_b( - "\202\323\344\223\002\270\002\0229/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}ZR\022P/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}ZG\022E/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}Z^\022\\/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - ), + serialized_options=b"\202\323\344\223\002\270\002\0229/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}ZR\022P/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}ZG\022E/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}Z^\022\\/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateSessionEntityType", @@ -763,9 +780,8 @@ containing_service=None, input_type=_CREATESESSIONENTITYTYPEREQUEST, output_type=_SESSIONENTITYTYPE, - serialized_options=_b( - '\202\323\344\223\002\214\003"9/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes:\023session_entity_typeZg"P/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes:\023session_entity_typeZ\\"E/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes:\023session_entity_typeZs"\\/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes:\023session_entity_type' - ), + serialized_options=b'\202\323\344\223\002\214\003"9/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes:\023session_entity_typeZg"P/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes:\023session_entity_typeZ\\"E/v2beta1/{parent=projects/*/locations/*/agent/sessions/*}/entityTypes:\023session_entity_typeZs"\\/v2beta1/{parent=projects/*/locations/*/agent/environments/*/users/*/sessions/*}/entityTypes:\023session_entity_type\332A\032parent,session_entity_type', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateSessionEntityType", @@ -774,9 +790,8 @@ containing_service=None, input_type=_UPDATESESSIONENTITYTYPEREQUEST, output_type=_SESSIONENTITYTYPE, - serialized_options=_b( - "\202\323\344\223\002\335\0032M/v2beta1/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}:\023session_entity_typeZ{2d/v2beta1/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}:\023session_entity_typeZp2Y/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/sessions/*/entityTypes/*}:\023session_entity_typeZ\207\0012p/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}:\023session_entity_type" - ), + serialized_options=b"\202\323\344\223\002\335\0032M/v2beta1/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}:\023session_entity_typeZ{2d/v2beta1/{session_entity_type.name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}:\023session_entity_typeZp2Y/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/sessions/*/entityTypes/*}:\023session_entity_typeZ\207\0012p/v2beta1/{session_entity_type.name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}:\023session_entity_type\332A\023session_entity_type\332A\037session_entity_type,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteSessionEntityType", @@ -785,9 +800,8 @@ containing_service=None, input_type=_DELETESESSIONENTITYTYPEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002\270\002*9/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}ZR*P/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}ZG*E/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}Z^*\\/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" - ), + serialized_options=b"\202\323\344\223\002\270\002*9/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}ZR*P/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}ZG*E/v2beta1/{name=projects/*/locations/*/agent/sessions/*/entityTypes/*}Z^*\\/v2beta1/{name=projects/*/locations/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py b/dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py index 0e08a4ffb..011f6068c 100644 --- a/dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2beta1.proto import ( @@ -8,31 +9,15 @@ class SessionEntityTypesStub(object): - """Entities are extracted from user input and represent parameters that are - meaningful to your application. For example, a date range, a proper name - such as a geographic location or landmark, and so on. Entities represent - actionable data for your application. - - Session entity types are referred to as **User** entity types and are - entities that are built for an individual user such as - favorites, preferences, playlists, and so on. You can redefine a session - entity type at the session level. - - Session entity methods do not work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - - For more information about entity types, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/entities-overview). - """ + """Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityType]. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.ListSessionEntityTypes = channel.unary_unary( "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/ListSessionEntityTypes", request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__entity__type__pb2.ListSessionEntityTypesRequest.SerializeToString, @@ -61,32 +46,16 @@ def __init__(self, channel): class SessionEntityTypesServicer(object): - """Entities are extracted from user input and represent parameters that are - meaningful to your application. For example, a date range, a proper name - such as a geographic location or landmark, and so on. Entities represent - actionable data for your application. - - Session entity types are referred to as **User** entity types and are - entities that are built for an individual user such as - favorites, preferences, playlists, and so on. You can redefine a session - entity type at the session level. - - Session entity methods do not work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - - For more information about entity types, see the - [Dialogflow - documentation](https://cloud.google.com/dialogflow/docs/entities-overview). - """ + """Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityType]. + """ def ListSessionEntityTypes(self, request, context): """Returns the list of all session entity types in the specified session. - This method doesn't work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - """ + This method doesn't work with Google Assistant integration. + Contact Dialogflow support if you need to use session entities + with Google Assistant integration. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -94,10 +63,10 @@ def ListSessionEntityTypes(self, request, context): def GetSessionEntityType(self, request, context): """Retrieves the specified session entity type. - This method doesn't work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - """ + This method doesn't work with Google Assistant integration. + Contact Dialogflow support if you need to use session entities + with Google Assistant integration. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -105,13 +74,13 @@ def GetSessionEntityType(self, request, context): def CreateSessionEntityType(self, request, context): """Creates a session entity type. - If the specified session entity type already exists, overrides the - session entity type. + If the specified session entity type already exists, overrides the + session entity type. - This method doesn't work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - """ + This method doesn't work with Google Assistant integration. + Contact Dialogflow support if you need to use session entities + with Google Assistant integration. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -119,10 +88,10 @@ def CreateSessionEntityType(self, request, context): def UpdateSessionEntityType(self, request, context): """Updates the specified session entity type. - This method doesn't work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - """ + This method doesn't work with Google Assistant integration. + Contact Dialogflow support if you need to use session entities + with Google Assistant integration. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -130,10 +99,10 @@ def UpdateSessionEntityType(self, request, context): def DeleteSessionEntityType(self, request, context): """Deletes the specified session entity type. - This method doesn't work with Google Assistant integration. - Contact Dialogflow support if you need to use session entities - with Google Assistant integration. - """ + This method doesn't work with Google Assistant integration. + Contact Dialogflow support if you need to use session entities + with Google Assistant integration. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -171,3 +140,144 @@ def add_SessionEntityTypesServicer_to_server(servicer, server): "google.cloud.dialogflow.v2beta1.SessionEntityTypes", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class SessionEntityTypes(object): + """Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityType]. + """ + + @staticmethod + def ListSessionEntityTypes( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/ListSessionEntityTypes", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__entity__type__pb2.ListSessionEntityTypesRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__entity__type__pb2.ListSessionEntityTypesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetSessionEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/GetSessionEntityType", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__entity__type__pb2.GetSessionEntityTypeRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__entity__type__pb2.SessionEntityType.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateSessionEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/CreateSessionEntityType", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__entity__type__pb2.CreateSessionEntityTypeRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__entity__type__pb2.SessionEntityType.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateSessionEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/UpdateSessionEntityType", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__entity__type__pb2.UpdateSessionEntityTypeRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__entity__type__pb2.SessionEntityType.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteSessionEntityType( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/DeleteSessionEntityType", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__entity__type__pb2.DeleteSessionEntityTypeRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2beta1/proto/session_pb2.py b/dialogflow_v2beta1/proto/session_pb2.py index c622eb788..40ab9e01b 100644 --- a/dialogflow_v2beta1/proto/session_pb2.py +++ b/dialogflow_v2beta1/proto/session_pb2.py @@ -2,10 +2,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/session.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -17,6 +14,7 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from dialogflow_v2beta1.proto import ( @@ -39,21 +37,18 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 from google.type import latlng_pb2 as google_dot_type_dot_latlng__pb2 -from google.api import client_pb2 as google_dot_api_dot_client__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="google/cloud/dialogflow_v2beta1/proto/session.proto", package="google.cloud.dialogflow.v2beta1", syntax="proto3", - serialized_options=_b( - "\n#com.google.cloud.dialogflow.v2beta1B\014SessionProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1\352A\222\001\n!dialogflow.googleapis.com/Session\022@projects/{project}/locations/{location}/agent/sessions/{session}\022+projects/{project}/agent/sessions/{session}" - ), - serialized_pb=_b( - '\n3google/cloud/dialogflow_v2beta1/proto/session.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x31google/cloud/dialogflow_v2beta1/proto/agent.proto\x1a\x38google/cloud/dialogflow_v2beta1/proto/audio_config.proto\x1a\x33google/cloud/dialogflow_v2beta1/proto/context.proto\x1a\x32google/cloud/dialogflow_v2beta1/proto/intent.proto\x1a?google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x18google/type/latlng.proto\x1a\x17google/api/client.proto"\xfc\x02\n\x13\x44\x65tectIntentRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xfa\x41#\n!dialogflow.googleapis.com/Session\x12\x46\n\x0cquery_params\x18\x02 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2beta1.QueryParameters\x12@\n\x0bquery_input\x18\x03 \x01(\x0b\x32+.google.cloud.dialogflow.v2beta1.QueryInput\x12O\n\x13output_audio_config\x18\x04 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.OutputAudioConfig\x12<\n\x18output_audio_config_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0binput_audio\x18\x05 \x01(\x0c"\xd3\x02\n\x14\x44\x65tectIntentResponse\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12\x42\n\x0cquery_result\x18\x02 \x01(\x0b\x32,.google.cloud.dialogflow.v2beta1.QueryResult\x12O\n\x19\x61lternative_query_results\x18\x05 \x03(\x0b\x32,.google.cloud.dialogflow.v2beta1.QueryResult\x12*\n\x0ewebhook_status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x14\n\x0coutput_audio\x18\x04 \x01(\x0c\x12O\n\x13output_audio_config\x18\x06 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.OutputAudioConfig"\xfe\x04\n\x0fQueryParameters\x12\x11\n\ttime_zone\x18\x01 \x01(\t\x12)\n\x0cgeo_location\x18\x02 \x01(\x0b\x32\x13.google.type.LatLng\x12:\n\x08\x63ontexts\x18\x03 \x03(\x0b\x32(.google.cloud.dialogflow.v2beta1.Context\x12\x16\n\x0ereset_contexts\x18\x04 \x01(\x08\x12P\n\x14session_entity_types\x18\x05 \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.SessionEntityType\x12(\n\x07payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x1c\n\x14knowledge_base_names\x18\x0c \x03(\t\x12j\n!sentiment_analysis_request_config\x18\n \x01(\x0b\x32?.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig\x12=\n\nsub_agents\x18\r \x03(\x0b\x32).google.cloud.dialogflow.v2beta1.SubAgent\x12]\n\x0fwebhook_headers\x18\x0e \x03(\x0b\x32\x44.google.cloud.dialogflow.v2beta1.QueryParameters.WebhookHeadersEntry\x1a\x35\n\x13WebhookHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xda\x01\n\nQueryInput\x12I\n\x0c\x61udio_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.dialogflow.v2beta1.InputAudioConfigH\x00\x12:\n\x04text\x18\x02 \x01(\x0b\x32*.google.cloud.dialogflow.v2beta1.TextInputH\x00\x12<\n\x05\x65vent\x18\x03 \x01(\x0b\x32+.google.cloud.dialogflow.v2beta1.EventInputH\x00\x42\x07\n\x05input"\xf2\x05\n\x0bQueryResult\x12\x12\n\nquery_text\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x0f \x01(\t\x12%\n\x1dspeech_recognition_confidence\x18\x02 \x01(\x02\x12\x0e\n\x06\x61\x63tion\x18\x03 \x01(\t\x12+\n\nparameters\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12#\n\x1b\x61ll_required_params_present\x18\x05 \x01(\x08\x12\x18\n\x10\x66ulfillment_text\x18\x06 \x01(\t\x12M\n\x14\x66ulfillment_messages\x18\x07 \x03(\x0b\x32/.google.cloud.dialogflow.v2beta1.Intent.Message\x12\x16\n\x0ewebhook_source\x18\x08 \x01(\t\x12\x30\n\x0fwebhook_payload\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x41\n\x0foutput_contexts\x18\n \x03(\x0b\x32(.google.cloud.dialogflow.v2beta1.Context\x12\x37\n\x06intent\x18\x0b \x01(\x0b\x32\'.google.cloud.dialogflow.v2beta1.Intent\x12#\n\x1bintent_detection_confidence\x18\x0c \x01(\x02\x12\x30\n\x0f\x64iagnostic_info\x18\x0e \x01(\x0b\x32\x17.google.protobuf.Struct\x12[\n\x19sentiment_analysis_result\x18\x11 \x01(\x0b\x32\x38.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult\x12L\n\x11knowledge_answers\x18\x12 \x01(\x0b\x32\x31.google.cloud.dialogflow.v2beta1.KnowledgeAnswers"\xaf\x03\n\x10KnowledgeAnswers\x12I\n\x07\x61nswers\x18\x01 \x03(\x0b\x32\x38.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer\x1a\xcf\x02\n\x06\x41nswer\x12\x37\n\x06source\x18\x01 \x01(\tB\'\xfa\x41$\n"dialogflow.googleapis.com/Document\x12\x14\n\x0c\x66\x61q_question\x18\x02 \x01(\t\x12\x0e\n\x06\x61nswer\x18\x03 \x01(\t\x12m\n\x16match_confidence_level\x18\x04 \x01(\x0e\x32M.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel\x12\x18\n\x10match_confidence\x18\x05 \x01(\x02"]\n\x14MatchConfidenceLevel\x12&\n"MATCH_CONFIDENCE_LEVEL_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03"\xf7\x02\n\x1cStreamingDetectIntentRequest\x12\x0f\n\x07session\x18\x01 \x01(\t\x12\x46\n\x0cquery_params\x18\x02 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2beta1.QueryParameters\x12@\n\x0bquery_input\x18\x03 \x01(\x0b\x32+.google.cloud.dialogflow.v2beta1.QueryInput\x12\x18\n\x10single_utterance\x18\x04 \x01(\x08\x12O\n\x13output_audio_config\x18\x05 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.OutputAudioConfig\x12<\n\x18output_audio_config_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0binput_audio\x18\x06 \x01(\x0c"\xb5\x03\n\x1dStreamingDetectIntentResponse\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12W\n\x12recognition_result\x18\x02 \x01(\x0b\x32;.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult\x12\x42\n\x0cquery_result\x18\x03 \x01(\x0b\x32,.google.cloud.dialogflow.v2beta1.QueryResult\x12O\n\x19\x61lternative_query_results\x18\x07 \x03(\x0b\x32,.google.cloud.dialogflow.v2beta1.QueryResult\x12*\n\x0ewebhook_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\x12\x14\n\x0coutput_audio\x18\x05 \x01(\x0c\x12O\n\x13output_audio_config\x18\x06 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.OutputAudioConfig"\xa3\x03\n\x1aStreamingRecognitionResult\x12]\n\x0cmessage_type\x18\x01 \x01(\x0e\x32G.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType\x12\x12\n\ntranscript\x18\x02 \x01(\t\x12\x10\n\x08is_final\x18\x03 \x01(\x08\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x11\n\tstability\x18\x06 \x01(\x02\x12I\n\x10speech_word_info\x18\x07 \x03(\x0b\x32/.google.cloud.dialogflow.v2beta1.SpeechWordInfo\x12\x34\n\x11speech_end_offset\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration"X\n\x0bMessageType\x12\x1c\n\x18MESSAGE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTRANSCRIPT\x10\x01\x12\x1b\n\x17\x45ND_OF_SINGLE_UTTERANCE\x10\x02"0\n\tTextInput\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t"^\n\nEventInput\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\nparameters\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x15\n\rlanguage_code\x18\x03 \x01(\t"F\n\x1eSentimentAnalysisRequestConfig\x12$\n\x1c\x61nalyze_query_text_sentiment\x18\x01 \x01(\x08"c\n\x17SentimentAnalysisResult\x12H\n\x14query_text_sentiment\x18\x01 \x01(\x0b\x32*.google.cloud.dialogflow.v2beta1.Sentiment"-\n\tSentiment\x12\r\n\x05score\x18\x01 \x01(\x02\x12\x11\n\tmagnitude\x18\x02 \x01(\x02\x32\xf7\x05\n\x08Sessions\x12\xd1\x03\n\x0c\x44\x65tectIntent\x12\x34.google.cloud.dialogflow.v2beta1.DetectIntentRequest\x1a\x35.google.cloud.dialogflow.v2beta1.DetectIntentResponse"\xd3\x02\x82\xd3\xe4\x93\x02\xcc\x02";/v2beta1/{session=projects/*/agent/sessions/*}:detectIntent:\x01*ZW"R/v2beta1/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent:\x01*ZL"G/v2beta1/{session=projects/*/locations/*/agent/sessions/*}:detectIntent:\x01*Zc"^/v2beta1/{session=projects/*/locations/*/agent/environments/*/users/*/sessions/*}:detectIntent:\x01*\x12\x9c\x01\n\x15StreamingDetectIntent\x12=.google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest\x1a>.google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse"\x00(\x01\x30\x01\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\xc0\x02\n#com.google.cloud.dialogflow.v2beta1B\x0cSessionProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1\xea\x41\x92\x01\n!dialogflow.googleapis.com/Session\x12@projects/{project}/locations/{location}/agent/sessions/{session}\x12+projects/{project}/agent/sessions/{session}b\x06proto3' - ), + serialized_options=b"\n#com.google.cloud.dialogflow.v2beta1B\014SessionProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1\352A\347\001\n!dialogflow.googleapis.com/Session\022+projects/{project}/agent/sessions/{session}\022Sprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}\022@projects/{project}/locations/{location}/agent/sessions/{session}", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n3google/cloud/dialogflow_v2beta1/proto/session.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x31google/cloud/dialogflow_v2beta1/proto/agent.proto\x1a\x38google/cloud/dialogflow_v2beta1/proto/audio_config.proto\x1a\x33google/cloud/dialogflow_v2beta1/proto/context.proto\x1a\x32google/cloud/dialogflow_v2beta1/proto/intent.proto\x1a?google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x18google/type/latlng.proto"\x84\x03\n\x13\x44\x65tectIntentRequest\x12:\n\x07session\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dialogflow.googleapis.com/Session\x12\x46\n\x0cquery_params\x18\x02 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2beta1.QueryParameters\x12\x45\n\x0bquery_input\x18\x03 \x01(\x0b\x32+.google.cloud.dialogflow.v2beta1.QueryInputB\x03\xe0\x41\x02\x12O\n\x13output_audio_config\x18\x04 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.OutputAudioConfig\x12<\n\x18output_audio_config_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0binput_audio\x18\x05 \x01(\x0c"\xd3\x02\n\x14\x44\x65tectIntentResponse\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12\x42\n\x0cquery_result\x18\x02 \x01(\x0b\x32,.google.cloud.dialogflow.v2beta1.QueryResult\x12O\n\x19\x61lternative_query_results\x18\x05 \x03(\x0b\x32,.google.cloud.dialogflow.v2beta1.QueryResult\x12*\n\x0ewebhook_status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x14\n\x0coutput_audio\x18\x04 \x01(\x0c\x12O\n\x13output_audio_config\x18\x06 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.OutputAudioConfig"\xfe\x04\n\x0fQueryParameters\x12\x11\n\ttime_zone\x18\x01 \x01(\t\x12)\n\x0cgeo_location\x18\x02 \x01(\x0b\x32\x13.google.type.LatLng\x12:\n\x08\x63ontexts\x18\x03 \x03(\x0b\x32(.google.cloud.dialogflow.v2beta1.Context\x12\x16\n\x0ereset_contexts\x18\x04 \x01(\x08\x12P\n\x14session_entity_types\x18\x05 \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.SessionEntityType\x12(\n\x07payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x1c\n\x14knowledge_base_names\x18\x0c \x03(\t\x12j\n!sentiment_analysis_request_config\x18\n \x01(\x0b\x32?.google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig\x12=\n\nsub_agents\x18\r \x03(\x0b\x32).google.cloud.dialogflow.v2beta1.SubAgent\x12]\n\x0fwebhook_headers\x18\x0e \x03(\x0b\x32\x44.google.cloud.dialogflow.v2beta1.QueryParameters.WebhookHeadersEntry\x1a\x35\n\x13WebhookHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xda\x01\n\nQueryInput\x12I\n\x0c\x61udio_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.dialogflow.v2beta1.InputAudioConfigH\x00\x12:\n\x04text\x18\x02 \x01(\x0b\x32*.google.cloud.dialogflow.v2beta1.TextInputH\x00\x12<\n\x05\x65vent\x18\x03 \x01(\x0b\x32+.google.cloud.dialogflow.v2beta1.EventInputH\x00\x42\x07\n\x05input"\xf2\x05\n\x0bQueryResult\x12\x12\n\nquery_text\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x0f \x01(\t\x12%\n\x1dspeech_recognition_confidence\x18\x02 \x01(\x02\x12\x0e\n\x06\x61\x63tion\x18\x03 \x01(\t\x12+\n\nparameters\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12#\n\x1b\x61ll_required_params_present\x18\x05 \x01(\x08\x12\x18\n\x10\x66ulfillment_text\x18\x06 \x01(\t\x12M\n\x14\x66ulfillment_messages\x18\x07 \x03(\x0b\x32/.google.cloud.dialogflow.v2beta1.Intent.Message\x12\x16\n\x0ewebhook_source\x18\x08 \x01(\t\x12\x30\n\x0fwebhook_payload\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x41\n\x0foutput_contexts\x18\n \x03(\x0b\x32(.google.cloud.dialogflow.v2beta1.Context\x12\x37\n\x06intent\x18\x0b \x01(\x0b\x32\'.google.cloud.dialogflow.v2beta1.Intent\x12#\n\x1bintent_detection_confidence\x18\x0c \x01(\x02\x12\x30\n\x0f\x64iagnostic_info\x18\x0e \x01(\x0b\x32\x17.google.protobuf.Struct\x12[\n\x19sentiment_analysis_result\x18\x11 \x01(\x0b\x32\x38.google.cloud.dialogflow.v2beta1.SentimentAnalysisResult\x12L\n\x11knowledge_answers\x18\x12 \x01(\x0b\x32\x31.google.cloud.dialogflow.v2beta1.KnowledgeAnswers"\xaf\x03\n\x10KnowledgeAnswers\x12I\n\x07\x61nswers\x18\x01 \x03(\x0b\x32\x38.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer\x1a\xcf\x02\n\x06\x41nswer\x12\x37\n\x06source\x18\x01 \x01(\tB\'\xfa\x41$\n"dialogflow.googleapis.com/Document\x12\x14\n\x0c\x66\x61q_question\x18\x02 \x01(\t\x12\x0e\n\x06\x61nswer\x18\x03 \x01(\t\x12m\n\x16match_confidence_level\x18\x04 \x01(\x0e\x32M.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel\x12\x18\n\x10match_confidence\x18\x05 \x01(\x02"]\n\x14MatchConfidenceLevel\x12&\n"MATCH_CONFIDENCE_LEVEL_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03"\x81\x03\n\x1cStreamingDetectIntentRequest\x12\x14\n\x07session\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x0cquery_params\x18\x02 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2beta1.QueryParameters\x12\x45\n\x0bquery_input\x18\x03 \x01(\x0b\x32+.google.cloud.dialogflow.v2beta1.QueryInputB\x03\xe0\x41\x02\x12\x18\n\x10single_utterance\x18\x04 \x01(\x08\x12O\n\x13output_audio_config\x18\x05 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.OutputAudioConfig\x12<\n\x18output_audio_config_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0binput_audio\x18\x06 \x01(\x0c"\xb5\x03\n\x1dStreamingDetectIntentResponse\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12W\n\x12recognition_result\x18\x02 \x01(\x0b\x32;.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult\x12\x42\n\x0cquery_result\x18\x03 \x01(\x0b\x32,.google.cloud.dialogflow.v2beta1.QueryResult\x12O\n\x19\x61lternative_query_results\x18\x07 \x03(\x0b\x32,.google.cloud.dialogflow.v2beta1.QueryResult\x12*\n\x0ewebhook_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\x12\x14\n\x0coutput_audio\x18\x05 \x01(\x0c\x12O\n\x13output_audio_config\x18\x06 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.OutputAudioConfig"\xa3\x03\n\x1aStreamingRecognitionResult\x12]\n\x0cmessage_type\x18\x01 \x01(\x0e\x32G.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType\x12\x12\n\ntranscript\x18\x02 \x01(\t\x12\x10\n\x08is_final\x18\x03 \x01(\x08\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x11\n\tstability\x18\x06 \x01(\x02\x12I\n\x10speech_word_info\x18\x07 \x03(\x0b\x32/.google.cloud.dialogflow.v2beta1.SpeechWordInfo\x12\x34\n\x11speech_end_offset\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration"X\n\x0bMessageType\x12\x1c\n\x18MESSAGE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTRANSCRIPT\x10\x01\x12\x1b\n\x17\x45ND_OF_SINGLE_UTTERANCE\x10\x02"0\n\tTextInput\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t"^\n\nEventInput\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\nparameters\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x15\n\rlanguage_code\x18\x03 \x01(\t"F\n\x1eSentimentAnalysisRequestConfig\x12$\n\x1c\x61nalyze_query_text_sentiment\x18\x01 \x01(\x08"c\n\x17SentimentAnalysisResult\x12H\n\x14query_text_sentiment\x18\x01 \x01(\x0b\x32*.google.cloud.dialogflow.v2beta1.Sentiment"-\n\tSentiment\x12\r\n\x05score\x18\x01 \x01(\x02\x12\x11\n\tmagnitude\x18\x02 \x01(\x02\x32\x8d\x06\n\x08Sessions\x12\xe7\x03\n\x0c\x44\x65tectIntent\x12\x34.google.cloud.dialogflow.v2beta1.DetectIntentRequest\x1a\x35.google.cloud.dialogflow.v2beta1.DetectIntentResponse"\xe9\x02\x82\xd3\xe4\x93\x02\xcc\x02";/v2beta1/{session=projects/*/agent/sessions/*}:detectIntent:\x01*ZW"R/v2beta1/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent:\x01*ZL"G/v2beta1/{session=projects/*/locations/*/agent/sessions/*}:detectIntent:\x01*Zc"^/v2beta1/{session=projects/*/locations/*/agent/environments/*/users/*/sessions/*}:detectIntent:\x01*\xda\x41\x13session,query_input\x12\x9c\x01\n\x15StreamingDetectIntent\x12=.google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest\x1a>.google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse"\x00(\x01\x30\x01\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x95\x03\n#com.google.cloud.dialogflow.v2beta1B\x0cSessionProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1\xea\x41\xe7\x01\n!dialogflow.googleapis.com/Session\x12+projects/{project}/agent/sessions/{session}\x12Sprojects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}\x12@projects/{project}/locations/{location}/agent/sessions/{session}b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.DESCRIPTOR, @@ -66,7 +61,6 @@ google_dot_protobuf_dot_struct__pb2.DESCRIPTOR, google_dot_rpc_dot_status__pb2.DESCRIPTOR, google_dot_type_dot_latlng__pb2.DESCRIPTOR, - google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -76,6 +70,7 @@ full_name="google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer.MatchConfidenceLevel", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="MATCH_CONFIDENCE_LEVEL_UNSPECIFIED", @@ -83,21 +78,37 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LOW", index=1, number=1, serialized_options=None, type=None + name="LOW", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MEDIUM", index=2, number=2, serialized_options=None, type=None + name="MEDIUM", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="HIGH", index=3, number=3, serialized_options=None, type=None + name="HIGH", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=3312, - serialized_end=3405, + serialized_start=3320, + serialized_end=3413, ) _sym_db.RegisterEnumDescriptor(_KNOWLEDGEANSWERS_ANSWER_MATCHCONFIDENCELEVEL) @@ -106,6 +117,7 @@ full_name="google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.MessageType", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="MESSAGE_TYPE_UNSPECIFIED", @@ -113,9 +125,15 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TRANSCRIPT", index=1, number=1, serialized_options=None, type=None + name="TRANSCRIPT", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="END_OF_SINGLE_UTTERANCE", @@ -123,12 +141,13 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=4557, - serialized_end=4645, + serialized_start=4575, + serialized_end=4663, ) _sym_db.RegisterEnumDescriptor(_STREAMINGRECOGNITIONRESULT_MESSAGETYPE) @@ -139,6 +158,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="session", @@ -149,14 +169,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\372A#\n!dialogflow.googleapis.com/Session"), + serialized_options=b"\340A\002\372A#\n!dialogflow.googleapis.com/Session", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_params", @@ -175,6 +196,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_input", @@ -191,8 +213,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio_config", @@ -211,6 +234,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio_config_mask", @@ -229,6 +253,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_audio", @@ -239,7 +264,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -247,6 +272,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -258,7 +284,7 @@ extension_ranges=[], oneofs=[], serialized_start=630, - serialized_end=1010, + serialized_end=1018, ) @@ -268,6 +294,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="response_id", @@ -278,7 +305,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -286,6 +313,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_result", @@ -304,6 +332,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="alternative_query_results", @@ -322,6 +351,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="webhook_status", @@ -340,6 +370,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio", @@ -350,7 +381,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -358,6 +389,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio_config", @@ -376,6 +408,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -386,8 +419,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1013, - serialized_end=1352, + serialized_start=1021, + serialized_end=1360, ) @@ -397,6 +430,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -407,7 +441,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -415,6 +449,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -425,7 +460,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -433,18 +468,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1940, - serialized_end=1993, + serialized_start=1948, + serialized_end=2001, ) _QUERYPARAMETERS = _descriptor.Descriptor( @@ -453,6 +489,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="time_zone", @@ -463,7 +500,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -471,6 +508,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="geo_location", @@ -489,6 +527,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="contexts", @@ -507,6 +546,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="reset_contexts", @@ -525,6 +565,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="session_entity_types", @@ -543,6 +584,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="payload", @@ -561,6 +603,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="knowledge_base_names", @@ -579,6 +622,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sentiment_analysis_request_config", @@ -597,6 +641,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sub_agents", @@ -615,6 +660,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="webhook_headers", @@ -633,6 +679,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -643,8 +690,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1355, - serialized_end=1993, + serialized_start=1363, + serialized_end=2001, ) @@ -654,6 +701,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="audio_config", @@ -672,6 +720,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text", @@ -690,6 +739,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="event", @@ -708,6 +758,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -723,11 +774,12 @@ full_name="google.cloud.dialogflow.v2beta1.QueryInput.input", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], ) ], - serialized_start=1996, - serialized_end=2214, + serialized_start=2004, + serialized_end=2222, ) @@ -737,6 +789,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="query_text", @@ -747,7 +800,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -755,6 +808,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -765,7 +819,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -773,6 +827,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="speech_recognition_confidence", @@ -791,6 +846,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="action", @@ -801,7 +857,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -809,6 +865,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parameters", @@ -827,6 +884,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="all_required_params_present", @@ -845,6 +903,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="fulfillment_text", @@ -855,7 +914,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -863,6 +922,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="fulfillment_messages", @@ -881,6 +941,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="webhook_source", @@ -891,7 +952,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -899,6 +960,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="webhook_payload", @@ -917,6 +979,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_contexts", @@ -935,6 +998,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent", @@ -953,6 +1017,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="intent_detection_confidence", @@ -971,6 +1036,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="diagnostic_info", @@ -989,6 +1055,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sentiment_analysis_result", @@ -1007,6 +1074,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="knowledge_answers", @@ -1025,6 +1093,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1035,8 +1104,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2217, - serialized_end=2971, + serialized_start=2225, + serialized_end=2979, ) @@ -1046,6 +1115,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="source", @@ -1056,14 +1126,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b('\372A$\n"dialogflow.googleapis.com/Document'), + serialized_options=b'\372A$\n"dialogflow.googleapis.com/Document', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="faq_question", @@ -1074,7 +1145,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1082,6 +1153,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="answer", @@ -1092,7 +1164,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1100,6 +1172,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="match_confidence_level", @@ -1118,6 +1191,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="match_confidence", @@ -1136,6 +1210,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1146,8 +1221,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3070, - serialized_end=3405, + serialized_start=3078, + serialized_end=3413, ) _KNOWLEDGEANSWERS = _descriptor.Descriptor( @@ -1156,6 +1231,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="answers", @@ -1174,6 +1250,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1184,8 +1261,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2974, - serialized_end=3405, + serialized_start=2982, + serialized_end=3413, ) @@ -1195,6 +1272,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="session", @@ -1205,14 +1283,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_params", @@ -1231,6 +1310,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_input", @@ -1247,8 +1327,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="single_utterance", @@ -1267,6 +1348,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio_config", @@ -1285,6 +1367,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio_config_mask", @@ -1303,6 +1386,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_audio", @@ -1313,7 +1397,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -1321,6 +1405,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1331,8 +1416,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3408, - serialized_end=3783, + serialized_start=3416, + serialized_end=3801, ) @@ -1342,6 +1427,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="response_id", @@ -1352,7 +1438,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1360,6 +1446,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="recognition_result", @@ -1378,6 +1465,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_result", @@ -1396,6 +1484,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="alternative_query_results", @@ -1414,6 +1503,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="webhook_status", @@ -1432,6 +1522,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio", @@ -1442,7 +1533,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -1450,6 +1541,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_audio_config", @@ -1468,6 +1560,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1478,8 +1571,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3786, - serialized_end=4223, + serialized_start=3804, + serialized_end=4241, ) @@ -1489,6 +1582,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="message_type", @@ -1507,6 +1601,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="transcript", @@ -1517,7 +1612,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1525,6 +1620,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="is_final", @@ -1543,6 +1639,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -1561,6 +1658,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="stability", @@ -1579,6 +1677,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="speech_word_info", @@ -1597,6 +1696,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="speech_end_offset", @@ -1615,6 +1715,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1625,8 +1726,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4226, - serialized_end=4645, + serialized_start=4244, + serialized_end=4663, ) @@ -1636,6 +1737,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="text", @@ -1646,7 +1748,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1654,6 +1756,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -1664,7 +1767,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1672,6 +1775,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1682,8 +1786,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4647, - serialized_end=4695, + serialized_start=4665, + serialized_end=4713, ) @@ -1693,6 +1797,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1703,7 +1808,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1711,6 +1816,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parameters", @@ -1729,6 +1835,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -1739,7 +1846,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1747,6 +1854,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1757,8 +1865,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4697, - serialized_end=4791, + serialized_start=4715, + serialized_end=4809, ) @@ -1768,6 +1876,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="analyze_query_text_sentiment", @@ -1786,6 +1895,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1796,8 +1906,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4793, - serialized_end=4863, + serialized_start=4811, + serialized_end=4881, ) @@ -1807,6 +1917,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="query_text_sentiment", @@ -1825,6 +1936,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -1835,8 +1947,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4865, - serialized_end=4964, + serialized_start=4883, + serialized_end=4982, ) @@ -1846,6 +1958,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="score", @@ -1864,6 +1977,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="magnitude", @@ -1882,6 +1996,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1892,8 +2007,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4966, - serialized_end=5011, + serialized_start=4984, + serialized_end=5029, ) _DETECTINTENTREQUEST.fields_by_name["query_params"].message_type = _QUERYPARAMETERS @@ -2075,13 +2190,10 @@ DetectIntentRequest = _reflection.GeneratedProtocolMessageType( "DetectIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_DETECTINTENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__=""" - Requests and responses for custom methods. The request to detect user's - intent. - + { + "DESCRIPTOR": _DETECTINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """The request to detect user’s intent. Attributes: session: @@ -2089,12 +2201,14 @@ Format: ``projects//agent/sessions/``, or ``projects//agent/environments//users//sessions/``. If ``Environment - ID`` is not specified, we assume default 'draft' environment. - If ``User ID`` is not specified, we are using "-". It's up to + ID`` is not specified, we assume default ‘draft’ environment. + If ``User ID`` is not specified, we are using “-”. It’s up to the API caller to choose an appropriate ``Session ID`` and ``User Id``. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the ``Session ID`` and ``User ID`` must not exceed 36 characters. + For more information, see the `API interactions guide + `__. query_params: The parameters of this query. query_input: @@ -2108,13 +2222,13 @@ audio. If this field is not set and agent-level speech synthesizer is not configured, no output audio is generated. output_audio_config_mask: - Mask for [output\_audio\_config][google.cloud.dialogflow.v2bet - a1.DetectIntentRequest.output\_audio\_config] indicating which + Mask for [output_audio_config][google.cloud.dialogflow.v2beta1 + .DetectIntentRequest.output_audio_config] indicating which settings in this request-level config should override speech synthesizer settings defined at agent-level. If unspecified - or empty, [output\_audio\_config][google.cloud.dialogflow.v2be - ta1.DetectIntentRequest.output\_audio\_config] replaces the - agent-level config in its entirety. + or empty, [output_audio_config][google.cloud.dialogflow.v2beta + 1.DetectIntentRequest.output_audio_config] replaces the agent- + level config in its entirety. input_audio: The natural language speech audio to be processed. This field should be populated iff ``query_input`` is set to an input @@ -2122,18 +2236,17 @@ speech audio data. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DetectIntentRequest) - ), + }, ) _sym_db.RegisterMessage(DetectIntentRequest) DetectIntentResponse = _reflection.GeneratedProtocolMessageType( "DetectIntentResponse", (_message.Message,), - dict( - DESCRIPTOR=_DETECTINTENTRESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""The message returned from the DetectIntent method. - + { + "DESCRIPTOR": _DETECTINTENTRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """The message returned from the DetectIntent method. Attributes: response_id: @@ -2148,7 +2261,7 @@ If Knowledge Connectors are enabled, there could be more than one result returned for a given query or event, and this field will contain all results except for the top one, which is - captured in query\_result. The alternative results are ordered + captured in query_result. The alternative results are ordered by decreasing ``QueryResult.intent_detection_confidence``. If Knowledge Connectors are disabled, this field will be empty until multiple responses for regular intents are supported, at @@ -2162,40 +2275,42 @@ ``query_result.fulfillment_messages`` field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, - the generated audio content will be empty. + the generated audio content will be empty. In some scenarios, + multiple output audio fields may be present in the response + structure. In these cases, only the top-most-level audio + output has content. output_audio_config: The config used by the speech synthesizer to generate the output audio. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DetectIntentResponse) - ), + }, ) _sym_db.RegisterMessage(DetectIntentResponse) QueryParameters = _reflection.GeneratedProtocolMessageType( "QueryParameters", (_message.Message,), - dict( - WebhookHeadersEntry=_reflection.GeneratedProtocolMessageType( + { + "WebhookHeadersEntry": _reflection.GeneratedProtocolMessageType( "WebhookHeadersEntry", (_message.Message,), - dict( - DESCRIPTOR=_QUERYPARAMETERS_WEBHOOKHEADERSENTRY, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2" + { + "DESCRIPTOR": _QUERYPARAMETERS_WEBHOOKHEADERSENTRY, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2" # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.QueryParameters.WebhookHeadersEntry) - ), + }, ), - DESCRIPTOR=_QUERYPARAMETERS, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""Represents the parameters of the conversational query. - + "DESCRIPTOR": _QUERYPARAMETERS, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """Represents the parameters of the conversational query. Attributes: time_zone: The time zone of this conversational query from the `time zone database `__, e.g., - America/New\_York, Europe/Paris. If not provided, the time - zone specified in agent settings is used. + America/New_York, Europe/Paris. If not provided, the time zone + specified in agent settings is used. geo_location: The geo location of this conversational query. contexts: @@ -2209,9 +2324,11 @@ entity types with. The entity synonyms apply to all languages and persist for the session of this query. payload: - This field can be used to pass custom data into the webhook - associated with the agent. Arbitrary JSON objects are - supported. + This field can be used to pass custom data to your webhook. + Arbitrary JSON objects are supported. If supplied, the value + is used to populate the + ``WebhookRequest.original_detect_intent_request.payload`` + field sent to your webhook. knowledge_base_names: KnowledgeBases to get alternative results from. If not set, the KnowledgeBases enabled in the agent (through UI) will be @@ -2234,14 +2351,14 @@ headers that have been configured through Dialogflow web console. The headers defined within this field will overwrite the headers configured through Dialogflow console if there is - a conflict. Header names are case-insensitive. Google's - specified headers are not allowed. Including: "Host", - "Content-Length", "Connection", "From", "User-Agent", "Accept- - Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded- - For", etc. + a conflict. Header names are case-insensitive. Google’s + specified headers are not allowed. Including: “Host”, + “Content-Length”, “Connection”, “From”, “User-Agent”, “Accept- + Encoding”, “If-Modified-Since”, “If-None-Match”, “X-Forwarded- + For”, etc. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.QueryParameters) - ), + }, ) _sym_db.RegisterMessage(QueryParameters) _sym_db.RegisterMessage(QueryParameters.WebhookHeadersEntry) @@ -2249,18 +2366,13 @@ QueryInput = _reflection.GeneratedProtocolMessageType( "QueryInput", (_message.Message,), - dict( - DESCRIPTOR=_QUERYINPUT, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""Represents the query input. It can contain either: - - 1. An audio config which instructs the speech recognizer how to process - the speech audio. - - 2. A conversational query in the form of text. - - 3. An event that specifies which intent to trigger. - + { + "DESCRIPTOR": _QUERYINPUT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """Represents the query input. It can contain either: 1. An audio config + which instructs the speech recognizer how to process the speech + audio. 2. A conversational query in the form of text. 3. An event + that specifies which intent to trigger. Attributes: input: @@ -2274,19 +2386,17 @@ The event to be processed. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.QueryInput) - ), + }, ) _sym_db.RegisterMessage(QueryInput) QueryResult = _reflection.GeneratedProtocolMessageType( "QueryResult", (_message.Message,), - dict( - DESCRIPTOR=_QUERYRESULT, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""Represents the result of conversational query or event - processing. - + { + "DESCRIPTOR": _QUERYRESULT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """Represents the result of conversational query or event processing. Attributes: query_text: @@ -2309,19 +2419,29 @@ the recognized words are correct. The default of 0.0 is a sentinel value indicating that confidence was not set. This field is not guaranteed to be accurate or set. In particular - this field isn't set for StreamingDetectIntent since the + this field isn’t set for StreamingDetectIntent since the streaming endpoint has separate confidence estimates per portion of the audio in StreamingRecognitionResult. action: The action name from the matched intent. parameters: - The collection of extracted parameters. + The collection of extracted parameters. Depending on your + protocol or client library language, this is a map, + associative array, symbol table, dictionary, or JSON object + composed of a collection of (MapKey, MapValue) pairs: - + MapKey type: string - MapKey value: parameter name - + MapValue type: - If parameter’s entity type is a + composite entity: map - Else: string or number, depending + on parameter value type - MapValue value: - If + parameter’s entity type is a composite entity: map from + composite entity property names to property values - Else: + parameter value all_required_params_present: This field is set to: - ``false`` if the matched intent has required parameters and not all of the required parameter values have been collected. - ``true`` if all required parameter values have been collected, or if the matched - intent doesn't contain any required parameters. + intent doesn’t contain any required parameters. fulfillment_text: The text to be pronounced to the user or shown on the screen. Note: This is a legacy field, ``fulfillment_messages`` should @@ -2371,22 +2491,21 @@ decreasing ``KnowledgeAnswers.match_confidence``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.QueryResult) - ), + }, ) _sym_db.RegisterMessage(QueryResult) KnowledgeAnswers = _reflection.GeneratedProtocolMessageType( "KnowledgeAnswers", (_message.Message,), - dict( - Answer=_reflection.GeneratedProtocolMessageType( + { + "Answer": _reflection.GeneratedProtocolMessageType( "Answer", (_message.Message,), - dict( - DESCRIPTOR=_KNOWLEDGEANSWERS_ANSWER, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""An answer from Knowledge Connector. - + { + "DESCRIPTOR": _KNOWLEDGEANSWERS_ANSWER, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """An answer from Knowledge Connector. Attributes: source: @@ -2401,7 +2520,7 @@ The piece of text from the ``source`` knowledge base document that answers this conversational query. match_confidence_level: - The system's confidence level that this knowledge answer is a + The system’s confidence level that this knowledge answer is a good match for this conversational query. NOTE: The confidence level for a given ```` pair may change without notice, as it depends on models that are constantly being @@ -2409,7 +2528,7 @@ confidence score below, and should be preferred for referencing the quality of an answer. match_confidence: - The system's confidence score that this Knowledge answer is a + The system’s confidence score that this Knowledge answer is a good match for this conversational query. The range is from 0.0 (completely uncertain) to 1.0 (completely certain). Note: The confidence score is likely to vary somewhat (possibly even @@ -2419,19 +2538,18 @@ generally more stable. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer) - ), + }, ), - DESCRIPTOR=_KNOWLEDGEANSWERS, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""Represents the result of querying a Knowledge base. - + "DESCRIPTOR": _KNOWLEDGEANSWERS, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """Represents the result of querying a Knowledge base. Attributes: answers: A list of answers from Knowledge Connector. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.KnowledgeAnswers) - ), + }, ) _sym_db.RegisterMessage(KnowledgeAnswers) _sym_db.RegisterMessage(KnowledgeAnswers.Answer) @@ -2439,46 +2557,35 @@ StreamingDetectIntentRequest = _reflection.GeneratedProtocolMessageType( "StreamingDetectIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_STREAMINGDETECTINTENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""The top-level message sent by the client to the - [Sessions.StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent] - method. - - Multiple request messages should be sent in order: - - 1. The first message must contain - [session][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.session], - [query\_input][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query\_input] - plus optionally - [query\_params][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query\_params]. - If the client wants to receive an audio response, it should also - contain - [output\_audio\_config][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.output\_audio\_config]. - The message must not contain - [input\_audio][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.input\_audio]. - 2. If - [query\_input][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query\_input] - was set to - [query\_input.audio\_config][google.cloud.dialogflow.v2beta1.InputAudioConfig], - all subsequent messages must contain - [input\_audio][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.input\_audio] - to continue with Speech recognition. If you decide to rather detect - an intent from text input after you already started Speech - recognition, please send a message with - [query\_input.text][google.cloud.dialogflow.v2beta1.QueryInput.text]. - - However, note that: - - - Dialogflow will bill you for the audio duration so far. - - Dialogflow discards all Speech recognition results in favor of the - input text. - - Dialogflow will use the language code from the first message. - - After you sent all input, you must half-close or abort the request - stream. - + { + "DESCRIPTOR": _STREAMINGDETECTINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """The top-level message sent by the client to the [Sessions.StreamingDet + ectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectInt + ent] method. Multiple request messages should be sent in order: 1. + The first message must contain [session][google.cloud.dialogflow.v2 + beta1.StreamingDetectIntentRequest.session], [query_input][google.c + loud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_input] + plus optionally [query_params][google.cloud.dialogflow.v2beta1.Stre + amingDetectIntentRequest.query_params]. If the client wants to + receive an audio response, it should also contain [output_audio_ + config][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.o + utput_audio_config]. The message must not contain [input_audio][ + google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.input_aud + io]. 2. If [query_input][google.cloud.dialogflow.v2beta1.StreamingD + etectIntentRequest.query_input] was set to [query_input.audio_co + nfig][google.cloud.dialogflow.v2beta1.InputAudioConfig], all + subsequent messages must contain [input_audio][google.cloud.dialogf + low.v2beta1.StreamingDetectIntentRequest.input_audio] to continue + with Speech recognition. If you decide to rather detect an intent + from text input after you already started Speech recognition, + please send a message with + [query_input.text][google.cloud.dialogflow.v2beta1.QueryInput.text]. + However, note that: - Dialogflow will bill you for the audio + duration so far. - Dialogflow discards all Speech recognition + results in favor of the input text. - Dialogflow will use + the language code from the first message. After you sent all input, + you must half-close or abort the request stream. Attributes: session: @@ -2487,12 +2594,14 @@ ID>/agent/sessions/``, or ``projects//agent/environments//users//sessions/``. If ``Environment ID`` is not - specified, we assume default 'draft' environment. If ``User - ID`` is not specified, we are using "-". It's up to the API + specified, we assume default ‘draft’ environment. If ``User + ID`` is not specified, we are using “-”. It’s up to the API caller to choose an appropriate ``Session ID`` and ``User Id``. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the ``Session ID`` and ``User ID`` must not exceed 36 characters. + For more information, see the `API interactions guide + `__. query_params: The parameters of this query. query_input: @@ -2502,12 +2611,12 @@ form of text, or 3. an event that specifies which intent to trigger. single_utterance: - DEPRECATED. Please use [InputAudioConfig.single\_utterance][go - ogle.cloud.dialogflow.v2beta1.InputAudioConfig.single\_utteran - ce] instead. If ``false`` (default), recognition does not - cease until the client closes the stream. If ``true``, the + DEPRECATED. Please use [InputAudioConfig.single_utterance][goo + gle.cloud.dialogflow.v2beta1.InputAudioConfig.single_utterance + ] instead. If ``false`` (default), recognition does not cease + until the client closes the stream. If ``true``, the recognizer will detect a single spoken utterance in input - audio. Recognition ceases when it detects the audio's voice + audio. Recognition ceases when it detects the audio’s voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. This setting is ignored @@ -2517,13 +2626,13 @@ audio. If this field is not set and agent-level speech synthesizer is not configured, no output audio is generated. output_audio_config_mask: - Mask for [output\_audio\_config][google.cloud.dialogflow.v2bet - a1.StreamingDetectIntentRequest.output\_audio\_config] - indicating which settings in this request-level config should - override speech synthesizer settings defined at agent-level. - If unspecified or empty, [output\_audio\_config][google.cloud. - dialogflow.v2beta1.StreamingDetectIntentRequest.output\_audio\ - _config] replaces the agent-level config in its entirety. + Mask for [output_audio_config][google.cloud.dialogflow.v2beta1 + .StreamingDetectIntentRequest.output_audio_config] indicating + which settings in this request-level config should override + speech synthesizer settings defined at agent-level. If + unspecified or empty, [output_audio_config][google.cloud.dialo + gflow.v2beta1.StreamingDetectIntentRequest.output_audio_config + ] replaces the agent-level config in its entirety. input_audio: The input audio content to be recognized. Must be sent if ``query_input`` was set to a streaming input audio config. The @@ -2531,34 +2640,28 @@ minute. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest) - ), + }, ) _sym_db.RegisterMessage(StreamingDetectIntentRequest) StreamingDetectIntentResponse = _reflection.GeneratedProtocolMessageType( "StreamingDetectIntentResponse", (_message.Message,), - dict( - DESCRIPTOR=_STREAMINGDETECTINTENTRESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""The top-level message returned from the - ``StreamingDetectIntent`` method. - - Multiple response messages can be returned in order: - - 1. If the input was set to streaming audio, the first one or more - messages contain ``recognition_result``. Each ``recognition_result`` - represents a more complete transcript of what the user said. The last - ``recognition_result`` has ``is_final`` set to ``true``. - - 2. The next message contains ``response_id``, ``query_result``, - ``alternative_query_results`` and optionally ``webhook_status`` if a - WebHook was called. - - 3. If ``output_audio_config`` was specified in the request or - agent-level speech synthesizer is configured, all subsequent messages - contain ``output_audio`` and ``output_audio_config``. - + { + "DESCRIPTOR": _STREAMINGDETECTINTENTRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """The top-level message returned from the ``StreamingDetectIntent`` + method. Multiple response messages can be returned in order: 1. If + the input was set to streaming audio, the first one or more + messages contain ``recognition_result``. Each ``recognition_result`` + represents a more complete transcript of what the user said. The last + ``recognition_result`` has ``is_final`` set to ``true``. 2. The next + message contains ``response_id``, ``query_result``, + ``alternative_query_results`` and optionally ``webhook_status`` if a + WebHook was called. 3. If ``output_audio_config`` was specified in + the request or agent-level speech synthesizer is configured, all + subsequent messages contain ``output_audio`` and + ``output_audio_config``. Attributes: response_id: @@ -2575,7 +2678,7 @@ If Knowledge Connectors are enabled, there could be more than one result returned for a given query or event, and this field will contain all results except for the top one, which is - captured in query\_result. The alternative results are ordered + captured in query_result. The alternative results are ordered by decreasing ``QueryResult.intent_detection_confidence``. If Knowledge Connectors are disabled, this field will be empty until multiple responses for regular intents are supported, at @@ -2589,54 +2692,38 @@ ``query_result.fulfillment_messages`` field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, - the generated audio content will be empty. + the generated audio content will be empty. In some scenarios, + multiple output audio fields may be present in the response + structure. In these cases, only the top-most-level audio + output has content. output_audio_config: The config used by the speech synthesizer to generate the output audio. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse) - ), + }, ) _sym_db.RegisterMessage(StreamingDetectIntentResponse) StreamingRecognitionResult = _reflection.GeneratedProtocolMessageType( "StreamingRecognitionResult", (_message.Message,), - dict( - DESCRIPTOR=_STREAMINGRECOGNITIONRESULT, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""Contains a speech recognition result corresponding to a - portion of the audio that is currently being processed or an indication - that this is the end of the single requested utterance. - - Example: - - 1. transcript: "tube" - - 2. transcript: "to be a" - - 3. transcript: "to be" - - 4. transcript: "to be or not to be" is\_final: true - - 5. transcript: " that's" - - 6. transcript: " that is" - - 7. message\_type: ``END_OF_SINGLE_UTTERANCE`` - - 8. transcript: " that is the question" is\_final: true - - Only two of the responses contain final results (#4 and #8 indicated by - ``is_final: true``). Concatenating these generates the full transcript: - "to be or not to be that is the question". - - In each response we populate: - - - for ``TRANSCRIPT``: ``transcript`` and possibly ``is_final``. - - - for ``END_OF_SINGLE_UTTERANCE``: only ``message_type``. - + { + "DESCRIPTOR": _STREAMINGRECOGNITIONRESULT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """Contains a speech recognition result corresponding to a portion of the + audio that is currently being processed or an indication that this is + the end of the single requested utterance. Example: 1. transcript: + “tube” 2. transcript: “to be a” 3. transcript: “to be” 4. + transcript: “to be or not to be” is_final: true 5. transcript: " + that’s" 6. transcript: " that is" 7. message_type: + ``END_OF_SINGLE_UTTERANCE`` 8. transcript: " that is the question" + is_final: true Only two of the responses contain final results (#4 + and #8 indicated by ``is_final: true``). Concatenating these generates + the full transcript: “to be or not to be that is the question”. In + each response we populate: - for ``TRANSCRIPT``: ``transcript`` and + possibly ``is_final``. - for ``END_OF_SINGLE_UTTERANCE``: only + ``message_type``. Attributes: message_type: @@ -2660,36 +2747,35 @@ accurate or even set. stability: An estimate of the likelihood that the speech recognizer will - not change its guess about this interim recognition result: \* - If the value is unspecified or 0.0, Dialogflow didn't compute - the stability. In particular, Dialogflow will only provide - stability for ``TRANSCRIPT`` results with ``is_final = - false``. \* Otherwise, the value is in (0.0, 1.0] where 0.0 - means completely unstable and 1.0 means completely stable. + not change its guess about this interim recognition result: - + If the value is unspecified or 0.0, Dialogflow didn’t compute + the stability. In particular, Dialogflow will only provide + stability for ``TRANSCRIPT`` results with ``is_final = + false``. - Otherwise, the value is in (0.0, 1.0] where 0.0 + means completely unstable and 1.0 means completely stable. speech_word_info: Word-specific information for the words recognized by Speech in [transcript][google.cloud.dialogflow.v2beta1.StreamingRecog nitionResult.transcript]. Populated if and only if ``message_type`` = ``TRANSCRIPT`` and - [InputAudioConfig.enable\_word\_info] is set. + [InputAudioConfig.enable_word_info] is set. speech_end_offset: Time offset of the end of this Speech recognition result relative to the beginning of the audio. Only populated for ``message_type`` = ``TRANSCRIPT``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.StreamingRecognitionResult) - ), + }, ) _sym_db.RegisterMessage(StreamingRecognitionResult) TextInput = _reflection.GeneratedProtocolMessageType( "TextInput", (_message.Message,), - dict( - DESCRIPTOR=_TEXTINPUT, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""Represents the natural language text to be processed. - + { + "DESCRIPTOR": _TEXTINPUT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """Represents the natural language text to be processed. Attributes: text: @@ -2703,29 +2789,38 @@ necessarily need to specify the same language. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.TextInput) - ), + }, ) _sym_db.RegisterMessage(TextInput) EventInput = _reflection.GeneratedProtocolMessageType( "EventInput", (_message.Message,), - dict( - DESCRIPTOR=_EVENTINPUT, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""Events allow for matching intents by event name instead of - the natural language input. For instance, input - ```` can - trigger a personalized welcome response. The parameter ``name`` may be - used by the agent in the response: - ``"Hello #welcome_event.name! What can I do for you today?"``. - + { + "DESCRIPTOR": _EVENTINPUT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """Events allow for matching intents by event name instead of the natural + language input. For instance, input ```` can trigger a personalized welcome + response. The parameter ``name`` may be used by the agent in the + response: ``"Hello #welcome_event.name! What can I do for you + today?"``. Attributes: name: Required. The unique identifier of the event. parameters: The collection of parameters associated with the event. + Depending on your protocol or client library language, this is + a map, associative array, symbol table, dictionary, or JSON + object composed of a collection of (MapKey, MapValue) pairs: + - MapKey type: string - MapKey value: parameter name - + MapValue type: - If parameter’s entity type is a + composite entity: map - Else: string or number, depending + on parameter value type - MapValue value: - If + parameter’s entity type is a composite entity: map from + composite entity property names to property values - Else: + parameter value language_code: Required. The language of this query. See `Language Support `__ @@ -2734,18 +2829,17 @@ specify the same language. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.EventInput) - ), + }, ) _sym_db.RegisterMessage(EventInput) SentimentAnalysisRequestConfig = _reflection.GeneratedProtocolMessageType( "SentimentAnalysisRequestConfig", (_message.Message,), - dict( - DESCRIPTOR=_SENTIMENTANALYSISREQUESTCONFIG, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""Configures the types of sentiment analysis to perform. - + { + "DESCRIPTOR": _SENTIMENTANALYSISREQUESTCONFIG, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """Configures the types of sentiment analysis to perform. Attributes: analyze_query_text_sentiment: @@ -2754,38 +2848,50 @@ performed on ``query_text``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SentimentAnalysisRequestConfig) - ), + }, ) _sym_db.RegisterMessage(SentimentAnalysisRequestConfig) SentimentAnalysisResult = _reflection.GeneratedProtocolMessageType( "SentimentAnalysisResult", (_message.Message,), - dict( - DESCRIPTOR=_SENTIMENTANALYSISRESULT, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""The result of sentiment analysis as configured by - ``sentiment_analysis_request_config``. - + { + "DESCRIPTOR": _SENTIMENTANALYSISRESULT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """The result of sentiment analysis. Sentiment analysis inspects user + input and identifies the prevailing subjective opinion, especially to + determine a user’s attitude as positive, negative, or neutral. For [Pa + rticipants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participant + s.AnalyzeContent], it needs to be configured in [DetectIntentRequest.q + uery_params][google.cloud.dialogflow.v2beta1.DetectIntentRequest.query + _params]. For [Participants.StreamingAnalyzeContent][google.cloud.dial + ogflow.v2beta1.Participants.StreamingAnalyzeContent], it needs to be + configured in [StreamingDetectIntentRequest.query_params][google.cloud + .dialogflow.v2beta1.StreamingDetectIntentRequest.query_params]. And + for [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Part + icipants.AnalyzeContent] and [Participants.StreamingAnalyzeContent][go + ogle.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent], + it needs to be configured in [ConversationProfile.human_agent_assistan + t_config][google.cloud.dialogflow.v2beta1.ConversationProfile.human_ag + ent_assistant_config] Attributes: query_text_sentiment: The sentiment analysis result for ``query_text``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SentimentAnalysisResult) - ), + }, ) _sym_db.RegisterMessage(SentimentAnalysisResult) Sentiment = _reflection.GeneratedProtocolMessageType( "Sentiment", (_message.Message,), - dict( - DESCRIPTOR=_SENTIMENT, - __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", - __doc__="""The sentiment, such as positive/negative feeling or - association, for a unit of analysis, such as the query text. - + { + "DESCRIPTOR": _SENTIMENT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.session_pb2", + "__doc__": """The sentiment, such as positive/negative feeling or association, for a + unit of analysis, such as the query text. Attributes: score: @@ -2797,26 +2903,28 @@ (positive or negative). """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Sentiment) - ), + }, ) _sym_db.RegisterMessage(Sentiment) DESCRIPTOR._options = None _DETECTINTENTREQUEST.fields_by_name["session"]._options = None +_DETECTINTENTREQUEST.fields_by_name["query_input"]._options = None _QUERYPARAMETERS_WEBHOOKHEADERSENTRY._options = None _KNOWLEDGEANSWERS_ANSWER.fields_by_name["source"]._options = None +_STREAMINGDETECTINTENTREQUEST.fields_by_name["session"]._options = None +_STREAMINGDETECTINTENTREQUEST.fields_by_name["query_input"]._options = None _SESSIONS = _descriptor.ServiceDescriptor( name="Sessions", full_name="google.cloud.dialogflow.v2beta1.Sessions", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - ), - serialized_start=5014, - serialized_end=5773, + serialized_options=b"\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow", + create_key=_descriptor._internal_create_key, + serialized_start=5032, + serialized_end=5813, methods=[ _descriptor.MethodDescriptor( name="DetectIntent", @@ -2825,9 +2933,8 @@ containing_service=None, input_type=_DETECTINTENTREQUEST, output_type=_DETECTINTENTRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\314\002";/v2beta1/{session=projects/*/agent/sessions/*}:detectIntent:\001*ZW"R/v2beta1/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent:\001*ZL"G/v2beta1/{session=projects/*/locations/*/agent/sessions/*}:detectIntent:\001*Zc"^/v2beta1/{session=projects/*/locations/*/agent/environments/*/users/*/sessions/*}:detectIntent:\001*' - ), + serialized_options=b'\202\323\344\223\002\314\002";/v2beta1/{session=projects/*/agent/sessions/*}:detectIntent:\001*ZW"R/v2beta1/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent:\001*ZL"G/v2beta1/{session=projects/*/locations/*/agent/sessions/*}:detectIntent:\001*Zc"^/v2beta1/{session=projects/*/locations/*/agent/environments/*/users/*/sessions/*}:detectIntent:\001*\332A\023session,query_input', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="StreamingDetectIntent", @@ -2837,6 +2944,7 @@ input_type=_STREAMINGDETECTINTENTREQUEST, output_type=_STREAMINGDETECTINTENTRESPONSE, serialized_options=None, + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/dialogflow_v2beta1/proto/session_pb2_grpc.py b/dialogflow_v2beta1/proto/session_pb2_grpc.py index 35d9eb0e9..4a860f14d 100644 --- a/dialogflow_v2beta1/proto/session_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/session_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from dialogflow_v2beta1.proto import ( @@ -7,18 +8,18 @@ class SessionsStub(object): - """A session represents an interaction with a user. You retrieve user input - and pass it to the [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or - [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) method to determine - user intent and respond. - """ + """A service used for session interactions. + + For more information, see the [API interactions + guide](https://cloud.google.com/dialogflow/docs/api-overview). + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.DetectIntent = channel.unary_unary( "/google.cloud.dialogflow.v2beta1.Sessions/DetectIntent", request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__pb2.DetectIntentRequest.SerializeToString, @@ -32,27 +33,27 @@ def __init__(self, channel): class SessionsServicer(object): - """A session represents an interaction with a user. You retrieve user input - and pass it to the [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or - [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent]) method to determine - user intent and respond. - """ + """A service used for session interactions. + + For more information, see the [API interactions + guide](https://cloud.google.com/dialogflow/docs/api-overview). + """ def DetectIntent(self, request, context): """Processes a natural language query and returns structured, actionable data - as a result. This method is not idempotent, because it may cause contexts - and session entity types to be updated, which in turn might affect - results of future queries. - """ + as a result. This method is not idempotent, because it may cause contexts + and session entity types to be updated, which in turn might affect + results of future queries. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def StreamingDetectIntent(self, request_iterator, context): """Processes a natural language query in audio format in a streaming fashion - and returns structured, actionable data as a result. This method is only - available via the gRPC API (not REST). - """ + and returns structured, actionable data as a result. This method is only + available via the gRPC API (not REST). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -75,3 +76,66 @@ def add_SessionsServicer_to_server(servicer, server): "google.cloud.dialogflow.v2beta1.Sessions", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class Sessions(object): + """A service used for session interactions. + + For more information, see the [API interactions + guide](https://cloud.google.com/dialogflow/docs/api-overview). + """ + + @staticmethod + def DetectIntent( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.dialogflow.v2beta1.Sessions/DetectIntent", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__pb2.DetectIntentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__pb2.DetectIntentResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def StreamingDetectIntent( + request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.stream_stream( + request_iterator, + target, + "/google.cloud.dialogflow.v2beta1.Sessions/StreamingDetectIntent", + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__pb2.StreamingDetectIntentRequest.SerializeToString, + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__pb2.StreamingDetectIntentResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/dialogflow_v2beta1/proto/validation_result.proto b/dialogflow_v2beta1/proto/validation_result.proto new file mode 100644 index 000000000..9ab491f7b --- /dev/null +++ b/dialogflow_v2beta1/proto/validation_result.proto @@ -0,0 +1,76 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "ValidationResultProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Represents a single validation error. +message ValidationError { + // Represents a level of severity. + enum Severity { + // Not specified. This value should never be used. + SEVERITY_UNSPECIFIED = 0; + + // The agent doesn't follow Dialogflow best practicies. + INFO = 1; + + // The agent may not behave as expected. + WARNING = 2; + + // The agent may experience partial failures. + ERROR = 3; + + // The agent may completely fail. + CRITICAL = 4; + } + + // The severity of the error. + Severity severity = 1; + + // The names of the entries that the error is associated with. + // Format: + // + // - "projects//agent", if the error is associated with the entire + // agent. + // - "projects//agent/intents/", if the error is + // associated with certain intents. + // - "projects//agent/intents//trainingPhrases/", if the + // error is associated with certain intent training phrases. + // - "projects//agent/intents//parameters/", if the error is associated with certain intent parameters. + // - "projects//agent/entities/", if the error is + // associated with certain entities. + repeated string entries = 3; + + // The detailed error messsage. + string error_message = 4; +} + +// Represents the output of agent validation. +message ValidationResult { + // Contains all validation errors. + repeated ValidationError validation_errors = 1; +} diff --git a/dialogflow_v2beta1/proto/validation_result_pb2.py b/dialogflow_v2beta1/proto/validation_result_pb2.py index 5c1290437..f594b5095 100644 --- a/dialogflow_v2beta1/proto/validation_result_pb2.py +++ b/dialogflow_v2beta1/proto/validation_result_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/validation_result.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -22,12 +19,9 @@ name="google/cloud/dialogflow_v2beta1/proto/validation_result.proto", package="google.cloud.dialogflow.v2beta1", syntax="proto3", - serialized_options=_b( - "\n#com.google.cloud.dialogflow.v2beta1B\025ValidationResultProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1" - ), - serialized_pb=_b( - '\n=google/cloud/dialogflow_v2beta1/proto/validation_result.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto"\xdc\x01\n\x0fValidationError\x12K\n\x08severity\x18\x01 \x01(\x0e\x32\x39.google.cloud.dialogflow.v2beta1.ValidationError.Severity\x12\x0f\n\x07\x65ntries\x18\x03 \x03(\t\x12\x15\n\rerror_message\x18\x04 \x01(\t"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04"_\n\x10ValidationResult\x12K\n\x11validation_errors\x18\x01 \x03(\x0b\x32\x30.google.cloud.dialogflow.v2beta1.ValidationErrorB\xb3\x01\n#com.google.cloud.dialogflow.v2beta1B\x15ValidationResultProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3' - ), + serialized_options=b"\n#com.google.cloud.dialogflow.v2beta1B\025ValidationResultProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n=google/cloud/dialogflow_v2beta1/proto/validation_result.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto"\xdc\x01\n\x0fValidationError\x12K\n\x08severity\x18\x01 \x01(\x0e\x32\x39.google.cloud.dialogflow.v2beta1.ValidationError.Severity\x12\x0f\n\x07\x65ntries\x18\x03 \x03(\t\x12\x15\n\rerror_message\x18\x04 \x01(\t"T\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04"_\n\x10ValidationResult\x12K\n\x11validation_errors\x18\x01 \x03(\x0b\x32\x30.google.cloud.dialogflow.v2beta1.ValidationErrorB\xb3\x01\n#com.google.cloud.dialogflow.v2beta1B\x15ValidationResultProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3', dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR], ) @@ -37,6 +31,7 @@ full_name="google.cloud.dialogflow.v2beta1.ValidationError.Severity", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="SEVERITY_UNSPECIFIED", @@ -44,18 +39,39 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="INFO", index=1, number=1, serialized_options=None, type=None + name="INFO", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="WARNING", index=2, number=2, serialized_options=None, type=None + name="WARNING", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="ERROR", index=3, number=3, serialized_options=None, type=None + name="ERROR", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CRITICAL", index=4, number=4, serialized_options=None, type=None + name="CRITICAL", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -72,6 +88,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="severity", @@ -90,6 +107,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entries", @@ -108,6 +126,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="error_message", @@ -118,7 +137,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -126,6 +145,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -147,6 +167,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="validation_errors", @@ -165,6 +186,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ) ], extensions=[], @@ -189,49 +211,47 @@ ValidationError = _reflection.GeneratedProtocolMessageType( "ValidationError", (_message.Message,), - dict( - DESCRIPTOR=_VALIDATIONERROR, - __module__="google.cloud.dialogflow_v2beta1.proto.validation_result_pb2", - __doc__="""Represents a single validation error. - + { + "DESCRIPTOR": _VALIDATIONERROR, + "__module__": "google.cloud.dialogflow_v2beta1.proto.validation_result_pb2", + "__doc__": """Represents a single validation error. Attributes: severity: The severity of the error. entries: The names of the entries that the error is associated with. - Format: - "projects//agent", if the error is associated with - the entire agent. - "projects//agent/intents/", if the error + Format: - “projects//agent”, if the error is associated with + the entire agent. - “projects//agent/intents/”, if the error is associated with certain intents. - - "projects//agent/intents//trainingPhrases/", if the error is + “projects//agent/intents//trainingPhrases/”, if the error is associated with certain intent training phrases. - - "projects//agent/intents//parameters/", if the error is + “projects//agent/intents//parameters/”, if the error is associated with certain intent parameters. - - "projects//agent/entities/", if the error is associated with + “projects//agent/entities/”, if the error is associated with certain entities. error_message: The detailed error messsage. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ValidationError) - ), + }, ) _sym_db.RegisterMessage(ValidationError) ValidationResult = _reflection.GeneratedProtocolMessageType( "ValidationResult", (_message.Message,), - dict( - DESCRIPTOR=_VALIDATIONRESULT, - __module__="google.cloud.dialogflow_v2beta1.proto.validation_result_pb2", - __doc__="""Represents the output of agent validation. - + { + "DESCRIPTOR": _VALIDATIONRESULT, + "__module__": "google.cloud.dialogflow_v2beta1.proto.validation_result_pb2", + "__doc__": """Represents the output of agent validation. Attributes: validation_errors: Contains all validation errors. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ValidationResult) - ), + }, ) _sym_db.RegisterMessage(ValidationResult) diff --git a/dialogflow_v2beta1/proto/validation_result_pb2_grpc.py b/dialogflow_v2beta1/proto/validation_result_pb2_grpc.py index 07cb78fe0..8a9393943 100644 --- a/dialogflow_v2beta1/proto/validation_result_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/validation_result_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/dialogflow_v2beta1/proto/webhook.proto b/dialogflow_v2beta1/proto/webhook.proto new file mode 100644 index 000000000..9e5d2a4c4 --- /dev/null +++ b/dialogflow_v2beta1/proto/webhook.proto @@ -0,0 +1,153 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/cloud/dialogflow/v2beta1/context.proto"; +import "google/cloud/dialogflow/v2beta1/intent.proto"; +import "google/cloud/dialogflow/v2beta1/session.proto"; +import "google/cloud/dialogflow/v2beta1/session_entity_type.proto"; +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "WebhookProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// The request message for a webhook call. +message WebhookRequest { + // The unique identifier of detectIntent request session. + // Can be used to identify end-user inside webhook implementation. + // Format: `projects//agent/sessions/`, or + // `projects//agent/environments//users//sessions/`. + string session = 4; + + // The unique identifier of the response. Contains the same value as + // `[Streaming]DetectIntentResponse.response_id`. + string response_id = 1; + + // The result of the conversational query or event processing. Contains the + // same value as `[Streaming]DetectIntentResponse.query_result`. + QueryResult query_result = 2; + + // Alternative query results from KnowledgeService. + repeated QueryResult alternative_query_results = 5; + + // Optional. The contents of the original request that was passed to + // `[Streaming]DetectIntent` call. + OriginalDetectIntentRequest original_detect_intent_request = 3; +} + +// The response message for a webhook call. +// +// This response is validated by the Dialogflow server. If validation fails, +// an error will be returned in the [QueryResult.diagnostic_info][google.cloud.dialogflow.v2beta1.QueryResult.diagnostic_info] field. +// Setting JSON fields to an empty value with the wrong type is a common error. +// To avoid this error: +// +// - Use `""` for empty strings +// - Use `{}` or `null` for empty objects +// - Use `[]` or `null` for empty arrays +// +// For more information, see the +// [Protocol Buffers Language +// Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). +message WebhookResponse { + // Optional. The text response message intended for the end-user. + // It is recommended to use `fulfillment_messages.text.text[0]` instead. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller. + string fulfillment_text = 1; + + // Optional. The rich response messages intended for the end-user. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller. + repeated Intent.Message fulfillment_messages = 2; + + // Optional. A custom field used to identify the webhook source. + // Arbitrary strings are supported. + // When provided, Dialogflow uses this field to populate + // [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller. + string source = 3; + + // Optional. This field can be used to pass custom data from your webhook to the + // integration or API caller. Arbitrary JSON objects are supported. + // When provided, Dialogflow uses this field to populate + // [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller. + // This field is also used by the + // [Google Assistant + // integration](https://cloud.google.com/dialogflow/docs/integrations/aog) + // for rich response messages. + // See the format definition at [Google Assistant Dialogflow webhook + // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) + google.protobuf.Struct payload = 4; + + // Optional. The collection of output contexts that will overwrite currently + // active contexts for the session and reset their lifespans. + // When provided, Dialogflow uses this field to populate + // [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller. + repeated Context output_contexts = 5; + + // Optional. Invokes the supplied events. + // When this field is set, Dialogflow ignores the `fulfillment_text`, + // `fulfillment_messages`, and `payload` fields. + EventInput followup_event_input = 6; + + // Optional. Indicates that this intent ends an interaction. Some integrations + // (e.g., Actions on Google or Dialogflow phone gateway) use this information + // to close interaction with an end user. Default is false. + bool end_interaction = 8; + + // Optional. Additional session entity types to replace or extend developer + // entity types with. The entity synonyms apply to all languages and persist + // for the session. Setting this data from a webhook overwrites + // the session entity types that have been set using `detectIntent`, + // `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods. + repeated SessionEntityType session_entity_types = 10; +} + +// Represents the contents of the original request that was passed to +// the `[Streaming]DetectIntent` call. +message OriginalDetectIntentRequest { + // The source of this request, e.g., `google`, `facebook`, `slack`. It is set + // by Dialogflow-owned servers. + string source = 1; + + // Optional. The version of the protocol used for this request. + // This field is AoG-specific. + string version = 2; + + // Optional. This field is set to the value of the `QueryParameters.payload` + // field passed in the request. Some integrations that query a Dialogflow + // agent may provide additional information in the payload. + // + // In particular, for the Dialogflow Phone Gateway integration, this field has + // the form: + //
{
+  //  "telephony": {
+  //    "caller_id": "+18558363987"
+  //  }
+  // }
+ // Note: The caller ID field (`caller_id`) will be redacted for Standard + // Edition agents and populated with the caller ID in [E.164 + // format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition agents. + google.protobuf.Struct payload = 3; +} diff --git a/dialogflow_v2beta1/proto/webhook_pb2.py b/dialogflow_v2beta1/proto/webhook_pb2.py index 96a3971cf..137eaa71a 100644 --- a/dialogflow_v2beta1/proto/webhook_pb2.py +++ b/dialogflow_v2beta1/proto/webhook_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/webhook.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -35,12 +32,9 @@ name="google/cloud/dialogflow_v2beta1/proto/webhook.proto", package="google.cloud.dialogflow.v2beta1", syntax="proto3", - serialized_options=_b( - "\n#com.google.cloud.dialogflow.v2beta1B\014WebhookProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1" - ), - serialized_pb=_b( - '\n3google/cloud/dialogflow_v2beta1/proto/webhook.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x33google/cloud/dialogflow_v2beta1/proto/context.proto\x1a\x32google/cloud/dialogflow_v2beta1/proto/intent.proto\x1a\x33google/cloud/dialogflow_v2beta1/proto/session.proto\x1a?google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto"\xb1\x02\n\x0eWebhookRequest\x12\x0f\n\x07session\x18\x04 \x01(\t\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12\x42\n\x0cquery_result\x18\x02 \x01(\x0b\x32,.google.cloud.dialogflow.v2beta1.QueryResult\x12O\n\x19\x61lternative_query_results\x18\x05 \x03(\x0b\x32,.google.cloud.dialogflow.v2beta1.QueryResult\x12\x64\n\x1eoriginal_detect_intent_request\x18\x03 \x01(\x0b\x32<.google.cloud.dialogflow.v2beta1.OriginalDetectIntentRequest"\xad\x03\n\x0fWebhookResponse\x12\x18\n\x10\x66ulfillment_text\x18\x01 \x01(\t\x12M\n\x14\x66ulfillment_messages\x18\x02 \x03(\x0b\x32/.google.cloud.dialogflow.v2beta1.Intent.Message\x12\x0e\n\x06source\x18\x03 \x01(\t\x12(\n\x07payload\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x41\n\x0foutput_contexts\x18\x05 \x03(\x0b\x32(.google.cloud.dialogflow.v2beta1.Context\x12I\n\x14\x66ollowup_event_input\x18\x06 \x01(\x0b\x32+.google.cloud.dialogflow.v2beta1.EventInput\x12\x17\n\x0f\x65nd_interaction\x18\x08 \x01(\x08\x12P\n\x14session_entity_types\x18\n \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.SessionEntityType"h\n\x1bOriginalDetectIntentRequest\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12(\n\x07payload\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\xaa\x01\n#com.google.cloud.dialogflow.v2beta1B\x0cWebhookProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3' - ), + serialized_options=b"\n#com.google.cloud.dialogflow.v2beta1B\014WebhookProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n3google/cloud/dialogflow_v2beta1/proto/webhook.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x33google/cloud/dialogflow_v2beta1/proto/context.proto\x1a\x32google/cloud/dialogflow_v2beta1/proto/intent.proto\x1a\x33google/cloud/dialogflow_v2beta1/proto/session.proto\x1a?google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto"\xb1\x02\n\x0eWebhookRequest\x12\x0f\n\x07session\x18\x04 \x01(\t\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12\x42\n\x0cquery_result\x18\x02 \x01(\x0b\x32,.google.cloud.dialogflow.v2beta1.QueryResult\x12O\n\x19\x61lternative_query_results\x18\x05 \x03(\x0b\x32,.google.cloud.dialogflow.v2beta1.QueryResult\x12\x64\n\x1eoriginal_detect_intent_request\x18\x03 \x01(\x0b\x32<.google.cloud.dialogflow.v2beta1.OriginalDetectIntentRequest"\xad\x03\n\x0fWebhookResponse\x12\x18\n\x10\x66ulfillment_text\x18\x01 \x01(\t\x12M\n\x14\x66ulfillment_messages\x18\x02 \x03(\x0b\x32/.google.cloud.dialogflow.v2beta1.Intent.Message\x12\x0e\n\x06source\x18\x03 \x01(\t\x12(\n\x07payload\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x41\n\x0foutput_contexts\x18\x05 \x03(\x0b\x32(.google.cloud.dialogflow.v2beta1.Context\x12I\n\x14\x66ollowup_event_input\x18\x06 \x01(\x0b\x32+.google.cloud.dialogflow.v2beta1.EventInput\x12\x17\n\x0f\x65nd_interaction\x18\x08 \x01(\x08\x12P\n\x14session_entity_types\x18\n \x03(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.SessionEntityType"h\n\x1bOriginalDetectIntentRequest\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12(\n\x07payload\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\xaa\x01\n#com.google.cloud.dialogflow.v2beta1B\x0cWebhookProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3', dependencies=[ google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.DESCRIPTOR, @@ -58,6 +52,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="session", @@ -68,7 +63,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -76,6 +71,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="response_id", @@ -86,7 +82,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -94,6 +90,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="query_result", @@ -112,6 +109,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="alternative_query_results", @@ -130,6 +128,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="original_detect_intent_request", @@ -148,6 +147,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -169,6 +169,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="fulfillment_text", @@ -179,7 +180,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -187,6 +188,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="fulfillment_messages", @@ -205,6 +207,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="source", @@ -215,7 +218,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -223,6 +226,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="payload", @@ -241,6 +245,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_contexts", @@ -259,6 +264,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="followup_event_input", @@ -277,6 +283,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="end_interaction", @@ -295,6 +302,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="session_entity_types", @@ -313,6 +321,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -334,6 +343,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="source", @@ -344,7 +354,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -352,6 +362,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="version", @@ -362,7 +373,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -370,6 +381,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="payload", @@ -388,6 +400,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -451,11 +464,10 @@ WebhookRequest = _reflection.GeneratedProtocolMessageType( "WebhookRequest", (_message.Message,), - dict( - DESCRIPTOR=_WEBHOOKREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.webhook_pb2", - __doc__="""The request message for a webhook call. - + { + "DESCRIPTOR": _WEBHOOKREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.webhook_pb2", + "__doc__": """The request message for a webhook call. Attributes: session: @@ -478,66 +490,70 @@ to ``[Streaming]DetectIntent`` call. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.WebhookRequest) - ), + }, ) _sym_db.RegisterMessage(WebhookRequest) WebhookResponse = _reflection.GeneratedProtocolMessageType( "WebhookResponse", (_message.Message,), - dict( - DESCRIPTOR=_WEBHOOKRESPONSE, - __module__="google.cloud.dialogflow_v2beta1.proto.webhook_pb2", - __doc__="""The response message for a webhook call. - - This response is validated by the Dialogflow server. If validation - fails, an error will be returned in the - [QueryResult.diagnostic\_info][google.cloud.dialogflow.v2beta1.QueryResult.diagnostic\_info] - field. Setting JSON fields to an empty value with the wrong type is a - common error. To avoid this error: - - - Use ``""`` for empty strings - - Use ``{}`` or ``null`` for empty objects - - Use ``[]`` or ``null`` for empty arrays - - For more information, see the `Protocol Buffers Language - Guide `__. - + { + "DESCRIPTOR": _WEBHOOKRESPONSE, + "__module__": "google.cloud.dialogflow_v2beta1.proto.webhook_pb2", + "__doc__": """The response message for a webhook call. This response is validated + by the Dialogflow server. If validation fails, an error will be + returned in the [QueryResult.diagnostic_info][google.cloud.dialogflow. + v2beta1.QueryResult.diagnostic_info] field. Setting JSON fields to an + empty value with the wrong type is a common error. To avoid this + error: - Use ``""`` for empty strings - Use ``{}`` or ``null`` for + empty objects - Use ``[]`` or ``null`` for empty arrays For more + information, see the `Protocol Buffers Language Guide + `__. Attributes: fulfillment_text: - Optional. The text to be shown on the screen. This value is - passed directly to ``QueryResult.fulfillment_text``. + Optional. The text response message intended for the end-user. + It is recommended to use ``fulfillment_messages.text.text[0]`` + instead. When provided, Dialogflow uses this field to populate + [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1 + .QueryResult.fulfillment_text] sent to the integration or API + caller. fulfillment_messages: - Optional. The collection of rich messages to present to the - user. This value is passed directly to - ``QueryResult.fulfillment_messages``. + Optional. The rich response messages intended for the end- + user. When provided, Dialogflow uses this field to populate [Q + ueryResult.fulfillment_messages][google.cloud.dialogflow.v2bet + a1.QueryResult.fulfillment_messages] sent to the integration + or API caller. source: - Optional. This value is passed directly to - ``QueryResult.webhook_source``. + Optional. A custom field used to identify the webhook source. + Arbitrary strings are supported. When provided, Dialogflow + uses this field to populate [QueryResult.webhook_source][googl + e.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to + the integration or API caller. payload: - Optional. This value is passed directly to - ``QueryResult.webhook_payload``. See the related - ``fulfillment_messages[i].payload field``, which may be used - as an alternative to this field. This field can be used for - Actions on Google responses. It should have a structure - similar to the JSON message shown here. For more information, - see `Actions on Google Webhook Format - `__ - .. raw:: html
{      "google": {
-          "expectUserResponse": true,        "richResponse": {
-          "items": [            {              "simpleResponse": {
-          "textToSpeech": "this is a simple response"              }
-          }          ]        }      }    }
+ Optional. This field can be used to pass custom data from your + webhook to the integration or API caller. Arbitrary JSON + objects are supported. When provided, Dialogflow uses this + field to populate [QueryResult.webhook_payload][google.cloud.d + ialogflow.v2beta1.QueryResult.webhook_payload] sent to the + integration or API caller. This field is also used by the + `Google Assistant integration + `__ + for rich response messages. See the format definition at + `Google Assistant Dialogflow webhook format `__ output_contexts: - Optional. The collection of output contexts. This value is - passed directly to ``QueryResult.output_contexts``. + Optional. The collection of output contexts that will + overwrite currently active contexts for the session and reset + their lifespans. When provided, Dialogflow uses this field to + populate [QueryResult.output_contexts][google.cloud.dialogflow + .v2beta1.QueryResult.output_contexts] sent to the integration + or API caller. followup_event_input: - Optional. Makes the platform immediately invoke another - ``DetectIntent`` call internally with the specified event as - input. When this field is set, Dialogflow ignores the - ``fulfillment_text``, ``fulfillment_messages``, and - ``payload`` fields. + Optional. Invokes the supplied events. When this field is set, + Dialogflow ignores the ``fulfillment_text``, + ``fulfillment_messages``, and ``payload`` fields. end_interaction: Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone @@ -546,25 +562,25 @@ session_entity_types: Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all - languages and persist for the session of this query. Setting - the session entity types inside webhook overwrites the session - entity types that have been set through - ``DetectIntentRequest.query_params.session_entity_types``. + languages and persist for the session. Setting this data from + a webhook overwrites the session entity types that have been + set using ``detectIntent``, ``streamingDetectIntent`` or [Sess + ionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTy + pe] management methods. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.WebhookResponse) - ), + }, ) _sym_db.RegisterMessage(WebhookResponse) OriginalDetectIntentRequest = _reflection.GeneratedProtocolMessageType( "OriginalDetectIntentRequest", (_message.Message,), - dict( - DESCRIPTOR=_ORIGINALDETECTINTENTREQUEST, - __module__="google.cloud.dialogflow_v2beta1.proto.webhook_pb2", - __doc__="""Represents the contents of the original request that was - passed to the ``[Streaming]DetectIntent`` call. - + { + "DESCRIPTOR": _ORIGINALDETECTINTENTREQUEST, + "__module__": "google.cloud.dialogflow_v2beta1.proto.webhook_pb2", + "__doc__": """Represents the contents of the original request that was passed to the + ``[Streaming]DetectIntent`` call. Attributes: source: @@ -577,17 +593,17 @@ Optional. This field is set to the value of the ``QueryParameters.payload`` field passed in the request. Some integrations that query a Dialogflow agent may provide - additional information in the payload. In particular for the - Telephony Gateway this field has the form: .. raw:: html -
{     "telephony": {       "caller_id": "+18558363987"
-          }    }
Note: The caller ID field (``caller_id``) will - be redacted for Standard Edition agents and populated with the - caller ID in `E.164 format + additional information in the payload. In particular, for the + Dialogflow Phone Gateway integration, this field has the form: + .. raw:: html
{     "telephony": {       "caller_id":
+          "+18558363987"     }    }
Note: The caller ID field + (``caller_id``) will be redacted for Standard Edition agents + and populated with the caller ID in `E.164 format `__ for Enterprise Edition agents. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.OriginalDetectIntentRequest) - ), + }, ) _sym_db.RegisterMessage(OriginalDetectIntentRequest) diff --git a/dialogflow_v2beta1/proto/webhook_pb2_grpc.py b/dialogflow_v2beta1/proto/webhook_pb2_grpc.py index 07cb78fe0..8a9393943 100644 --- a/dialogflow_v2beta1/proto/webhook_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/webhook_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/dialogflow_v2beta1/types.py b/dialogflow_v2beta1/types.py index 1ac0ede2d..d18160ab1 100644 --- a/dialogflow_v2beta1/types.py +++ b/dialogflow_v2beta1/types.py @@ -25,6 +25,7 @@ from dialogflow_v2beta1.proto import context_pb2 from dialogflow_v2beta1.proto import document_pb2 from dialogflow_v2beta1.proto import entity_type_pb2 +from dialogflow_v2beta1.proto import environment_pb2 from dialogflow_v2beta1.proto import gcs_pb2 from dialogflow_v2beta1.proto import intent_pb2 from dialogflow_v2beta1.proto import knowledge_base_pb2 @@ -38,6 +39,7 @@ from google.protobuf import empty_pb2 from google.protobuf import field_mask_pb2 from google.protobuf import struct_pb2 +from google.protobuf import timestamp_pb2 from google.rpc import status_pb2 from google.type import latlng_pb2 @@ -49,6 +51,7 @@ empty_pb2, field_mask_pb2, struct_pb2, + timestamp_pb2, status_pb2, latlng_pb2, ] @@ -59,6 +62,7 @@ context_pb2, document_pb2, entity_type_pb2, + environment_pb2, gcs_pb2, intent_pb2, knowledge_base_pb2, diff --git a/noxfile.py b/noxfile.py index b34f2eb53..1216e11af 100644 --- a/noxfile.py +++ b/noxfile.py @@ -108,7 +108,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/setup.cfg b/setup.cfg index 3bd555500..2a9acf13d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,2 @@ -# Generated by synthtool. DO NOT EDIT! [bdist_wheel] universal = 1 diff --git a/synth.metadata b/synth.metadata index e6096044a..f7d77bee1 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,26 +1,18 @@ { - "updateTime": "2020-03-26T18:20:13.139271Z", "sources": [ - { - "generator": { - "name": "artman", - "version": "1.1.1", - "dockerImage": "googleapis/artman@sha256:5ef340c8d9334719bc5c6981d95f4a5d2737b0a6a24f2b9a0d430e96fff85c5b" - } - }, { "git": { "name": ".", "remote": "git@github.com:googleapis/dialogflow-python-client-v2.git", - "sha": "1c25409d4ee04503840a23d86adf31e3d3ec02ff" + "sha": "7ecac620897dc8c0805686737ba51354b3745d57" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "65816afa71e588252b7119dc723592abe51ea106", - "internalRef": "303150338" + "sha": "1a97126c6ced4e6179ade331a5372ec06e24f727", + "internalRef": "328383688" } } ], @@ -31,8 +23,7 @@ "apiName": "dialogflow", "apiVersion": "v2beta1", "language": "python", - "generator": "gapic", - "config": "google/cloud/dialogflow/v2beta1/artman_dialogflow_v2beta1.yaml" + "generator": "bazel" } }, { @@ -41,8 +32,7 @@ "apiName": "dialogflow", "apiVersion": "v2", "language": "python", - "generator": "gapic", - "config": "google/cloud/dialogflow/v2/artman_dialogflow_v2.yaml" + "generator": "bazel" } } ] diff --git a/synth.py b/synth.py index afd261a14..1d09b71e6 100644 --- a/synth.py +++ b/synth.py @@ -122,4 +122,197 @@ """['"]-W['"], # warnings as errors""", "") +# Re-add dropped methods and re-order method args +# TODO: remove during microgenerator transition +count = s.replace( + "dialogflow_*/**/agents_client.py", + """(\s+)def export_agent\( +(\s+)self, +\s+parent, +\s+agent_uri,""", + """\g<1>def export_agent( + self, + parent, + agent_uri=None,""" +) + +if count != 1: + raise Exception("Required replacement not made.") + +count = s.replace( + "dialogflow_*/**/agents_client.py", + """(\s+)def get_validation_result\( +(\s+)self, +\s+parent,""", +"""\g<1>def get_validation_result( + self, + parent=None,""" +) + +if count != 2: + raise Exception("Required replacement not made.") + + +count = s.replace( + "dialogflow_*/**/entity_types_client.py", + """@classmethod + def agent_path\(cls, project\):""", + '''@classmethod + def project_agent_path(cls, project): + """Return a fully-qualified project_agent string.""" + return google.api_core.path_template.expand( + "projects/{project}/agent", project=project + ) + + @classmethod + def agent_path(cls, project):''' +) + +if count != 2: + raise Exception("Required replacement not made.") + + +count = s.replace( + "dialogflow_*/**/intents_client.py", + '''@classmethod + def agent_path\(cls, project\): + """Return a fully-qualified agent string\.""" + return google\.api_core\.path_template\.expand\( + 'projects/{project}/agent', + project=project, + \)''', + '''@classmethod + def agent_path(cls, project, agent): + """Return a fully-qualified agent string.""" + return google.api_core.path_template.expand( + "projects/{project}/agents/{agent}", project=project, agent=agent + ) + + @classmethod + def project_agent_path(cls, project): + """Return a fully-qualified project_agent string.""" + return google.api_core.path_template.expand( + "projects/{project}/agent", project=project + )''' +) + +if count != 2: + raise Exception("Required replacement not made.") + + +count = s.replace( + "dialogflow_v2beta1/**/contexts_client.py", + """@classmethod + def session_path\(cls, project, session\):""", + '''@classmethod + def environment_context_path(cls, project, environment, user, session, context): + """Return a fully-qualified environment_context string.""" + return google.api_core.path_template.expand( + "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}", + project=project, + environment=environment, + user=user, + session=session, + context=context, + ) + + @classmethod + def environment_session_path(cls, project, environment, user, session): + """Return a fully-qualified environment_session string.""" + return google.api_core.path_template.expand( + "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}", + project=project, + environment=environment, + user=user, + session=session, + ) + + @classmethod + def session_path(cls, project, session):''' +) + +if count != 1: + raise Exception("Required replacement not made.") + + +count = s.replace( + "dialogflow_v2beta1/**/documents_client.py", + """(\s+)def reload_document\( +\s+self, +\s+name,""", + """\g<1>def reload_document( + self, + name=None,""" +) + +if count != 1: + raise Exception("Required replacement not made.") + + +count = s.replace( + "dialogflow_v2beta1/**/session_entity_types_client.py", + """@classmethod +\s+def session_path\(cls, project, session\):""", + '''@classmethod + def environment_session_path(cls, project, environment, user, session): + """Return a fully-qualified environment_session string.""" + return google.api_core.path_template.expand( + "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}", + project=project, + environment=environment, + user=user, + session=session, + ) + + @classmethod + def environment_session_entity_type_path( + cls, project, environment, user, session, entity_type + ): + """Return a fully-qualified environment_session_entity_type string.""" + return google.api_core.path_template.expand( + "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}", + project=project, + environment=environment, + user=user, + session=session, + entity_type=entity_type, + ) + + @classmethod + def session_path(cls, project, session):''' +) + +if count != 1: + raise Exception("Required replacement not made.") + +count = s.replace( + "dialogflow_v2beta1/**/sessions_client.py", + """@classmethod +\s+def session_path\(cls, project, session\):""", + '''@classmethod + def environment_session_path(cls, project, environment, user, session): + """Return a fully-qualified environment_session string.""" + return google.api_core.path_template.expand( + "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}", + project=project, + environment=environment, + user=user, + session=session, + ) + + @classmethod + def session_path(cls, project, session):''' +) + +if count != 1: + raise Exception("Required replacement not made.") + + +# fix unit test +s.replace( + "tests/**/test_intents_client_v2.py", + """client\.agent_path\('\[PROJECT\]'\)""", + """client.agent_path("[PROJECT]", "[AGENT]")""", +) + s.shell.run(["nox", "-s", "blacken"], hide_output=False) diff --git a/tests/unit/gapic/v2/test_agents_client_v2.py b/tests/unit/gapic/v2/test_agents_client_v2.py index fafab4613..ae6b12404 100644 --- a/tests/unit/gapic/v2/test_agents_client_v2.py +++ b/tests/unit/gapic/v2/test_agents_client_v2.py @@ -65,9 +65,9 @@ class CustomException(Exception): class TestAgentsClient(object): - def test_set_agent(self): + def test_get_agent(self): # Setup Expected Response - parent = "parent-995424086" + parent_2 = "parent21175163357" display_name = "displayName1615086568" default_language_code = "defaultLanguageCode856575222" time_zone = "timeZone36848094" @@ -76,7 +76,7 @@ def test_set_agent(self): enable_logging = False classification_threshold = 1.11581064e8 expected_response = { - "parent": parent, + "parent": parent_2, "display_name": display_name, "default_language_code": default_language_code, "time_zone": time_zone, @@ -95,17 +95,17 @@ def test_set_agent(self): client = dialogflow_v2.AgentsClient() # Setup Request - agent = {} + parent = client.project_path("[PROJECT]") - response = client.set_agent(agent) + response = client.get_agent(parent) assert expected_response == response assert len(channel.requests) == 1 - expected_request = agent_pb2.SetAgentRequest(agent=agent) + expected_request = agent_pb2.GetAgentRequest(parent=parent) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_set_agent_exception(self): + def test_get_agent_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -114,29 +114,52 @@ def test_set_agent_exception(self): client = dialogflow_v2.AgentsClient() # Setup request - agent = {} + parent = client.project_path("[PROJECT]") with pytest.raises(CustomException): - client.set_agent(agent) + client.get_agent(parent) - def test_delete_agent(self): - channel = ChannelStub() + def test_set_agent(self): + # Setup Expected Response + parent = "parent-995424086" + display_name = "displayName1615086568" + default_language_code = "defaultLanguageCode856575222" + time_zone = "timeZone36848094" + description = "description-1724546052" + avatar_uri = "avatarUri-402824826" + enable_logging = False + classification_threshold = 1.11581064e8 + expected_response = { + "parent": parent, + "display_name": display_name, + "default_language_code": default_language_code, + "time_zone": time_zone, + "description": description, + "avatar_uri": avatar_uri, + "enable_logging": enable_logging, + "classification_threshold": classification_threshold, + } + expected_response = agent_pb2.Agent(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = dialogflow_v2.AgentsClient() # Setup Request - parent = client.project_path("[PROJECT]") + agent = {} - client.delete_agent(parent) + response = client.set_agent(agent) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = agent_pb2.DeleteAgentRequest(parent=parent) + expected_request = agent_pb2.SetAgentRequest(agent=agent) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_delete_agent_exception(self): + def test_set_agent_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -145,35 +168,13 @@ def test_delete_agent_exception(self): client = dialogflow_v2.AgentsClient() # Setup request - parent = client.project_path("[PROJECT]") + agent = {} with pytest.raises(CustomException): - client.delete_agent(parent) - - def test_get_agent(self): - # Setup Expected Response - parent_2 = "parent21175163357" - display_name = "displayName1615086568" - default_language_code = "defaultLanguageCode856575222" - time_zone = "timeZone36848094" - description = "description-1724546052" - avatar_uri = "avatarUri-402824826" - enable_logging = False - classification_threshold = 1.11581064e8 - expected_response = { - "parent": parent_2, - "display_name": display_name, - "default_language_code": default_language_code, - "time_zone": time_zone, - "description": description, - "avatar_uri": avatar_uri, - "enable_logging": enable_logging, - "classification_threshold": classification_threshold, - } - expected_response = agent_pb2.Agent(**expected_response) + client.set_agent(agent) - # Mock the API response - channel = ChannelStub(responses=[expected_response]) + def test_delete_agent(self): + channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel @@ -182,15 +183,14 @@ def test_get_agent(self): # Setup Request parent = client.project_path("[PROJECT]") - response = client.get_agent(parent) - assert expected_response == response + client.delete_agent(parent) assert len(channel.requests) == 1 - expected_request = agent_pb2.GetAgentRequest(parent=parent) + expected_request = agent_pb2.DeleteAgentRequest(parent=parent) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_get_agent_exception(self): + def test_delete_agent_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -202,7 +202,7 @@ def test_get_agent_exception(self): parent = client.project_path("[PROJECT]") with pytest.raises(CustomException): - client.get_agent(parent) + client.delete_agent(parent) def test_search_agents(self): # Setup Expected Response @@ -299,8 +299,8 @@ def test_train_agent_exception(self): def test_export_agent(self): # Setup Expected Response - agent_uri = "agentUri-1700713166" - expected_response = {"agent_uri": agent_uri} + agent_uri_2 = "agentUri21997190245" + expected_response = {"agent_uri": agent_uri_2} expected_response = agent_pb2.ExportAgentResponse(**expected_response) operation = operations_pb2.Operation( name="operations/test_export_agent", done=True @@ -316,13 +316,16 @@ def test_export_agent(self): # Setup Request parent = client.project_path("[PROJECT]") + agent_uri = "agentUri-1700713166" - response = client.export_agent(parent) + response = client.export_agent(parent, agent_uri) result = response.result() assert expected_response == result assert len(channel.requests) == 1 - expected_request = agent_pb2.ExportAgentRequest(parent=parent) + expected_request = agent_pb2.ExportAgentRequest( + parent=parent, agent_uri=agent_uri + ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -343,8 +346,9 @@ def test_export_agent_exception(self): # Setup Request parent = client.project_path("[PROJECT]") + agent_uri = "agentUri-1700713166" - response = client.export_agent(parent) + response = client.export_agent(parent, agent_uri) exception = response.exception() assert exception.errors[0] == error @@ -460,11 +464,14 @@ def test_get_validation_result(self): create_channel.return_value = channel client = dialogflow_v2.AgentsClient() - response = client.get_validation_result() + # Setup Request + parent = client.project_path("[PROJECT]") + + response = client.get_validation_result(parent) assert expected_response == response assert len(channel.requests) == 1 - expected_request = agent_pb2.GetValidationResultRequest() + expected_request = agent_pb2.GetValidationResultRequest(parent=parent) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -476,5 +483,8 @@ def test_get_validation_result_exception(self): create_channel.return_value = channel client = dialogflow_v2.AgentsClient() + # Setup request + parent = client.project_path("[PROJECT]") + with pytest.raises(CustomException): - client.get_validation_result() + client.get_validation_result(parent) diff --git a/tests/unit/gapic/v2/test_contexts_client_v2.py b/tests/unit/gapic/v2/test_contexts_client_v2.py index 9aecb19a9..7003bc6c6 100644 --- a/tests/unit/gapic/v2/test_contexts_client_v2.py +++ b/tests/unit/gapic/v2/test_contexts_client_v2.py @@ -77,7 +77,7 @@ def test_list_contexts(self): client = dialogflow_v2.ContextsClient() # Setup Request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" paged_list_response = client.list_contexts(parent) resources = list(paged_list_response) @@ -98,7 +98,7 @@ def test_list_contexts_exception(self): client = dialogflow_v2.ContextsClient() # Setup request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" paged_list_response = client.list_contexts(parent) with pytest.raises(CustomException): @@ -119,7 +119,7 @@ def test_get_context(self): client = dialogflow_v2.ContextsClient() # Setup Request - name = client.context_path("[PROJECT]", "[SESSION]", "[CONTEXT]") + name = "name3373707" response = client.get_context(name) assert expected_response == response @@ -138,7 +138,7 @@ def test_get_context_exception(self): client = dialogflow_v2.ContextsClient() # Setup request - name = client.context_path("[PROJECT]", "[SESSION]", "[CONTEXT]") + name = "name3373707" with pytest.raises(CustomException): client.get_context(name) @@ -158,7 +158,7 @@ def test_create_context(self): client = dialogflow_v2.ContextsClient() # Setup Request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" context = {} response = client.create_context(parent, context) @@ -180,7 +180,7 @@ def test_create_context_exception(self): client = dialogflow_v2.ContextsClient() # Setup request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" context = {} with pytest.raises(CustomException): @@ -233,7 +233,7 @@ def test_delete_context(self): client = dialogflow_v2.ContextsClient() # Setup Request - name = client.context_path("[PROJECT]", "[SESSION]", "[CONTEXT]") + name = "name3373707" client.delete_context(name) @@ -251,7 +251,7 @@ def test_delete_context_exception(self): client = dialogflow_v2.ContextsClient() # Setup request - name = client.context_path("[PROJECT]", "[SESSION]", "[CONTEXT]") + name = "name3373707" with pytest.raises(CustomException): client.delete_context(name) @@ -264,7 +264,7 @@ def test_delete_all_contexts(self): client = dialogflow_v2.ContextsClient() # Setup Request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" client.delete_all_contexts(parent) @@ -282,7 +282,7 @@ def test_delete_all_contexts_exception(self): client = dialogflow_v2.ContextsClient() # Setup request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" with pytest.raises(CustomException): client.delete_all_contexts(parent) diff --git a/tests/unit/gapic/v2/test_entity_types_client_v2.py b/tests/unit/gapic/v2/test_entity_types_client_v2.py index c5b660875..248ab4569 100644 --- a/tests/unit/gapic/v2/test_entity_types_client_v2.py +++ b/tests/unit/gapic/v2/test_entity_types_client_v2.py @@ -83,7 +83,7 @@ def test_list_entity_types(self): client = dialogflow_v2.EntityTypesClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]") paged_list_response = client.list_entity_types(parent) resources = list(paged_list_response) @@ -104,7 +104,7 @@ def test_list_entity_types_exception(self): client = dialogflow_v2.EntityTypesClient() # Setup request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]") paged_list_response = client.list_entity_types(parent) with pytest.raises(CustomException): @@ -174,7 +174,7 @@ def test_create_entity_type(self): client = dialogflow_v2.EntityTypesClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]") entity_type = {} response = client.create_entity_type(parent, entity_type) @@ -196,7 +196,7 @@ def test_create_entity_type_exception(self): client = dialogflow_v2.EntityTypesClient() # Setup request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]") entity_type = {} with pytest.raises(CustomException): @@ -298,7 +298,7 @@ def test_batch_update_entity_types(self): client = dialogflow_v2.EntityTypesClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]") response = client.batch_update_entity_types(parent) result = response.result() @@ -325,7 +325,7 @@ def test_batch_update_entity_types_exception(self): client = dialogflow_v2.EntityTypesClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]") response = client.batch_update_entity_types(parent) exception = response.exception() @@ -348,7 +348,7 @@ def test_batch_delete_entity_types(self): client = dialogflow_v2.EntityTypesClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]") entity_type_names = [] response = client.batch_delete_entity_types(parent, entity_type_names) @@ -378,7 +378,7 @@ def test_batch_delete_entity_types_exception(self): client = dialogflow_v2.EntityTypesClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]") entity_type_names = [] response = client.batch_delete_entity_types(parent, entity_type_names) diff --git a/tests/unit/gapic/v2/test_environments_client_v2.py b/tests/unit/gapic/v2/test_environments_client_v2.py new file mode 100644 index 000000000..f1b514421 --- /dev/null +++ b/tests/unit/gapic/v2/test_environments_client_v2.py @@ -0,0 +1,109 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Unit tests.""" + +import mock +import pytest + +import dialogflow_v2 +from dialogflow_v2.proto import environment_pb2 + + +class MultiCallableStub(object): + """Stub for the grpc.UnaryUnaryMultiCallable interface.""" + + def __init__(self, method, channel_stub): + self.method = method + self.channel_stub = channel_stub + + def __call__(self, request, timeout=None, metadata=None, credentials=None): + self.channel_stub.requests.append((self.method, request)) + + response = None + if self.channel_stub.responses: + response = self.channel_stub.responses.pop() + + if isinstance(response, Exception): + raise response + + if response: + return response + + +class ChannelStub(object): + """Stub for the grpc.Channel interface.""" + + def __init__(self, responses=[]): + self.responses = responses + self.requests = [] + + def unary_unary(self, method, request_serializer=None, response_deserializer=None): + return MultiCallableStub(method, self) + + +class CustomException(Exception): + pass + + +class TestEnvironmentsClient(object): + def test_list_environments(self): + # Setup Expected Response + next_page_token = "" + environments_element = {} + environments = [environments_element] + expected_response = { + "next_page_token": next_page_token, + "environments": environments, + } + expected_response = environment_pb2.ListEnvironmentsResponse( + **expected_response + ) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = dialogflow_v2.EnvironmentsClient() + + # Setup Request + parent = client.agent_path("[PROJECT]") + + paged_list_response = client.list_environments(parent) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.environments[0] == resources[0] + + assert len(channel.requests) == 1 + expected_request = environment_pb2.ListEnvironmentsRequest(parent=parent) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_list_environments_exception(self): + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = dialogflow_v2.EnvironmentsClient() + + # Setup request + parent = client.agent_path("[PROJECT]") + + paged_list_response = client.list_environments(parent) + with pytest.raises(CustomException): + list(paged_list_response) diff --git a/tests/unit/gapic/v2/test_intents_client_v2.py b/tests/unit/gapic/v2/test_intents_client_v2.py index ec5d72d92..75a635ed7 100644 --- a/tests/unit/gapic/v2/test_intents_client_v2.py +++ b/tests/unit/gapic/v2/test_intents_client_v2.py @@ -80,7 +80,7 @@ def test_list_intents(self): client = dialogflow_v2.IntentsClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]", "[AGENT]") paged_list_response = client.list_intents(parent) resources = list(paged_list_response) @@ -101,7 +101,7 @@ def test_list_intents_exception(self): client = dialogflow_v2.IntentsClient() # Setup request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]", "[AGENT]") paged_list_response = client.list_intents(parent) with pytest.raises(CustomException): @@ -195,7 +195,7 @@ def test_create_intent(self): client = dialogflow_v2.IntentsClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]", "[AGENT]") intent = {} response = client.create_intent(parent, intent) @@ -215,7 +215,7 @@ def test_create_intent_exception(self): client = dialogflow_v2.IntentsClient() # Setup request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]", "[AGENT]") intent = {} with pytest.raises(CustomException): @@ -325,7 +325,7 @@ def test_batch_update_intents(self): client = dialogflow_v2.IntentsClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]", "[AGENT]") response = client.batch_update_intents(parent) result = response.result() @@ -352,7 +352,7 @@ def test_batch_update_intents_exception(self): client = dialogflow_v2.IntentsClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]", "[AGENT]") response = client.batch_update_intents(parent) exception = response.exception() @@ -375,7 +375,7 @@ def test_batch_delete_intents(self): client = dialogflow_v2.IntentsClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]", "[AGENT]") intents = [] response = client.batch_delete_intents(parent, intents) @@ -405,7 +405,7 @@ def test_batch_delete_intents_exception(self): client = dialogflow_v2.IntentsClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = client.agent_path("[PROJECT]", "[AGENT]") intents = [] response = client.batch_delete_intents(parent, intents) diff --git a/tests/unit/gapic/v2/test_session_entity_types_client_v2.py b/tests/unit/gapic/v2/test_session_entity_types_client_v2.py index 922c9fac4..1c2229f0e 100644 --- a/tests/unit/gapic/v2/test_session_entity_types_client_v2.py +++ b/tests/unit/gapic/v2/test_session_entity_types_client_v2.py @@ -82,7 +82,7 @@ def test_list_session_entity_types(self): client = dialogflow_v2.SessionEntityTypesClient() # Setup Request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" paged_list_response = client.list_session_entity_types(parent) resources = list(paged_list_response) @@ -105,7 +105,7 @@ def test_list_session_entity_types_exception(self): client = dialogflow_v2.SessionEntityTypesClient() # Setup request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" paged_list_response = client.list_session_entity_types(parent) with pytest.raises(CustomException): @@ -127,9 +127,7 @@ def test_get_session_entity_type(self): client = dialogflow_v2.SessionEntityTypesClient() # Setup Request - name = client.session_entity_type_path( - "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]" - ) + name = "name3373707" response = client.get_session_entity_type(name) assert expected_response == response @@ -150,9 +148,7 @@ def test_get_session_entity_type_exception(self): client = dialogflow_v2.SessionEntityTypesClient() # Setup request - name = client.session_entity_type_path( - "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]" - ) + name = "name3373707" with pytest.raises(CustomException): client.get_session_entity_type(name) @@ -173,7 +169,7 @@ def test_create_session_entity_type(self): client = dialogflow_v2.SessionEntityTypesClient() # Setup Request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" session_entity_type = {} response = client.create_session_entity_type(parent, session_entity_type) @@ -195,7 +191,7 @@ def test_create_session_entity_type_exception(self): client = dialogflow_v2.SessionEntityTypesClient() # Setup request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" session_entity_type = {} with pytest.raises(CustomException): @@ -251,9 +247,7 @@ def test_delete_session_entity_type(self): client = dialogflow_v2.SessionEntityTypesClient() # Setup Request - name = client.session_entity_type_path( - "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]" - ) + name = "name3373707" client.delete_session_entity_type(name) @@ -273,9 +267,7 @@ def test_delete_session_entity_type_exception(self): client = dialogflow_v2.SessionEntityTypesClient() # Setup request - name = client.session_entity_type_path( - "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]" - ) + name = "name3373707" with pytest.raises(CustomException): client.delete_session_entity_type(name) diff --git a/tests/unit/gapic/v2/test_sessions_client_v2.py b/tests/unit/gapic/v2/test_sessions_client_v2.py index 415639d74..1fcee8665 100644 --- a/tests/unit/gapic/v2/test_sessions_client_v2.py +++ b/tests/unit/gapic/v2/test_sessions_client_v2.py @@ -80,7 +80,7 @@ def test_detect_intent(self): client = dialogflow_v2.SessionsClient() # Setup Request - session = client.session_path("[PROJECT]", "[SESSION]") + session = "session1984987798" query_input = {} response = client.detect_intent(session, query_input) @@ -102,7 +102,7 @@ def test_detect_intent_exception(self): client = dialogflow_v2.SessionsClient() # Setup request - session = client.session_path("[PROJECT]", "[SESSION]") + session = "session1984987798" query_input = {} with pytest.raises(CustomException): diff --git a/tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py index fe76d84bf..2e953da0c 100644 --- a/tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py @@ -65,9 +65,9 @@ class CustomException(Exception): class TestAgentsClient(object): - def test_set_agent(self): + def test_get_agent(self): # Setup Expected Response - parent = "parent-995424086" + parent_2 = "parent21175163357" display_name = "displayName1615086568" default_language_code = "defaultLanguageCode856575222" time_zone = "timeZone36848094" @@ -76,7 +76,7 @@ def test_set_agent(self): enable_logging = False classification_threshold = 1.11581064e8 expected_response = { - "parent": parent, + "parent": parent_2, "display_name": display_name, "default_language_code": default_language_code, "time_zone": time_zone, @@ -95,17 +95,17 @@ def test_set_agent(self): client = dialogflow_v2beta1.AgentsClient() # Setup Request - agent = {} + parent = client.project_path("[PROJECT]") - response = client.set_agent(agent) + response = client.get_agent(parent) assert expected_response == response assert len(channel.requests) == 1 - expected_request = agent_pb2.SetAgentRequest(agent=agent) + expected_request = agent_pb2.GetAgentRequest(parent=parent) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_set_agent_exception(self): + def test_get_agent_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -114,29 +114,52 @@ def test_set_agent_exception(self): client = dialogflow_v2beta1.AgentsClient() # Setup request - agent = {} + parent = client.project_path("[PROJECT]") with pytest.raises(CustomException): - client.set_agent(agent) + client.get_agent(parent) - def test_delete_agent(self): - channel = ChannelStub() + def test_set_agent(self): + # Setup Expected Response + parent = "parent-995424086" + display_name = "displayName1615086568" + default_language_code = "defaultLanguageCode856575222" + time_zone = "timeZone36848094" + description = "description-1724546052" + avatar_uri = "avatarUri-402824826" + enable_logging = False + classification_threshold = 1.11581064e8 + expected_response = { + "parent": parent, + "display_name": display_name, + "default_language_code": default_language_code, + "time_zone": time_zone, + "description": description, + "avatar_uri": avatar_uri, + "enable_logging": enable_logging, + "classification_threshold": classification_threshold, + } + expected_response = agent_pb2.Agent(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = dialogflow_v2beta1.AgentsClient() # Setup Request - parent = client.project_path("[PROJECT]") + agent = {} - client.delete_agent(parent) + response = client.set_agent(agent) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = agent_pb2.DeleteAgentRequest(parent=parent) + expected_request = agent_pb2.SetAgentRequest(agent=agent) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_delete_agent_exception(self): + def test_set_agent_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -145,35 +168,13 @@ def test_delete_agent_exception(self): client = dialogflow_v2beta1.AgentsClient() # Setup request - parent = client.project_path("[PROJECT]") + agent = {} with pytest.raises(CustomException): - client.delete_agent(parent) - - def test_get_agent(self): - # Setup Expected Response - parent_2 = "parent21175163357" - display_name = "displayName1615086568" - default_language_code = "defaultLanguageCode856575222" - time_zone = "timeZone36848094" - description = "description-1724546052" - avatar_uri = "avatarUri-402824826" - enable_logging = False - classification_threshold = 1.11581064e8 - expected_response = { - "parent": parent_2, - "display_name": display_name, - "default_language_code": default_language_code, - "time_zone": time_zone, - "description": description, - "avatar_uri": avatar_uri, - "enable_logging": enable_logging, - "classification_threshold": classification_threshold, - } - expected_response = agent_pb2.Agent(**expected_response) + client.set_agent(agent) - # Mock the API response - channel = ChannelStub(responses=[expected_response]) + def test_delete_agent(self): + channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel @@ -182,15 +183,14 @@ def test_get_agent(self): # Setup Request parent = client.project_path("[PROJECT]") - response = client.get_agent(parent) - assert expected_response == response + client.delete_agent(parent) assert len(channel.requests) == 1 - expected_request = agent_pb2.GetAgentRequest(parent=parent) + expected_request = agent_pb2.DeleteAgentRequest(parent=parent) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_get_agent_exception(self): + def test_delete_agent_exception(self): # Mock the API response channel = ChannelStub(responses=[CustomException()]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -202,7 +202,7 @@ def test_get_agent_exception(self): parent = client.project_path("[PROJECT]") with pytest.raises(CustomException): - client.get_agent(parent) + client.delete_agent(parent) def test_search_agents(self): # Setup Expected Response @@ -460,11 +460,14 @@ def test_get_validation_result(self): create_channel.return_value = channel client = dialogflow_v2beta1.AgentsClient() - response = client.get_validation_result() + # Setup Request + parent = client.project_path("[PROJECT]") + + response = client.get_validation_result(parent) assert expected_response == response assert len(channel.requests) == 1 - expected_request = agent_pb2.GetValidationResultRequest() + expected_request = agent_pb2.GetValidationResultRequest(parent=parent) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -476,5 +479,8 @@ def test_get_validation_result_exception(self): create_channel.return_value = channel client = dialogflow_v2beta1.AgentsClient() + # Setup request + parent = client.project_path("[PROJECT]") + with pytest.raises(CustomException): - client.get_validation_result() + client.get_validation_result(parent) diff --git a/tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py index 76bbcf96c..c6b946d2e 100644 --- a/tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py @@ -77,7 +77,7 @@ def test_list_contexts(self): client = dialogflow_v2beta1.ContextsClient() # Setup Request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" paged_list_response = client.list_contexts(parent) resources = list(paged_list_response) @@ -98,7 +98,7 @@ def test_list_contexts_exception(self): client = dialogflow_v2beta1.ContextsClient() # Setup request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" paged_list_response = client.list_contexts(parent) with pytest.raises(CustomException): @@ -119,7 +119,7 @@ def test_get_context(self): client = dialogflow_v2beta1.ContextsClient() # Setup Request - name = client.context_path("[PROJECT]", "[SESSION]", "[CONTEXT]") + name = "name3373707" response = client.get_context(name) assert expected_response == response @@ -138,7 +138,7 @@ def test_get_context_exception(self): client = dialogflow_v2beta1.ContextsClient() # Setup request - name = client.context_path("[PROJECT]", "[SESSION]", "[CONTEXT]") + name = "name3373707" with pytest.raises(CustomException): client.get_context(name) @@ -158,7 +158,7 @@ def test_create_context(self): client = dialogflow_v2beta1.ContextsClient() # Setup Request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" context = {} response = client.create_context(parent, context) @@ -180,7 +180,7 @@ def test_create_context_exception(self): client = dialogflow_v2beta1.ContextsClient() # Setup request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" context = {} with pytest.raises(CustomException): @@ -233,7 +233,7 @@ def test_delete_context(self): client = dialogflow_v2beta1.ContextsClient() # Setup Request - name = client.context_path("[PROJECT]", "[SESSION]", "[CONTEXT]") + name = "name3373707" client.delete_context(name) @@ -251,7 +251,7 @@ def test_delete_context_exception(self): client = dialogflow_v2beta1.ContextsClient() # Setup request - name = client.context_path("[PROJECT]", "[SESSION]", "[CONTEXT]") + name = "name3373707" with pytest.raises(CustomException): client.delete_context(name) @@ -264,7 +264,7 @@ def test_delete_all_contexts(self): client = dialogflow_v2beta1.ContextsClient() # Setup Request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" client.delete_all_contexts(parent) @@ -282,7 +282,7 @@ def test_delete_all_contexts_exception(self): client = dialogflow_v2beta1.ContextsClient() # Setup request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" with pytest.raises(CustomException): client.delete_all_contexts(parent) diff --git a/tests/unit/gapic/v2beta1/test_documents_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_documents_client_v2beta1.py index cbad54677..3481b3e73 100644 --- a/tests/unit/gapic/v2beta1/test_documents_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_documents_client_v2beta1.py @@ -113,11 +113,13 @@ def test_get_document(self): display_name = "displayName1615086568" mime_type = "mimeType-196041627" content_uri = "contentUri-388807514" + enable_auto_reload = False expected_response = { "name": name_2, "display_name": display_name, "mime_type": mime_type, "content_uri": content_uri, + "enable_auto_reload": enable_auto_reload, } expected_response = document_pb2.Document(**expected_response) @@ -159,11 +161,13 @@ def test_create_document(self): display_name = "displayName1615086568" mime_type = "mimeType-196041627" content_uri = "contentUri-388807514" + enable_auto_reload = False expected_response = { "name": name, "display_name": display_name, "mime_type": mime_type, "content_uri": content_uri, + "enable_auto_reload": enable_auto_reload, } expected_response = document_pb2.Document(**expected_response) operation = operations_pb2.Operation( @@ -272,11 +276,13 @@ def test_update_document(self): display_name = "displayName1615086568" mime_type = "mimeType-196041627" content_uri = "contentUri-388807514" + enable_auto_reload = False expected_response = { "name": name, "display_name": display_name, "mime_type": mime_type, "content_uri": content_uri, + "enable_auto_reload": enable_auto_reload, } expected_response = document_pb2.Document(**expected_response) operation = operations_pb2.Operation( @@ -327,33 +333,61 @@ def test_update_document_exception(self): def test_reload_document(self): # Setup Expected Response - name = "name3373707" - done = True - expected_response = {"name": name, "done": done} - expected_response = operations_pb2.Operation(**expected_response) + name_2 = "name2-1052831874" + display_name = "displayName1615086568" + mime_type = "mimeType-196041627" + content_uri = "contentUri-388807514" + enable_auto_reload = False + expected_response = { + "name": name_2, + "display_name": display_name, + "mime_type": mime_type, + "content_uri": content_uri, + "enable_auto_reload": enable_auto_reload, + } + expected_response = document_pb2.Document(**expected_response) + operation = operations_pb2.Operation( + name="operations/test_reload_document", done=True + ) + operation.response.Pack(expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) + channel = ChannelStub(responses=[operation]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = dialogflow_v2beta1.DocumentsClient() - response = client.reload_document() - assert expected_response == response + # Setup Request + name = client.document_path("[PROJECT]", "[KNOWLEDGE_BASE]", "[DOCUMENT]") + + response = client.reload_document(name) + result = response.result() + assert expected_response == result assert len(channel.requests) == 1 - expected_request = document_pb2.ReloadDocumentRequest() + expected_request = document_pb2.ReloadDocumentRequest(name=name) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_reload_document_exception(self): + # Setup Response + error = status_pb2.Status() + operation = operations_pb2.Operation( + name="operations/test_reload_document_exception", done=True + ) + operation.error.CopyFrom(error) + # Mock the API response - channel = ChannelStub(responses=[CustomException()]) + channel = ChannelStub(responses=[operation]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = dialogflow_v2beta1.DocumentsClient() - with pytest.raises(CustomException): - client.reload_document() + # Setup Request + name = client.document_path("[PROJECT]", "[KNOWLEDGE_BASE]", "[DOCUMENT]") + + response = client.reload_document(name) + exception = response.exception() + assert exception.errors[0] == error diff --git a/tests/unit/gapic/v2beta1/test_entity_types_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_entity_types_client_v2beta1.py index f7e09c7c6..e2b8f3c49 100644 --- a/tests/unit/gapic/v2beta1/test_entity_types_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_entity_types_client_v2beta1.py @@ -83,7 +83,7 @@ def test_list_entity_types(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" paged_list_response = client.list_entity_types(parent) resources = list(paged_list_response) @@ -104,7 +104,7 @@ def test_list_entity_types_exception(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" paged_list_response = client.list_entity_types(parent) with pytest.raises(CustomException): @@ -130,7 +130,7 @@ def test_get_entity_type(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - name = client.entity_type_path("[PROJECT]", "[ENTITY_TYPE]") + name = "name3373707" response = client.get_entity_type(name) assert expected_response == response @@ -149,7 +149,7 @@ def test_get_entity_type_exception(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup request - name = client.entity_type_path("[PROJECT]", "[ENTITY_TYPE]") + name = "name3373707" with pytest.raises(CustomException): client.get_entity_type(name) @@ -174,7 +174,7 @@ def test_create_entity_type(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" entity_type = {} response = client.create_entity_type(parent, entity_type) @@ -196,7 +196,7 @@ def test_create_entity_type_exception(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" entity_type = {} with pytest.raises(CustomException): @@ -256,7 +256,7 @@ def test_delete_entity_type(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - name = client.entity_type_path("[PROJECT]", "[ENTITY_TYPE]") + name = "name3373707" client.delete_entity_type(name) @@ -274,7 +274,7 @@ def test_delete_entity_type_exception(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup request - name = client.entity_type_path("[PROJECT]", "[ENTITY_TYPE]") + name = "name3373707" with pytest.raises(CustomException): client.delete_entity_type(name) @@ -298,7 +298,7 @@ def test_batch_update_entity_types(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" response = client.batch_update_entity_types(parent) result = response.result() @@ -325,7 +325,7 @@ def test_batch_update_entity_types_exception(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" response = client.batch_update_entity_types(parent) exception = response.exception() @@ -348,7 +348,7 @@ def test_batch_delete_entity_types(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" entity_type_names = [] response = client.batch_delete_entity_types(parent, entity_type_names) @@ -378,7 +378,7 @@ def test_batch_delete_entity_types_exception(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" entity_type_names = [] response = client.batch_delete_entity_types(parent, entity_type_names) @@ -402,7 +402,7 @@ def test_batch_create_entities(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - parent = client.entity_type_path("[PROJECT]", "[ENTITY_TYPE]") + parent = "parent-995424086" entities = [] response = client.batch_create_entities(parent, entities) @@ -432,7 +432,7 @@ def test_batch_create_entities_exception(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - parent = client.entity_type_path("[PROJECT]", "[ENTITY_TYPE]") + parent = "parent-995424086" entities = [] response = client.batch_create_entities(parent, entities) @@ -456,7 +456,7 @@ def test_batch_update_entities(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - parent = client.entity_type_path("[PROJECT]", "[ENTITY_TYPE]") + parent = "parent-995424086" entities = [] response = client.batch_update_entities(parent, entities) @@ -486,7 +486,7 @@ def test_batch_update_entities_exception(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - parent = client.entity_type_path("[PROJECT]", "[ENTITY_TYPE]") + parent = "parent-995424086" entities = [] response = client.batch_update_entities(parent, entities) @@ -510,7 +510,7 @@ def test_batch_delete_entities(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - parent = client.entity_type_path("[PROJECT]", "[ENTITY_TYPE]") + parent = "parent-995424086" entity_values = [] response = client.batch_delete_entities(parent, entity_values) @@ -540,7 +540,7 @@ def test_batch_delete_entities_exception(self): client = dialogflow_v2beta1.EntityTypesClient() # Setup Request - parent = client.entity_type_path("[PROJECT]", "[ENTITY_TYPE]") + parent = "parent-995424086" entity_values = [] response = client.batch_delete_entities(parent, entity_values) diff --git a/tests/unit/gapic/v2beta1/test_environments_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_environments_client_v2beta1.py new file mode 100644 index 000000000..a464b7071 --- /dev/null +++ b/tests/unit/gapic/v2beta1/test_environments_client_v2beta1.py @@ -0,0 +1,109 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Unit tests.""" + +import mock +import pytest + +import dialogflow_v2beta1 +from dialogflow_v2beta1.proto import environment_pb2 + + +class MultiCallableStub(object): + """Stub for the grpc.UnaryUnaryMultiCallable interface.""" + + def __init__(self, method, channel_stub): + self.method = method + self.channel_stub = channel_stub + + def __call__(self, request, timeout=None, metadata=None, credentials=None): + self.channel_stub.requests.append((self.method, request)) + + response = None + if self.channel_stub.responses: + response = self.channel_stub.responses.pop() + + if isinstance(response, Exception): + raise response + + if response: + return response + + +class ChannelStub(object): + """Stub for the grpc.Channel interface.""" + + def __init__(self, responses=[]): + self.responses = responses + self.requests = [] + + def unary_unary(self, method, request_serializer=None, response_deserializer=None): + return MultiCallableStub(method, self) + + +class CustomException(Exception): + pass + + +class TestEnvironmentsClient(object): + def test_list_environments(self): + # Setup Expected Response + next_page_token = "" + environments_element = {} + environments = [environments_element] + expected_response = { + "next_page_token": next_page_token, + "environments": environments, + } + expected_response = environment_pb2.ListEnvironmentsResponse( + **expected_response + ) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = dialogflow_v2beta1.EnvironmentsClient() + + # Setup Request + parent = "parent-995424086" + + paged_list_response = client.list_environments(parent) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.environments[0] == resources[0] + + assert len(channel.requests) == 1 + expected_request = environment_pb2.ListEnvironmentsRequest(parent=parent) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_list_environments_exception(self): + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = dialogflow_v2beta1.EnvironmentsClient() + + # Setup request + parent = "parent-995424086" + + paged_list_response = client.list_environments(parent) + with pytest.raises(CustomException): + list(paged_list_response) diff --git a/tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py index ccfdb38d5..772573fbf 100644 --- a/tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py @@ -80,7 +80,7 @@ def test_list_intents(self): client = dialogflow_v2beta1.IntentsClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" paged_list_response = client.list_intents(parent) resources = list(paged_list_response) @@ -101,7 +101,7 @@ def test_list_intents_exception(self): client = dialogflow_v2beta1.IntentsClient() # Setup request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" paged_list_response = client.list_intents(parent) with pytest.raises(CustomException): @@ -143,7 +143,7 @@ def test_get_intent(self): client = dialogflow_v2beta1.IntentsClient() # Setup Request - name = client.intent_path("[PROJECT]", "[INTENT]") + name = "name3373707" response = client.get_intent(name) assert expected_response == response @@ -162,7 +162,7 @@ def test_get_intent_exception(self): client = dialogflow_v2beta1.IntentsClient() # Setup request - name = client.intent_path("[PROJECT]", "[INTENT]") + name = "name3373707" with pytest.raises(CustomException): client.get_intent(name) @@ -203,7 +203,7 @@ def test_create_intent(self): client = dialogflow_v2beta1.IntentsClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" intent = {} response = client.create_intent(parent, intent) @@ -223,7 +223,7 @@ def test_create_intent_exception(self): client = dialogflow_v2beta1.IntentsClient() # Setup request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" intent = {} with pytest.raises(CustomException): @@ -297,7 +297,7 @@ def test_delete_intent(self): client = dialogflow_v2beta1.IntentsClient() # Setup Request - name = client.intent_path("[PROJECT]", "[INTENT]") + name = "name3373707" client.delete_intent(name) @@ -315,7 +315,7 @@ def test_delete_intent_exception(self): client = dialogflow_v2beta1.IntentsClient() # Setup request - name = client.intent_path("[PROJECT]", "[INTENT]") + name = "name3373707" with pytest.raises(CustomException): client.delete_intent(name) @@ -337,7 +337,7 @@ def test_batch_update_intents(self): client = dialogflow_v2beta1.IntentsClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" response = client.batch_update_intents(parent) result = response.result() @@ -364,7 +364,7 @@ def test_batch_update_intents_exception(self): client = dialogflow_v2beta1.IntentsClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" response = client.batch_update_intents(parent) exception = response.exception() @@ -387,7 +387,7 @@ def test_batch_delete_intents(self): client = dialogflow_v2beta1.IntentsClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" intents = [] response = client.batch_delete_intents(parent, intents) @@ -417,7 +417,7 @@ def test_batch_delete_intents_exception(self): client = dialogflow_v2beta1.IntentsClient() # Setup Request - parent = client.project_agent_path("[PROJECT]") + parent = "parent-995424086" intents = [] response = client.batch_delete_intents(parent, intents) diff --git a/tests/unit/gapic/v2beta1/test_session_entity_types_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_session_entity_types_client_v2beta1.py index 2e31bb51f..a68ae3035 100644 --- a/tests/unit/gapic/v2beta1/test_session_entity_types_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_session_entity_types_client_v2beta1.py @@ -82,7 +82,7 @@ def test_list_session_entity_types(self): client = dialogflow_v2beta1.SessionEntityTypesClient() # Setup Request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" paged_list_response = client.list_session_entity_types(parent) resources = list(paged_list_response) @@ -105,7 +105,7 @@ def test_list_session_entity_types_exception(self): client = dialogflow_v2beta1.SessionEntityTypesClient() # Setup request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" paged_list_response = client.list_session_entity_types(parent) with pytest.raises(CustomException): @@ -127,9 +127,7 @@ def test_get_session_entity_type(self): client = dialogflow_v2beta1.SessionEntityTypesClient() # Setup Request - name = client.session_entity_type_path( - "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]" - ) + name = "name3373707" response = client.get_session_entity_type(name) assert expected_response == response @@ -150,9 +148,7 @@ def test_get_session_entity_type_exception(self): client = dialogflow_v2beta1.SessionEntityTypesClient() # Setup request - name = client.session_entity_type_path( - "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]" - ) + name = "name3373707" with pytest.raises(CustomException): client.get_session_entity_type(name) @@ -173,7 +169,7 @@ def test_create_session_entity_type(self): client = dialogflow_v2beta1.SessionEntityTypesClient() # Setup Request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" session_entity_type = {} response = client.create_session_entity_type(parent, session_entity_type) @@ -195,7 +191,7 @@ def test_create_session_entity_type_exception(self): client = dialogflow_v2beta1.SessionEntityTypesClient() # Setup request - parent = client.session_path("[PROJECT]", "[SESSION]") + parent = "parent-995424086" session_entity_type = {} with pytest.raises(CustomException): @@ -251,9 +247,7 @@ def test_delete_session_entity_type(self): client = dialogflow_v2beta1.SessionEntityTypesClient() # Setup Request - name = client.session_entity_type_path( - "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]" - ) + name = "name3373707" client.delete_session_entity_type(name) @@ -273,9 +267,7 @@ def test_delete_session_entity_type_exception(self): client = dialogflow_v2beta1.SessionEntityTypesClient() # Setup request - name = client.session_entity_type_path( - "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]" - ) + name = "name3373707" with pytest.raises(CustomException): client.delete_session_entity_type(name) diff --git a/tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py index 23c6da89a..0492a25ab 100644 --- a/tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py @@ -80,7 +80,7 @@ def test_detect_intent(self): client = dialogflow_v2beta1.SessionsClient() # Setup Request - session = client.session_path("[PROJECT]", "[SESSION]") + session = "session1984987798" query_input = {} response = client.detect_intent(session, query_input) @@ -102,7 +102,7 @@ def test_detect_intent_exception(self): client = dialogflow_v2beta1.SessionsClient() # Setup request - session = client.session_path("[PROJECT]", "[SESSION]") + session = "session1984987798" query_input = {} with pytest.raises(CustomException):