From 6222277a5332011e9cc2e80bb5b26692a12fad36 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Wed, 16 Oct 2019 07:41:18 -0700 Subject: [PATCH] feat: regenerate (#151) * build: fix synth * fix: more _pb2 modifications * docs: fix docstring in intent_pb2 * chore: blacken new additions * fix: resynth to get lost changes * chore: blacken tests directory --- MANIFEST.in | 1 - dialogflow_v2/__init__.py | 1 + dialogflow_v2/gapic/agents_client.py | 243 +- dialogflow_v2/gapic/agents_client_config.py | 10 + dialogflow_v2/gapic/contexts_client.py | 53 +- dialogflow_v2/gapic/entity_types_client.py | 85 +- dialogflow_v2/gapic/enums.py | 85 +- dialogflow_v2/gapic/intents_client.py | 67 +- .../gapic/session_entity_types_client.py | 73 +- dialogflow_v2/gapic/sessions_client.py | 27 +- dialogflow_v2/gapic/sessions_client_config.py | 4 +- .../gapic/transports/agents_grpc_transport.py | 44 +- .../transports/contexts_grpc_transport.py | 18 +- .../transports/entity_types_grpc_transport.py | 18 +- .../transports/intents_grpc_transport.py | 18 +- .../session_entity_types_grpc_transport.py | 38 +- .../transports/sessions_grpc_transport.py | 18 +- dialogflow_v2/proto/agent.proto | 335 -- dialogflow_v2/proto/agent_pb2.py | 494 ++- dialogflow_v2/proto/agent_pb2_grpc.py | 47 +- dialogflow_v2/proto/audio_config.proto | 126 - dialogflow_v2/proto/audio_config_pb2.py | 334 +- dialogflow_v2/proto/context.proto | 185 -- dialogflow_v2/proto/context_pb2.py | 101 +- dialogflow_v2/proto/context_pb2_grpc.py | 4 +- dialogflow_v2/proto/entity_type.proto | 436 --- dialogflow_v2/proto/entity_type_pb2.py | 313 +- dialogflow_v2/proto/entity_type_pb2_grpc.py | 4 +- dialogflow_v2/proto/intent.proto | 848 ----- dialogflow_v2/proto/intent_pb2.py | 513 +-- dialogflow_v2/proto/intent_pb2_grpc.py | 4 +- dialogflow_v2/proto/session.proto | 555 ---- dialogflow_v2/proto/session_entity_type.proto | 195 -- .../proto/session_entity_type_pb2.py | 100 +- .../proto/session_entity_type_pb2_grpc.py | 32 +- dialogflow_v2/proto/session_pb2.py | 499 +-- dialogflow_v2/proto/webhook.proto | 128 - dialogflow_v2/proto/webhook_pb2.py | 53 +- dialogflow_v2/types.py | 5 +- dialogflow_v2beta1/__init__.py | 1 + dialogflow_v2beta1/gapic/agents_client.py | 319 +- .../gapic/agents_client_config.py | 15 + dialogflow_v2beta1/gapic/contexts_client.py | 54 +- dialogflow_v2beta1/gapic/documents_client.py | 119 +- .../gapic/entity_types_client.py | 87 +- dialogflow_v2beta1/gapic/enums.py | 244 ++ dialogflow_v2beta1/gapic/intents_client.py | 69 +- .../gapic/knowledge_bases_client.py | 71 +- .../gapic/session_entity_types_client.py | 75 +- dialogflow_v2beta1/gapic/sessions_client.py | 33 +- .../gapic/sessions_client_config.py | 4 +- .../gapic/transports/agents_grpc_transport.py | 58 +- .../transports/contexts_grpc_transport.py | 18 +- .../transports/documents_grpc_transport.py | 46 +- .../transports/entity_types_grpc_transport.py | 18 +- .../transports/intents_grpc_transport.py | 18 +- .../knowledge_bases_grpc_transport.py | 33 +- .../session_entity_types_grpc_transport.py | 38 +- .../transports/sessions_grpc_transport.py | 18 +- dialogflow_v2beta1/proto/agent.proto | 339 -- dialogflow_v2beta1/proto/agent_pb2.py | 517 ++- dialogflow_v2beta1/proto/agent_pb2_grpc.py | 68 +- dialogflow_v2beta1/proto/audio_config.proto | 216 -- dialogflow_v2beta1/proto/audio_config_pb2.py | 431 ++- dialogflow_v2beta1/proto/context.proto | 229 -- dialogflow_v2beta1/proto/context_pb2.py | 63 +- dialogflow_v2beta1/proto/context_pb2_grpc.py | 4 +- dialogflow_v2beta1/proto/document.proto | 270 -- dialogflow_v2beta1/proto/document_pb2.py | 116 +- dialogflow_v2beta1/proto/document_pb2_grpc.py | 20 + dialogflow_v2beta1/proto/entity_type.proto | 436 --- dialogflow_v2beta1/proto/entity_type_pb2.py | 179 +- .../proto/entity_type_pb2_grpc.py | 4 +- dialogflow_v2beta1/proto/gcs_pb2.py | 98 + dialogflow_v2beta1/proto/gcs_pb2_grpc.py | 2 + dialogflow_v2beta1/proto/intent.proto | 924 ------ dialogflow_v2beta1/proto/intent_pb2.py | 2819 ++++++++++++++++- dialogflow_v2beta1/proto/intent_pb2_grpc.py | 4 +- dialogflow_v2beta1/proto/knowledge_base.proto | 168 - .../proto/knowledge_base_pb2.py | 47 +- .../proto/knowledge_base_pb2_grpc.py | 15 + dialogflow_v2beta1/proto/session.proto | 586 ---- .../proto/session_entity_type.proto | 233 -- .../proto/session_entity_type_pb2.py | 57 +- .../proto/session_entity_type_pb2_grpc.py | 32 +- dialogflow_v2beta1/proto/session_pb2.py | 327 +- .../proto/validation_result_pb2.py | 240 ++ .../proto/validation_result_pb2_grpc.py | 2 + dialogflow_v2beta1/proto/webhook.proto | 137 - dialogflow_v2beta1/proto/webhook_pb2.py | 43 +- dialogflow_v2beta1/types.py | 11 +- noxfile.py | 1 + setup.cfg | 1 - synth.metadata | 13 +- synth.py | 9 +- tests/unit/gapic/v2/test_agents_client_v2.py | 86 + .../unit/gapic/v2/test_contexts_client_v2.py | 1 + .../gapic/v2/test_entity_types_client_v2.py | 22 +- tests/unit/gapic/v2/test_intents_client_v2.py | 1 + .../v2/test_session_entity_types_client_v2.py | 1 + .../unit/gapic/v2/test_sessions_client_v2.py | 1 + .../v2beta1/test_agents_client_v2beta1.py | 118 + .../v2beta1/test_contexts_client_v2beta1.py | 1 + .../v2beta1/test_documents_client_v2beta1.py | 47 +- .../test_entity_types_client_v2beta1.py | 22 +- .../v2beta1/test_intents_client_v2beta1.py | 1 + .../test_knowledge_bases_client_v2beta1.py | 15 +- ...est_session_entity_types_client_v2beta1.py | 1 + .../v2beta1/test_sessions_client_v2beta1.py | 1 + 109 files changed, 8224 insertions(+), 8207 deletions(-) delete mode 100644 dialogflow_v2/proto/agent.proto delete mode 100644 dialogflow_v2/proto/audio_config.proto delete mode 100644 dialogflow_v2/proto/context.proto delete mode 100644 dialogflow_v2/proto/entity_type.proto delete mode 100644 dialogflow_v2/proto/intent.proto delete mode 100644 dialogflow_v2/proto/session.proto delete mode 100644 dialogflow_v2/proto/session_entity_type.proto delete mode 100644 dialogflow_v2/proto/webhook.proto delete mode 100644 dialogflow_v2beta1/proto/agent.proto delete mode 100644 dialogflow_v2beta1/proto/audio_config.proto delete mode 100644 dialogflow_v2beta1/proto/context.proto delete mode 100644 dialogflow_v2beta1/proto/document.proto delete mode 100644 dialogflow_v2beta1/proto/entity_type.proto create mode 100644 dialogflow_v2beta1/proto/gcs_pb2.py create mode 100644 dialogflow_v2beta1/proto/gcs_pb2_grpc.py delete mode 100644 dialogflow_v2beta1/proto/intent.proto delete mode 100644 dialogflow_v2beta1/proto/knowledge_base.proto delete mode 100644 dialogflow_v2beta1/proto/session.proto delete mode 100644 dialogflow_v2beta1/proto/session_entity_type.proto create mode 100644 dialogflow_v2beta1/proto/validation_result_pb2.py create mode 100644 dialogflow_v2beta1/proto/validation_result_pb2_grpc.py delete mode 100644 dialogflow_v2beta1/proto/webhook.proto diff --git a/MANIFEST.in b/MANIFEST.in index cd011be27..9cbf175af 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,3 @@ -# Generated by synthtool. DO NOT EDIT! include README.rst LICENSE recursive-include google *.json *.proto recursive-include tests * diff --git a/dialogflow_v2/__init__.py b/dialogflow_v2/__init__.py index 85cb198a8..38f7de3ca 100644 --- a/dialogflow_v2/__init__.py +++ b/dialogflow_v2/__init__.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import from dialogflow_v2 import types diff --git a/dialogflow_v2/gapic/agents_client.py b/dialogflow_v2/gapic/agents_client.py index 9e173b5f1..5f4a350a5 100644 --- a/dialogflow_v2/gapic/agents_client.py +++ b/dialogflow_v2/gapic/agents_client.py @@ -13,6 +13,7 @@ # 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 Agents API.""" import functools @@ -20,6 +21,7 @@ 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 @@ -39,8 +41,10 @@ from dialogflow_v2.proto import agent_pb2_grpc 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 @@ -57,19 +61,19 @@ class AgentsClient(object): You can create an agent using both Dialogflow Standard Edition and Dialogflow Enterprise Edition. For details, see `Dialogflow - Editions `__. + 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, + 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 `__. + documentation `__. """ SERVICE_ADDRESS = "dialogflow.googleapis.com:443" @@ -113,6 +117,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -143,6 +148,9 @@ def __init__( 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: @@ -161,6 +169,15 @@ def __init__( 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. @@ -169,6 +186,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=agents_grpc_transport.AgentsGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -179,7 +197,7 @@ def __init__( self.transport = transport else: self.transport = agents_grpc_transport.AgentsGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -205,6 +223,151 @@ def __init__( self._inner_api_calls = {} # Service calls + def set_agent( + self, + agent, + update_mask=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Creates/updates the specified agent. + + Example: + >>> import dialogflow_v2 + >>> + >>> client = dialogflow_v2.AgentsClient() + >>> + >>> # TODO: Initialize `agent`: + >>> agent = {} + >>> + >>> response = client.set_agent(agent) + + 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` + 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.cloud.dialogflow_v2.types.Agent` instance. + + 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 "set_agent" not in self._inner_api_calls: + self._inner_api_calls[ + "set_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, + client_info=self._client_info, + ) + + request = agent_pb2.SetAgentRequest(agent=agent, update_mask=update_mask) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("agent.parent", agent.parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + return self._inner_api_calls["set_agent"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def delete_agent( + self, + parent, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes the specified agent. + + Example: + >>> import dialogflow_v2 + >>> + >>> client = dialogflow_v2.AgentsClient() + >>> + >>> parent = client.project_path('[PROJECT]') + >>> + >>> client.delete_agent(parent) + + Args: + 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 + 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. + + 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 "delete_agent" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_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, + client_info=self._client_info, + ) + + request = agent_pb2.DeleteAgentRequest(parent=parent) + 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) + + self._inner_api_calls["delete_agent"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + def get_agent( self, parent, @@ -228,8 +391,8 @@ def get_agent( 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 not - be retried. + 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. @@ -322,8 +485,8 @@ def search_agents( 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 not - be retried. + 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. @@ -331,10 +494,10 @@ def search_agents( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.dialogflow_v2.types.Agent` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2.types.Agent` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -417,8 +580,8 @@ def train_agent( parent (str): Required. The project that the agent to train 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 not - be retried. + 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. @@ -504,14 +667,14 @@ def export_agent( Args: parent (str): Required. The project that the agent to export is associated with. Format: ``projects/``. - agent_uri (str): Optional. The `Google Cloud + agent_uri (str): Required. The `Google Cloud Storage `__ URI to export the agent to. The format of this URI must be ``gs:///``. If left unspecified, the serialized agent is returned inline. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -604,26 +767,10 @@ def import_agent( Format: ``projects/``. agent_uri (str): The URI to a Google Cloud Storage file containing the agent to import. Note: The URI must start with "gs://". - agent_content (bytes): The agent to import. - - Example for how to import an agent via the command line: - - .. raw:: html - -
curl \
-                      'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:import\
-                       -X POST \
-                       -H 'Authorization: Bearer '$(gcloud auth application-default
-                       print-access-token) \
-                       -H 'Accept: application/json' \
-                       -H 'Content-Type: application/json' \
-                       --compressed \
-                       --data-binary "{
-                          'agentContent': '$(cat <agent zip file> | base64 -w 0)'
-                       }"
+ agent_content (bytes): Zip compressed raw byte content for agent. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -723,26 +870,10 @@ def restore_agent( Format: ``projects/``. agent_uri (str): The URI to a Google Cloud Storage file containing the agent to restore. Note: The URI must start with "gs://". - agent_content (bytes): The agent to restore. - - Example for how to restore an agent via the command line: - - .. raw:: html - -
curl \
-                      'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:restore\
-                       -X POST \
-                       -H 'Authorization: Bearer '$(gcloud auth application-default
-                       print-access-token) \
-                       -H 'Accept: application/json' \
-                       -H 'Content-Type: application/json' \
-                       --compressed \
-                       --data-binary "{
-                           'agentContent': '$(cat <agent zip file> | base64 -w 0)'
-                       }"
+ agent_content (bytes): Zip compressed raw byte content for agent. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. diff --git a/dialogflow_v2/gapic/agents_client_config.py b/dialogflow_v2/gapic/agents_client_config.py index 71a4f8798..0d252dfba 100644 --- a/dialogflow_v2/gapic/agents_client_config.py +++ b/dialogflow_v2/gapic/agents_client_config.py @@ -17,6 +17,16 @@ } }, "methods": { + "SetAgent": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "DeleteAgent": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, "GetAgent": { "timeout_millis": 60000, "retry_codes_name": "idempotent", diff --git a/dialogflow_v2/gapic/contexts_client.py b/dialogflow_v2/gapic/contexts_client.py index 8c52791fa..ed495c13c 100644 --- a/dialogflow_v2/gapic/contexts_client.py +++ b/dialogflow_v2/gapic/contexts_client.py @@ -13,6 +13,7 @@ # 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 Contexts API.""" import functools @@ -20,6 +21,7 @@ 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 @@ -41,6 +43,7 @@ from google.protobuf import field_mask_pb2 from google.protobuf import struct_pb2 + _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version @@ -61,7 +64,7 @@ class ContextsClient(object): matched for a ``DetectIntent`` request. For more information about contexts, see the `Dialogflow - documentation `__. + documentation `__. """ SERVICE_ADDRESS = "dialogflow.googleapis.com:443" @@ -117,6 +120,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -147,6 +151,9 @@ def __init__( 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: @@ -165,6 +172,15 @@ def __init__( 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. @@ -173,6 +189,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=contexts_grpc_transport.ContextsGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -183,7 +200,7 @@ def __init__( self.transport = transport else: self.transport = contexts_grpc_transport.ContextsGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -250,8 +267,8 @@ def list_contexts( 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 not - be retried. + 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. @@ -259,10 +276,10 @@ def list_contexts( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.dialogflow_v2.types.Context` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2.types.Context` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -334,8 +351,8 @@ def get_context( name (str): Required. The name of the context. Format: ``projects//agent/sessions//contexts/``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -414,8 +431,8 @@ def create_context( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.Context` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -492,8 +509,8 @@ def update_context( 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 not - be retried. + 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. @@ -564,8 +581,8 @@ def delete_context( name (str): Required. The name of the context to delete. Format: ``projects//agent/sessions//contexts/``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -631,8 +648,8 @@ def delete_all_contexts( parent (str): Required. The name of the session to delete all contexts from. Format: ``projects//agent/sessions/``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. diff --git a/dialogflow_v2/gapic/entity_types_client.py b/dialogflow_v2/gapic/entity_types_client.py index b6e3981ee..4a1169f28 100644 --- a/dialogflow_v2/gapic/entity_types_client.py +++ b/dialogflow_v2/gapic/entity_types_client.py @@ -13,6 +13,7 @@ # 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 EntityTypes API.""" import functools @@ -20,6 +21,7 @@ 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 @@ -46,6 +48,7 @@ from google.protobuf import field_mask_pb2 from google.protobuf import struct_pb2 + _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version @@ -77,7 +80,7 @@ class EntityTypesClient(object): represented by the ``SessionEntityType`` type. For more information about entity types, see the `Dialogflow - documentation `__. + documentation `__. """ SERVICE_ADDRESS = "dialogflow.googleapis.com:443" @@ -130,6 +133,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -160,6 +164,9 @@ def __init__( 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: @@ -178,6 +185,15 @@ def __init__( 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. @@ -186,6 +202,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=entity_types_grpc_transport.EntityTypesGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -196,7 +213,7 @@ def __init__( self.transport = transport else: self.transport = entity_types_grpc_transport.EntityTypesGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -260,7 +277,7 @@ def list_entity_types( ``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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. page_size (int): The maximum number of resources contained in the @@ -269,8 +286,8 @@ def list_entity_types( 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 not - be retried. + 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. @@ -278,10 +295,10 @@ def list_entity_types( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.dialogflow_v2.types.EntityType` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2.types.EntityType` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -357,12 +374,12 @@ def get_entity_type( ``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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -443,12 +460,12 @@ def create_entity_type( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -525,7 +542,7 @@ def update_entity_type( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated. @@ -533,8 +550,8 @@ 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.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -607,8 +624,8 @@ def delete_entity_type( name (str): Required. The name of the entity type to delete. Format: ``projects//agent/entityTypes/``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -698,7 +715,7 @@ def batch_update_entity_types( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated. @@ -706,8 +723,8 @@ 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.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -812,8 +829,8 @@ def batch_delete_entity_types( 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 not - be retried. + 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. @@ -911,12 +928,12 @@ def batch_create_entities( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -1017,7 +1034,7 @@ def batch_update_entities( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated. @@ -1025,8 +1042,8 @@ def batch_update_entities( 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 not - be retried. + 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. @@ -1126,12 +1143,12 @@ def batch_delete_entities( ``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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. diff --git a/dialogflow_v2/gapic/enums.py b/dialogflow_v2/gapic/enums.py index 23abdb148..0afbcb4f2 100644 --- a/dialogflow_v2/gapic/enums.py +++ b/dialogflow_v2/gapic/enums.py @@ -13,6 +13,7 @@ # 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. + """Wrappers for protocol buffer enum types.""" import enum @@ -115,6 +116,51 @@ class OutputAudioEncoding(enum.IntEnum): OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3 +class SpeechModelVariant(enum.IntEnum): + """ + Variant of the specified ``Speech model`` to use. + + See the `Cloud Speech + documentation `__ + 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. + + 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 + documentation `__ + for details about enhanced models. + USE_ENHANCED (int): Use an enhanced model variant: + + - If an enhanced variant does not exist for the given ``model`` and + request language, Dialogflow falls back to the standard variant. + + The `Cloud Speech + documentation `__ + 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 `__ for + how to make your project eligible. + """ + + SPEECH_MODEL_VARIANT_UNSPECIFIED = 0 + USE_BEST_AVAILABLE = 1 + USE_STANDARD = 2 + USE_ENHANCED = 3 + + class SsmlVoiceGender(enum.IntEnum): """ Gender of the voice as described in `SSML voice @@ -135,6 +181,22 @@ class SsmlVoiceGender(enum.IntEnum): class Agent(object): + class ApiVersion(enum.IntEnum): + """ + API version for the agent. + + Attributes: + API_VERSION_UNSPECIFIED (int): Not specified. + API_VERSION_V1 (int): Legacy V1 API. + API_VERSION_V2 (int): V2 API. + API_VERSION_V2_BETA_1 (int): V2beta1 API. + """ + + API_VERSION_UNSPECIFIED = 0 + API_VERSION_V1 = 1 + API_VERSION_V2 = 2 + API_VERSION_V2_BETA_1 = 3 + class MatchMode(enum.IntEnum): """ Match mode determines how intents are detected from user queries. @@ -151,6 +213,22 @@ class MatchMode(enum.IntEnum): MATCH_MODE_HYBRID = 1 MATCH_MODE_ML_ONLY = 2 + class Tier(enum.IntEnum): + """ + Represents the agent tier. + + Attributes: + TIER_UNSPECIFIED (int): Not specified. This value should never be used. + TIER_STANDARD (int): Standard tier. + TIER_ENTERPRISE (int): Enterprise tier (Essentials). + TIER_ENTERPRISE_PLUS (int): Enterprise tier (Plus). + """ + + TIER_UNSPECIFIED = 0 + TIER_STANDARD = 1 + TIER_ENTERPRISE = 2 + TIER_ENTERPRISE_PLUS = 3 + class EntityType(object): class AutoExpansionMode(enum.IntEnum): @@ -179,11 +257,14 @@ class Kind(enum.IntEnum): KIND_LIST (int): List entity types contain a set of entries that do not map to canonical values. However, list entity types can contain references to other entity types (with or without aliases). + KIND_REGEXP (int): Regexp entity types allow to specify regular expressions in entries + values. """ KIND_UNSPECIFIED = 0 KIND_MAP = 1 KIND_LIST = 2 + KIND_REGEXP = 3 class Intent(object): @@ -298,6 +379,7 @@ class Platform(enum.IntEnum): "intent": "actions.intent.OPTION" } } + GOOGLE_HANGOUTS (int): Google Hangouts. """ PLATFORM_UNSPECIFIED = 0 @@ -309,6 +391,7 @@ class Platform(enum.IntEnum): LINE = 6 VIBER = 7 ACTIONS_ON_GOOGLE = 8 + GOOGLE_HANGOUTS = 11 class SessionEntityType(object): @@ -345,7 +428,7 @@ class MessageType(enum.IntEnum): MESSAGE_TYPE_UNSPECIFIED (int): Not specified. Should never be used. TRANSCRIPT (int): Message contains a (possibly partial) transcript. END_OF_SINGLE_UTTERANCE (int): Event indicates that the server has detected the end of the user's - speech utterance and expects no additional speech. Therefore, the server + 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 diff --git a/dialogflow_v2/gapic/intents_client.py b/dialogflow_v2/gapic/intents_client.py index a2cf0d830..bf9c668b8 100644 --- a/dialogflow_v2/gapic/intents_client.py +++ b/dialogflow_v2/gapic/intents_client.py @@ -13,6 +13,7 @@ # 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 Intents API.""" import functools @@ -20,6 +21,7 @@ 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 @@ -48,6 +50,7 @@ from google.protobuf import field_mask_pb2 from google.protobuf import struct_pb2 + _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version @@ -82,7 +85,7 @@ class IntentsClient(object): Dialogflow API agent to better match intents. For more information about intents, see the `Dialogflow - documentation `__. + documentation `__. """ SERVICE_ADDRESS = "dialogflow.googleapis.com:443" @@ -140,6 +143,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -170,6 +174,9 @@ def __init__( 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: @@ -188,6 +195,15 @@ def __init__( 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. @@ -196,6 +212,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=intents_grpc_transport.IntentsGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -206,7 +223,7 @@ def __init__( self.transport = transport else: self.transport = intents_grpc_transport.IntentsGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -272,7 +289,7 @@ def list_intents( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. intent_view (~google.cloud.dialogflow_v2.types.IntentView): Optional. The resource view to apply to the returned intent. @@ -282,8 +299,8 @@ def list_intents( 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 not - be retried. + 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. @@ -291,10 +308,10 @@ def list_intents( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.dialogflow_v2.types.Intent` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2.types.Intent` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -375,13 +392,13 @@ def get_intent( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. 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 not - be retried. + 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. @@ -464,13 +481,13 @@ def create_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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. 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 not - be retried. + 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. @@ -555,7 +572,7 @@ def update_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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated. @@ -564,8 +581,8 @@ def update_intent( message :class:`~google.cloud.dialogflow_v2.types.FieldMask` 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 not - be retried. + 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. @@ -640,8 +657,8 @@ def delete_intent( 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 not - be retried. + 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. @@ -728,7 +745,7 @@ def batch_update_intents( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. intent_batch_uri (str): The URI to a Google Cloud Storage file containing intents to update or @@ -744,8 +761,8 @@ def batch_update_intents( message :class:`~google.cloud.dialogflow_v2.types.FieldMask` 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 not - be retried. + 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. @@ -853,8 +870,8 @@ def batch_delete_intents( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.Intent` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. diff --git a/dialogflow_v2/gapic/session_entity_types_client.py b/dialogflow_v2/gapic/session_entity_types_client.py index 97413efea..2bf8449e0 100644 --- a/dialogflow_v2/gapic/session_entity_types_client.py +++ b/dialogflow_v2/gapic/session_entity_types_client.py @@ -13,6 +13,7 @@ # 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 SessionEntityTypes API.""" import functools @@ -20,6 +21,7 @@ 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 @@ -47,6 +49,7 @@ from google.protobuf import field_mask_pb2 from google.protobuf import struct_pb2 + _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version @@ -62,8 +65,12 @@ class SessionEntityTypesClient(object): 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 `__. + documentation `__. """ SERVICE_ADDRESS = "dialogflow.googleapis.com:443" @@ -119,6 +126,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -149,6 +157,9 @@ def __init__( 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: @@ -167,6 +178,15 @@ def __init__( 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. @@ -175,6 +195,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=session_entity_types_grpc_transport.SessionEntityTypesGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -185,7 +206,7 @@ def __init__( self.transport = transport else: self.transport = session_entity_types_grpc_transport.SessionEntityTypesGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -222,6 +243,10 @@ def list_session_entity_types( """ 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. + Example: >>> import dialogflow_v2 >>> @@ -252,8 +277,8 @@ def list_session_entity_types( 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 not - be retried. + 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. @@ -261,10 +286,10 @@ def list_session_entity_types( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.dialogflow_v2.types.SessionEntityType` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2.types.SessionEntityType` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -325,6 +350,10 @@ def get_session_entity_type( """ 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. + Example: >>> import dialogflow_v2 >>> @@ -338,8 +367,8 @@ def get_session_entity_type( name (str): Required. The name of the session entity type. Format: ``projects//agent/sessions//entityTypes/``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -399,6 +428,10 @@ def create_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. + Example: >>> import dialogflow_v2 >>> @@ -419,8 +452,8 @@ def create_session_entity_type( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.SessionEntityType` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -479,6 +512,10 @@ def update_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. + Example: >>> import dialogflow_v2 >>> @@ -500,8 +537,8 @@ def update_session_entity_type( 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 not - be retried. + 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. @@ -559,6 +596,10 @@ def delete_session_entity_type( """ 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. + Example: >>> import dialogflow_v2 >>> @@ -572,8 +613,8 @@ def delete_session_entity_type( name (str): Required. The name of the entity type to delete. Format: ``projects//agent/sessions//entityTypes/``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. diff --git a/dialogflow_v2/gapic/sessions_client.py b/dialogflow_v2/gapic/sessions_client.py index 7701dec6b..41df4a78c 100644 --- a/dialogflow_v2/gapic/sessions_client.py +++ b/dialogflow_v2/gapic/sessions_client.py @@ -13,12 +13,14 @@ # 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 Sessions API.""" 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 @@ -48,6 +50,7 @@ from google.protobuf import field_mask_pb2 from google.protobuf import struct_pb2 + _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version @@ -101,6 +104,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -131,6 +135,9 @@ def __init__( 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: @@ -149,6 +156,15 @@ def __init__( 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. @@ -157,6 +173,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=sessions_grpc_transport.SessionsGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -167,7 +184,7 @@ def __init__( self.transport = transport else: self.transport = sessions_grpc_transport.SessionsGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -253,8 +270,8 @@ def detect_intent( 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 not - be retried. + 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. @@ -341,8 +358,8 @@ def streaming_detect_intent( requests (iterator[dict|google.cloud.dialogflow_v2.proto.session_pb2.StreamingDetectIntentRequest]): The input objects. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2.types.StreamingDetectIntentRequest` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. diff --git a/dialogflow_v2/gapic/sessions_client_config.py b/dialogflow_v2/gapic/sessions_client_config.py index 32f867920..b7a53bf38 100644 --- a/dialogflow_v2/gapic/sessions_client_config.py +++ b/dialogflow_v2/gapic/sessions_client_config.py @@ -18,12 +18,12 @@ }, "methods": { "DetectIntent": { - "timeout_millis": 230000, + "timeout_millis": 220000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "StreamingDetectIntent": { - "timeout_millis": 230000, + "timeout_millis": 220000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, diff --git a/dialogflow_v2/gapic/transports/agents_grpc_transport.py b/dialogflow_v2/gapic/transports/agents_grpc_transport.py index 2437d3a5d..25e2792cf 100644 --- a/dialogflow_v2/gapic/transports/agents_grpc_transport.py +++ b/dialogflow_v2/gapic/transports/agents_grpc_transport.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + import google.api_core.grpc_helpers import google.api_core.operations_v1 @@ -61,7 +62,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -77,7 +85,9 @@ def __init__( ) @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -87,12 +97,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property @@ -104,6 +116,32 @@ def channel(self): """ return self._channel + @property + def set_agent(self): + """Return the gRPC stub for :meth:`AgentsClient.set_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"].SetAgent + + @property + def delete_agent(self): + """Return the gRPC stub for :meth:`AgentsClient.delete_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"].DeleteAgent + @property def get_agent(self): """Return the gRPC stub for :meth:`AgentsClient.get_agent`. diff --git a/dialogflow_v2/gapic/transports/contexts_grpc_transport.py b/dialogflow_v2/gapic/transports/contexts_grpc_transport.py index 19962e30c..f1d2bb53a 100644 --- a/dialogflow_v2/gapic/transports/contexts_grpc_transport.py +++ b/dialogflow_v2/gapic/transports/contexts_grpc_transport.py @@ -14,6 +14,7 @@ # 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 context_pb2_grpc @@ -60,7 +61,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -69,7 +77,9 @@ def __init__( self._stubs = {"contexts_stub": context_pb2_grpc.ContextsStub(channel)} @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -79,12 +89,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property diff --git a/dialogflow_v2/gapic/transports/entity_types_grpc_transport.py b/dialogflow_v2/gapic/transports/entity_types_grpc_transport.py index 7ea59ddfc..714ac1804 100644 --- a/dialogflow_v2/gapic/transports/entity_types_grpc_transport.py +++ b/dialogflow_v2/gapic/transports/entity_types_grpc_transport.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + import google.api_core.grpc_helpers import google.api_core.operations_v1 @@ -61,7 +62,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -79,7 +87,9 @@ def __init__( ) @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -89,12 +99,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property diff --git a/dialogflow_v2/gapic/transports/intents_grpc_transport.py b/dialogflow_v2/gapic/transports/intents_grpc_transport.py index 27635858e..320812bae 100644 --- a/dialogflow_v2/gapic/transports/intents_grpc_transport.py +++ b/dialogflow_v2/gapic/transports/intents_grpc_transport.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + import google.api_core.grpc_helpers import google.api_core.operations_v1 @@ -61,7 +62,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -77,7 +85,9 @@ def __init__( ) @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -87,12 +97,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property diff --git a/dialogflow_v2/gapic/transports/session_entity_types_grpc_transport.py b/dialogflow_v2/gapic/transports/session_entity_types_grpc_transport.py index 0b6e2b4a4..59a738a29 100644 --- a/dialogflow_v2/gapic/transports/session_entity_types_grpc_transport.py +++ b/dialogflow_v2/gapic/transports/session_entity_types_grpc_transport.py @@ -14,6 +14,7 @@ # 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 session_entity_type_pb2_grpc @@ -60,7 +61,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -73,7 +81,9 @@ def __init__( } @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -83,12 +93,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property @@ -106,6 +118,10 @@ def list_session_entity_types(self): 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. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -119,6 +135,10 @@ def get_session_entity_type(self): 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. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -135,6 +155,10 @@ def create_session_entity_type(self): 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. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -148,6 +172,10 @@ def update_session_entity_type(self): 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. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -161,6 +189,10 @@ def delete_session_entity_type(self): 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. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a diff --git a/dialogflow_v2/gapic/transports/sessions_grpc_transport.py b/dialogflow_v2/gapic/transports/sessions_grpc_transport.py index 883724109..caaa6f38c 100644 --- a/dialogflow_v2/gapic/transports/sessions_grpc_transport.py +++ b/dialogflow_v2/gapic/transports/sessions_grpc_transport.py @@ -14,6 +14,7 @@ # 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 session_pb2_grpc @@ -60,7 +61,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -69,7 +77,9 @@ def __init__( self._stubs = {"sessions_stub": session_pb2_grpc.SessionsStub(channel)} @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -79,12 +89,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property diff --git a/dialogflow_v2/proto/agent.proto b/dialogflow_v2/proto/agent.proto deleted file mode 100644 index a0c7c0d0f..000000000 --- a/dialogflow_v2/proto/agent.proto +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright 2019 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/resource.proto"; -import "google/longrunning/operations.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 = "AgentProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// 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-enterprise/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-enterprise/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-enterprise/docs/agents-overview). -service Agents { - // Retrieves the specified agent. - rpc GetAgent(GetAgentRequest) returns (Agent) { - option (google.api.http) = { - get: "/v2/{parent=projects/*}/agent" - }; - } - - // 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" - }; - } - - // Trains the specified agent. - // - // Operation - rpc TrainAgent(TrainAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/agent:train" - body: "*" - }; - } - - // 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: "*" - }; - } - - // 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 - rpc ImportAgent(ImportAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/agent:import" - body: "*" - }; - } - - // 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 - rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/agent:restore" - body: "*" - }; - } -} - -// Represents a conversational agent. -message 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 developer entities. - MATCH_MODE_ML_ONLY = 2; - } - - // 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-enterprise/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-enterprise/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; -} - -// 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; -} - -// 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; - - // 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.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; -} - -// 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; - - // 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.v2.Agents.ExportAgent]. -message ExportAgentResponse { - // Required. 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; - - // The exported agent. - // - // Example for how to export an agent to a zip file via a command line: - //
curl \
-    //   'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:export'\
-    //   -X POST \
-    //   -H 'Authorization: Bearer '$(gcloud auth application-default
-    //   print-access-token) \
-    //   -H 'Accept: application/json' \
-    //   -H 'Content-Type: application/json' \
-    //   --compressed \
-    //   --data-binary '{}' \
-    // | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*/\1/' \
-    // | base64 --decode > <agent zip file>
- 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; - - // 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; - - // The agent to import. - // - // Example for how to import an agent via the command line: - //
curl \
-    //   'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:import\
-    //    -X POST \
-    //    -H 'Authorization: Bearer '$(gcloud auth application-default
-    //    print-access-token) \
-    //    -H 'Accept: application/json' \
-    //    -H 'Content-Type: application/json' \
-    //    --compressed \
-    //    --data-binary "{
-    //       'agentContent': '$(cat <agent zip file> | base64 -w 0)'
-    //    }"
- 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; - - // 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; - - // The agent to restore. - // - // Example for how to restore an agent via the command line: - //
curl \
-    //   'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:restore\
-    //    -X POST \
-    //    -H 'Authorization: Bearer '$(gcloud auth application-default
-    //    print-access-token) \
-    //    -H 'Accept: application/json' \
-    //    -H 'Content-Type: application/json' \
-    //    --compressed \
-    //    --data-binary "{
-    //        'agentContent': '$(cat <agent zip file> | base64 -w 0)'
-    //    }"
- bytes agent_content = 3; - } -} diff --git a/dialogflow_v2/proto/agent_pb2.py b/dialogflow_v2/proto/agent_pb2.py index 7dcc6134f..1485b7ff2 100644 --- a/dialogflow_v2/proto/agent_pb2.py +++ b/dialogflow_v2/proto/agent_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/agent.proto @@ -15,13 +16,14 @@ 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 ( operations_pb2 as google_dot_longrunning_dot_operations__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 DESCRIPTOR = _descriptor.FileDescriptor( @@ -32,15 +34,16 @@ "\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\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto"\xfd\x02\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?\n\nmatch_mode\x18\t \x01(\x0e\x32+.google.cloud.dialogflow.v2.Agent.MatchMode\x12 \n\x18\x63lassification_threshold\x18\n \x01(\x02"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"!\n\x0fGetAgentRequest\x12\x0e\n\x06parent\x18\x01 \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"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"#\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\x61gent2\xee\x06\n\x06\x41gents\x12\x81\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\x12\x9f\x01\n\x0cSearchAgents\x12/.google.cloud.dialogflow.v2.SearchAgentsRequest\x1a\x30.google.cloud.dialogflow.v2.SearchAgentsResponse",\x82\xd3\xe4\x93\x02&\x12$/v2/{parent=projects/*}/agent:search\x12\x8a\x01\n\nTrainAgent\x12-.google.cloud.dialogflow.v2.TrainAgentRequest\x1a\x1d.google.longrunning.Operation".\x82\xd3\xe4\x93\x02("#/v2/{parent=projects/*}/agent:train:\x01*\x12\x8d\x01\n\x0b\x45xportAgent\x12..google.cloud.dialogflow.v2.ExportAgentRequest\x1a\x1d.google.longrunning.Operation"/\x82\xd3\xe4\x93\x02)"$/v2/{parent=projects/*}/agent:export:\x01*\x12\x8d\x01\n\x0bImportAgent\x12..google.cloud.dialogflow.v2.ImportAgentRequest\x1a\x1d.google.longrunning.Operation"/\x82\xd3\xe4\x93\x02)"$/v2/{parent=projects/*}/agent:import:\x01*\x12\x90\x01\n\x0cRestoreAgent\x12/.google.cloud.dialogflow.v2.RestoreAgentRequest\x1a\x1d.google.longrunning.Operation"0\x82\xd3\xe4\x93\x02*"%/v2/{parent=projects/*}/agent:restore:\x01*B\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' + '\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#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\xb0\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"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\x61gent2\x8f\x0c\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\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, + 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_protobuf_dot_struct__pb2.DESCRIPTOR, ], ) @@ -75,11 +78,83 @@ ], containing_type=None, serialized_options=None, - serialized_start=559, - serialized_end=645, + serialized_start=816, + serialized_end=902, ) _sym_db.RegisterEnumDescriptor(_AGENT_MATCHMODE) +_AGENT_APIVERSION = _descriptor.EnumDescriptor( + name="ApiVersion", + full_name="google.cloud.dialogflow.v2.Agent.ApiVersion", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="API_VERSION_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="API_VERSION_V1", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="API_VERSION_V2", index=2, number=2, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="API_VERSION_V2_BETA_1", + index=3, + number=3, + serialized_options=None, + type=None, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=904, + serialized_end=1012, +) +_sym_db.RegisterEnumDescriptor(_AGENT_APIVERSION) + +_AGENT_TIER = _descriptor.EnumDescriptor( + name="Tier", + full_name="google.cloud.dialogflow.v2.Agent.Tier", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="TIER_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="TIER_STANDARD", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="TIER_ENTERPRISE", + index=2, + number=2, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="TIER_ENTERPRISE_PLUS", + index=3, + number=3, + serialized_options=None, + type=None, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=1014, + serialized_end=1108, +) +_sym_db.RegisterEnumDescriptor(_AGENT_TIER) + _AGENT = _descriptor.Descriptor( name="Agent", @@ -103,7 +178,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -121,7 +198,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -139,7 +216,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -157,7 +234,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -175,7 +252,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -193,7 +270,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -211,7 +288,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -229,7 +306,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -247,7 +324,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -265,20 +342,56 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="api_version", + full_name="google.cloud.dialogflow.v2.Agent.api_version", + index=10, + number=14, + 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\001"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tier", + full_name="google.cloud.dialogflow.v2.Agent.tier", + index=11, + number=15, + 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\001"), file=DESCRIPTOR, ), ], extensions=[], nested_types=[], - enum_types=[_AGENT_MATCHMODE], + enum_types=[_AGENT_MATCHMODE, _AGENT_APIVERSION, _AGENT_TIER], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=264, - serialized_end=645, + serialized_start=292, + serialized_end=1108, ) @@ -304,7 +417,107 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" + ), + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1110, + serialized_end=1196, +) + + +_SETAGENTREQUEST = _descriptor.Descriptor( + name="SetAgentRequest", + full_name="google.cloud.dialogflow.v2.SetAgentRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="agent", + full_name="google.cloud.dialogflow.v2.SetAgentRequest.agent", + 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=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="update_mask", + full_name="google.cloud.dialogflow.v2.SetAgentRequest.update_mask", + 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=_b("\340A\001"), + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1198, + serialized_end=1324, +) + + +_DELETEAGENTREQUEST = _descriptor.Descriptor( + name="DeleteAgentRequest", + full_name="google.cloud.dialogflow.v2.DeleteAgentRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.cloud.dialogflow.v2.DeleteAgentRequest.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-\n+cloudresourcemanager.googleapis.com/Project" + ), file=DESCRIPTOR, ) ], @@ -316,8 +529,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=647, - serialized_end=680, + serialized_start=1326, + serialized_end=1415, ) @@ -343,7 +556,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -361,7 +576,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -391,8 +606,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=682, - serialized_end=758, + serialized_start=1418, + serialized_end=1552, ) @@ -448,8 +663,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=760, - serialized_end=858, + serialized_start=1554, + serialized_end=1652, ) @@ -475,7 +690,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" + ), file=DESCRIPTOR, ) ], @@ -487,8 +704,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=860, - serialized_end=895, + serialized_start=1654, + serialized_end=1742, ) @@ -514,7 +731,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -532,7 +751,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -544,8 +763,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=897, - serialized_end=952, + serialized_start=1744, + serialized_end=1857, ) @@ -609,8 +828,8 @@ fields=[], ) ], - serialized_start=954, - serialized_end=1030, + serialized_start=1859, + serialized_end=1935, ) @@ -636,7 +855,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -692,8 +913,8 @@ fields=[], ) ], - serialized_start=1032, - serialized_end=1123, + serialized_start=1938, + serialized_end=2082, ) @@ -719,7 +940,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A-\n+cloudresourcemanager.googleapis.com/Project" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -775,12 +998,20 @@ fields=[], ) ], - serialized_start=1125, - serialized_end=1217, + serialized_start=2085, + serialized_end=2230, ) _AGENT.fields_by_name["match_mode"].enum_type = _AGENT_MATCHMODE +_AGENT.fields_by_name["api_version"].enum_type = _AGENT_APIVERSION +_AGENT.fields_by_name["tier"].enum_type = _AGENT_TIER _AGENT_MATCHMODE.containing_type = _AGENT +_AGENT_APIVERSION.containing_type = _AGENT +_AGENT_TIER.containing_type = _AGENT +_SETAGENTREQUEST.fields_by_name["agent"].message_type = _AGENT +_SETAGENTREQUEST.fields_by_name[ + "update_mask" +].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK _SEARCHAGENTSRESPONSE.fields_by_name["agents"].message_type = _AGENT _EXPORTAGENTRESPONSE.oneofs_by_name["agent"].fields.append( _EXPORTAGENTRESPONSE.fields_by_name["agent_uri"] @@ -820,6 +1051,8 @@ ].containing_oneof = _RESTOREAGENTREQUEST.oneofs_by_name["agent"] DESCRIPTOR.message_types_by_name["Agent"] = _AGENT DESCRIPTOR.message_types_by_name["GetAgentRequest"] = _GETAGENTREQUEST +DESCRIPTOR.message_types_by_name["SetAgentRequest"] = _SETAGENTREQUEST +DESCRIPTOR.message_types_by_name["DeleteAgentRequest"] = _DELETEAGENTREQUEST DESCRIPTOR.message_types_by_name["SearchAgentsRequest"] = _SEARCHAGENTSREQUEST DESCRIPTOR.message_types_by_name["SearchAgentsResponse"] = _SEARCHAGENTSRESPONSE DESCRIPTOR.message_types_by_name["TrainAgentRequest"] = _TRAINAGENTREQUEST @@ -846,10 +1079,10 @@ Required. The name of this agent. default_language_code: Required. The default language of the agent as a language tag. - See `Language Support `__ for a list of the - currently supported language codes. This field cannot be set - by the ``Update`` method. + See `Language Support `__ for a list of the currently supported + language codes. This field cannot be set by the ``Update`` + method. supported_language_codes: Optional. The list of all languages supported by this agent (except for the ``default_language_code``). @@ -863,8 +1096,9 @@ avatar_uri: Optional. The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted `Web - Demo `__ integration. + Demo + `__ integration. enable_logging: Optional. Determines whether this agent should log conversation queries. @@ -880,6 +1114,15 @@ 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. + api_version: + 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. + tier: + Optional. The agent tier. If not specified, TIER\_STANDARD is + assumed. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Agent) ), @@ -906,6 +1149,47 @@ ) _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 + [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent]. + + + Attributes: + agent: + Required. The agent to update. + update_mask: + 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 + [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,), @@ -924,8 +1208,8 @@ 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. + The next\_page\_token value returned from a previous list + request. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.SearchAgentsRequest) ), @@ -990,7 +1274,7 @@ Required. The project that the agent to export is associated with. Format: ``projects/``. agent_uri: - Optional. The `Google Cloud Storage + Required. The `Google Cloud Storage `__ URI to export the agent to. The format of this URI must be ``gs:///``. If left unspecified, the serialized @@ -1013,22 +1297,13 @@ Attributes: agent: - Required. The exported agent. + The exported agent. agent_uri: The URI to a file containing the exported agent. This field is populated only if ``agent_uri`` is specified in ``ExportAgentRequest``. agent_content: - The exported agent. Example for how to export an agent to a - zip file via a command line: .. raw:: html
curl \
-          'https://dialogflow.googleapis.com/v2/projects/<project_nam
-          e>/agent:export'\      -X POST \      -H 'Authorization:
-          Bearer '$(gcloud auth application-default      print-access-
-          token) \      -H 'Accept: application/json' \      -H
-          'Content-Type: application/json' \      --compressed \
-          --data-binary '{}' \    | grep agentContent | sed -e
-          's/.*"agentContent": "\([^"]*\)".*/\1/' \    | base64 --decode
-          > <agent zip file>
+ Zip compressed raw byte content for agent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ExportAgentResponse) ), @@ -1055,15 +1330,7 @@ The URI to a Google Cloud Storage file containing the agent to import. Note: The URI must start with "gs://". agent_content: - The agent to import. Example for how to import an agent via - the command line: .. raw:: html
curl \      'https:/
-          /dialogflow.googleapis.com/v2/projects/<project_name>/ag
-          ent:import\       -X POST \       -H 'Authorization: Bearer
-          '$(gcloud auth application-default       print-access-token) \
-          -H 'Accept: application/json' \       -H 'Content-Type:
-          application/json' \       --compressed \       --data-binary
-          "{          'agentContent': '$(cat <agent zip file> |
-          base64 -w 0)'       }"
+ Zip compressed raw byte content for agent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ImportAgentRequest) ), @@ -1090,15 +1357,7 @@ The URI to a Google Cloud Storage file containing the agent to restore. Note: The URI must start with "gs://". agent_content: - The agent to restore. Example for how to restore an agent via - the command line: .. raw:: html
curl \      'https:/
-          /dialogflow.googleapis.com/v2/projects/<project_name>/ag
-          ent:restore\       -X POST \       -H 'Authorization: Bearer
-          '$(gcloud auth application-default       print-access-token) \
-          -H 'Accept: application/json' \       -H 'Content-Type:
-          application/json' \       --compressed \       --data-binary
-          "{           'agentContent': '$(cat <agent zip file> |
-          base64 -w 0)'       }"
+ Zip compressed raw byte content for agent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.RestoreAgentRequest) ), @@ -1107,15 +1366,40 @@ DESCRIPTOR._options = None +_AGENT.fields_by_name["parent"]._options = None +_AGENT.fields_by_name["display_name"]._options = None +_AGENT.fields_by_name["default_language_code"]._options = None +_AGENT.fields_by_name["supported_language_codes"]._options = None +_AGENT.fields_by_name["time_zone"]._options = None +_AGENT.fields_by_name["description"]._options = None +_AGENT.fields_by_name["avatar_uri"]._options = None +_AGENT.fields_by_name["enable_logging"]._options = None +_AGENT.fields_by_name["match_mode"]._options = None +_AGENT.fields_by_name["classification_threshold"]._options = None +_AGENT.fields_by_name["api_version"]._options = None +_AGENT.fields_by_name["tier"]._options = None +_GETAGENTREQUEST.fields_by_name["parent"]._options = None +_SETAGENTREQUEST.fields_by_name["agent"]._options = None +_SETAGENTREQUEST.fields_by_name["update_mask"]._options = None +_DELETEAGENTREQUEST.fields_by_name["parent"]._options = None +_SEARCHAGENTSREQUEST.fields_by_name["parent"]._options = None +_SEARCHAGENTSREQUEST.fields_by_name["page_size"]._options = None +_TRAINAGENTREQUEST.fields_by_name["parent"]._options = None +_EXPORTAGENTREQUEST.fields_by_name["parent"]._options = None +_EXPORTAGENTREQUEST.fields_by_name["agent_uri"]._options = None +_IMPORTAGENTREQUEST.fields_by_name["parent"]._options = None +_RESTOREAGENTREQUEST.fields_by_name["parent"]._options = None _AGENTS = _descriptor.ServiceDescriptor( name="Agents", full_name="google.cloud.dialogflow.v2.Agents", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=1220, - serialized_end=2098, + serialized_options=_b( + "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + ), + serialized_start=2233, + serialized_end=3784, methods=[ _descriptor.MethodDescriptor( name="GetAgent", @@ -1125,62 +1409,84 @@ input_type=_GETAGENTREQUEST, output_type=_AGENT, serialized_options=_b( - "\202\323\344\223\002\037\022\035/v2/{parent=projects/*}/agent" + "\202\323\344\223\002\037\022\035/v2/{parent=projects/*}/agent\332A\006parent" + ), + ), + _descriptor.MethodDescriptor( + name="SetAgent", + full_name="google.cloud.dialogflow.v2.Agents.SetAgent", + index=1, + 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' + ), + ), + _descriptor.MethodDescriptor( + name="DeleteAgent", + full_name="google.cloud.dialogflow.v2.Agents.DeleteAgent", + index=2, + 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" ), ), _descriptor.MethodDescriptor( name="SearchAgents", full_name="google.cloud.dialogflow.v2.Agents.SearchAgents", - index=1, + index=3, containing_service=None, input_type=_SEARCHAGENTSREQUEST, output_type=_SEARCHAGENTSRESPONSE, serialized_options=_b( - "\202\323\344\223\002&\022$/v2/{parent=projects/*}/agent:search" + "\202\323\344\223\002&\022$/v2/{parent=projects/*}/agent:search\332A\006parent" ), ), _descriptor.MethodDescriptor( name="TrainAgent", full_name="google.cloud.dialogflow.v2.Agents.TrainAgent", - index=2, + index=4, 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*' + '\202\323\344\223\002("#/v2/{parent=projects/*}/agent:train:\001*\332A\006parent\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct' ), ), _descriptor.MethodDescriptor( name="ExportAgent", full_name="google.cloud.dialogflow.v2.Agents.ExportAgent", - index=3, + index=5, 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*' + '\202\323\344\223\002)"$/v2/{parent=projects/*}/agent:export:\001*\332A\006parent\312AH\n.google.cloud.dialogflow.v2.ExportAgentResponse\022\026google.protobuf.Struct' ), ), _descriptor.MethodDescriptor( name="ImportAgent", full_name="google.cloud.dialogflow.v2.Agents.ImportAgent", - index=4, + index=6, 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*' + '\202\323\344\223\002)"$/v2/{parent=projects/*}/agent:import:\001*\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct' ), ), _descriptor.MethodDescriptor( name="RestoreAgent", full_name="google.cloud.dialogflow.v2.Agents.RestoreAgent", - index=5, + index=7, 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*' + '\202\323\344\223\002*"%/v2/{parent=projects/*}/agent:restore:\001*\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct' ), ), ], diff --git a/dialogflow_v2/proto/agent_pb2_grpc.py b/dialogflow_v2/proto/agent_pb2_grpc.py index be2ffd63c..0192da477 100644 --- a/dialogflow_v2/proto/agent_pb2_grpc.py +++ b/dialogflow_v2/proto/agent_pb2_grpc.py @@ -7,6 +7,7 @@ from google.longrunning import ( operations_pb2 as google_dot_longrunning_dot_operations__pb2, ) +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 class AgentsStub(object): @@ -23,7 +24,7 @@ class AgentsStub(object): You can create an agent using both Dialogflow Standard Edition and Dialogflow Enterprise Edition. For details, see [Dialogflow - Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions). + 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 @@ -31,13 +32,13 @@ class AgentsStub(object): Dialogflow provides several [prebuilt - agents](https://cloud.google.com/dialogflow-enterprise/docs/agents-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-enterprise/docs/agents-overview). + documentation](https://cloud.google.com/dialogflow/docs/agents-overview). """ def __init__(self, channel): @@ -51,6 +52,16 @@ def __init__(self, channel): request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.GetAgentRequest.SerializeToString, response_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.Agent.FromString, ) + self.SetAgent = channel.unary_unary( + "/google.cloud.dialogflow.v2.Agents/SetAgent", + request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SetAgentRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.Agent.FromString, + ) + self.DeleteAgent = channel.unary_unary( + "/google.cloud.dialogflow.v2.Agents/DeleteAgent", + request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.DeleteAgentRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) self.SearchAgents = channel.unary_unary( "/google.cloud.dialogflow.v2.Agents/SearchAgents", request_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SearchAgentsRequest.SerializeToString, @@ -92,7 +103,7 @@ class AgentsServicer(object): You can create an agent using both Dialogflow Standard Edition and Dialogflow Enterprise Edition. For details, see [Dialogflow - Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions). + 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 @@ -100,13 +111,13 @@ class AgentsServicer(object): Dialogflow provides several [prebuilt - agents](https://cloud.google.com/dialogflow-enterprise/docs/agents-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-enterprise/docs/agents-overview). + documentation](https://cloud.google.com/dialogflow/docs/agents-overview). """ def GetAgent(self, request, context): @@ -116,6 +127,20 @@ def GetAgent(self, request, context): 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. @@ -180,6 +205,16 @@ def add_AgentsServicer_to_server(servicer, server): request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.GetAgentRequest.FromString, response_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.Agent.SerializeToString, ), + "SetAgent": grpc.unary_unary_rpc_method_handler( + servicer.SetAgent, + request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SetAgentRequest.FromString, + response_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.Agent.SerializeToString, + ), + "DeleteAgent": grpc.unary_unary_rpc_method_handler( + servicer.DeleteAgent, + request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.DeleteAgentRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), "SearchAgents": grpc.unary_unary_rpc_method_handler( servicer.SearchAgents, request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_agent__pb2.SearchAgentsRequest.FromString, diff --git a/dialogflow_v2/proto/audio_config.proto b/dialogflow_v2/proto/audio_config.proto deleted file mode 100644 index d3ae64e9f..000000000 --- a/dialogflow_v2/proto/audio_config.proto +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2019 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 = "AudioConfigProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// 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; -} - -// 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 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. 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; -} - -// 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; -} - -// 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. - 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; -} - -// Instructs the speech synthesizer how to generate the output audio content. -message OutputAudioConfig { - // Required. Audio encoding of the synthesized audio content. - OutputAudioEncoding audio_encoding = 1; - - // Optional. 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; - - // Optional. Configuration of how speech should be synthesized. - SynthesizeSpeechConfig synthesize_speech_config = 3; -} diff --git a/dialogflow_v2/proto/audio_config_pb2.py b/dialogflow_v2/proto/audio_config_pb2.py index 79a64e5cb..32f720ca7 100644 --- a/dialogflow_v2/proto/audio_config_pb2.py +++ b/dialogflow_v2/proto/audio_config_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/audio_config.proto @@ -15,6 +16,7 @@ _sym_db = _symbol_database.Default() +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 @@ -26,11 +28,120 @@ "\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\x1cgoogle/api/annotations.proto"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"\xcd\x01\n\x11OutputAudioConfig\x12G\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32/.google.cloud.dialogflow.v2.OutputAudioEncoding\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*\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' + '\n3google/cloud/dialogflow_v2/proto/audio_config.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/api/annotations.proto"\xfe\x01\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\x14\n\x0cphrase_hints\x18\x04 \x03(\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"\xcd\x01\n\x11OutputAudioConfig\x12G\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32/.google.cloud.dialogflow.v2.OutputAudioEncoding\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_annotations__pb2.DESCRIPTOR], + dependencies=[ + google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + ], +) + +_AUDIOENCODING = _descriptor.EnumDescriptor( + name="AudioEncoding", + full_name="google.cloud.dialogflow.v2.AudioEncoding", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="AUDIO_ENCODING_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="AUDIO_ENCODING_LINEAR_16", + index=1, + number=1, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="AUDIO_ENCODING_FLAC", + index=2, + number=2, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="AUDIO_ENCODING_MULAW", + index=3, + number=3, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="AUDIO_ENCODING_AMR", + index=4, + number=4, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="AUDIO_ENCODING_AMR_WB", + index=5, + number=5, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="AUDIO_ENCODING_OGG_OPUS", + index=6, + number=6, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE", + index=7, + number=7, + serialized_options=None, + type=None, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=897, + serialized_end=1148, ) +_sym_db.RegisterEnumDescriptor(_AUDIOENCODING) +AudioEncoding = enum_type_wrapper.EnumTypeWrapper(_AUDIOENCODING) +_SPEECHMODELVARIANT = _descriptor.EnumDescriptor( + name="SpeechModelVariant", + full_name="google.cloud.dialogflow.v2.SpeechModelVariant", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="SPEECH_MODEL_VARIANT_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="USE_BEST_AVAILABLE", + index=1, + number=1, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="USE_STANDARD", index=2, number=2, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="USE_ENHANCED", index=3, number=3, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=1150, + serialized_end=1268, +) +_sym_db.RegisterEnumDescriptor(_SPEECHMODELVARIANT) + +SpeechModelVariant = enum_type_wrapper.EnumTypeWrapper(_SPEECHMODELVARIANT) _SSMLVOICEGENDER = _descriptor.EnumDescriptor( name="SsmlVoiceGender", full_name="google.cloud.dialogflow.v2.SsmlVoiceGender", @@ -68,8 +179,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=608, - serialized_end=749, + serialized_start=1271, + serialized_end=1412, ) _sym_db.RegisterEnumDescriptor(_SSMLVOICEGENDER) @@ -111,12 +222,24 @@ ], containing_type=None, serialized_options=None, - serialized_start=752, - serialized_end=916, + serialized_start=1415, + serialized_end=1579, ) _sym_db.RegisterEnumDescriptor(_OUTPUTAUDIOENCODING) OutputAudioEncoding = enum_type_wrapper.EnumTypeWrapper(_OUTPUTAUDIOENCODING) +AUDIO_ENCODING_UNSPECIFIED = 0 +AUDIO_ENCODING_LINEAR_16 = 1 +AUDIO_ENCODING_FLAC = 2 +AUDIO_ENCODING_MULAW = 3 +AUDIO_ENCODING_AMR = 4 +AUDIO_ENCODING_AMR_WB = 5 +AUDIO_ENCODING_OGG_OPUS = 6 +AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 +SPEECH_MODEL_VARIANT_UNSPECIFIED = 0 +USE_BEST_AVAILABLE = 1 +USE_STANDARD = 2 +USE_ENHANCED = 3 SSML_VOICE_GENDER_UNSPECIFIED = 0 SSML_VOICE_GENDER_MALE = 1 SSML_VOICE_GENDER_FEMALE = 2 @@ -127,6 +250,135 @@ OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3 +_INPUTAUDIOCONFIG = _descriptor.Descriptor( + name="InputAudioConfig", + full_name="google.cloud.dialogflow.v2.InputAudioConfig", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="audio_encoding", + full_name="google.cloud.dialogflow.v2.InputAudioConfig.audio_encoding", + index=0, + number=1, + 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=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="sample_rate_hertz", + full_name="google.cloud.dialogflow.v2.InputAudioConfig.sample_rate_hertz", + 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, + ), + _descriptor.FieldDescriptor( + name="language_code", + full_name="google.cloud.dialogflow.v2.InputAudioConfig.language_code", + 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=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="phrase_hints", + full_name="google.cloud.dialogflow.v2.InputAudioConfig.phrase_hints", + index=3, + number=4, + type=9, + cpp_type=9, + 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, + ), + _descriptor.FieldDescriptor( + name="model_variant", + full_name="google.cloud.dialogflow.v2.InputAudioConfig.model_variant", + index=4, + number=10, + 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=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="single_utterance", + full_name="google.cloud.dialogflow.v2.InputAudioConfig.single_utterance", + index=5, + number=8, + 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=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=146, + serialized_end=400, +) + + _VOICESELECTIONPARAMS = _descriptor.Descriptor( name="VoiceSelectionParams", full_name="google.cloud.dialogflow.v2.VoiceSelectionParams", @@ -179,8 +431,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=113, - serialized_end=215, + serialized_start=402, + serialized_end=504, ) @@ -290,8 +542,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=218, - serialized_end=397, + serialized_start=507, + serialized_end=686, ) @@ -365,23 +617,79 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=400, - serialized_end=605, + serialized_start=689, + serialized_end=894, ) +_INPUTAUDIOCONFIG.fields_by_name["audio_encoding"].enum_type = _AUDIOENCODING +_INPUTAUDIOCONFIG.fields_by_name["model_variant"].enum_type = _SPEECHMODELVARIANT _VOICESELECTIONPARAMS.fields_by_name["ssml_gender"].enum_type = _SSMLVOICEGENDER _SYNTHESIZESPEECHCONFIG.fields_by_name["voice"].message_type = _VOICESELECTIONPARAMS _OUTPUTAUDIOCONFIG.fields_by_name["audio_encoding"].enum_type = _OUTPUTAUDIOENCODING _OUTPUTAUDIOCONFIG.fields_by_name[ "synthesize_speech_config" ].message_type = _SYNTHESIZESPEECHCONFIG +DESCRIPTOR.message_types_by_name["InputAudioConfig"] = _INPUTAUDIOCONFIG DESCRIPTOR.message_types_by_name["VoiceSelectionParams"] = _VOICESELECTIONPARAMS DESCRIPTOR.message_types_by_name["SynthesizeSpeechConfig"] = _SYNTHESIZESPEECHCONFIG DESCRIPTOR.message_types_by_name["OutputAudioConfig"] = _OUTPUTAUDIOCONFIG +DESCRIPTOR.enum_types_by_name["AudioEncoding"] = _AUDIOENCODING +DESCRIPTOR.enum_types_by_name["SpeechModelVariant"] = _SPEECHMODELVARIANT DESCRIPTOR.enum_types_by_name["SsmlVoiceGender"] = _SSMLVOICEGENDER DESCRIPTOR.enum_types_by_name["OutputAudioEncoding"] = _OUTPUTAUDIOENCODING _sym_db.RegisterFileDescriptor(DESCRIPTOR) +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. + + + Attributes: + audio_encoding: + Required. Audio encoding of the audio content to process. + sample_rate_hertz: + Required. Sample rate (in Hertz) of the audio content sent in + the query. Refer to `Cloud Speech API documentation + `__ for + more details. + language_code: + Required. The language of the supplied audio. Dialogflow does + not do translations. See `Language Support `__ 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. + 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. + model_variant: + Optional. Which variant of the [Speech + model][google.cloud.dialogflow.v2.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. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.InputAudioConfig) + ), +) +_sym_db.RegisterMessage(InputAudioConfig) + VoiceSelectionParams = _reflection.GeneratedProtocolMessageType( "VoiceSelectionParams", (_message.Message,), @@ -458,7 +766,7 @@ dict( DESCRIPTOR=_OUTPUTAUDIOCONFIG, __module__="google.cloud.dialogflow_v2.proto.audio_config_pb2", - __doc__="""Instructs the speech synthesizer how to generate the output audio + __doc__="""Instructs the speech synthesizer on how to generate the output audio content. diff --git a/dialogflow_v2/proto/context.proto b/dialogflow_v2/proto/context.proto deleted file mode 100644 index 3c870e32b..000000000 --- a/dialogflow_v2/proto/context.proto +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright 2019 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/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.V2"; -option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; -option java_multiple_files = true; -option java_outer_classname = "ContextProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// 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-enterprise/docs/contexts-overview). -service Contexts { - // Returns the list of all contexts in the specified session. - rpc ListContexts(ListContextsRequest) returns (ListContextsResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*/agent/sessions/*}/contexts" - }; - } - - // Retrieves the specified context. - rpc GetContext(GetContextRequest) returns (Context) { - option (google.api.http) = { - get: "/v2/{name=projects/*/agent/sessions/*/contexts/*}" - }; - } - - // Creates a context. - // - // If the specified context already exists, overrides the context. - rpc CreateContext(CreateContextRequest) returns (Context) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent/sessions/*}/contexts" - body: "context" - }; - } - - // Updates the specified context. - rpc UpdateContext(UpdateContextRequest) returns (Context) { - option (google.api.http) = { - patch: "/v2/{context.name=projects/*/agent/sessions/*/contexts/*}" - body: "context" - }; - } - - // Deletes the specified context. - rpc DeleteContext(DeleteContextRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/agent/sessions/*/contexts/*}" - }; - } - - // Deletes all active contexts in the specified session. - rpc DeleteAllContexts(DeleteAllContextsRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{parent=projects/*/agent/sessions/*}/contexts" - }; - } -} - -// Represents a context. -message Context { - // Required. The unique identifier of the context. Format: - // `projects//agent/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. - string name = 1; - - // 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. - int32 lifespan_count = 2; - - // Optional. The collection of parameters associated with this context. - // Refer to [this - // doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters) - // for syntax. - google.protobuf.Struct parameters = 3; -} - -// 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/`. - string parent = 1; - - // 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.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/`. - string name = 1; -} - -// 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/`. - string parent = 1; - - // Required. The context to create. - Context context = 2; -} - -// The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2.Contexts.UpdateContext]. -message UpdateContextRequest { - // Required. The context to update. - Context context = 1; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2; -} - -// 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/`. - string name = 1; -} - -// 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/`. - string parent = 1; -} diff --git a/dialogflow_v2/proto/context_pb2.py b/dialogflow_v2/proto/context_pb2.py index a147ea151..dfbd895e3 100644 --- a/dialogflow_v2/proto/context_pb2.py +++ b/dialogflow_v2/proto/context_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/context.proto @@ -15,6 +16,8 @@ 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 @@ -29,10 +32,12 @@ "\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\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.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"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"!\n\x11GetContextRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\\\n\x14\x43reateContextRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x34\n\x07\x63ontext\x18\x02 \x01(\x0b\x32#.google.cloud.dialogflow.v2.Context"}\n\x14UpdateContextRequest\x12\x34\n\x07\x63ontext\x18\x01 \x01(\x0b\x32#.google.cloud.dialogflow.v2.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\xef\x07\n\x08\x43ontexts\x12\xac\x01\n\x0cListContexts\x12/.google.cloud.dialogflow.v2.ListContextsRequest\x1a\x30.google.cloud.dialogflow.v2.ListContextsResponse"9\x82\xd3\xe4\x93\x02\x33\x12\x31/v2/{parent=projects/*/agent/sessions/*}/contexts\x12\x9b\x01\n\nGetContext\x12-.google.cloud.dialogflow.v2.GetContextRequest\x1a#.google.cloud.dialogflow.v2.Context"9\x82\xd3\xe4\x93\x02\x33\x12\x31/v2/{name=projects/*/agent/sessions/*/contexts/*}\x12\xaa\x01\n\rCreateContext\x12\x30.google.cloud.dialogflow.v2.CreateContextRequest\x1a#.google.cloud.dialogflow.v2.Context"B\x82\xd3\xe4\x93\x02<"1/v2/{parent=projects/*/agent/sessions/*}/contexts:\x07\x63ontext\x12\xb2\x01\n\rUpdateContext\x12\x30.google.cloud.dialogflow.v2.UpdateContextRequest\x1a#.google.cloud.dialogflow.v2.Context"J\x82\xd3\xe4\x93\x02\x44\x32\x39/v2/{context.name=projects/*/agent/sessions/*/contexts/*}:\x07\x63ontext\x12\x94\x01\n\rDeleteContext\x12\x30.google.cloud.dialogflow.v2.DeleteContextRequest\x1a\x16.google.protobuf.Empty"9\x82\xd3\xe4\x93\x02\x33*1/v2/{name=projects/*/agent/sessions/*/contexts/*}\x12\x9c\x01\n\x11\x44\x65leteAllContexts\x12\x34.google.cloud.dialogflow.v2.DeleteAllContextsRequest\x1a\x16.google.protobuf.Empty"9\x82\xd3\xe4\x93\x02\x33*1/v2/{parent=projects/*/agent/sessions/*}/contextsB\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' + '\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"f\n\x14\x43reateContextRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\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"/\n\x18\x44\x65leteAllContextsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x32\xf2\x08\n\x08\x43ontexts\x12\xb5\x01\n\x0cListContexts\x12/.google.cloud.dialogflow.v2.ListContextsRequest\x1a\x30.google.cloud.dialogflow.v2.ListContextsResponse"B\x82\xd3\xe4\x93\x02\x33\x12\x31/v2/{parent=projects/*/agent/sessions/*}/contexts\xda\x41\x06parent\x12\x9b\x01\n\nGetContext\x12-.google.cloud.dialogflow.v2.GetContextRequest\x1a#.google.cloud.dialogflow.v2.Context"9\x82\xd3\xe4\x93\x02\x33\x12\x31/v2/{name=projects/*/agent/sessions/*/contexts/*}\x12\xaa\x01\n\rCreateContext\x12\x30.google.cloud.dialogflow.v2.CreateContextRequest\x1a#.google.cloud.dialogflow.v2.Context"B\x82\xd3\xe4\x93\x02<"1/v2/{parent=projects/*/agent/sessions/*}/contexts:\x07\x63ontext\x12\xb2\x01\n\rUpdateContext\x12\x30.google.cloud.dialogflow.v2.UpdateContextRequest\x1a#.google.cloud.dialogflow.v2.Context"J\x82\xd3\xe4\x93\x02\x44\x32\x39/v2/{context.name=projects/*/agent/sessions/*/contexts/*}:\x07\x63ontext\x12\x94\x01\n\rDeleteContext\x12\x30.google.cloud.dialogflow.v2.DeleteContextRequest\x1a\x16.google.protobuf.Empty"9\x82\xd3\xe4\x93\x02\x33*1/v2/{name=projects/*/agent/sessions/*/contexts/*}\x12\x9c\x01\n\x11\x44\x65leteAllContexts\x12\x34.google.cloud.dialogflow.v2.DeleteAllContextsRequest\x1a\x16.google.protobuf.Empty"9\x82\xd3\xe4\x93\x02\x33*1/v2/{parent=projects/*/agent/sessions/*}/contexts\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, + 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, @@ -63,7 +68,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -81,7 +86,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -99,20 +104,22 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352Ac\n!dialogflow.googleapis.com/Context\022>projects/{project}/agent/sessions/{session}/contexts/{context}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=228, - serialized_end=320, + serialized_start=287, + serialized_end=498, ) @@ -138,7 +145,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -156,7 +163,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -174,7 +181,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -186,8 +193,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=322, - serialized_end=398, + serialized_start=500, + serialized_end=591, ) @@ -243,8 +250,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=400, - serialized_end=502, + serialized_start=593, + serialized_end=695, ) @@ -270,7 +277,9 @@ 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, ) ], @@ -282,8 +291,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=504, - serialized_end=537, + serialized_start=697, + serialized_end=773, ) @@ -309,7 +318,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -327,7 +336,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -339,8 +348,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=539, - serialized_end=631, + serialized_start=775, + serialized_end=877, ) @@ -366,7 +375,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -384,7 +393,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -396,8 +405,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=633, - serialized_end=758, + serialized_start=880, + serialized_end=1015, ) @@ -423,7 +432,9 @@ 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, ) ], @@ -435,8 +446,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=760, - serialized_end=796, + serialized_start=1017, + serialized_end=1096, ) @@ -462,7 +473,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ) ], @@ -474,8 +485,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=798, - serialized_end=840, + serialized_start=1098, + serialized_end=1145, ) _CONTEXT.fields_by_name[ @@ -521,8 +532,8 @@ parameters: Optional. The collection of parameters associated with this context. Refer to `this doc - `__ for syntax. + `__ for syntax. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Context) ), @@ -684,15 +695,31 @@ DESCRIPTOR._options = None +_CONTEXT.fields_by_name["name"]._options = None +_CONTEXT.fields_by_name["lifespan_count"]._options = None +_CONTEXT.fields_by_name["parameters"]._options = None +_CONTEXT._options = None +_LISTCONTEXTSREQUEST.fields_by_name["parent"]._options = None +_LISTCONTEXTSREQUEST.fields_by_name["page_size"]._options = None +_LISTCONTEXTSREQUEST.fields_by_name["page_token"]._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.v2.Contexts", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=843, - serialized_end=1850, + serialized_options=_b( + "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + ), + serialized_start=1148, + serialized_end=2286, methods=[ _descriptor.MethodDescriptor( name="ListContexts", @@ -702,7 +729,7 @@ input_type=_LISTCONTEXTSREQUEST, output_type=_LISTCONTEXTSRESPONSE, serialized_options=_b( - "\202\323\344\223\0023\0221/v2/{parent=projects/*/agent/sessions/*}/contexts" + "\202\323\344\223\0023\0221/v2/{parent=projects/*/agent/sessions/*}/contexts\332A\006parent" ), ), _descriptor.MethodDescriptor( diff --git a/dialogflow_v2/proto/context_pb2_grpc.py b/dialogflow_v2/proto/context_pb2_grpc.py index 930351962..3e07a998f 100644 --- a/dialogflow_v2/proto/context_pb2_grpc.py +++ b/dialogflow_v2/proto/context_pb2_grpc.py @@ -25,7 +25,7 @@ class ContextsStub(object): For more information about contexts, see the [Dialogflow - documentation](https://cloud.google.com/dialogflow-enterprise/docs/contexts-overview). + documentation](https://cloud.google.com/dialogflow/docs/contexts-overview). """ def __init__(self, channel): @@ -84,7 +84,7 @@ class ContextsServicer(object): For more information about contexts, see the [Dialogflow - documentation](https://cloud.google.com/dialogflow-enterprise/docs/contexts-overview). + documentation](https://cloud.google.com/dialogflow/docs/contexts-overview). """ def ListContexts(self, request, context): diff --git a/dialogflow_v2/proto/entity_type.proto b/dialogflow_v2/proto/entity_type.proto deleted file mode 100644 index ea24d9d1b..000000000 --- a/dialogflow_v2/proto/entity_type.proto +++ /dev/null @@ -1,436 +0,0 @@ -// Copyright 2019 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/resource.proto"; -import "google/longrunning/operations.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 = "EntityTypeProto"; -option java_package = "com.google.cloud.dialogflow.v2"; -option objc_class_prefix = "DF"; - -// 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. -// -// * **Developer** - 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 developer -// 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-enterprise/docs/entities-overview). -service EntityTypes { - // 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" - }; - } - - // Retrieves the specified entity type. - rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) { - option (google.api.http) = { - get: "/v2/{name=projects/*/agent/entityTypes/*}" - }; - } - - // 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" - }; - } - - // 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" - }; - } - - // Deletes the specified entity type. - rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/agent/entityTypes/*}" - }; - } - - // 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: "*" - }; - } - - // 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: "*" - }; - } - - // 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: "*" - }; - } - - // 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: "*" - }; - } - - // 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: "*" - }; - } -} - -// Represents an entity type. -// Entity types serve as a tool for extracting parameter values from natural -// language queries. -message EntityType { - // 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 canonical 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 canonical - // value. - KIND_MAP = 1; - - // List entity types contain a set of entries that do not map to canonical - // values. However, list entity types can contain references to other entity - // types (with or without aliases). - KIND_LIST = 2; - } - - // 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; - - // Required. Indicates the kind of entity type. - Kind kind = 3; - - // Optional. Indicates whether the entity type can be automatically - // expanded. - AutoExpansionMode auto_expansion_mode = 4; - - // Optional. The collection of entity entries associated with the entity type. - repeated Entity entities = 6; -} - -// 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; - - // Optional. The language to list entity synonyms for. If not specified, - // the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 3; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 4; -} - -// 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; - - // Optional. The language to retrieve entity synonyms for. If not specified, - // the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; -} - -// 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; - - // Required. The entity type to create. - EntityType entity_type = 2; - - // Optional. The language of entity synonyms defined in `entity_type`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; -} - -// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]. -message UpdateEntityTypeRequest { - // Required. The entity type to update. - EntityType entity_type = 1; - - // Optional. The language of entity synonyms defined in `entity_type`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 3; -} - -// 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; -} - -// 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; - - // 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. - 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 of entity synonyms defined in `entity_types`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 4; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 5; -} - -// 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; - - // Required. The names entity types to delete. All names must point to the - // same agent as `parent`. - repeated string entity_type_names = 2; -} - -// 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; - - // Required. The entities to create. - repeated EntityType.Entity entities = 2; - - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; -} - -// 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; - - // Required. The entities to update or create. - repeated EntityType.Entity entities = 2; - - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 4; -} - -// 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; - - // Required. The canonical `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; - - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; -} - -// 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 56aa2ea16..02b062c42 100644 --- a/dialogflow_v2/proto/entity_type_pb2.py +++ b/dialogflow_v2/proto/entity_type_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/entity_type.proto @@ -15,13 +16,14 @@ 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 ( operations_pb2 as google_dot_longrunning_dot_operations__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 DESCRIPTOR = _descriptor.FileDescriptor( @@ -32,15 +34,16 @@ "\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\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto"\xc4\x03\n\nEntityType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x39\n\x04kind\x18\x03 \x01(\x0e\x32+.google.cloud.dialogflow.v2.EntityType.Kind\x12U\n\x13\x61uto_expansion_mode\x18\x04 \x01(\x0e\x32\x38.google.cloud.dialogflow.v2.EntityType.AutoExpansionMode\x12?\n\x08\x65ntities\x18\x06 \x03(\x0b\x32-.google.cloud.dialogflow.v2.EntityType.Entity\x1a)\n\x06\x45ntity\x12\r\n\x05value\x18\x01 \x01(\t\x12\x10\n\x08synonyms\x18\x02 \x03(\t"9\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x0c\n\x08KIND_MAP\x10\x01\x12\r\n\tKIND_LIST\x10\x02"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"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\x14GetEntityTypeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t"}\n\x17\x43reateEntityTypeRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12;\n\x0b\x65ntity_type\x18\x02 \x01(\x0b\x32&.google.cloud.dialogflow.v2.EntityType\x12\x15\n\rlanguage_code\x18\x03 \x01(\t"\x9e\x01\n\x17UpdateEntityTypeRequest\x12;\n\x0b\x65ntity_type\x18\x01 \x01(\x0b\x32&.google.cloud.dialogflow.v2.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"\xfe\x01\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\x12O\n\x18\x65ntity_type_batch_inline\x18\x03 \x01(\x0b\x32+.google.cloud.dialogflow.v2.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"^\n\x1e\x42\x61tchUpdateEntityTypesResponse\x12<\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32&.google.cloud.dialogflow.v2.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"\x84\x01\n\x1a\x42\x61tchCreateEntitiesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12?\n\x08\x65ntities\x18\x02 \x03(\x0b\x32-.google.cloud.dialogflow.v2.EntityType.Entity\x12\x15\n\rlanguage_code\x18\x03 \x01(\t"\xb5\x01\n\x1a\x42\x61tchUpdateEntitiesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12?\n\x08\x65ntities\x18\x02 \x03(\x0b\x32-.google.cloud.dialogflow.v2.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"O\n\x0f\x45ntityTypeBatch\x12<\n\x0c\x65ntity_types\x18\x01 \x03(\x0b\x32&.google.cloud.dialogflow.v2.EntityType2\x83\x0e\n\x0b\x45ntityTypes\x12\xad\x01\n\x0fListEntityTypes\x12\x32.google.cloud.dialogflow.v2.ListEntityTypesRequest\x1a\x33.google.cloud.dialogflow.v2.ListEntityTypesResponse"1\x82\xd3\xe4\x93\x02+\x12)/v2/{parent=projects/*/agent}/entityTypes\x12\x9c\x01\n\rGetEntityType\x12\x30.google.cloud.dialogflow.v2.GetEntityTypeRequest\x1a&.google.cloud.dialogflow.v2.EntityType"1\x82\xd3\xe4\x93\x02+\x12)/v2/{name=projects/*/agent/entityTypes/*}\x12\xaf\x01\n\x10\x43reateEntityType\x12\x33.google.cloud.dialogflow.v2.CreateEntityTypeRequest\x1a&.google.cloud.dialogflow.v2.EntityType">\x82\xd3\xe4\x93\x02\x38")/v2/{parent=projects/*/agent}/entityTypes:\x0b\x65ntity_type\x12\xbb\x01\n\x10UpdateEntityType\x12\x33.google.cloud.dialogflow.v2.UpdateEntityTypeRequest\x1a&.google.cloud.dialogflow.v2.EntityType"J\x82\xd3\xe4\x93\x02\x44\x32\x35/v2/{entity_type.name=projects/*/agent/entityTypes/*}:\x0b\x65ntity_type\x12\x92\x01\n\x10\x44\x65leteEntityType\x12\x33.google.cloud.dialogflow.v2.DeleteEntityTypeRequest\x1a\x16.google.protobuf.Empty"1\x82\xd3\xe4\x93\x02+*)/v2/{name=projects/*/agent/entityTypes/*}\x12\xb4\x01\n\x16\x42\x61tchUpdateEntityTypes\x12\x39.google.cloud.dialogflow.v2.BatchUpdateEntityTypesRequest\x1a\x1d.google.longrunning.Operation"@\x82\xd3\xe4\x93\x02:"5/v2/{parent=projects/*/agent}/entityTypes:batchUpdate:\x01*\x12\xb4\x01\n\x16\x42\x61tchDeleteEntityTypes\x12\x39.google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest\x1a\x1d.google.longrunning.Operation"@\x82\xd3\xe4\x93\x02:"5/v2/{parent=projects/*/agent}/entityTypes:batchDelete:\x01*\x12\xb9\x01\n\x13\x42\x61tchCreateEntities\x12\x36.google.cloud.dialogflow.v2.BatchCreateEntitiesRequest\x1a\x1d.google.longrunning.Operation"K\x82\xd3\xe4\x93\x02\x45"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate:\x01*\x12\xb9\x01\n\x13\x42\x61tchUpdateEntities\x12\x36.google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest\x1a\x1d.google.longrunning.Operation"K\x82\xd3\xe4\x93\x02\x45"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\x01*\x12\xb9\x01\n\x13\x42\x61tchDeleteEntities\x12\x36.google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest\x1a\x1d.google.longrunning.Operation"K\x82\xd3\xe4\x93\x02\x45"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\x01*B\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' + '\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\xff\x12\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\xe6\x01\n\x16\x42\x61tchDeleteEntityTypes\x12\x39.google.cloud.dialogflow.v2.BatchDeleteEntityTypesRequest\x1a\x1d.google.longrunning.Operation"r\x82\xd3\xe4\x93\x02:"5/v2/{parent=projects/*/agent}/entityTypes:batchDelete:\x01*\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\xeb\x01\n\x13\x42\x61tchUpdateEntities\x12\x36.google.cloud.dialogflow.v2.BatchUpdateEntitiesRequest\x1a\x1d.google.longrunning.Operation"}\x82\xd3\xe4\x93\x02\x45"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\x01*\xda\x41\x0fparent,entities\xda\x41\x1dparent,entities,language_code\x12\xf6\x01\n\x13\x42\x61tchDeleteEntities\x12\x36.google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest\x1a\x1d.google.longrunning.Operation"\x87\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\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, + 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_protobuf_dot_struct__pb2.DESCRIPTOR, ], ) @@ -64,11 +67,14 @@ _descriptor.EnumValueDescriptor( name="KIND_LIST", index=2, number=2, serialized_options=None, type=None ), + _descriptor.EnumValueDescriptor( + name="KIND_REGEXP", index=3, number=3, serialized_options=None, type=None + ), ], containing_type=None, serialized_options=None, - serialized_start=574, - serialized_end=631, + serialized_start=670, + serialized_end=744, ) _sym_db.RegisterEnumDescriptor(_ENTITYTYPE_KIND) @@ -95,8 +101,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=633, - serialized_end=722, + serialized_start=746, + serialized_end=835, ) _sym_db.RegisterEnumDescriptor(_ENTITYTYPE_AUTOEXPANSIONMODE) @@ -123,7 +129,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -141,7 +147,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -153,8 +159,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=531, - serialized_end=572, + serialized_start=617, + serialized_end=668, ) _ENTITYTYPE = _descriptor.Descriptor( @@ -197,7 +203,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -215,7 +221,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -233,7 +239,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -251,20 +257,40 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="enable_fuzzy_extraction", + full_name="google.cloud.dialogflow.v2.EntityType.enable_fuzzy_extraction", + index=5, + number=7, + 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, ), ], extensions=[], nested_types=[_ENTITYTYPE_ENTITY], enum_types=[_ENTITYTYPE_KIND, _ENTITYTYPE_AUTOEXPANSIONMODE], - serialized_options=None, + serialized_options=_b( + "\352AZ\n$dialogflow.googleapis.com/EntityType\0222projects/{project}/agent/entityTypes/{entity_type}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=270, - serialized_end=722, + serialized_start=298, + serialized_end=930, ) @@ -290,7 +316,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -308,7 +336,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -326,7 +354,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -344,7 +372,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -356,8 +384,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=724, - serialized_end=826, + serialized_start=933, + serialized_end=1091, ) @@ -413,8 +441,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=828, - serialized_end=940, + serialized_start=1093, + serialized_end=1205, ) @@ -440,7 +468,9 @@ 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, ), _descriptor.FieldDescriptor( @@ -458,7 +488,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -470,8 +500,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=942, - serialized_end=1001, + serialized_start=1207, + serialized_end=1317, ) @@ -497,7 +527,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -515,7 +547,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -533,7 +565,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -545,8 +577,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1003, - serialized_end=1128, + serialized_start=1320, + serialized_end=1496, ) @@ -572,7 +604,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -590,7 +622,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -608,7 +640,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -620,8 +652,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1131, - serialized_end=1289, + serialized_start=1499, + serialized_end=1672, ) @@ -647,7 +679,9 @@ 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, ) ], @@ -659,8 +693,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1291, - serialized_end=1330, + serialized_start=1674, + serialized_end=1759, ) @@ -686,7 +720,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -740,7 +776,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -758,7 +794,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -778,8 +814,8 @@ fields=[], ) ], - serialized_start=1333, - serialized_end=1587, + serialized_start=1762, + serialized_end=2067, ) @@ -817,8 +853,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1589, - serialized_end=1683, + serialized_start=2069, + serialized_end=2163, ) @@ -844,7 +880,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -862,7 +900,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -874,8 +912,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1685, - serialized_end=1759, + serialized_start=2165, + serialized_end=2285, ) @@ -901,7 +939,9 @@ 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, ), _descriptor.FieldDescriptor( @@ -919,7 +959,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -937,7 +977,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -949,8 +989,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1762, - serialized_end=1894, + serialized_start=2288, + serialized_end=2476, ) @@ -976,7 +1016,9 @@ 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, ), _descriptor.FieldDescriptor( @@ -994,7 +1036,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1012,7 +1054,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1030,7 +1072,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -1042,8 +1084,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1897, - serialized_end=2078, + serialized_start=2479, + serialized_end=2721, ) @@ -1069,7 +1111,9 @@ 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, ), _descriptor.FieldDescriptor( @@ -1087,7 +1131,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1105,7 +1149,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -1117,8 +1161,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2080, - serialized_end=2170, + serialized_start=2724, + serialized_end=2870, ) @@ -1156,8 +1200,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2172, - serialized_end=2251, + serialized_start=2872, + serialized_end=2951, ) _ENTITYTYPE_ENTITY.containing_type = _ENTITYTYPE @@ -1284,6 +1328,9 @@ entities: Optional. The collection of entity entries associated with the entity type. + enable_fuzzy_extraction: + Optional. Enables fuzzy entity extraction during + classification. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.EntityType) ), @@ -1308,10 +1355,9 @@ 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. + languages `__ are supported. Note: languages must be enabled in + the agent before they can be used. page_size: Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. @@ -1365,10 +1411,9 @@ 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. + 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.GetEntityTypeRequest) ), @@ -1394,9 +1439,8 @@ 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: + language is used. `Many languages `__ are supported. Note: languages must be enabled in the agent before they can be used. """, @@ -1421,9 +1465,8 @@ 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: + language is used. `Many languages `__ are supported. Note: languages must be enabled in the agent before they can be used. update_mask: @@ -1469,10 +1512,10 @@ 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 @@ -1483,9 +1526,8 @@ 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: + language is used. `Many languages `__ are supported. Note: languages must be enabled in the agent before they can be used. update_mask: @@ -1558,10 +1600,9 @@ 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. + 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.BatchCreateEntitiesRequest) ), @@ -1588,10 +1629,9 @@ 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. + is used. `Many languages `__ are supported. Note: languages + must be enabled in the agent before they can be used. update_mask: Optional. The mask to control which fields get updated. """, @@ -1622,10 +1662,9 @@ 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. + 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.BatchDeleteEntitiesRequest) ), @@ -1652,15 +1691,53 @@ DESCRIPTOR._options = None +_ENTITYTYPE_ENTITY.fields_by_name["value"]._options = None +_ENTITYTYPE_ENTITY.fields_by_name["synonyms"]._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 +_BATCHUPDATEENTITIESREQUEST.fields_by_name["update_mask"]._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.v2.EntityTypes", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=2254, - serialized_end=4049, + 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=5385, methods=[ _descriptor.MethodDescriptor( name="ListEntityTypes", @@ -1670,7 +1747,7 @@ input_type=_LISTENTITYTYPESREQUEST, output_type=_LISTENTITYTYPESRESPONSE, serialized_options=_b( - "\202\323\344\223\002+\022)/v2/{parent=projects/*/agent}/entityTypes" + "\202\323\344\223\002+\022)/v2/{parent=projects/*/agent}/entityTypes\332A\006parent\332A\024parent,language_code" ), ), _descriptor.MethodDescriptor( @@ -1681,7 +1758,7 @@ input_type=_GETENTITYTYPEREQUEST, output_type=_ENTITYTYPE, serialized_options=_b( - "\202\323\344\223\002+\022)/v2/{name=projects/*/agent/entityTypes/*}" + "\202\323\344\223\002+\022)/v2/{name=projects/*/agent/entityTypes/*}\332A\004name\332A\022name,language_code" ), ), _descriptor.MethodDescriptor( @@ -1692,7 +1769,7 @@ input_type=_CREATEENTITYTYPEREQUEST, output_type=_ENTITYTYPE, serialized_options=_b( - '\202\323\344\223\0028")/v2/{parent=projects/*/agent}/entityTypes:\013entity_type' + '\202\323\344\223\0028")/v2/{parent=projects/*/agent}/entityTypes:\013entity_type\332A\022parent,entity_type\332A parent,entity_type,language_code' ), ), _descriptor.MethodDescriptor( @@ -1703,7 +1780,7 @@ input_type=_UPDATEENTITYTYPEREQUEST, output_type=_ENTITYTYPE, serialized_options=_b( - "\202\323\344\223\002D25/v2/{entity_type.name=projects/*/agent/entityTypes/*}:\013entity_type" + "\202\323\344\223\002D25/v2/{entity_type.name=projects/*/agent/entityTypes/*}:\013entity_type\332A\013entity_type\332A\031entity_type,language_code" ), ), _descriptor.MethodDescriptor( @@ -1714,7 +1791,7 @@ 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/*}" + "\202\323\344\223\002+*)/v2/{name=projects/*/agent/entityTypes/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -1725,7 +1802,7 @@ 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*' + '\202\323\344\223\002:"5/v2/{parent=projects/*/agent}/entityTypes:batchUpdate:\001*\312AS\n9google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse\022\026google.protobuf.Struct' ), ), _descriptor.MethodDescriptor( @@ -1736,7 +1813,7 @@ 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*' + '\202\323\344\223\002:"5/v2/{parent=projects/*/agent}/entityTypes:batchDelete:\001*\312A/\n\025google.protobuf.Empty\022\026google.protobuf.Struct' ), ), _descriptor.MethodDescriptor( @@ -1747,7 +1824,7 @@ 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*' + '\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' ), ), _descriptor.MethodDescriptor( @@ -1758,7 +1835,7 @@ 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*' + '\202\323\344\223\002E"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\001*\332A\017parent,entities\332A\035parent,entities,language_code' ), ), _descriptor.MethodDescriptor( @@ -1769,7 +1846,7 @@ 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*' + '\202\323\344\223\002E"@/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\001*\332A\024parent,entity_values\332A"parent,entity_values,language_code' ), ), ], diff --git a/dialogflow_v2/proto/entity_type_pb2_grpc.py b/dialogflow_v2/proto/entity_type_pb2_grpc.py index 479a14676..a1012102d 100644 --- a/dialogflow_v2/proto/entity_type_pb2_grpc.py +++ b/dialogflow_v2/proto/entity_type_pb2_grpc.py @@ -38,7 +38,7 @@ class EntityTypesStub(object): For more information about entity types, see the [Dialogflow - documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview). + documentation](https://cloud.google.com/dialogflow/docs/entities-overview). """ def __init__(self, channel): @@ -127,7 +127,7 @@ class EntityTypesServicer(object): For more information about entity types, see the [Dialogflow - documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview). + documentation](https://cloud.google.com/dialogflow/docs/entities-overview). """ def ListEntityTypes(self, request, context): diff --git a/dialogflow_v2/proto/intent.proto b/dialogflow_v2/proto/intent.proto deleted file mode 100644 index bd7382fcf..000000000 --- a/dialogflow_v2/proto/intent.proto +++ /dev/null @@ -1,848 +0,0 @@ -// Copyright 2019 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/resource.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"; - -// 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-enterprise/docs/intents-overview). -service Intents { - // 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" - }; - } - - // Retrieves the specified intent. - rpc GetIntent(GetIntentRequest) returns (Intent) { - option (google.api.http) = { - get: "/v2/{name=projects/*/agent/intents/*}" - }; - } - - // Creates an intent in the specified agent. - rpc CreateIntent(CreateIntentRequest) returns (Intent) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent}/intents" - body: "intent" - }; - } - - // Updates the specified intent. - rpc UpdateIntent(UpdateIntentRequest) returns (Intent) { - option (google.api.http) = { - patch: "/v2/{intent.name=projects/*/agent/intents/*}" - body: "intent" - }; - } - - // 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/*}" - }; - } - - // 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: "*" - }; - } - - // 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: "*" - }; - } -} - -// 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. -message 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; - - // 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; - - // 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; - } - - // 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 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; - - // Optional. A text description of the image to be used for accessibility, - // e.g., screen readers. - 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; - } - - // 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; - } - - // 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; - - // 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](https://developers.google.com/actions/dialogflow/webhook) - //
{
-      //   "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 = 8; - } - - // 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; - - // 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. - 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; - } - - // Optional. The platform that this message is intended for. - Platform platform = 6; - } - - // 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; - } - - // 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; - - // Required. The name of this intent. - string display_name = 2; - - // Optional. Indicates whether webhooks are enabled for the intent. - WebhookState webhook_state = 6; - - // Optional. The priority of this intent. Higher numbers represent higher - // priorities. If this is zero or unspecified, we use the default - // priority 500000. - // - // Negative numbers mean that the intent is disabled. - int32 priority = 3; - - // Optional. Indicates whether this is a fallback intent. - bool is_fallback = 4; - - // Optional. Indicates whether Machine Learning is disabled for the intent. - // Note: If `ml_diabled` 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; - - // Optional. The list of context names required for this intent to be - // triggered. - // Format: `projects//agent/sessions/-/contexts/`. - repeated string input_context_names = 7; - - // 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. - repeated string events = 8; - - // Optional. The collection of examples that the agent is - // trained on. - repeated TrainingPhrase training_phrases = 9; - - // Optional. The name of the action associated with the intent. - // Note: The action name must not contain whitespaces. - string action = 10; - - // 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; - - // Optional. Indicates whether to delete all contexts in the current - // session when this intent is matched. - bool reset_contexts = 12; - - // Optional. The collection of parameters associated with the intent. - repeated Parameter parameters = 13; - - // 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 response will be - // taken from among the messages assigned to the DEFAULT_PLATFORM. - repeated Message.Platform default_response_platforms = 15; - - // 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][] or [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; - - // Optional. The language to list training phrases, parameters and rich - // messages for. If not specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; - - // 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.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; - - // Optional. The language to retrieve training phrases, parameters and rich - // messages for. If not specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; - - // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 3; -} - -// 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; - - // Required. The intent to create. - Intent intent = 2; - - // 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](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; - - // Optional. The resource view to apply to the returned intent. - IntentView intent_view = 4; -} - -// The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent]. -message UpdateIntentRequest { - // Required. The intent to update. - Intent intent = 1; - - // 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](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; - - // 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.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; -} - -// The request message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents]. -message BatchUpdateIntentsRequest { - // Required. The name of the agent to update or create intents in. - // Format: `projects//agent`. - string parent = 1; - - // Required. 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 of training phrases, parameters and rich messages - // defined in `intents`. If not specified, the agent's default language is - // used. [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 4; - - // 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.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; - - // Required. The collection of intents to delete. Only intent `name` must be - // filled in. - repeated Intent intents = 2; -} - -// 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 9bb18e5a2..8f2f824d9 100644 --- a/dialogflow_v2/proto/intent_pb2.py +++ b/dialogflow_v2/proto/intent_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/intent.proto @@ -16,7 +17,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_v2.proto import ( + audio_config_pb2 as google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_audio__config__pb2, +) from dialogflow_v2.proto import ( context_pb2 as google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2, ) @@ -37,11 +43,14 @@ "\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\x19google/api/resource.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"\xf7 \n\x06Intent\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x46\n\rwebhook_state\x18\x06 \x01(\x0e\x32/.google.cloud.dialogflow.v2.Intent.WebhookState\x12\x10\n\x08priority\x18\x03 \x01(\x05\x12\x13\n\x0bis_fallback\x18\x04 \x01(\x08\x12\x13\n\x0bml_disabled\x18\x13 \x01(\x08\x12\x1b\n\x13input_context_names\x18\x07 \x03(\t\x12\x0e\n\x06\x65vents\x18\x08 \x03(\t\x12K\n\x10training_phrases\x18\t \x03(\x0b\x32\x31.google.cloud.dialogflow.v2.Intent.TrainingPhrase\x12\x0e\n\x06\x61\x63tion\x18\n \x01(\t\x12<\n\x0foutput_contexts\x18\x0b \x03(\x0b\x32#.google.cloud.dialogflow.v2.Context\x12\x16\n\x0ereset_contexts\x18\x0c \x01(\x08\x12@\n\nparameters\x18\r \x03(\x0b\x32,.google.cloud.dialogflow.v2.Intent.Parameter\x12<\n\x08messages\x18\x0e \x03(\x0b\x32*.google.cloud.dialogflow.v2.Intent.Message\x12W\n\x1a\x64\x65\x66\x61ult_response_platforms\x18\x0f \x03(\x0e\x32\x33.google.cloud.dialogflow.v2.Intent.Message.Platform\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\xd3\x02\n\x0eTrainingPhrase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x44\n\x04type\x18\x02 \x01(\x0e\x32\x36.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type\x12\x45\n\x05parts\x18\x03 \x03(\x0b\x32\x36.google.cloud.dialogflow.v2.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\x9a\x15\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\x45\n\x08platform\x18\x06 \x01(\x0e\x32\x33.google.cloud.dialogflow.v2.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\xad\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\x12G\n\x07\x62uttons\x18\x04 \x03(\x0b\x32\x36.google.cloud.dialogflow.v2.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\x1a\x66\n\x0fSimpleResponses\x12S\n\x10simple_responses\x18\x01 \x03(\x0b\x32\x39.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse\x1a\xef\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?\n\x05image\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.Image\x12L\n\x07\x62uttons\x18\x05 \x03(\x0b\x32;.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button\x1a\x99\x01\n\x06\x42utton\x12\r\n\x05title\x18\x01 \x01(\t\x12\x62\n\x0fopen_uri_action\x18\x02 \x01(\x0b\x32I.google.cloud.dialogflow.v2.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\x1aY\n\x0bSuggestions\x12J\n\x0bsuggestions\x18\x01 \x03(\x0b\x32\x35.google.cloud.dialogflow.v2.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\x9d\x02\n\nListSelect\x12\r\n\x05title\x18\x01 \x01(\t\x12I\n\x05items\x18\x02 \x03(\x0b\x32:.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item\x1a\xb4\x01\n\x04Item\x12G\n\x04info\x18\x01 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12?\n\x05image\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.Image\x1a\x96\x02\n\x0e\x43\x61rouselSelect\x12M\n\x05items\x18\x01 \x03(\x0b\x32>.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item\x1a\xb4\x01\n\x04Item\x12G\n\x04info\x18\x01 \x01(\x0b\x32\x39.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12?\n\x05image\x18\x04 \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.Intent.Message.Image\x1a/\n\x0eSelectItemInfo\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x10\n\x08synonyms\x18\x02 \x03(\t"\x8b\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\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"\x9f\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.v2.IntentView\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t"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"t\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.v2.IntentView"\xad\x01\n\x13\x43reateIntentRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x32\n\x06intent\x18\x02 \x01(\x0b\x32".google.cloud.dialogflow.v2.Intent\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\x12;\n\x0bintent_view\x18\x04 \x01(\x0e\x32&.google.cloud.dialogflow.v2.IntentView"\xce\x01\n\x13UpdateIntentRequest\x12\x32\n\x06intent\x18\x01 \x01(\x0b\x32".google.cloud.dialogflow.v2.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.v2.IntentView"#\n\x13\x44\x65leteIntentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\xa4\x02\n\x19\x42\x61tchUpdateIntentsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\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\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.v2.IntentViewB\x0e\n\x0cintent_batch"Q\n\x1a\x42\x61tchUpdateIntentsResponse\x12\x33\n\x07intents\x18\x01 \x03(\x0b\x32".google.cloud.dialogflow.v2.Intent"`\n\x19\x42\x61tchDeleteIntentsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x33\n\x07intents\x18\x02 \x03(\x0b\x32".google.cloud.dialogflow.v2.Intent"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\xd8\x08\n\x07Intents\x12\x9d\x01\n\x0bListIntents\x12..google.cloud.dialogflow.v2.ListIntentsRequest\x1a/.google.cloud.dialogflow.v2.ListIntentsResponse"-\x82\xd3\xe4\x93\x02\'\x12%/v2/{parent=projects/*/agent}/intents\x12\x8c\x01\n\tGetIntent\x12,.google.cloud.dialogflow.v2.GetIntentRequest\x1a".google.cloud.dialogflow.v2.Intent"-\x82\xd3\xe4\x93\x02\'\x12%/v2/{name=projects/*/agent/intents/*}\x12\x9a\x01\n\x0c\x43reateIntent\x12/.google.cloud.dialogflow.v2.CreateIntentRequest\x1a".google.cloud.dialogflow.v2.Intent"5\x82\xd3\xe4\x93\x02/"%/v2/{parent=projects/*/agent}/intents:\x06intent\x12\xa1\x01\n\x0cUpdateIntent\x12/.google.cloud.dialogflow.v2.UpdateIntentRequest\x1a".google.cloud.dialogflow.v2.Intent"<\x82\xd3\xe4\x93\x02\x36\x32,/v2/{intent.name=projects/*/agent/intents/*}:\x06intent\x12\x86\x01\n\x0c\x44\x65leteIntent\x12/.google.cloud.dialogflow.v2.DeleteIntentRequest\x1a\x16.google.protobuf.Empty"-\x82\xd3\xe4\x93\x02\'*%/v2/{name=projects/*/agent/intents/*}\x12\xa8\x01\n\x12\x42\x61tchUpdateIntents\x12\x35.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest\x1a\x1d.google.longrunning.Operation"<\x82\xd3\xe4\x93\x02\x36"1/v2/{parent=projects/*/agent}/intents:batchUpdate:\x01*\x12\xa8\x01\n\x12\x42\x61tchDeleteIntents\x12\x35.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest\x1a\x1d.google.longrunning.Operation"<\x82\xd3\xe4\x93\x02\x36"1/v2/{parent=projects/*/agent}/intents:batchDelete:\x01*B\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' + '\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"\x90$\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\xe3\x16\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\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\xbb\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\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"\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:L\xea\x41I\n\x1cpubsub.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' ), 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__v2_dot_proto_dot_audio__config__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.DESCRIPTOR, google_dot_longrunning_dot_operations__pb2.DESCRIPTOR, google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, @@ -74,8 +83,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=5909, - serialized_end=5972, + serialized_start=6764, + serialized_end=6827, ) _sym_db.RegisterEnumDescriptor(_INTENTVIEW) @@ -110,8 +119,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1402, - serialized_end=1461, + serialized_start=1613, + serialized_end=1672, ) _sym_db.RegisterEnumDescriptor(_INTENT_TRAININGPHRASE_TYPE) @@ -156,11 +165,18 @@ serialized_options=None, type=None, ), + _descriptor.EnumValueDescriptor( + name="GOOGLE_HANGOUTS", + index=9, + number=11, + serialized_options=None, + type=None, + ), ], containing_type=None, serialized_options=None, - serialized_start=4203, - serialized_end=4342, + serialized_start=4624, + serialized_end=4784, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_PLATFORM) @@ -194,8 +210,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=4444, - serialized_end=4560, + serialized_start=4886, + serialized_end=5002, ) _sym_db.RegisterEnumDescriptor(_INTENT_WEBHOOKSTATE) @@ -240,7 +256,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -258,7 +274,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -276,7 +292,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -288,8 +304,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1322, - serialized_end=1400, + serialized_start=1518, + serialized_end=1611, ) _INTENT_TRAININGPHRASE = _descriptor.Descriptor( @@ -332,7 +348,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -350,7 +366,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -368,7 +384,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -380,8 +396,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1122, - serialized_end=1461, + serialized_start=1303, + serialized_end=1672, ) _INTENT_PARAMETER = _descriptor.Descriptor( @@ -442,7 +458,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -460,7 +476,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -478,7 +494,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -496,7 +512,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -514,7 +530,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -532,7 +548,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -544,8 +560,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1464, - serialized_end=1636, + serialized_start=1675, + serialized_end=1877, ) _INTENT_MESSAGE_TEXT = _descriptor.Descriptor( @@ -570,7 +586,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ) ], @@ -582,8 +598,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2544, - serialized_end=2564, + serialized_start=2790, + serialized_end=2815, ) _INTENT_MESSAGE_IMAGE = _descriptor.Descriptor( @@ -608,7 +624,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -626,7 +642,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -638,8 +654,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2566, - serialized_end=2620, + serialized_start=2817, + serialized_end=2881, ) _INTENT_MESSAGE_QUICKREPLIES = _descriptor.Descriptor( @@ -664,7 +680,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -682,7 +698,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -694,8 +710,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2622, - serialized_end=2674, + serialized_start=2883, + serialized_end=2945, ) _INTENT_MESSAGE_CARD_BUTTON = _descriptor.Descriptor( @@ -720,7 +736,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -738,7 +754,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -750,8 +766,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2810, - serialized_end=2850, + serialized_start=3101, + serialized_end=3151, ) _INTENT_MESSAGE_CARD = _descriptor.Descriptor( @@ -776,7 +792,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -794,7 +810,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -812,7 +828,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -830,7 +846,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -842,8 +858,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2677, - serialized_end=2850, + serialized_start=2948, + serialized_end=3151, ) _INTENT_MESSAGE_SIMPLERESPONSE = _descriptor.Descriptor( @@ -904,7 +920,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -916,8 +932,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2852, - serialized_end=2928, + serialized_start=3153, + serialized_end=3234, ) _INTENT_MESSAGE_SIMPLERESPONSES = _descriptor.Descriptor( @@ -942,7 +958,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ) ], @@ -954,8 +970,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2930, - serialized_end=3032, + serialized_start=3236, + serialized_end=3343, ) _INTENT_MESSAGE_BASICCARD_BUTTON_OPENURIACTION = _descriptor.Descriptor( @@ -992,8 +1008,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3374, - serialized_end=3402, + serialized_start=3710, + serialized_end=3738, ) _INTENT_MESSAGE_BASICCARD_BUTTON = _descriptor.Descriptor( @@ -1036,7 +1052,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -1048,8 +1064,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3249, - serialized_end=3402, + serialized_start=3580, + serialized_end=3738, ) _INTENT_MESSAGE_BASICCARD = _descriptor.Descriptor( @@ -1074,7 +1090,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1092,7 +1108,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1128,7 +1144,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1146,7 +1162,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -1158,8 +1174,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3035, - serialized_end=3402, + serialized_start=3346, + serialized_end=3738, ) _INTENT_MESSAGE_SUGGESTION = _descriptor.Descriptor( @@ -1184,7 +1200,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ) ], @@ -1196,8 +1212,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3404, - serialized_end=3431, + serialized_start=3740, + serialized_end=3772, ) _INTENT_MESSAGE_SUGGESTIONS = _descriptor.Descriptor( @@ -1222,7 +1238,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ) ], @@ -1234,8 +1250,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3433, - serialized_end=3522, + serialized_start=3774, + serialized_end=3868, ) _INTENT_MESSAGE_LINKOUTSUGGESTION = _descriptor.Descriptor( @@ -1260,7 +1276,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1278,7 +1294,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -1290,8 +1306,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3524, - serialized_end=3582, + serialized_start=3870, + serialized_end=3938, ) _INTENT_MESSAGE_LISTSELECT_ITEM = _descriptor.Descriptor( @@ -1316,7 +1332,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1334,7 +1350,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1352,7 +1368,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1370,7 +1386,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -1382,8 +1398,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3690, - serialized_end=3870, + serialized_start=4056, + serialized_end=4256, ) _INTENT_MESSAGE_LISTSELECT = _descriptor.Descriptor( @@ -1408,7 +1424,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1426,7 +1442,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -1438,8 +1454,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3585, - serialized_end=3870, + serialized_start=3941, + serialized_end=4256, ) _INTENT_MESSAGE_CAROUSELSELECT_ITEM = _descriptor.Descriptor( @@ -1464,7 +1480,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1482,7 +1498,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1500,7 +1516,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1518,7 +1534,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -1530,8 +1546,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3690, - serialized_end=3870, + serialized_start=4056, + serialized_end=4256, ) _INTENT_MESSAGE_CAROUSELSELECT = _descriptor.Descriptor( @@ -1556,7 +1572,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ) ], @@ -1568,8 +1584,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3873, - serialized_end=4151, + serialized_start=4259, + serialized_end=4562, ) _INTENT_MESSAGE_SELECTITEMINFO = _descriptor.Descriptor( @@ -1594,7 +1610,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1612,7 +1628,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -1624,8 +1640,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4153, - serialized_end=4200, + serialized_start=4564, + serialized_end=4621, ) _INTENT_MESSAGE = _descriptor.Descriptor( @@ -1848,7 +1864,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -1882,8 +1898,8 @@ fields=[], ) ], - serialized_start=1639, - serialized_end=4353, + serialized_start=1880, + serialized_end=4795, ) _INTENT_FOLLOWUPINTENTINFO = _descriptor.Descriptor( @@ -1938,8 +1954,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4355, - serialized_end=4442, + serialized_start=4797, + serialized_end=4884, ) _INTENT = _descriptor.Descriptor( @@ -1982,7 +1998,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2000,7 +2016,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2018,7 +2034,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2036,7 +2052,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2054,7 +2070,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2072,7 +2088,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2090,7 +2106,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2108,7 +2124,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2126,7 +2142,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2144,7 +2160,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2162,7 +2178,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2180,7 +2196,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2198,7 +2214,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2216,7 +2232,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2282,13 +2298,15 @@ _INTENT_FOLLOWUPINTENTINFO, ], enum_types=[_INTENT_WEBHOOKSTATE], - serialized_options=None, + serialized_options=_b( + "\352AI\n\034pubsub.googleapis.com/Intent\022)projects/{project}/agent/intents/{intent}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=345, - serialized_end=4560, + serialized_start=456, + serialized_end=5080, ) @@ -2314,7 +2332,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2332,7 +2352,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2350,7 +2370,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2368,7 +2388,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2386,7 +2406,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -2398,8 +2418,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4563, - serialized_end=4722, + serialized_start=5083, + serialized_end=5303, ) @@ -2455,8 +2475,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4724, - serialized_end=4823, + serialized_start=5305, + serialized_end=5404, ) @@ -2482,7 +2502,7 @@ 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, ), _descriptor.FieldDescriptor( @@ -2500,7 +2520,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2518,7 +2538,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -2530,8 +2550,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4825, - serialized_end=4941, + serialized_start=5407, + serialized_end=5575, ) @@ -2557,7 +2577,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2575,7 +2597,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2593,7 +2615,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2611,7 +2633,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -2623,8 +2645,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4944, - serialized_end=5117, + serialized_start=5578, + serialized_end=5807, ) @@ -2650,7 +2672,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2668,7 +2690,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2686,7 +2708,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2704,7 +2726,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -2716,8 +2738,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5120, - serialized_end=5326, + serialized_start=5810, + serialized_end=6036, ) @@ -2743,7 +2765,7 @@ 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, ) ], @@ -2755,8 +2777,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5328, - serialized_end=5363, + serialized_start=6038, + serialized_end=6115, ) @@ -2782,7 +2804,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2836,7 +2860,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2854,7 +2878,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2872,7 +2896,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -2892,8 +2916,8 @@ fields=[], ) ], - serialized_start=5366, - serialized_end=5658, + serialized_start=6118, + serialized_end=6466, ) @@ -2931,8 +2955,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5660, - serialized_end=5741, + serialized_start=6468, + serialized_end=6549, ) @@ -2958,7 +2982,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2976,7 +3002,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -2988,8 +3014,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5743, - serialized_end=5839, + serialized_start=6552, + serialized_end=6694, ) @@ -3027,8 +3053,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5841, - serialized_end=5907, + serialized_start=6696, + serialized_end=6762, ) _INTENT_TRAININGPHRASE_PART.containing_type = _INTENT_TRAININGPHRASE @@ -3354,7 +3380,7 @@ the parameter value. prompts: Optional. The collection of prompts that the agent can present - to the user in order to collect value for the parameter. + to the user in order to collect a value for the parameter. is_list: Optional. Indicates whether the parameter represents a list of values. @@ -3429,7 +3455,7 @@ dict( DESCRIPTOR=_INTENT_MESSAGE_CARD_BUTTON, __module__="google.cloud.dialogflow_v2.proto.intent_pb2", - __doc__="""Optional. Contains information about a button. + __doc__="""Contains information about a button. Attributes: @@ -3835,9 +3861,9 @@ Optional. The collection of rich messages corresponding to the ``Response`` field in the Dialogflow console. default_response_platforms: - Optional. The list of platforms for which the first response - will be taken from among the messages assigned to the - DEFAULT\_PLATFORM. + Optional. The list of platforms for which the first responses + 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 @@ -3902,9 +3928,8 @@ 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: + language is used. `Many languages `__ are supported. Note: languages must be enabled in the agent before they can be used. intent_view: @@ -3961,11 +3986,10 @@ 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. + agent's default language is used. `Many languages `__ are + supported. Note: languages must be enabled in the agent before + they can be used. intent_view: Optional. The resource view to apply to the returned intent. """, @@ -3993,11 +4017,10 @@ 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. + agent's default language is used. `Many languages `__ are + supported. Note: languages must be enabled in the agent before + they can be used. intent_view: Optional. The resource view to apply to the returned intent. """, @@ -4022,11 +4045,10 @@ 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. + agent's default language is used. `Many languages `__ are + supported. Note: languages must be enabled in the agent before + they can be used. update_mask: Optional. The mask to control which fields get updated. intent_view: @@ -4073,7 +4095,7 @@ Required. The name of the agent to update or create intents in. Format: ``projects//agent``. intent_batch: - Required. The source of the intent batch. + The source of the intent batch. intent_batch_uri: The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized @@ -4084,11 +4106,10 @@ 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. + agent's default language is used. `Many languages `__ are + supported. Note: languages must be enabled in the agent before + they can be used. update_mask: Optional. The mask to control which fields get updated. intent_view: @@ -4161,16 +4182,104 @@ DESCRIPTOR._options = None +_INTENT_TRAININGPHRASE_PART.fields_by_name["entity_type"]._options = None +_INTENT_TRAININGPHRASE_PART.fields_by_name["alias"]._options = None +_INTENT_TRAININGPHRASE_PART.fields_by_name["user_defined"]._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_PARAMETER.fields_by_name["value"]._options = None +_INTENT_PARAMETER.fields_by_name["default_value"]._options = None +_INTENT_PARAMETER.fields_by_name["entity_type_display_name"]._options = None +_INTENT_PARAMETER.fields_by_name["mandatory"]._options = None +_INTENT_PARAMETER.fields_by_name["prompts"]._options = None +_INTENT_PARAMETER.fields_by_name["is_list"]._options = None +_INTENT_MESSAGE_TEXT.fields_by_name["text"]._options = None +_INTENT_MESSAGE_IMAGE.fields_by_name["image_uri"]._options = None +_INTENT_MESSAGE_IMAGE.fields_by_name["accessibility_text"]._options = None +_INTENT_MESSAGE_QUICKREPLIES.fields_by_name["title"]._options = None +_INTENT_MESSAGE_QUICKREPLIES.fields_by_name["quick_replies"]._options = None +_INTENT_MESSAGE_CARD_BUTTON.fields_by_name["text"]._options = None +_INTENT_MESSAGE_CARD_BUTTON.fields_by_name["postback"]._options = None +_INTENT_MESSAGE_CARD.fields_by_name["title"]._options = None +_INTENT_MESSAGE_CARD.fields_by_name["subtitle"]._options = None +_INTENT_MESSAGE_CARD.fields_by_name["image_uri"]._options = None +_INTENT_MESSAGE_CARD.fields_by_name["buttons"]._options = None +_INTENT_MESSAGE_SIMPLERESPONSE.fields_by_name["display_text"]._options = None +_INTENT_MESSAGE_SIMPLERESPONSES.fields_by_name["simple_responses"]._options = None +_INTENT_MESSAGE_BASICCARD_BUTTON.fields_by_name["open_uri_action"]._options = None +_INTENT_MESSAGE_BASICCARD.fields_by_name["title"]._options = None +_INTENT_MESSAGE_BASICCARD.fields_by_name["subtitle"]._options = None +_INTENT_MESSAGE_BASICCARD.fields_by_name["image"]._options = None +_INTENT_MESSAGE_BASICCARD.fields_by_name["buttons"]._options = None +_INTENT_MESSAGE_SUGGESTION.fields_by_name["title"]._options = None +_INTENT_MESSAGE_SUGGESTIONS.fields_by_name["suggestions"]._options = None +_INTENT_MESSAGE_LINKOUTSUGGESTION.fields_by_name["destination_name"]._options = None +_INTENT_MESSAGE_LINKOUTSUGGESTION.fields_by_name["uri"]._options = None +_INTENT_MESSAGE_LISTSELECT_ITEM.fields_by_name["info"]._options = None +_INTENT_MESSAGE_LISTSELECT_ITEM.fields_by_name["title"]._options = None +_INTENT_MESSAGE_LISTSELECT_ITEM.fields_by_name["description"]._options = None +_INTENT_MESSAGE_LISTSELECT_ITEM.fields_by_name["image"]._options = None +_INTENT_MESSAGE_LISTSELECT.fields_by_name["title"]._options = None +_INTENT_MESSAGE_LISTSELECT.fields_by_name["items"]._options = None +_INTENT_MESSAGE_CAROUSELSELECT_ITEM.fields_by_name["info"]._options = None +_INTENT_MESSAGE_CAROUSELSELECT_ITEM.fields_by_name["title"]._options = None +_INTENT_MESSAGE_CAROUSELSELECT_ITEM.fields_by_name["description"]._options = None +_INTENT_MESSAGE_CAROUSELSELECT_ITEM.fields_by_name["image"]._options = None +_INTENT_MESSAGE_CAROUSELSELECT.fields_by_name["items"]._options = None +_INTENT_MESSAGE_SELECTITEMINFO.fields_by_name["key"]._options = None +_INTENT_MESSAGE_SELECTITEMINFO.fields_by_name["synonyms"]._options = None +_INTENT_MESSAGE.fields_by_name["platform"]._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_disabled"]._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["messages"]._options = None +_INTENT.fields_by_name["default_response_platforms"]._options = None +_INTENT._options = None +_LISTINTENTSREQUEST.fields_by_name["parent"]._options = None +_LISTINTENTSREQUEST.fields_by_name["language_code"]._options = None +_LISTINTENTSREQUEST.fields_by_name["intent_view"]._options = None +_LISTINTENTSREQUEST.fields_by_name["page_size"]._options = None +_LISTINTENTSREQUEST.fields_by_name["page_token"]._options = None +_GETINTENTREQUEST.fields_by_name["name"]._options = None +_GETINTENTREQUEST.fields_by_name["language_code"]._options = None +_GETINTENTREQUEST.fields_by_name["intent_view"]._options = None +_CREATEINTENTREQUEST.fields_by_name["parent"]._options = None +_CREATEINTENTREQUEST.fields_by_name["intent"]._options = None +_CREATEINTENTREQUEST.fields_by_name["language_code"]._options = None +_CREATEINTENTREQUEST.fields_by_name["intent_view"]._options = None +_UPDATEINTENTREQUEST.fields_by_name["intent"]._options = None +_UPDATEINTENTREQUEST.fields_by_name["language_code"]._options = None +_UPDATEINTENTREQUEST.fields_by_name["update_mask"]._options = None +_UPDATEINTENTREQUEST.fields_by_name["intent_view"]._options = None +_DELETEINTENTREQUEST.fields_by_name["name"]._options = None +_BATCHUPDATEINTENTSREQUEST.fields_by_name["parent"]._options = None +_BATCHUPDATEINTENTSREQUEST.fields_by_name["language_code"]._options = None +_BATCHUPDATEINTENTSREQUEST.fields_by_name["update_mask"]._options = None +_BATCHUPDATEINTENTSREQUEST.fields_by_name["intent_view"]._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.v2.Intents", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=5975, - serialized_end=7087, + serialized_options=_b( + "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + ), + serialized_start=6830, + serialized_end=8385, methods=[ _descriptor.MethodDescriptor( name="ListIntents", @@ -4180,7 +4289,7 @@ input_type=_LISTINTENTSREQUEST, output_type=_LISTINTENTSRESPONSE, serialized_options=_b( - "\202\323\344\223\002'\022%/v2/{parent=projects/*/agent}/intents" + "\202\323\344\223\002'\022%/v2/{parent=projects/*/agent}/intents\332A\006parent\332A\024parent,language_code" ), ), _descriptor.MethodDescriptor( @@ -4191,7 +4300,7 @@ input_type=_GETINTENTREQUEST, output_type=_INTENT, serialized_options=_b( - "\202\323\344\223\002'\022%/v2/{name=projects/*/agent/intents/*}" + "\202\323\344\223\002'\022%/v2/{name=projects/*/agent/intents/*}\332A\004name\332A\022name,language_code" ), ), _descriptor.MethodDescriptor( @@ -4202,7 +4311,7 @@ input_type=_CREATEINTENTREQUEST, output_type=_INTENT, serialized_options=_b( - '\202\323\344\223\002/"%/v2/{parent=projects/*/agent}/intents:\006intent' + '\202\323\344\223\002/"%/v2/{parent=projects/*/agent}/intents:\006intent\332A\rparent,intent\332A\033parent,intent,language_code' ), ), _descriptor.MethodDescriptor( @@ -4213,7 +4322,7 @@ input_type=_UPDATEINTENTREQUEST, output_type=_INTENT, serialized_options=_b( - "\202\323\344\223\00262,/v2/{intent.name=projects/*/agent/intents/*}:\006intent" + "\202\323\344\223\00262,/v2/{intent.name=projects/*/agent/intents/*}:\006intent\332A\024intent,language_code\332A intent,language_code,update_mask" ), ), _descriptor.MethodDescriptor( @@ -4224,7 +4333,7 @@ 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/*}" + "\202\323\344\223\002'*%/v2/{name=projects/*/agent/intents/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -4235,7 +4344,7 @@ 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*' + '\202\323\344\223\0026"1/v2/{parent=projects/*/agent}/intents:batchUpdate:\001*\312AO\n5google.cloud.dialogflow.v2.BatchUpdateIntentsResponse\022\026google.protobuf.Struct' ), ), _descriptor.MethodDescriptor( @@ -4246,7 +4355,7 @@ 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*' + '\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' ), ), ], diff --git a/dialogflow_v2/proto/intent_pb2_grpc.py b/dialogflow_v2/proto/intent_pb2_grpc.py index 169f0416f..1bf9dc039 100644 --- a/dialogflow_v2/proto/intent_pb2_grpc.py +++ b/dialogflow_v2/proto/intent_pb2_grpc.py @@ -43,7 +43,7 @@ class IntentsStub(object): For more information about intents, see the [Dialogflow - documentation](https://cloud.google.com/dialogflow-enterprise/docs/intents-overview). + documentation](https://cloud.google.com/dialogflow/docs/intents-overview). """ def __init__(self, channel): @@ -121,7 +121,7 @@ class IntentsServicer(object): For more information about intents, see the [Dialogflow - documentation](https://cloud.google.com/dialogflow-enterprise/docs/intents-overview). + documentation](https://cloud.google.com/dialogflow/docs/intents-overview). """ def ListIntents(self, request, context): diff --git a/dialogflow_v2/proto/session.proto b/dialogflow_v2/proto/session.proto deleted file mode 100644 index e10bb6db8..000000000 --- a/dialogflow_v2/proto/session.proto +++ /dev/null @@ -1,555 +0,0 @@ -// Copyright 2019 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/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/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"; - -// 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. -service Sessions { - // 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: "*" - }; - } - - // 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/`. It's up to the API - // caller to choose an appropriate session ID. It can be a random number or - // some type of user identifier (preferably hashed). The length of the session - // ID must not exceed 36 bytes. - string session = 1; - - // Optional. 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; - - // Optional. 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; - - // Optional. 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. - 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 { - // Optional. 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; - - // Optional. The geo location of this conversational query. - google.type.LatLng geo_location = 2; - - // Optional. The collection of contexts to be activated before this query is - // executed. - repeated Context contexts = 3; - - // Optional. Specifies whether to delete all contexts in the current session - // before the new ones are activated. - bool reset_contexts = 4; - - // 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. - repeated SessionEntityType session_entity_types = 5; - - // Optional. This field can be used to pass custom data into the webhook - // associated with the agent. Arbitrary JSON objects are supported. - google.protobuf.Struct payload = 6; - - // Optional. 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 an event was provided as input, `query_text` is not set. - string query_text = 1; - - // The language that was triggered during intent detection. - // See [Language - // Support](https://cloud.google.com/dialogflow-enterprise/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. - 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` and `webhook_state`. - Intent intent = 11; - - // The intent detection confidence. Values range from 0.0 - // (completely uncertain) to 1.0 (completely certain). - // 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; - - // The free-form diagnostic info. For example, this field could contain - // webhook call latency. The string keys of the Struct's fields map can change - // without notice. - 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 -// `StreamingDetectIntent` method. -// -// Multiple request messages should be sent in order: -// -// 1. The first message must contain `session`, `query_input` plus optionally -// `query_params` and/or `single_utterance`. The message must not contain `input_audio`. -// -// 2. If `query_input` was set to a streaming input audio config, -// all subsequent messages must contain only `input_audio`. -// Otherwise, finish the request stream. -message StreamingDetectIntentRequest { - // Required. The name of the session the query is sent to. - // Format of the session name: - // `projects//agent/sessions/`. It’s up to the API - // caller to choose an appropriate `Session ID`. It can be a random number or - // some type of user identifier (preferably hashed). The length of the session - // ID must not exceed 36 characters. - string session = 1; - - // Optional. 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; - - // 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. - // This setting is ignored when `query_input` is a piece of text or an event. - bool single_utterance = 4; - - // Optional. 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; - - // Optional. 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. - bytes output_audio = 5; - - // Instructs the speech synthesizer how to generate the output audio. This - // field is populated from the agent-level speech synthesizer configuration, - // if enabled. - 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: `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 `MESSAGE_TYPE_TRANSCRIPT`: `transcript` and possibly `is_final`. -// -// * for `MESSAGE_TYPE_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` = `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` = `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; -} - -// 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-enterprise/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; - - // Optional. The collection of phrase hints which are used to boost accuracy - // of speech recognition. - // Refer to - // [Cloud Speech API - // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) - // for more details. - repeated string phrase_hints = 4; -} - -// 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-enterprise/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; -} - -// 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; -} - -// 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; - - // Optional. The collection of parameters associated with the event. - google.protobuf.Struct parameters = 2; - - // Required. The language of this query. See [Language - // Support](https://cloud.google.com/dialogflow-enterprise/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 { - // Optional. 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 as configured by -// `sentiment_analysis_request_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 deleted file mode 100644 index 10d666fd1..000000000 --- a/dialogflow_v2/proto/session_entity_type.proto +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright 2019 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/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"; - -// 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. -// -// For more information about entity types, see the -// [Dialogflow -// documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview). -service SessionEntityTypes { - // Returns the list of all session entity types in the specified session. - rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes" - }; - } - - // Retrieves the specified session entity type. - rpc GetSessionEntityType(GetSessionEntityTypeRequest) returns (SessionEntityType) { - option (google.api.http) = { - get: "/v2/{name=projects/*/agent/sessions/*/entityTypes/*}" - }; - } - - // Creates a session entity type. - // - // If the specified session entity type already exists, overrides the session - // entity type. - rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes" - body: "session_entity_type" - }; - } - - // Updates the specified session entity type. - rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest) returns (SessionEntityType) { - option (google.api.http) = { - patch: "/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}" - body: "session_entity_type" - }; - } - - // Deletes the specified session entity type. - rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/agent/sessions/*/entityTypes/*}" - }; - } -} - -// Represents a session entity type. -// -// Extends or replaces a developer entity type at the user session level (we -// refer to the entity types defined at the agent level as "developer entity -// types"). -// -// Note: session entity types apply to all queries, regardless of the language. -message SessionEntityType { - // 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 developer entity type. - ENTITY_OVERRIDE_MODE_OVERRIDE = 1; - - // The collection of session entities extends the collection of entities in - // the corresponding developer 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 developer entity type - // and merge. - ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; - } - - // Required. The unique identifier of this session entity type. Format: - // `projects//agent/sessions//entityTypes/`. - // - // `` 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 developer 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.v2.SessionEntityTypes.ListSessionEntityTypes]. -message ListSessionEntityTypesRequest { - // Required. The session to list all session entity types from. - // Format: `projects//agent/sessions/`. - string parent = 1; - - // 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.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/`. - string name = 1; -} - -// 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/`. - string parent = 1; - - // Required. The session entity type to create. - SessionEntityType session_entity_type = 2; -} - -// The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType]. -message UpdateSessionEntityTypeRequest { - // Required. The entity type to update. Format: - // `projects//agent/sessions//entityTypes/`. - SessionEntityType session_entity_type = 1; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2; -} - -// 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/`. - string name = 1; -} diff --git a/dialogflow_v2/proto/session_entity_type_pb2.py b/dialogflow_v2/proto/session_entity_type_pb2.py index 6067441c3..c94894c28 100644 --- a/dialogflow_v2/proto/session_entity_type_pb2.py +++ b/dialogflow_v2/proto/session_entity_type_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/session_entity_type.proto @@ -15,6 +16,8 @@ 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_v2.proto import ( entity_type_pb2 as google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2, @@ -31,10 +34,12 @@ "\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\x19google/api/resource.proto\x1a\x32google/cloud/dialogflow_v2/proto/entity_type.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"\xc7\x02\n\x11SessionEntityType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12^\n\x14\x65ntity_override_mode\x18\x02 \x01(\x0e\x32@.google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode\x12?\n\x08\x65ntities\x18\x03 \x03(\x0b\x32-.google.cloud.dialogflow.v2.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"\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\x0c\n\x04name\x18\x01 \x01(\t"|\n\x1e\x43reateSessionEntityTypeRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12J\n\x13session_entity_type\x18\x02 \x01(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityType"\x9d\x01\n\x1eUpdateSessionEntityTypeRequest\x12J\n\x13session_entity_type\x18\x01 \x01(\x0b\x32-.google.cloud.dialogflow.v2.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\x99\x08\n\x12SessionEntityTypes\x12\xcd\x01\n\x16ListSessionEntityTypes\x12\x39.google.cloud.dialogflow.v2.ListSessionEntityTypesRequest\x1a:.google.cloud.dialogflow.v2.ListSessionEntityTypesResponse"<\x82\xd3\xe4\x93\x02\x36\x12\x34/v2/{parent=projects/*/agent/sessions/*}/entityTypes\x12\xbc\x01\n\x14GetSessionEntityType\x12\x37.google.cloud.dialogflow.v2.GetSessionEntityTypeRequest\x1a-.google.cloud.dialogflow.v2.SessionEntityType"<\x82\xd3\xe4\x93\x02\x36\x12\x34/v2/{name=projects/*/agent/sessions/*/entityTypes/*}\x12\xd7\x01\n\x17\x43reateSessionEntityType\x12:.google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest\x1a-.google.cloud.dialogflow.v2.SessionEntityType"Q\x82\xd3\xe4\x93\x02K"4/v2/{parent=projects/*/agent/sessions/*}/entityTypes:\x13session_entity_type\x12\xeb\x01\n\x17UpdateSessionEntityType\x12:.google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest\x1a-.google.cloud.dialogflow.v2.SessionEntityType"e\x82\xd3\xe4\x93\x02_2H/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}:\x13session_entity_type\x12\xab\x01\n\x17\x44\x65leteSessionEntityType\x12:.google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest\x1a\x16.google.protobuf.Empty"<\x82\xd3\xe4\x93\x02\x36*4/v2/{name=projects/*/agent/sessions/*/entityTypes/*}B\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' + '\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"\xcb\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:s\xea\x41p\n\'pubsub.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\xd6\t\n\x12SessionEntityTypes\x12\xd6\x01\n\x16ListSessionEntityTypes\x12\x39.google.cloud.dialogflow.v2.ListSessionEntityTypesRequest\x1a:.google.cloud.dialogflow.v2.ListSessionEntityTypesResponse"E\x82\xd3\xe4\x93\x02\x36\x12\x34/v2/{parent=projects/*/agent/sessions/*}/entityTypes\xda\x41\x06parent\x12\xbc\x01\n\x14GetSessionEntityType\x12\x37.google.cloud.dialogflow.v2.GetSessionEntityTypeRequest\x1a-.google.cloud.dialogflow.v2.SessionEntityType"<\x82\xd3\xe4\x93\x02\x36\x12\x34/v2/{name=projects/*/agent/sessions/*/entityTypes/*}\x12\xf4\x01\n\x17\x43reateSessionEntityType\x12:.google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest\x1a-.google.cloud.dialogflow.v2.SessionEntityType"n\x82\xd3\xe4\x93\x02K"4/v2/{parent=projects/*/agent/sessions/*}/entityTypes:\x13session_entity_type\xda\x41\x1aparent,session_entity_type\x12\x81\x02\n\x17UpdateSessionEntityType\x12:.google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest\x1a-.google.cloud.dialogflow.v2.SessionEntityType"{\x82\xd3\xe4\x93\x02_2H/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}:\x13session_entity_type\xda\x41\x13session_entity_type\x12\xb2\x01\n\x17\x44\x65leteSessionEntityType\x12:.google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest\x1a\x16.google.protobuf.Empty"C\x82\xd3\xe4\x93\x02\x36*4/v2/{name=projects/*/agent/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, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_entity__type__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, @@ -73,8 +78,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=460, - serialized_end=590, + serialized_start=533, + serialized_end=663, ) _sym_db.RegisterEnumDescriptor(_SESSIONENTITYTYPE_ENTITYOVERRIDEMODE) @@ -101,7 +106,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -119,7 +124,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -137,20 +142,22 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], extensions=[], nested_types=[], enum_types=[_SESSIONENTITYTYPE_ENTITYOVERRIDEMODE], - serialized_options=None, + serialized_options=_b( + "\352Ap\n'pubsub.googleapis.com/SessionEntityType\022Eprojects/{project}/agent/sessions/{session}/entityTypes/{entity_type}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=263, - serialized_end=590, + serialized_start=321, + serialized_end=780, ) @@ -176,7 +183,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -194,7 +201,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -212,7 +219,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -224,8 +231,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=592, - serialized_end=678, + serialized_start=782, + serialized_end=883, ) @@ -281,8 +288,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=681, - serialized_end=815, + serialized_start=886, + serialized_end=1020, ) @@ -308,7 +315,9 @@ 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, ) ], @@ -320,8 +329,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=817, - serialized_end=860, + serialized_start=1022, + serialized_end=1118, ) @@ -347,7 +356,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -365,7 +374,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -377,8 +386,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=862, - serialized_end=986, + serialized_start=1121, + serialized_end=1255, ) @@ -404,7 +413,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -422,7 +431,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -434,8 +443,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=989, - serialized_end=1146, + serialized_start=1258, + serialized_end=1425, ) @@ -461,7 +470,9 @@ 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, ) ], @@ -473,8 +484,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1148, - serialized_end=1194, + serialized_start=1427, + serialized_end=1516, ) _SESSIONENTITYTYPE.fields_by_name[ @@ -694,15 +705,30 @@ DESCRIPTOR._options = None +_SESSIONENTITYTYPE.fields_by_name["name"]._options = None +_SESSIONENTITYTYPE.fields_by_name["entity_override_mode"]._options = None +_SESSIONENTITYTYPE.fields_by_name["entities"]._options = None +_SESSIONENTITYTYPE._options = None +_LISTSESSIONENTITYTYPESREQUEST.fields_by_name["parent"]._options = None +_LISTSESSIONENTITYTYPESREQUEST.fields_by_name["page_size"]._options = None +_LISTSESSIONENTITYTYPESREQUEST.fields_by_name["page_token"]._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 +_UPDATESESSIONENTITYTYPEREQUEST.fields_by_name["update_mask"]._options = None +_DELETESESSIONENTITYTYPEREQUEST.fields_by_name["name"]._options = None _SESSIONENTITYTYPES = _descriptor.ServiceDescriptor( name="SessionEntityTypes", full_name="google.cloud.dialogflow.v2.SessionEntityTypes", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=1197, - serialized_end=2246, + serialized_options=_b( + "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + ), + serialized_start=1519, + serialized_end=2757, methods=[ _descriptor.MethodDescriptor( name="ListSessionEntityTypes", @@ -712,7 +738,7 @@ input_type=_LISTSESSIONENTITYTYPESREQUEST, output_type=_LISTSESSIONENTITYTYPESRESPONSE, serialized_options=_b( - "\202\323\344\223\0026\0224/v2/{parent=projects/*/agent/sessions/*}/entityTypes" + "\202\323\344\223\0026\0224/v2/{parent=projects/*/agent/sessions/*}/entityTypes\332A\006parent" ), ), _descriptor.MethodDescriptor( @@ -734,7 +760,7 @@ input_type=_CREATESESSIONENTITYTYPEREQUEST, output_type=_SESSIONENTITYTYPE, serialized_options=_b( - '\202\323\344\223\002K"4/v2/{parent=projects/*/agent/sessions/*}/entityTypes:\023session_entity_type' + '\202\323\344\223\002K"4/v2/{parent=projects/*/agent/sessions/*}/entityTypes:\023session_entity_type\332A\032parent,session_entity_type' ), ), _descriptor.MethodDescriptor( @@ -745,7 +771,7 @@ input_type=_UPDATESESSIONENTITYTYPEREQUEST, output_type=_SESSIONENTITYTYPE, serialized_options=_b( - "\202\323\344\223\002_2H/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}:\023session_entity_type" + "\202\323\344\223\002_2H/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}:\023session_entity_type\332A\023session_entity_type" ), ), _descriptor.MethodDescriptor( @@ -756,7 +782,7 @@ input_type=_DELETESESSIONENTITYTYPEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\0026*4/v2/{name=projects/*/agent/sessions/*/entityTypes/*}" + "\202\323\344\223\0026*4/v2/{name=projects/*/agent/sessions/*/entityTypes/*}\332A\004name" ), ), ], diff --git a/dialogflow_v2/proto/session_entity_type_pb2_grpc.py b/dialogflow_v2/proto/session_entity_type_pb2_grpc.py index 3a76c2d10..b030eb808 100644 --- a/dialogflow_v2/proto/session_entity_type_pb2_grpc.py +++ b/dialogflow_v2/proto/session_entity_type_pb2_grpc.py @@ -18,9 +18,13 @@ class SessionEntityTypesStub(object): 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-enterprise/docs/entities-overview). + documentation](https://cloud.google.com/dialogflow/docs/entities-overview). """ def __init__(self, channel): @@ -67,13 +71,21 @@ class SessionEntityTypesServicer(object): 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-enterprise/docs/entities-overview). + documentation](https://cloud.google.com/dialogflow/docs/entities-overview). """ 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. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -81,6 +93,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. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -91,6 +107,10 @@ def CreateSessionEntityType(self, request, context): 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. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -98,6 +118,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. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -105,6 +129,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. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") diff --git a/dialogflow_v2/proto/session_pb2.py b/dialogflow_v2/proto/session_pb2.py index 5c52d318d..51255e7ae 100644 --- a/dialogflow_v2/proto/session_pb2.py +++ b/dialogflow_v2/proto/session_pb2.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- +# -*- 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")) -from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -17,7 +17,8 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 -from google.api import resource_pb2 as google_dot_api_dot_resource__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 dialogflow_v2.proto import ( audio_config_pb2 as google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_audio__config__pb2, ) @@ -30,6 +31,7 @@ from dialogflow_v2.proto import ( session_entity_type_pb2 as google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2, ) +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 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 @@ -43,101 +45,23 @@ "\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" ), serialized_pb=_b( - '\n.google/cloud/dialogflow_v2/proto/session.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.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\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x18google/type/latlng.proto"\x87\x02\n\x13\x44\x65tectIntentRequest\x12\x0f\n\x07session\x18\x01 \x01(\t\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.QueryInput\x12J\n\x13output_audio_config\x18\x04 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig\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"\xaa\x02\n\x1cStreamingDetectIntentRequest\x12\x0f\n\x07session\x18\x01 \x01(\t\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.QueryInput\x12\x18\n\x10single_utterance\x18\x04 \x01(\x08\x12J\n\x13output_audio_config\x18\x05 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfig\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"\x8a\x02\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"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"\x9d\x01\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\x14\n\x0cphrase_hints\x18\x04 \x03(\t"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"^\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*\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\x32\xd6\x02\n\x08Sessions\x12\xb4\x01\n\x0c\x44\x65tectIntent\x12/.google.cloud.dialogflow.v2.DetectIntentRequest\x1a\x30.google.cloud.dialogflow.v2.DetectIntentResponse"A\x82\xd3\xe4\x93\x02;"6/v2/{session=projects/*/agent/sessions/*}:detectIntent:\x01*\x12\x92\x01\n\x15StreamingDetectIntent\x12\x38.google.cloud.dialogflow.v2.StreamingDetectIntentRequest\x1a\x39.google.cloud.dialogflow.v2.StreamingDetectIntentResponse"\x00(\x01\x30\x01\x42\x9b\x01\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.V2b\x06proto3' + '\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\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\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x18google/type/latlng.proto"\xa0\x02\n\x13\x44\x65tectIntentRequest\x12\x14\n\x07session\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x0cquery_params\x18\x02 \x01(\x0b\x32+.google.cloud.dialogflow.v2.QueryParametersB\x03\xe0\x41\x01\x12@\n\x0bquery_input\x18\x03 \x01(\x0b\x32&.google.cloud.dialogflow.v2.QueryInputB\x03\xe0\x41\x02\x12O\n\x13output_audio_config\x18\x04 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfigB\x03\xe0\x41\x01\x12\x18\n\x0binput_audio\x18\x05 \x01(\x0c\x42\x03\xe0\x41\x01"\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"\x9f\x03\n\x0fQueryParameters\x12\x16\n\ttime_zone\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12.\n\x0cgeo_location\x18\x02 \x01(\x0b\x32\x13.google.type.LatLngB\x03\xe0\x41\x01\x12:\n\x08\x63ontexts\x18\x03 \x03(\x0b\x32#.google.cloud.dialogflow.v2.ContextB\x03\xe0\x41\x01\x12\x1b\n\x0ereset_contexts\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12P\n\x14session_entity_types\x18\x05 \x03(\x0b\x32-.google.cloud.dialogflow.v2.SessionEntityTypeB\x03\xe0\x41\x01\x12-\n\x07payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12j\n!sentiment_analysis_request_config\x18\n \x01(\x0b\x32:.google.cloud.dialogflow.v2.SentimentAnalysisRequestConfigB\x03\xe0\x41\x01"\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"\xca\x02\n\x1cStreamingDetectIntentRequest\x12\x14\n\x07session\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x0cquery_params\x18\x02 \x01(\x0b\x32+.google.cloud.dialogflow.v2.QueryParametersB\x03\xe0\x41\x01\x12@\n\x0bquery_input\x18\x03 \x01(\x0b\x32&.google.cloud.dialogflow.v2.QueryInputB\x03\xe0\x41\x02\x12\x1f\n\x10single_utterance\x18\x04 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12O\n\x13output_audio_config\x18\x05 \x01(\x0b\x32-.google.cloud.dialogflow.v2.OutputAudioConfigB\x03\xe0\x41\x01\x12\x18\n\x0binput_audio\x18\x06 \x01(\x0c\x42\x03\xe0\x41\x01"\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"\x8a\x02\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"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"m\n\nEventInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x30\n\nparameters\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x02"K\n\x1eSentimentAnalysisRequestConfig\x12)\n\x1c\x61nalyze_query_text_sentiment\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01"^\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\xe6\x03\n\x08Sessions\x12\xca\x01\n\x0c\x44\x65tectIntent\x12/.google.cloud.dialogflow.v2.DetectIntentRequest\x1a\x30.google.cloud.dialogflow.v2.DetectIntentResponse"W\x82\xd3\xe4\x93\x02;"6/v2/{session=projects/*/agent/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\x9b\x01\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.V2b\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, - google_dot_api_dot_resource__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_audio__config__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_context__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_intent__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2.DESCRIPTOR, + google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, google_dot_protobuf_dot_struct__pb2.DESCRIPTOR, google_dot_rpc_dot_status__pb2.DESCRIPTOR, google_dot_type_dot_latlng__pb2.DESCRIPTOR, ], ) -_AUDIOENCODING = _descriptor.EnumDescriptor( - name="AudioEncoding", - full_name="google.cloud.dialogflow.v2.AudioEncoding", - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name="AUDIO_ENCODING_UNSPECIFIED", - index=0, - number=0, - serialized_options=None, - type=None, - ), - _descriptor.EnumValueDescriptor( - name="AUDIO_ENCODING_LINEAR_16", - index=1, - number=1, - serialized_options=None, - type=None, - ), - _descriptor.EnumValueDescriptor( - name="AUDIO_ENCODING_FLAC", - index=2, - number=2, - serialized_options=None, - type=None, - ), - _descriptor.EnumValueDescriptor( - name="AUDIO_ENCODING_MULAW", - index=3, - number=3, - serialized_options=None, - type=None, - ), - _descriptor.EnumValueDescriptor( - name="AUDIO_ENCODING_AMR", - index=4, - number=4, - serialized_options=None, - type=None, - ), - _descriptor.EnumValueDescriptor( - name="AUDIO_ENCODING_AMR_WB", - index=5, - number=5, - serialized_options=None, - type=None, - ), - _descriptor.EnumValueDescriptor( - name="AUDIO_ENCODING_OGG_OPUS", - index=6, - number=6, - serialized_options=None, - type=None, - ), - _descriptor.EnumValueDescriptor( - name="AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE", - index=7, - number=7, - serialized_options=None, - type=None, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=3625, - serialized_end=3876, -) -_sym_db.RegisterEnumDescriptor(_AUDIOENCODING) - -AudioEncoding = enum_type_wrapper.EnumTypeWrapper(_AUDIOENCODING) -AUDIO_ENCODING_UNSPECIFIED = 0 -AUDIO_ENCODING_LINEAR_16 = 1 -AUDIO_ENCODING_FLAC = 2 -AUDIO_ENCODING_MULAW = 3 -AUDIO_ENCODING_AMR = 4 -AUDIO_ENCODING_AMR_WB = 5 -AUDIO_ENCODING_OGG_OPUS = 6 -AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 - _STREAMINGRECOGNITIONRESULT_MESSAGETYPE = _descriptor.EnumDescriptor( name="MessageType", @@ -165,8 +89,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3013, - serialized_end=3101, + serialized_start=3168, + serialized_end=3256, ) _sym_db.RegisterEnumDescriptor(_STREAMINGRECOGNITIONRESULT_MESSAGETYPE) @@ -193,7 +117,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -211,7 +135,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -229,7 +153,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -247,7 +171,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -265,7 +189,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -277,8 +201,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=425, - serialized_end=688, + serialized_start=488, + serialized_end=776, ) @@ -388,8 +312,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=691, - serialized_end=939, + serialized_start=779, + serialized_end=1027, ) @@ -415,7 +339,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -433,7 +357,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -451,7 +375,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -469,7 +393,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -487,7 +411,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -505,7 +429,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -523,7 +447,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -535,8 +459,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=942, - serialized_end=1322, + serialized_start=1030, + serialized_end=1445, ) @@ -618,8 +542,8 @@ fields=[], ) ], - serialized_start=1325, - serialized_end=1528, + serialized_start=1448, + serialized_end=1651, ) @@ -909,8 +833,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1531, - serialized_end=2187, + serialized_start=1654, + serialized_end=2310, ) @@ -936,7 +860,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -954,7 +878,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -972,7 +896,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -990,7 +914,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\030\001\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1008,7 +932,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1026,7 +950,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], @@ -1038,8 +962,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2190, - serialized_end=2488, + serialized_start=2313, + serialized_end=2643, ) @@ -1167,8 +1091,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2491, - serialized_end=2832, + serialized_start=2646, + serialized_end=2987, ) @@ -1260,101 +1184,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2835, - serialized_end=3101, -) - - -_INPUTAUDIOCONFIG = _descriptor.Descriptor( - name="InputAudioConfig", - full_name="google.cloud.dialogflow.v2.InputAudioConfig", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="audio_encoding", - full_name="google.cloud.dialogflow.v2.InputAudioConfig.audio_encoding", - index=0, - number=1, - 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=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="sample_rate_hertz", - full_name="google.cloud.dialogflow.v2.InputAudioConfig.sample_rate_hertz", - 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, - ), - _descriptor.FieldDescriptor( - name="language_code", - full_name="google.cloud.dialogflow.v2.InputAudioConfig.language_code", - 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=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="phrase_hints", - full_name="google.cloud.dialogflow.v2.InputAudioConfig.phrase_hints", - index=3, - number=4, - type=9, - cpp_type=9, - 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, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3104, - serialized_end=3261, + serialized_start=2990, + serialized_end=3256, ) @@ -1380,7 +1211,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1398,7 +1229,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -1410,8 +1241,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3263, - serialized_end=3311, + serialized_start=3258, + serialized_end=3316, ) @@ -1437,7 +1268,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1455,7 +1286,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1473,7 +1304,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -1485,8 +1316,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3313, - serialized_end=3407, + serialized_start=3318, + serialized_end=3427, ) @@ -1512,7 +1343,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ) ], @@ -1524,8 +1355,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3409, - serialized_end=3479, + serialized_start=3429, + serialized_end=3504, ) @@ -1563,8 +1394,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3481, - serialized_end=3575, + serialized_start=3506, + serialized_end=3600, ) @@ -1620,8 +1451,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3577, - serialized_end=3622, + serialized_start=3602, + serialized_end=3647, ) _DETECTINTENTREQUEST.fields_by_name["query_params"].message_type = _QUERYPARAMETERS @@ -1657,7 +1488,11 @@ _QUERYPARAMETERS.fields_by_name[ "sentiment_analysis_request_config" ].message_type = _SENTIMENTANALYSISREQUESTCONFIG -_QUERYINPUT.fields_by_name["audio_config"].message_type = _INPUTAUDIOCONFIG +_QUERYINPUT.fields_by_name[ + "audio_config" +].message_type = ( + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_audio__config__pb2._INPUTAUDIOCONFIG +) _QUERYINPUT.fields_by_name["text"].message_type = _TEXTINPUT _QUERYINPUT.fields_by_name["event"].message_type = _EVENTINPUT _QUERYINPUT.oneofs_by_name["input"].fields.append( @@ -1724,7 +1559,6 @@ "message_type" ].enum_type = _STREAMINGRECOGNITIONRESULT_MESSAGETYPE _STREAMINGRECOGNITIONRESULT_MESSAGETYPE.containing_type = _STREAMINGRECOGNITIONRESULT -_INPUTAUDIOCONFIG.fields_by_name["audio_encoding"].enum_type = _AUDIOENCODING _EVENTINPUT.fields_by_name[ "parameters" ].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT @@ -1745,7 +1579,6 @@ DESCRIPTOR.message_types_by_name[ "StreamingRecognitionResult" ] = _STREAMINGRECOGNITIONRESULT -DESCRIPTOR.message_types_by_name["InputAudioConfig"] = _INPUTAUDIOCONFIG DESCRIPTOR.message_types_by_name["TextInput"] = _TEXTINPUT DESCRIPTOR.message_types_by_name["EventInput"] = _EVENTINPUT DESCRIPTOR.message_types_by_name[ @@ -1753,7 +1586,6 @@ ] = _SENTIMENTANALYSISREQUESTCONFIG DESCRIPTOR.message_types_by_name["SentimentAnalysisResult"] = _SENTIMENTANALYSISRESULT DESCRIPTOR.message_types_by_name["Sentiment"] = _SENTIMENT -DESCRIPTOR.enum_types_by_name["AudioEncoding"] = _AUDIOENCODING _sym_db.RegisterFileDescriptor(DESCRIPTOR) DetectIntentRequest = _reflection.GeneratedProtocolMessageType( @@ -1916,18 +1748,19 @@ Attributes: query_text: - 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 an event was provided as input, - ``query_text`` is not set. + 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. language_code: The language that was triggered during intent detection. See - `Language Support `__ for a list of the - currently supported language codes. + `Language Support `__ for a list of the currently supported + language codes. speech_recognition_confidence: The Speech recognition confidence between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that @@ -1942,11 +1775,11 @@ parameters: The collection of extracted parameters. 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. + 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. fulfillment_text: The text to be pronounced to the user or shown on the screen. Note: This is a legacy field, ``fulfillment_messages`` should @@ -1969,13 +1802,18 @@ intent: The intent that matched the conversational query. Some, not all fields are filled in this message, including but not - limited to: ``name``, ``display_name`` and ``webhook_state``. + limited to: ``name``, ``display_name``, ``end_interaction`` + and ``is_fallback``. intent_detection_confidence: The intent detection confidence. Values range from 0.0 - (completely uncertain) to 1.0 (completely certain). If there - are ``multiple knowledge_answers`` messages, this value is set - to the greatest ``knowledgeAnswers.match_confidence`` value in - the list. + (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. diagnostic_info: The free-form diagnostic info. For example, this field could contain webhook call latency. The string keys of the Struct's @@ -1997,24 +1835,44 @@ DESCRIPTOR=_STREAMINGDETECTINTENTREQUEST, __module__="google.cloud.dialogflow_v2.proto.session_pb2", __doc__="""The top-level message sent by the client to the - ``StreamingDetectIntent`` method. + [StreamingDetectIntent][] method. Multiple request messages should be sent in order: - 1. The first message must contain ``session``, ``query_input`` plus - optionally ``query_params`` and/or ``single_utterance``. The message - must not contain ``input_audio``. + 1. The first message must contain + [StreamingDetectIntentRequest.session][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.session], + [StreamingDetectIntentRequest.query\_input] plus optionally + [StreamingDetectIntentRequest.query\_params]. If the client wants to + receive an audio response, it should also contain + [StreamingDetectIntentRequest.output\_audio\_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output\_audio\_config]. + The message must not contain + [StreamingDetectIntentRequest.input\_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input\_audio]. + 2. If + [StreamingDetectIntentRequest.query\_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query\_input] + was set to + [StreamingDetectIntentRequest.query\_input.audio\_config][], all + subsequent messages must contain + [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 [StreamingDetectIntentRequest.query\_input.text][]. + + However, note that: - 2. If ``query_input`` was set to a streaming input audio config, all - subsequent messages must contain only ``input_audio``. Otherwise, - finish the request stream. + - 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: Required. The name of the session the query is sent to. Format of the session name: ``projects//agent/sessions/``. It’s up to the API caller + ID>/agent/sessions/``. It's up to the API caller to choose an appropriate ``Session ID``. It can be a random number or some type of user identifier (preferably hashed). The length of the session ID must not exceed 36 characters. @@ -2027,7 +1885,9 @@ form of text, or 3. an event that specifies which intent to trigger. single_utterance: - Optional. If ``false`` (default), recognition does not cease + Optional. Please use [InputAudioConfig.single\_utterance][goog + le.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 @@ -2083,10 +1943,15 @@ Specifies the status of the webhook request. output_audio: 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. output_audio_config: - Instructs the speech synthesizer how to generate the output - audio. This field is populated from the agent-level speech - synthesizer configuration, if enabled. + The config used by the speech synthesizer to generate the + output audio. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.StreamingDetectIntentResponse) ), @@ -2117,7 +1982,7 @@ 6. transcript: " that is" - 7. message\_type: ``MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE`` + 7. message\_type: ``END_OF_SINGLE_UTTERANCE`` 8. transcript: " that is the question" is\_final: true @@ -2127,10 +1992,9 @@ In each response we populate: - - for ``MESSAGE_TYPE_TRANSCRIPT``: ``transcript`` and possibly - ``is_final``. + - for ``TRANSCRIPT``: ``transcript`` and possibly ``is_final``. - - for ``MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE``: only ``message_type``. + - for ``END_OF_SINGLE_UTTERANCE``: only ``message_type``. Attributes: @@ -2138,14 +2002,13 @@ Type of the result message. transcript: Transcript text representing the words that the user spoke. - Populated if and only if ``message_type`` = - ``MESSAGE_TYPE_TRANSCRIPT``. + Populated if and only if ``message_type`` = ``TRANSCRIPT``. is_final: 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`` = - ``MESSAGE_TYPE_TRANSCRIPT``. + ``TRANSCRIPT``. confidence: The Speech confidence between 0.0 and 1.0 for the current portion of audio. A higher number indicates an estimated @@ -2160,42 +2023,6 @@ ) _sym_db.RegisterMessage(StreamingRecognitionResult) -InputAudioConfig = _reflection.GeneratedProtocolMessageType( - "InputAudioConfig", - (_message.Message,), - dict( - DESCRIPTOR=_INPUTAUDIOCONFIG, - __module__="google.cloud.dialogflow_v2.proto.session_pb2", - __doc__="""Instructs the speech recognizer how to process the audio content. - - - Attributes: - audio_encoding: - Required. Audio encoding of the audio content to process. - sample_rate_hertz: - Required. Sample rate (in Hertz) of the audio content sent in - the query. Refer to `Cloud Speech API documentation - `__ for - more details. - language_code: - Required. The language of the supplied audio. Dialogflow does - not do translations. See `Language Support - `__ 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. - phrase_hints: - Optional. The collection of phrase hints which are used to - boost accuracy of speech recognition. Refer to `Cloud Speech - API documentation `__ for more details. - """, - # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.InputAudioConfig) - ), -) -_sym_db.RegisterMessage(InputAudioConfig) - TextInput = _reflection.GeneratedProtocolMessageType( "TextInput", (_message.Message,), @@ -2211,11 +2038,10 @@ processed. Text length must not exceed 256 characters. language_code: Required. The language of this conversational query. See - `Language Support `__ 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. + `Language Support `__ 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. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.TextInput) ), @@ -2243,12 +2069,11 @@ Optional. The collection of parameters associated with the event. language_code: - Required. The language of this query. See `Language Support - `__ 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. + Required. The language of this query. See `Language Support `__ + 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. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.EventInput) ), @@ -2320,15 +2145,43 @@ DESCRIPTOR._options = None +_DETECTINTENTREQUEST.fields_by_name["session"]._options = None +_DETECTINTENTREQUEST.fields_by_name["query_params"]._options = None +_DETECTINTENTREQUEST.fields_by_name["query_input"]._options = None +_DETECTINTENTREQUEST.fields_by_name["output_audio_config"]._options = None +_DETECTINTENTREQUEST.fields_by_name["input_audio"]._options = None +_QUERYPARAMETERS.fields_by_name["time_zone"]._options = None +_QUERYPARAMETERS.fields_by_name["geo_location"]._options = None +_QUERYPARAMETERS.fields_by_name["contexts"]._options = None +_QUERYPARAMETERS.fields_by_name["reset_contexts"]._options = None +_QUERYPARAMETERS.fields_by_name["session_entity_types"]._options = None +_QUERYPARAMETERS.fields_by_name["payload"]._options = None +_QUERYPARAMETERS.fields_by_name["sentiment_analysis_request_config"]._options = None +_STREAMINGDETECTINTENTREQUEST.fields_by_name["session"]._options = None +_STREAMINGDETECTINTENTREQUEST.fields_by_name["query_params"]._options = None +_STREAMINGDETECTINTENTREQUEST.fields_by_name["query_input"]._options = None +_STREAMINGDETECTINTENTREQUEST.fields_by_name["single_utterance"]._options = None +_STREAMINGDETECTINTENTREQUEST.fields_by_name["output_audio_config"]._options = None +_STREAMINGDETECTINTENTREQUEST.fields_by_name["input_audio"]._options = None +_TEXTINPUT.fields_by_name["text"]._options = None +_TEXTINPUT.fields_by_name["language_code"]._options = None +_EVENTINPUT.fields_by_name["name"]._options = None +_EVENTINPUT.fields_by_name["parameters"]._options = None +_EVENTINPUT.fields_by_name["language_code"]._options = None +_SENTIMENTANALYSISREQUESTCONFIG.fields_by_name[ + "analyze_query_text_sentiment" +]._options = None _SESSIONS = _descriptor.ServiceDescriptor( name="Sessions", full_name="google.cloud.dialogflow.v2.Sessions", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=3879, - serialized_end=4221, + serialized_options=_b( + "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + ), + serialized_start=3650, + serialized_end=4136, methods=[ _descriptor.MethodDescriptor( name="DetectIntent", @@ -2338,7 +2191,7 @@ input_type=_DETECTINTENTREQUEST, output_type=_DETECTINTENTRESPONSE, serialized_options=_b( - '\202\323\344\223\002;"6/v2/{session=projects/*/agent/sessions/*}:detectIntent:\001*' + '\202\323\344\223\002;"6/v2/{session=projects/*/agent/sessions/*}:detectIntent:\001*\332A\023session,query_input' ), ), _descriptor.MethodDescriptor( diff --git a/dialogflow_v2/proto/webhook.proto b/dialogflow_v2/proto/webhook.proto deleted file mode 100644 index 4c958cebe..000000000 --- a/dialogflow_v2/proto/webhook.proto +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2019 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/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. -message WebhookResponse { - // Optional. The text to be shown on the screen. This value is passed directly - // to `QueryResult.fulfillment_text`. - string fulfillment_text = 1; - - // Optional. The collection of rich messages to present to the user. This - // value is passed directly to `QueryResult.fulfillment_messages`. - repeated Intent.Message fulfillment_messages = 2; - - // Optional. This value is passed directly to `QueryResult.webhook_source`. - string source = 3; - - // 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](https://developers.google.com/actions/dialogflow/webhook) - //
{
-  //   "google": {
-  //     "expectUserResponse": true,
-  //     "richResponse": {
-  //       "items": [
-  //         {
-  //           "simpleResponse": {
-  //             "textToSpeech": "this is a simple response"
-  //           }
-  //         }
-  //       ]
-  //     }
-  //   }
-  // }
- google.protobuf.Struct payload = 4; - - // Optional. The collection of output contexts. This value is passed directly - // to `QueryResult.output_contexts`. - repeated Context output_contexts = 5; - - // Optional. Makes the platform immediately invoke another `DetectIntent` call - // internally with the specified event as input. - EventInput followup_event_input = 6; -} - -// 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 Telephony Gateway 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 488cdfc0d..47bc45fa0 100644 --- a/dialogflow_v2/proto/webhook_pb2.py +++ b/dialogflow_v2/proto/webhook_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2/proto/webhook.proto @@ -23,6 +24,9 @@ from dialogflow_v2.proto import ( session_pb2 as google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__pb2, ) +from dialogflow_v2.proto import ( + session_entity_type_pb2 as google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2, +) from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 @@ -35,12 +39,13 @@ "\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\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"\xb3\x02\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"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' + '\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, google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__pb2.DESCRIPTOR, + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2.DESCRIPTOR, google_dot_protobuf_dot_struct__pb2.DESCRIPTOR, google_dot_api_dot_annotations__pb2.DESCRIPTOR, ], @@ -135,8 +140,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=282, - serialized_end=496, + serialized_start=342, + serialized_end=556, ) @@ -255,6 +260,24 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="session_entity_types", + full_name="google.cloud.dialogflow.v2.WebhookResponse.session_entity_types", + index=6, + number=10, + 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, + ), ], extensions=[], nested_types=[], @@ -264,8 +287,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=499, - serialized_end=806, + serialized_start=559, + serialized_end=943, ) @@ -339,8 +362,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=808, - serialized_end=912, + serialized_start=945, + serialized_end=1049, ) _WEBHOOKREQUEST.fields_by_name[ @@ -367,6 +390,11 @@ ].message_type = ( google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__pb2._EVENTINPUT ) +_WEBHOOKRESPONSE.fields_by_name[ + "session_entity_types" +].message_type = ( + google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__entity__type__pb2._SESSIONENTITYTYPE +) _ORIGINALDETECTINTENTREQUEST.fields_by_name[ "payload" ].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT @@ -449,7 +477,16 @@ followup_event_input: Optional. Makes the platform immediately invoke another ``DetectIntent`` call internally with the specified event as - input. + input. 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``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.WebhookResponse) ), diff --git a/dialogflow_v2/types.py b/dialogflow_v2/types.py index 601c46935..fd722dd46 100644 --- a/dialogflow_v2/types.py +++ b/dialogflow_v2/types.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import import sys @@ -35,6 +36,7 @@ from google.rpc import status_pb2 from google.type import latlng_pb2 + _shared_modules = [ operations_pb2, any_pb2, @@ -58,7 +60,7 @@ names = [] -for module in _shared_modules: +for module in _shared_modules: # pragma: NO COVER for name, message in get_messages(module).items(): setattr(sys.modules[__name__], name, message) names.append(name) @@ -68,4 +70,5 @@ setattr(sys.modules[__name__], name, message) names.append(name) + __all__ = tuple(sorted(names)) diff --git a/dialogflow_v2beta1/__init__.py b/dialogflow_v2beta1/__init__.py index 36e2e4a99..7715c1ce1 100644 --- a/dialogflow_v2beta1/__init__.py +++ b/dialogflow_v2beta1/__init__.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import from dialogflow_v2beta1 import types diff --git a/dialogflow_v2beta1/gapic/agents_client.py b/dialogflow_v2beta1/gapic/agents_client.py index 9c1eb746c..ab1c0a300 100644 --- a/dialogflow_v2beta1/gapic/agents_client.py +++ b/dialogflow_v2beta1/gapic/agents_client.py @@ -13,6 +13,7 @@ # 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 Agents API.""" import functools @@ -20,6 +21,7 @@ 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 @@ -37,10 +39,13 @@ 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 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 @@ -57,19 +62,19 @@ class AgentsClient(object): You can create an agent using both Dialogflow Standard Edition and Dialogflow Enterprise Edition. For details, see `Dialogflow - Editions `__. + 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, + 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 `__. + documentation `__. """ SERVICE_ADDRESS = "dialogflow.googleapis.com:443" @@ -113,6 +118,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -143,6 +149,9 @@ def __init__( 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: @@ -161,6 +170,15 @@ def __init__( 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. @@ -169,6 +187,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=agents_grpc_transport.AgentsGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -179,7 +198,7 @@ def __init__( self.transport = transport else: self.transport = agents_grpc_transport.AgentsGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -205,6 +224,151 @@ def __init__( self._inner_api_calls = {} # Service calls + def set_agent( + self, + agent, + update_mask=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Creates/updates the specified agent. + + Example: + >>> import dialogflow_v2beta1 + >>> + >>> client = dialogflow_v2beta1.AgentsClient() + >>> + >>> # TODO: Initialize `agent`: + >>> agent = {} + >>> + >>> response = client.set_agent(agent) + + 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` + 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.cloud.dialogflow_v2beta1.types.Agent` instance. + + 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 "set_agent" not in self._inner_api_calls: + self._inner_api_calls[ + "set_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, + client_info=self._client_info, + ) + + request = agent_pb2.SetAgentRequest(agent=agent, update_mask=update_mask) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("agent.parent", agent.parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + return self._inner_api_calls["set_agent"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def delete_agent( + self, + parent, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes the specified agent. + + Example: + >>> import dialogflow_v2beta1 + >>> + >>> client = dialogflow_v2beta1.AgentsClient() + >>> + >>> parent = client.project_path('[PROJECT]') + >>> + >>> client.delete_agent(parent) + + Args: + 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 + 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. + + 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 "delete_agent" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_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, + client_info=self._client_info, + ) + + request = agent_pb2.DeleteAgentRequest(parent=parent) + 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) + + self._inner_api_calls["delete_agent"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + def get_agent( self, parent, @@ -228,8 +392,8 @@ def get_agent( 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 not - be retried. + 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. @@ -322,8 +486,8 @@ def search_agents( 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 not - be retried. + 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. @@ -331,10 +495,10 @@ def search_agents( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.dialogflow_v2beta1.types.Agent` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2beta1.types.Agent` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -417,8 +581,8 @@ def train_agent( parent (str): Required. The project that the agent to train 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 not - be retried. + 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. @@ -510,8 +674,8 @@ def export_agent( ``gs:///``. If left unspecified, the serialized agent is returned inline. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -604,26 +768,10 @@ def import_agent( Format: ``projects/``. agent_uri (str): The URI to a Google Cloud Storage file containing the agent to import. Note: The URI must start with "gs://". - agent_content (bytes): The agent to import. - - Example for how to import an agent via the command line: - - .. raw:: html - -
curl \
-                      'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:import\
-                       -X POST \
-                       -H 'Authorization: Bearer '$(gcloud auth application-default
-                       print-access-token) \
-                       -H 'Accept: application/json' \
-                       -H 'Content-Type: application/json' \
-                       --compressed \
-                       --data-binary "{
-                          'agentContent': '$(cat <agent zip file> | base64 -w 0)'
-                       }"
+ agent_content (bytes): Zip compressed raw byte content for agent. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -723,26 +871,10 @@ def restore_agent( Format: ``projects/``. agent_uri (str): The URI to a Google Cloud Storage file containing the agent to restore. Note: The URI must start with "gs://". - agent_content (bytes): The agent to restore. - - Example for how to restore an agent via the command line: - - .. raw:: html - -
curl \
-                      'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:restore\
-                       -X POST \
-                       -H 'Authorization: Bearer '$(gcloud auth application-default
-                       print-access-token) \
-                       -H 'Accept: application/json' \
-                       -H 'Content-Type: application/json' \
-                       --compressed \
-                       --data-binary "{
-                           'agentContent': '$(cat <agent zip file> | base64 -w 0)'
-                       }"
+ agent_content (bytes): Zip compressed raw byte content for agent. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -801,3 +933,80 @@ def restore_agent( empty_pb2.Empty, metadata_type=struct_pb2.Struct, ) + + def get_validation_result( + self, + parent=None, + language_code=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Gets agent validation result. Agent validation is performed during + training time and is updated automatically when training is completed. + + Example: + >>> import dialogflow_v2beta1 + >>> + >>> client = dialogflow_v2beta1.AgentsClient() + >>> + >>> response = client.get_validation_result() + + 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 + languages `__ + are supported. Note: languages must be enabled in the agent before they + can be used. + 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.cloud.dialogflow_v2beta1.types.ValidationResult` instance. + + 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 "get_validation_result" not in self._inner_api_calls: + self._inner_api_calls[ + "get_validation_result" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.get_validation_result, + default_retry=self._method_configs["GetValidationResult"].retry, + default_timeout=self._method_configs["GetValidationResult"].timeout, + client_info=self._client_info, + ) + + request = agent_pb2.GetValidationResultRequest( + parent=parent, language_code=language_code + ) + 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) + + return self._inner_api_calls["get_validation_result"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) diff --git a/dialogflow_v2beta1/gapic/agents_client_config.py b/dialogflow_v2beta1/gapic/agents_client_config.py index ff12af58f..9904888f5 100644 --- a/dialogflow_v2beta1/gapic/agents_client_config.py +++ b/dialogflow_v2beta1/gapic/agents_client_config.py @@ -17,6 +17,16 @@ } }, "methods": { + "SetAgent": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "DeleteAgent": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, "GetAgent": { "timeout_millis": 60000, "retry_codes_name": "idempotent", @@ -47,6 +57,11 @@ "retry_codes_name": "idempotent", "retry_params_name": "default", }, + "GetValidationResult": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, }, } } diff --git a/dialogflow_v2beta1/gapic/contexts_client.py b/dialogflow_v2beta1/gapic/contexts_client.py index 86f3612d9..f02578bea 100644 --- a/dialogflow_v2beta1/gapic/contexts_client.py +++ b/dialogflow_v2beta1/gapic/contexts_client.py @@ -13,6 +13,7 @@ # 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 Contexts API.""" import functools @@ -20,6 +21,7 @@ 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 @@ -36,11 +38,13 @@ 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 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 @@ -61,7 +65,7 @@ class ContextsClient(object): matched for a ``DetectIntent`` request. For more information about contexts, see the `Dialogflow - documentation `__. + documentation `__. """ SERVICE_ADDRESS = "dialogflow.googleapis.com:443" @@ -140,6 +144,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -170,6 +175,9 @@ def __init__( 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: @@ -188,6 +196,15 @@ def __init__( 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. @@ -196,6 +213,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=contexts_grpc_transport.ContextsGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -206,7 +224,7 @@ def __init__( self.transport = transport else: self.transport = contexts_grpc_transport.ContextsGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -277,8 +295,8 @@ def list_contexts( 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 not - be retried. + 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. @@ -286,10 +304,10 @@ def list_contexts( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.dialogflow_v2beta1.types.Context` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2beta1.types.Context` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -366,8 +384,8 @@ def get_context( environment. If ``User ID`` is not specified, we assume default '-' user. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -450,8 +468,8 @@ def create_context( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.Context` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -528,8 +546,8 @@ def update_context( 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 not - be retried. + 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. @@ -605,8 +623,8 @@ def delete_context( environment. If ``User ID`` is not specified, we assume default '-' user. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -676,8 +694,8 @@ def delete_all_contexts( environment. If ``User ID`` is not specified, we assume default '-' user. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. diff --git a/dialogflow_v2beta1/gapic/documents_client.py b/dialogflow_v2beta1/gapic/documents_client.py index 816c8d79a..52f38d9bd 100644 --- a/dialogflow_v2beta1/gapic/documents_client.py +++ b/dialogflow_v2beta1/gapic/documents_client.py @@ -13,6 +13,7 @@ # 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 Documents API.""" import functools @@ -20,6 +21,7 @@ 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 @@ -29,6 +31,7 @@ import google.api_core.operations_v1 import google.api_core.page_iterator import google.api_core.path_template +import google.api_core.protobuf_helpers import grpc from dialogflow_v2beta1.gapic import documents_client_config @@ -40,11 +43,14 @@ 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 gcs_pb2 +from dialogflow_v2beta1.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 @@ -104,6 +110,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -134,6 +141,9 @@ def __init__( 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: @@ -152,6 +162,15 @@ def __init__( 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. @@ -160,6 +179,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=documents_grpc_transport.DocumentsGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -170,7 +190,7 @@ def __init__( self.transport = transport else: self.transport = documents_grpc_transport.DocumentsGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -207,6 +227,9 @@ def list_documents( """ Returns the list of all documents of the knowledge base. + Note: The ``projects.agent.knowledgeBases.documents`` resource is + deprecated; only use ``projects.knowledgeBases.documents``. + Example: >>> import dialogflow_v2beta1 >>> @@ -237,8 +260,8 @@ def list_documents( 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 not - be retried. + 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. @@ -246,10 +269,10 @@ def list_documents( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.dialogflow_v2beta1.types.Document` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2beta1.types.Document` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -308,6 +331,9 @@ def get_document( """ Retrieves the specified document. + Note: The ``projects.agent.knowledgeBases.documents`` resource is + deprecated; only use ``projects.knowledgeBases.documents``. + Example: >>> import dialogflow_v2beta1 >>> @@ -321,8 +347,8 @@ def get_document( name (str): Required. The name of the document to retrieve. Format ``projects//knowledgeBases//documents/``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -379,6 +405,9 @@ def create_document( """ Creates a new document. + Note: The ``projects.agent.knowledgeBases.documents`` resource is + deprecated; only use ``projects.knowledgeBases.documents``. + Operation @@ -411,8 +440,8 @@ def create_document( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.Document` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -474,6 +503,9 @@ def delete_document( """ Deletes the specified document. + Note: The ``projects.agent.knowledgeBases.documents`` resource is + deprecated; only use ``projects.knowledgeBases.documents``. + Operation @@ -499,8 +531,8 @@ def delete_document( name (str): 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 not - be retried. + 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. @@ -554,22 +586,39 @@ def delete_document( def update_document( self, - document=None, + document, update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Updates the specified document. Operation + Updates the specified document. + + 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.update_document() + >>> # TODO: Initialize `document`: + >>> document = {} + >>> + >>> response = client.update_document(document) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() Args: document (Union[dict, ~google.cloud.dialogflow_v2beta1.types.Document]): Required. The document to update. @@ -583,8 +632,8 @@ def update_document( 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 not - be retried. + 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. @@ -592,7 +641,7 @@ def update_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 @@ -628,13 +677,20 @@ def update_document( ) metadata.append(routing_metadata) - return self._inner_api_calls["update_document"]( + operation = self._inner_api_calls["update_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, + ) def reload_document( self, name=None, + gcs_source=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, @@ -644,7 +700,12 @@ def reload_document( 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. Operation Example: @@ -657,9 +718,13 @@ def reload_document( Args: name (str): 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. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.dialogflow_v2beta1.types.GcsSource` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -687,7 +752,11 @@ def reload_document( client_info=self._client_info, ) - request = document_pb2.ReloadDocumentRequest(name=name) + # Sanity check: We have some fields which are mutually exclusive; + # raise ValueError if more than one is sent. + google.api_core.protobuf_helpers.check_oneof(gcs_source=gcs_source) + + request = document_pb2.ReloadDocumentRequest(name=name, gcs_source=gcs_source) if metadata is None: metadata = [] metadata = list(metadata) diff --git a/dialogflow_v2beta1/gapic/entity_types_client.py b/dialogflow_v2beta1/gapic/entity_types_client.py index 9273a2a6d..13d191881 100644 --- a/dialogflow_v2beta1/gapic/entity_types_client.py +++ b/dialogflow_v2beta1/gapic/entity_types_client.py @@ -13,6 +13,7 @@ # 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 EntityTypes API.""" import functools @@ -20,6 +21,7 @@ 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 @@ -43,11 +45,14 @@ 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 gcs_pb2 +from dialogflow_v2beta1.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 @@ -79,7 +84,7 @@ class EntityTypesClient(object): represented by the ``SessionEntityType`` type. For more information about entity types, see the `Dialogflow - documentation `__. + documentation `__. """ SERVICE_ADDRESS = "dialogflow.googleapis.com:443" @@ -132,6 +137,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -162,6 +168,9 @@ def __init__( 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: @@ -180,6 +189,15 @@ def __init__( 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. @@ -188,6 +206,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=entity_types_grpc_transport.EntityTypesGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -198,7 +217,7 @@ def __init__( self.transport = transport else: self.transport = entity_types_grpc_transport.EntityTypesGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -262,7 +281,7 @@ def list_entity_types( ``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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. page_size (int): The maximum number of resources contained in the @@ -271,8 +290,8 @@ def list_entity_types( 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 not - be retried. + 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. @@ -280,10 +299,10 @@ def list_entity_types( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.dialogflow_v2beta1.types.EntityType` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2beta1.types.EntityType` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -359,12 +378,12 @@ def get_entity_type( ``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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -445,12 +464,12 @@ def create_entity_type( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -527,7 +546,7 @@ def update_entity_type( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. update_mask (Union[dict, ~google.cloud.dialogflow_v2beta1.types.FieldMask]): Optional. The mask to control which fields get updated. @@ -535,8 +554,8 @@ 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.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -609,8 +628,8 @@ def delete_entity_type( name (str): Required. The name of the entity type to delete. Format: ``projects//agent/entityTypes/``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -700,7 +719,7 @@ def batch_update_entity_types( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. update_mask (Union[dict, ~google.cloud.dialogflow_v2beta1.types.FieldMask]): Optional. The mask to control which fields get updated. @@ -708,8 +727,8 @@ 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.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -814,8 +833,8 @@ def batch_delete_entity_types( 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 not - be retried. + 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. @@ -913,12 +932,12 @@ def batch_create_entities( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -1019,7 +1038,7 @@ def batch_update_entities( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. update_mask (Union[dict, ~google.cloud.dialogflow_v2beta1.types.FieldMask]): Optional. The mask to control which fields get updated. @@ -1027,8 +1046,8 @@ def batch_update_entities( 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 not - be retried. + 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. @@ -1128,12 +1147,12 @@ def batch_delete_entities( ``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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. diff --git a/dialogflow_v2beta1/gapic/enums.py b/dialogflow_v2beta1/gapic/enums.py index 265a75932..e2e2282cb 100644 --- a/dialogflow_v2beta1/gapic/enums.py +++ b/dialogflow_v2beta1/gapic/enums.py @@ -13,6 +13,7 @@ # 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. + """Wrappers for protocol buffer enum types.""" import enum @@ -115,6 +116,51 @@ class OutputAudioEncoding(enum.IntEnum): OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3 +class SpeechModelVariant(enum.IntEnum): + """ + Variant of the specified ``Speech model`` to use. + + See the `Cloud Speech + documentation `__ + 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. + + 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 + documentation `__ + for details about enhanced models. + USE_ENHANCED (int): Use an enhanced model variant: + + - If an enhanced variant does not exist for the given ``model`` and + request language, Dialogflow falls back to the standard variant. + + The `Cloud Speech + documentation `__ + 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 `__ for + how to make your project eligible. + """ + + SPEECH_MODEL_VARIANT_UNSPECIFIED = 0 + USE_BEST_AVAILABLE = 1 + USE_STANDARD = 2 + USE_ENHANCED = 3 + + class SsmlVoiceGender(enum.IntEnum): """ Gender of the voice as described in `SSML voice @@ -135,6 +181,22 @@ class SsmlVoiceGender(enum.IntEnum): class Agent(object): + class ApiVersion(enum.IntEnum): + """ + API version for the agent. + + Attributes: + API_VERSION_UNSPECIFIED (int): Not specified. + API_VERSION_V1 (int): Legacy V1 API. + API_VERSION_V2 (int): V2 API. + API_VERSION_V2_BETA_1 (int): V2beta1 API. + """ + + API_VERSION_UNSPECIFIED = 0 + API_VERSION_V1 = 1 + API_VERSION_V2 = 2 + API_VERSION_V2_BETA_1 = 3 + class MatchMode(enum.IntEnum): """ Match mode determines how intents are detected from user queries. @@ -151,6 +213,22 @@ class MatchMode(enum.IntEnum): MATCH_MODE_HYBRID = 1 MATCH_MODE_ML_ONLY = 2 + class Tier(enum.IntEnum): + """ + Represents the agent tier. + + Attributes: + TIER_UNSPECIFIED (int): Not specified. This value should never be used. + TIER_STANDARD (int): Standard tier. + TIER_ENTERPRISE (int): Enterprise tier (Essentials). + TIER_ENTERPRISE_PLUS (int): Enterprise tier (Plus). + """ + + TIER_UNSPECIFIED = 0 + TIER_STANDARD = 1 + TIER_ENTERPRISE = 2 + TIER_ENTERPRISE_PLUS = 3 + class Document(object): class KnowledgeType(enum.IntEnum): @@ -202,11 +280,14 @@ class Kind(enum.IntEnum): KIND_LIST (int): List entity types contain a set of entries that do not map to canonical values. However, list entity types can contain references to other entity types (with or without aliases). + KIND_REGEXP (int): Regexp entity types allow to specify regular expressions in entries + values. """ KIND_UNSPECIFIED = 0 KIND_MAP = 1 KIND_LIST = 2 + KIND_REGEXP = 3 class Intent(object): @@ -322,6 +403,7 @@ class Platform(enum.IntEnum): } } TELEPHONY (int): Telephony Gateway. + GOOGLE_HANGOUTS (int): Google Hangouts. """ PLATFORM_UNSPECIFIED = 0 @@ -334,6 +416,148 @@ class Platform(enum.IntEnum): VIBER = 7 ACTIONS_ON_GOOGLE = 8 TELEPHONY = 10 + GOOGLE_HANGOUTS = 11 + + class RbmCarouselCard(object): + class CardWidth(enum.IntEnum): + """ + The width of the cards in the carousel. + + Attributes: + CARD_WIDTH_UNSPECIFIED (int): Not specified. + SMALL (int): 120 DP. Note that tall media cannot be used. + MEDIUM (int): 232 DP. + """ + + CARD_WIDTH_UNSPECIFIED = 0 + SMALL = 1 + MEDIUM = 2 + + class RbmStandaloneCard(object): + class CardOrientation(enum.IntEnum): + """ + Orientation of the card. + + Attributes: + CARD_ORIENTATION_UNSPECIFIED (int): Not specified. + HORIZONTAL (int): Horizontal layout. + VERTICAL (int): Vertical layout. + """ + + CARD_ORIENTATION_UNSPECIFIED = 0 + HORIZONTAL = 1 + VERTICAL = 2 + + class ThumbnailImageAlignment(enum.IntEnum): + """ + Thumbnail preview alignment for standalone cards with horizontal + layout. + + Attributes: + THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED (int): Not specified. + LEFT (int): Thumbnail preview is left-aligned. + RIGHT (int): Thumbnail preview is right-aligned. + """ + + THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED = 0 + LEFT = 1 + RIGHT = 2 + + class RbmCardContent(object): + class RbmMedia(object): + class Height(enum.IntEnum): + """ + Media height + + Attributes: + HEIGHT_UNSPECIFIED (int): Not specified. + SHORT (int): 112 DP. + MEDIUM (int): 168 DP. + TALL (int): 264 DP. Not available for rich card carousels when the card width + is set to small. + """ + + HEIGHT_UNSPECIFIED = 0 + SHORT = 1 + MEDIUM = 2 + TALL = 3 + + class MediaContent(object): + class ResponseMediaType(enum.IntEnum): + """ + Format of response media type. + + Attributes: + RESPONSE_MEDIA_TYPE_UNSPECIFIED (int): Unspecified. + AUDIO (int): Response media type is audio. + """ + + RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0 + AUDIO = 1 + + class BrowseCarouselCard(object): + class ImageDisplayOptions(enum.IntEnum): + """ + 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. + + Attributes: + IMAGE_DISPLAY_OPTIONS_UNSPECIFIED (int): Fill the gaps between the image and the image container with gray + bars. + GRAY (int): Fill the gaps between the image and the image container with gray + bars. + WHITE (int): Fill the gaps between the image and the image container with white + bars. + CROPPED (int): 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. + BLURRED_BACKGROUND (int): Pad the gaps between image and image frame with a blurred copy of the + same image. + """ + + IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0 + GRAY = 1 + WHITE = 2 + CROPPED = 3 + BLURRED_BACKGROUND = 4 + + class BrowseCarouselCardItem(object): + class OpenUrlAction(object): + class UrlTypeHint(enum.IntEnum): + """ + Type of the URI. + + Attributes: + URL_TYPE_HINT_UNSPECIFIED (int): Unspecified + AMP_ACTION (int): Url would be an amp action + AMP_CONTENT (int): URL that points directly to AMP content, or to a canonical URL + which refers to AMP content via . + """ + + URL_TYPE_HINT_UNSPECIFIED = 0 + AMP_ACTION = 1 + AMP_CONTENT = 2 + + class ColumnProperties(object): + class HorizontalAlignment(enum.IntEnum): + """ + Text alignments within a cell. + + Attributes: + HORIZONTAL_ALIGNMENT_UNSPECIFIED (int): Text is aligned to the leading edge of the column. + LEADING (int): Text is aligned to the leading edge of the column. + CENTER (int): Text is centered in the column. + TRAILING (int): Text is aligned to the trailing edge of the column. + """ + + HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0 + LEADING = 1 + CENTER = 2 + TRAILING = 3 class KnowledgeAnswers(object): @@ -420,3 +644,23 @@ class MessageType(enum.IntEnum): MESSAGE_TYPE_UNSPECIFIED = 0 TRANSCRIPT = 1 END_OF_SINGLE_UTTERANCE = 2 + + +class ValidationError(object): + class Severity(enum.IntEnum): + """ + Represents a level of severity. + + Attributes: + SEVERITY_UNSPECIFIED (int): Not specified. This value should never be used. + INFO (int): The agent doesn't follow Dialogflow best practicies. + WARNING (int): The agent may not behave as expected. + ERROR (int): The agent may experience partial failures. + CRITICAL (int): The agent may completely fail. + """ + + SEVERITY_UNSPECIFIED = 0 + INFO = 1 + WARNING = 2 + ERROR = 3 + CRITICAL = 4 diff --git a/dialogflow_v2beta1/gapic/intents_client.py b/dialogflow_v2beta1/gapic/intents_client.py index e0403bade..6283351a6 100644 --- a/dialogflow_v2beta1/gapic/intents_client.py +++ b/dialogflow_v2beta1/gapic/intents_client.py @@ -13,6 +13,7 @@ # 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 Intents API.""" import functools @@ -20,6 +21,7 @@ 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 @@ -43,13 +45,16 @@ 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 gcs_pb2 from dialogflow_v2beta1.proto import intent_pb2 from dialogflow_v2beta1.proto import intent_pb2_grpc +from dialogflow_v2beta1.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 @@ -84,7 +89,7 @@ class IntentsClient(object): Dialogflow API agent to better match intents. For more information about intents, see the `Dialogflow - documentation `__. + documentation `__. """ SERVICE_ADDRESS = "dialogflow.googleapis.com:443" @@ -135,6 +140,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -165,6 +171,9 @@ def __init__( 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: @@ -183,6 +192,15 @@ def __init__( 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. @@ -191,6 +209,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=intents_grpc_transport.IntentsGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -201,7 +220,7 @@ def __init__( self.transport = transport else: self.transport = intents_grpc_transport.IntentsGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -267,7 +286,7 @@ def list_intents( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. intent_view (~google.cloud.dialogflow_v2beta1.types.IntentView): Optional. The resource view to apply to the returned intent. @@ -277,8 +296,8 @@ def list_intents( 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 not - be retried. + 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. @@ -286,10 +305,10 @@ def list_intents( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.dialogflow_v2beta1.types.Intent` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2beta1.types.Intent` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -370,13 +389,13 @@ def get_intent( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. 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 not - be retried. + 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. @@ -459,13 +478,13 @@ def create_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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. 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 not - be retried. + 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. @@ -550,7 +569,7 @@ def update_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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. update_mask (Union[dict, ~google.cloud.dialogflow_v2beta1.types.FieldMask]): Optional. The mask to control which fields get updated. @@ -559,8 +578,8 @@ def update_intent( message :class:`~google.cloud.dialogflow_v2beta1.types.FieldMask` 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 not - be retried. + 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. @@ -636,8 +655,8 @@ def delete_intent( Format: ``projects//agent/intents/``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -724,7 +743,7 @@ def batch_update_intents( 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 `__ + languages `__ are supported. Note: languages must be enabled in the agent before they can be used. intent_batch_uri (str): The URI to a Google Cloud Storage file containing intents to update or @@ -740,8 +759,8 @@ def batch_update_intents( message :class:`~google.cloud.dialogflow_v2beta1.types.FieldMask` 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 not - be retried. + 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. @@ -849,8 +868,8 @@ def batch_delete_intents( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.Intent` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. diff --git a/dialogflow_v2beta1/gapic/knowledge_bases_client.py b/dialogflow_v2beta1/gapic/knowledge_bases_client.py index bfa8e58ea..1a34fa569 100644 --- a/dialogflow_v2beta1/gapic/knowledge_bases_client.py +++ b/dialogflow_v2beta1/gapic/knowledge_bases_client.py @@ -13,6 +13,7 @@ # 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 KnowledgeBases API.""" import functools @@ -20,6 +21,7 @@ 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 @@ -40,15 +42,18 @@ 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 gcs_pb2 from dialogflow_v2beta1.proto import intent_pb2 from dialogflow_v2beta1.proto import intent_pb2_grpc from dialogflow_v2beta1.proto import knowledge_base_pb2 from dialogflow_v2beta1.proto import knowledge_base_pb2_grpc +from dialogflow_v2beta1.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 @@ -109,6 +114,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -139,6 +145,9 @@ def __init__( 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: @@ -157,6 +166,15 @@ def __init__( 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. @@ -165,6 +183,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=knowledge_bases_grpc_transport.KnowledgeBasesGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -175,7 +194,7 @@ def __init__( self.transport = transport else: self.transport = knowledge_bases_grpc_transport.KnowledgeBasesGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -212,6 +231,9 @@ def list_knowledge_bases( """ Returns the list of all knowledge bases of the specified agent. + Note: The ``projects.agent.knowledgeBases`` resource is deprecated; only + use ``projects.knowledgeBases``. + Example: >>> import dialogflow_v2beta1 >>> @@ -242,8 +264,8 @@ def list_knowledge_bases( 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 not - be retried. + 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. @@ -251,10 +273,10 @@ def list_knowledge_bases( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.dialogflow_v2beta1.types.KnowledgeBase` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2beta1.types.KnowledgeBase` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -315,6 +337,9 @@ def get_knowledge_base( """ Retrieves the specified knowledge base. + Note: The ``projects.agent.knowledgeBases`` resource is deprecated; only + use ``projects.knowledgeBases``. + Example: >>> import dialogflow_v2beta1 >>> @@ -328,8 +353,8 @@ def get_knowledge_base( name (str): Required. The name of the knowledge base to retrieve. Format ``projects//knowledgeBases/``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -386,6 +411,9 @@ def create_knowledge_base( """ Creates a knowledge base. + Note: The ``projects.agent.knowledgeBases`` resource is deprecated; only + use ``projects.knowledgeBases``. + Example: >>> import dialogflow_v2beta1 >>> @@ -406,8 +434,8 @@ def create_knowledge_base( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.KnowledgeBase` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -466,6 +494,9 @@ def delete_knowledge_base( """ Deletes the specified knowledge base. + Note: The ``projects.agent.knowledgeBases`` resource is deprecated; only + use ``projects.knowledgeBases``. + Example: >>> import dialogflow_v2beta1 >>> @@ -481,8 +512,8 @@ def delete_knowledge_base( force (bool): Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -527,7 +558,7 @@ def delete_knowledge_base( def update_knowledge_base( self, - knowledge_base=None, + knowledge_base, update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, @@ -536,12 +567,18 @@ def update_knowledge_base( """ Updates the specified knowledge base. + Note: The ``projects.agent.knowledgeBases`` resource is deprecated; only + use ``projects.knowledgeBases``. + Example: >>> import dialogflow_v2beta1 >>> >>> client = dialogflow_v2beta1.KnowledgeBasesClient() >>> - >>> response = client.update_knowledge_base() + >>> # TODO: Initialize `knowledge_base`: + >>> knowledge_base = {} + >>> + >>> response = client.update_knowledge_base(knowledge_base) Args: knowledge_base (Union[dict, ~google.cloud.dialogflow_v2beta1.types.KnowledgeBase]): Required. The knowledge base to update. @@ -555,8 +592,8 @@ def update_knowledge_base( 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 not - be retried. + 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. diff --git a/dialogflow_v2beta1/gapic/session_entity_types_client.py b/dialogflow_v2beta1/gapic/session_entity_types_client.py index 77d67935e..3cf685004 100644 --- a/dialogflow_v2beta1/gapic/session_entity_types_client.py +++ b/dialogflow_v2beta1/gapic/session_entity_types_client.py @@ -13,6 +13,7 @@ # 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 SessionEntityTypes API.""" import functools @@ -20,6 +21,7 @@ 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 @@ -40,17 +42,20 @@ 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 gcs_pb2 from dialogflow_v2beta1.proto import intent_pb2 from dialogflow_v2beta1.proto import intent_pb2_grpc from dialogflow_v2beta1.proto import knowledge_base_pb2 from dialogflow_v2beta1.proto import knowledge_base_pb2_grpc from dialogflow_v2beta1.proto import session_entity_type_pb2 from dialogflow_v2beta1.proto import session_entity_type_pb2_grpc +from dialogflow_v2beta1.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 @@ -66,8 +71,12 @@ class SessionEntityTypesClient(object): 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 `__. + documentation `__. """ SERVICE_ADDRESS = "dialogflow.googleapis.com:443" @@ -148,6 +157,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -178,6 +188,9 @@ def __init__( 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: @@ -196,6 +209,15 @@ def __init__( 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. @@ -204,6 +226,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=session_entity_types_grpc_transport.SessionEntityTypesGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -214,7 +237,7 @@ def __init__( self.transport = transport else: self.transport = session_entity_types_grpc_transport.SessionEntityTypesGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -251,6 +274,10 @@ def list_session_entity_types( """ 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. + Example: >>> import dialogflow_v2beta1 >>> @@ -285,8 +312,8 @@ def list_session_entity_types( 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 not - be retried. + 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. @@ -294,10 +321,10 @@ def list_session_entity_types( that is provided to the method. Returns: - A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.dialogflow_v2beta1.types.SessionEntityType` instances. - This object can also be configured to iterate over the pages - of the response through the `options` parameter. + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.dialogflow_v2beta1.types.SessionEntityType` instances. + You can also iterate over the pages of the response + using its `pages` property. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -358,6 +385,10 @@ def get_session_entity_type( """ 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. + Example: >>> import dialogflow_v2beta1 >>> @@ -376,8 +407,8 @@ def get_session_entity_type( environment. If ``User ID`` is not specified, we assume default '-' user. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -437,6 +468,10 @@ def create_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. + Example: >>> import dialogflow_v2beta1 >>> @@ -461,8 +496,8 @@ def create_session_entity_type( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.SessionEntityType` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. @@ -521,6 +556,10 @@ def update_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. + Example: >>> import dialogflow_v2beta1 >>> @@ -547,8 +586,8 @@ def update_session_entity_type( 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 not - be retried. + 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. @@ -606,6 +645,10 @@ def delete_session_entity_type( """ 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. + Example: >>> import dialogflow_v2beta1 >>> @@ -624,8 +667,8 @@ def delete_session_entity_type( environment. If ``User ID`` is not specified, we assume default '-' user. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. diff --git a/dialogflow_v2beta1/gapic/sessions_client.py b/dialogflow_v2beta1/gapic/sessions_client.py index d8547155c..f3539d1b0 100644 --- a/dialogflow_v2beta1/gapic/sessions_client.py +++ b/dialogflow_v2beta1/gapic/sessions_client.py @@ -13,12 +13,14 @@ # 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 Sessions API.""" 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 @@ -39,6 +41,7 @@ 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 gcs_pb2 from dialogflow_v2beta1.proto import intent_pb2 from dialogflow_v2beta1.proto import intent_pb2_grpc from dialogflow_v2beta1.proto import knowledge_base_pb2 @@ -47,11 +50,13 @@ from dialogflow_v2beta1.proto import session_entity_type_pb2_grpc from dialogflow_v2beta1.proto import session_pb2 from dialogflow_v2beta1.proto import session_pb2_grpc +from dialogflow_v2beta1.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 @@ -116,6 +121,7 @@ def __init__( credentials=None, client_config=None, client_info=None, + client_options=None, ): """Constructor. @@ -146,6 +152,9 @@ def __init__( 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: @@ -164,6 +173,15 @@ def __init__( 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. @@ -172,6 +190,7 @@ def __init__( self.transport = transport( credentials=credentials, default_class=sessions_grpc_transport.SessionsGrpcTransport, + address=api_endpoint, ) else: if credentials: @@ -182,7 +201,7 @@ def __init__( self.transport = transport else: self.transport = sessions_grpc_transport.SessionsGrpcTransport( - address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials ) if client_info is None: @@ -242,9 +261,9 @@ def detect_intent( ``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 + 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 numbers or some type of user 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. query_input (Union[dict, ~google.cloud.dialogflow_v2beta1.types.QueryInput]): Required. The input specification. It can be set to: @@ -272,8 +291,8 @@ def detect_intent( 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 not - be retried. + 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. @@ -360,8 +379,8 @@ def streaming_detect_intent( requests (iterator[dict|google.cloud.dialogflow_v2beta1.proto.session_pb2.StreamingDetectIntentRequest]): The input objects. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.dialogflow_v2beta1.types.StreamingDetectIntentRequest` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + 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. diff --git a/dialogflow_v2beta1/gapic/sessions_client_config.py b/dialogflow_v2beta1/gapic/sessions_client_config.py index 7eb0576a3..62240223e 100644 --- a/dialogflow_v2beta1/gapic/sessions_client_config.py +++ b/dialogflow_v2beta1/gapic/sessions_client_config.py @@ -18,12 +18,12 @@ }, "methods": { "DetectIntent": { - "timeout_millis": 230000, + "timeout_millis": 220000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "StreamingDetectIntent": { - "timeout_millis": 230000, + "timeout_millis": 220000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, diff --git a/dialogflow_v2beta1/gapic/transports/agents_grpc_transport.py b/dialogflow_v2beta1/gapic/transports/agents_grpc_transport.py index 0624cc857..915a8a648 100644 --- a/dialogflow_v2beta1/gapic/transports/agents_grpc_transport.py +++ b/dialogflow_v2beta1/gapic/transports/agents_grpc_transport.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + import google.api_core.grpc_helpers import google.api_core.operations_v1 @@ -61,7 +62,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -77,7 +85,9 @@ def __init__( ) @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -87,12 +97,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property @@ -104,6 +116,32 @@ def channel(self): """ return self._channel + @property + def set_agent(self): + """Return the gRPC stub for :meth:`AgentsClient.set_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"].SetAgent + + @property + def delete_agent(self): + """Return the gRPC stub for :meth:`AgentsClient.delete_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"].DeleteAgent + @property def get_agent(self): """Return the gRPC stub for :meth:`AgentsClient.get_agent`. @@ -202,3 +240,17 @@ def restore_agent(self): deserialized response object. """ return self._stubs["agents_stub"].RestoreAgent + + @property + def get_validation_result(self): + """Return the gRPC stub for :meth:`AgentsClient.get_validation_result`. + + Gets agent validation result. Agent validation is performed during + training time and is updated automatically when training is completed. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["agents_stub"].GetValidationResult diff --git a/dialogflow_v2beta1/gapic/transports/contexts_grpc_transport.py b/dialogflow_v2beta1/gapic/transports/contexts_grpc_transport.py index 2596bf79e..d36e10087 100644 --- a/dialogflow_v2beta1/gapic/transports/contexts_grpc_transport.py +++ b/dialogflow_v2beta1/gapic/transports/contexts_grpc_transport.py @@ -14,6 +14,7 @@ # 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 context_pb2_grpc @@ -60,7 +61,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -69,7 +77,9 @@ def __init__( self._stubs = {"contexts_stub": context_pb2_grpc.ContextsStub(channel)} @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -79,12 +89,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property diff --git a/dialogflow_v2beta1/gapic/transports/documents_grpc_transport.py b/dialogflow_v2beta1/gapic/transports/documents_grpc_transport.py index d9cab7b46..ac6d0091c 100644 --- a/dialogflow_v2beta1/gapic/transports/documents_grpc_transport.py +++ b/dialogflow_v2beta1/gapic/transports/documents_grpc_transport.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + import google.api_core.grpc_helpers import google.api_core.operations_v1 @@ -61,7 +62,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -77,7 +85,9 @@ def __init__( ) @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -87,12 +97,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property @@ -110,6 +122,9 @@ def list_documents(self): Returns the list of all documents of the knowledge base. + Note: The ``projects.agent.knowledgeBases.documents`` resource is + deprecated; only use ``projects.knowledgeBases.documents``. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -123,6 +138,9 @@ def get_document(self): Retrieves the specified document. + Note: The ``projects.agent.knowledgeBases.documents`` resource is + deprecated; only use ``projects.knowledgeBases.documents``. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -136,6 +154,9 @@ def create_document(self): Creates a new document. + Note: The ``projects.agent.knowledgeBases.documents`` resource is + deprecated; only use ``projects.knowledgeBases.documents``. + Operation @@ -152,6 +173,9 @@ def delete_document(self): Deletes the specified document. + Note: The ``projects.agent.knowledgeBases.documents`` resource is + deprecated; only use ``projects.knowledgeBases.documents``. + Operation @@ -166,8 +190,13 @@ def delete_document(self): def update_document(self): """Return the gRPC stub for :meth:`DocumentsClient.update_document`. - Updates the specified document. Operation + Updates the specified document. + + Note: The ``projects.agent.knowledgeBases.documents`` resource is + deprecated; only use ``projects.knowledgeBases.documents``. + + Operation Returns: Callable: A callable which accepts the appropriate @@ -184,7 +213,12 @@ def reload_document(self): 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. Operation Returns: diff --git a/dialogflow_v2beta1/gapic/transports/entity_types_grpc_transport.py b/dialogflow_v2beta1/gapic/transports/entity_types_grpc_transport.py index 6f23211d5..d2dd5fd2b 100644 --- a/dialogflow_v2beta1/gapic/transports/entity_types_grpc_transport.py +++ b/dialogflow_v2beta1/gapic/transports/entity_types_grpc_transport.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + import google.api_core.grpc_helpers import google.api_core.operations_v1 @@ -61,7 +62,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -79,7 +87,9 @@ def __init__( ) @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -89,12 +99,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property diff --git a/dialogflow_v2beta1/gapic/transports/intents_grpc_transport.py b/dialogflow_v2beta1/gapic/transports/intents_grpc_transport.py index 3fbe328d5..463d0eb90 100644 --- a/dialogflow_v2beta1/gapic/transports/intents_grpc_transport.py +++ b/dialogflow_v2beta1/gapic/transports/intents_grpc_transport.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + import google.api_core.grpc_helpers import google.api_core.operations_v1 @@ -61,7 +62,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -77,7 +85,9 @@ def __init__( ) @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -87,12 +97,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property diff --git a/dialogflow_v2beta1/gapic/transports/knowledge_bases_grpc_transport.py b/dialogflow_v2beta1/gapic/transports/knowledge_bases_grpc_transport.py index 57cb45d1e..0da3dbe14 100644 --- a/dialogflow_v2beta1/gapic/transports/knowledge_bases_grpc_transport.py +++ b/dialogflow_v2beta1/gapic/transports/knowledge_bases_grpc_transport.py @@ -14,6 +14,7 @@ # 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 knowledge_base_pb2_grpc @@ -60,7 +61,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -71,7 +79,9 @@ def __init__( } @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -81,12 +91,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property @@ -104,6 +116,9 @@ def list_knowledge_bases(self): Returns the list of all knowledge bases of the specified agent. + Note: The ``projects.agent.knowledgeBases`` resource is deprecated; only + use ``projects.knowledgeBases``. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -117,6 +132,9 @@ def get_knowledge_base(self): Retrieves the specified knowledge base. + Note: The ``projects.agent.knowledgeBases`` resource is deprecated; only + use ``projects.knowledgeBases``. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -130,6 +148,9 @@ def create_knowledge_base(self): Creates a knowledge base. + Note: The ``projects.agent.knowledgeBases`` resource is deprecated; only + use ``projects.knowledgeBases``. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -143,6 +164,9 @@ def delete_knowledge_base(self): Deletes the specified knowledge base. + Note: The ``projects.agent.knowledgeBases`` resource is deprecated; only + use ``projects.knowledgeBases``. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -156,6 +180,9 @@ def update_knowledge_base(self): Updates the specified knowledge base. + Note: The ``projects.agent.knowledgeBases`` resource is deprecated; only + use ``projects.knowledgeBases``. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a diff --git a/dialogflow_v2beta1/gapic/transports/session_entity_types_grpc_transport.py b/dialogflow_v2beta1/gapic/transports/session_entity_types_grpc_transport.py index 50893164c..31f081ca7 100644 --- a/dialogflow_v2beta1/gapic/transports/session_entity_types_grpc_transport.py +++ b/dialogflow_v2beta1/gapic/transports/session_entity_types_grpc_transport.py @@ -14,6 +14,7 @@ # 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 session_entity_type_pb2_grpc @@ -60,7 +61,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -73,7 +81,9 @@ def __init__( } @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -83,12 +93,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property @@ -106,6 +118,10 @@ def list_session_entity_types(self): 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. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -119,6 +135,10 @@ def get_session_entity_type(self): 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. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -135,6 +155,10 @@ def create_session_entity_type(self): 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. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -148,6 +172,10 @@ def update_session_entity_type(self): 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. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -161,6 +189,10 @@ def delete_session_entity_type(self): 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. + Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a diff --git a/dialogflow_v2beta1/gapic/transports/sessions_grpc_transport.py b/dialogflow_v2beta1/gapic/transports/sessions_grpc_transport.py index f6c030675..909ea42ae 100644 --- a/dialogflow_v2beta1/gapic/transports/sessions_grpc_transport.py +++ b/dialogflow_v2beta1/gapic/transports/sessions_grpc_transport.py @@ -14,6 +14,7 @@ # 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 session_pb2_grpc @@ -60,7 +61,14 @@ def __init__( # Create the channel. if channel is None: - channel = self.create_channel(address=address, credentials=credentials) + 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 @@ -69,7 +77,9 @@ def __init__( self._stubs = {"sessions_stub": session_pb2_grpc.SessionsStub(channel)} @classmethod - def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=None): + def create_channel( + cls, address="dialogflow.googleapis.com:443", credentials=None, **kwargs + ): """Create and return a gRPC channel object. Args: @@ -79,12 +89,14 @@ def create_channel(cls, address="dialogflow.googleapis.com:443", credentials=Non 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 + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs ) @property diff --git a/dialogflow_v2beta1/proto/agent.proto b/dialogflow_v2beta1/proto/agent.proto deleted file mode 100644 index 9e4c7a2a0..000000000 --- a/dialogflow_v2beta1/proto/agent.proto +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright 2019 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/resource.proto"; -import "google/longrunning/operations.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 = "AgentProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// 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-enterprise/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-enterprise/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-enterprise/docs/agents-overview). -service Agents { - // Retrieves the specified agent. - rpc GetAgent(GetAgentRequest) returns (Agent) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*}/agent" - }; - } - - // 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" - }; - } - - // Trains the specified agent. - // - // - // Operation - rpc TrainAgent(TrainAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*}/agent:train" - body: "*" - }; - } - - // 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: "*" - }; - } - - // 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 - rpc ImportAgent(ImportAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*}/agent:import" - body: "*" - }; - } - - // 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 - rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*}/agent:restore" - body: "*" - }; - } -} - -// Represents a conversational agent. -message 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 developer entities. - MATCH_MODE_ML_ONLY = 2; - } - - // 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-enterprise/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-enterprise/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; -} - -// 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; -} - -// 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; - - // 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; -} - -// 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; - - // 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 { - // Required. 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; - - // The exported agent. - // - // Example for how to export an agent to a zip file via a command line: - //
curl \
-    //   'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:export'\
-    //   -X POST \
-    //   -H 'Authorization: Bearer '$(gcloud auth application-default
-    //   print-access-token) \
-    //   -H 'Accept: application/json' \
-    //   -H 'Content-Type: application/json' \
-    //   --compressed \
-    //   --data-binary '{}' \
-    // | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*/\1/' \
-    // | base64 --decode > <agent zip file>
- 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; - - // 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; - - // The agent to import. - // - // Example for how to import an agent via the command line: - //
curl \
-    //   'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:import\
-    //    -X POST \
-    //    -H 'Authorization: Bearer '$(gcloud auth application-default
-    //    print-access-token) \
-    //    -H 'Accept: application/json' \
-    //    -H 'Content-Type: application/json' \
-    //    --compressed \
-    //    --data-binary "{
-    //       'agentContent': '$(cat <agent zip file> | base64 -w 0)'
-    //    }"
- 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; - - // 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; - - // The agent to restore. - // - // Example for how to restore an agent via the command line: - //
curl \
-    //   'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:restore\
-    //    -X POST \
-    //    -H 'Authorization: Bearer '$(gcloud auth application-default
-    //    print-access-token) \
-    //    -H 'Accept: application/json' \
-    //    -H 'Content-Type: application/json' \
-    //    --compressed \
-    //    --data-binary "{
-    //        'agentContent': '$(cat <agent zip file> | base64 -w 0)'
-    //    }"
- bytes agent_content = 3; - } -} diff --git a/dialogflow_v2beta1/proto/agent_pb2.py b/dialogflow_v2beta1/proto/agent_pb2.py index cd38f11a2..23dde162e 100644 --- a/dialogflow_v2beta1/proto/agent_pb2.py +++ b/dialogflow_v2beta1/proto/agent_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/agent.proto @@ -15,13 +16,17 @@ 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 dialogflow_v2beta1.proto import ( + validation_result_pb2 as google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_validation__result__pb2, +) from google.longrunning import ( operations_pb2 as google_dot_longrunning_dot_operations__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( @@ -32,15 +37,17 @@ "\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\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto"\x82\x03\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"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"!\n\x0fGetAgentRequest\x12\x0e\n\x06parent\x18\x01 \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\x61gent2\xb4\x07\n\x06\x41gents\x12\x90\x01\n\x08GetAgent\x12\x30.google.cloud.dialogflow.v2beta1.GetAgentRequest\x1a&.google.cloud.dialogflow.v2beta1.Agent"*\x82\xd3\xe4\x93\x02$\x12"/v2beta1/{parent=projects/*}/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\x94\x01\n\nTrainAgent\x12\x32.google.cloud.dialogflow.v2beta1.TrainAgentRequest\x1a\x1d.google.longrunning.Operation"3\x82\xd3\xe4\x93\x02-"(/v2beta1/{parent=projects/*}/agent:train:\x01*\x12\x97\x01\n\x0b\x45xportAgent\x12\x33.google.cloud.dialogflow.v2beta1.ExportAgentRequest\x1a\x1d.google.longrunning.Operation"4\x82\xd3\xe4\x93\x02.")/v2beta1/{parent=projects/*}/agent:export:\x01*\x12\x97\x01\n\x0bImportAgent\x12\x33.google.cloud.dialogflow.v2beta1.ImportAgentRequest\x1a\x1d.google.longrunning.Operation"4\x82\xd3\xe4\x93\x02.")/v2beta1/{parent=projects/*}/agent:import:\x01*\x12\x9a\x01\n\x0cRestoreAgent\x12\x34.google.cloud.dialogflow.v2beta1.RestoreAgentRequest\x1a\x1d.google.longrunning.Operation"5\x82\xd3\xe4\x93\x02/"*/v2beta1/{parent=projects/*}/agent:restore:\x01*B\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' + '\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"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"C\n\x1aGetValidationResultRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t2\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' ), 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_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_protobuf_dot_struct__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, ], ) @@ -75,11 +82,83 @@ ], containing_type=None, serialized_options=None, - serialized_start=574, - serialized_end=660, + serialized_start=796, + serialized_end=882, ) _sym_db.RegisterEnumDescriptor(_AGENT_MATCHMODE) +_AGENT_APIVERSION = _descriptor.EnumDescriptor( + name="ApiVersion", + full_name="google.cloud.dialogflow.v2beta1.Agent.ApiVersion", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="API_VERSION_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="API_VERSION_V1", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="API_VERSION_V2", index=2, number=2, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="API_VERSION_V2_BETA_1", + index=3, + number=3, + serialized_options=None, + type=None, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=884, + serialized_end=992, +) +_sym_db.RegisterEnumDescriptor(_AGENT_APIVERSION) + +_AGENT_TIER = _descriptor.EnumDescriptor( + name="Tier", + full_name="google.cloud.dialogflow.v2beta1.Agent.Tier", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="TIER_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="TIER_STANDARD", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="TIER_ENTERPRISE", + index=2, + number=2, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="TIER_ENTERPRISE_PLUS", + index=3, + number=3, + serialized_options=None, + type=None, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=994, + serialized_end=1088, +) +_sym_db.RegisterEnumDescriptor(_AGENT_TIER) + _AGENT = _descriptor.Descriptor( name="Agent", @@ -268,17 +347,55 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="api_version", + full_name="google.cloud.dialogflow.v2beta1.Agent.api_version", + index=10, + number=14, + 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=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tier", + full_name="google.cloud.dialogflow.v2beta1.Agent.tier", + index=11, + number=15, + 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=None, + file=DESCRIPTOR, + ), ], extensions=[], nested_types=[], - enum_types=[_AGENT_MATCHMODE], - serialized_options=None, + 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" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=274, - serialized_end=660, + serialized_start=365, + serialized_end=1199, ) @@ -316,8 +433,104 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=662, - serialized_end=695, + serialized_start=1201, + serialized_end=1234, +) + + +_SETAGENTREQUEST = _descriptor.Descriptor( + name="SetAgentRequest", + full_name="google.cloud.dialogflow.v2beta1.SetAgentRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="agent", + full_name="google.cloud.dialogflow.v2beta1.SetAgentRequest.agent", + 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, + ), + _descriptor.FieldDescriptor( + name="update_mask", + full_name="google.cloud.dialogflow.v2beta1.SetAgentRequest.update_mask", + 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, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1236, + serialized_end=1357, +) + + +_DELETEAGENTREQUEST = _descriptor.Descriptor( + name="DeleteAgentRequest", + full_name="google.cloud.dialogflow.v2beta1.DeleteAgentRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.cloud.dialogflow.v2beta1.DeleteAgentRequest.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=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1359, + serialized_end=1395, ) @@ -391,8 +604,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=697, - serialized_end=773, + serialized_start=1397, + serialized_end=1473, ) @@ -448,8 +661,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=775, - serialized_end=878, + serialized_start=1475, + serialized_end=1578, ) @@ -487,8 +700,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=880, - serialized_end=915, + serialized_start=1580, + serialized_end=1615, ) @@ -544,8 +757,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=917, - serialized_end=972, + serialized_start=1617, + serialized_end=1672, ) @@ -609,8 +822,8 @@ fields=[], ) ], - serialized_start=974, - serialized_end=1050, + serialized_start=1674, + serialized_end=1750, ) @@ -692,8 +905,8 @@ fields=[], ) ], - serialized_start=1052, - serialized_end=1143, + serialized_start=1752, + serialized_end=1843, ) @@ -775,12 +988,77 @@ fields=[], ) ], - serialized_start=1145, - serialized_end=1237, + serialized_start=1845, + serialized_end=1937, +) + + +_GETVALIDATIONRESULTREQUEST = _descriptor.Descriptor( + name="GetValidationResultRequest", + full_name="google.cloud.dialogflow.v2beta1.GetValidationResultRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.cloud.dialogflow.v2beta1.GetValidationResultRequest.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=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="language_code", + full_name="google.cloud.dialogflow.v2beta1.GetValidationResultRequest.language_code", + index=1, + 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=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1939, + serialized_end=2006, ) _AGENT.fields_by_name["match_mode"].enum_type = _AGENT_MATCHMODE +_AGENT.fields_by_name["api_version"].enum_type = _AGENT_APIVERSION +_AGENT.fields_by_name["tier"].enum_type = _AGENT_TIER _AGENT_MATCHMODE.containing_type = _AGENT +_AGENT_APIVERSION.containing_type = _AGENT +_AGENT_TIER.containing_type = _AGENT +_SETAGENTREQUEST.fields_by_name["agent"].message_type = _AGENT +_SETAGENTREQUEST.fields_by_name[ + "update_mask" +].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK _SEARCHAGENTSRESPONSE.fields_by_name["agents"].message_type = _AGENT _EXPORTAGENTRESPONSE.oneofs_by_name["agent"].fields.append( _EXPORTAGENTRESPONSE.fields_by_name["agent_uri"] @@ -820,6 +1098,8 @@ ].containing_oneof = _RESTOREAGENTREQUEST.oneofs_by_name["agent"] DESCRIPTOR.message_types_by_name["Agent"] = _AGENT DESCRIPTOR.message_types_by_name["GetAgentRequest"] = _GETAGENTREQUEST +DESCRIPTOR.message_types_by_name["SetAgentRequest"] = _SETAGENTREQUEST +DESCRIPTOR.message_types_by_name["DeleteAgentRequest"] = _DELETEAGENTREQUEST DESCRIPTOR.message_types_by_name["SearchAgentsRequest"] = _SEARCHAGENTSREQUEST DESCRIPTOR.message_types_by_name["SearchAgentsResponse"] = _SEARCHAGENTSRESPONSE DESCRIPTOR.message_types_by_name["TrainAgentRequest"] = _TRAINAGENTREQUEST @@ -827,6 +1107,9 @@ DESCRIPTOR.message_types_by_name["ExportAgentResponse"] = _EXPORTAGENTRESPONSE DESCRIPTOR.message_types_by_name["ImportAgentRequest"] = _IMPORTAGENTREQUEST DESCRIPTOR.message_types_by_name["RestoreAgentRequest"] = _RESTOREAGENTREQUEST +DESCRIPTOR.message_types_by_name[ + "GetValidationResultRequest" +] = _GETVALIDATIONRESULTREQUEST _sym_db.RegisterFileDescriptor(DESCRIPTOR) Agent = _reflection.GeneratedProtocolMessageType( @@ -846,10 +1129,10 @@ Required. The name of this agent. default_language_code: Required. The default language of the agent as a language tag. - See `Language Support `__ for a list of the - currently supported language codes. This field cannot be set - by the ``Update`` method. + See `Language Support `__ for a list of the currently supported + language codes. This field cannot be set by the ``Update`` + method. supported_language_codes: Optional. The list of all languages supported by this agent (except for the ``default_language_code``). @@ -863,8 +1146,9 @@ avatar_uri: Optional. The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted `Web - Demo `__ integration. + Demo + `__ integration. enable_logging: Optional. Determines whether this agent should log conversation queries. @@ -880,6 +1164,15 @@ 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. + api_version: + 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. + tier: + Optional. The agent tier. If not specified, TIER\_STANDARD is + assumed. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Agent) ), @@ -906,6 +1199,47 @@ ) _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 + [Agents.SetAgent][google.cloud.dialogflow.v2beta1.Agents.SetAgent]. + + + Attributes: + agent: + Required. The agent to update. + update_mask: + 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]. + + + Attributes: + parent: + Required. The project that the agent to delete is associated + with. Format: ``projects/``. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DeleteAgentRequest) + ), +) +_sym_db.RegisterMessage(DeleteAgentRequest) + SearchAgentsRequest = _reflection.GeneratedProtocolMessageType( "SearchAgentsRequest", (_message.Message,), @@ -1013,22 +1347,13 @@ Attributes: agent: - Required. The exported agent. + The exported agent. agent_uri: The URI to a file containing the exported agent. This field is populated only if ``agent_uri`` is specified in ``ExportAgentRequest``. agent_content: - The exported agent. Example for how to export an agent to a - zip file via a command line: .. raw:: html
curl \
-          'https://dialogflow.googleapis.com/v2beta1/projects/<projec
-          t_name>/agent:export'\      -X POST \      -H
-          'Authorization: Bearer '$(gcloud auth application-default
-          print-access-token) \      -H 'Accept: application/json' \
-          -H 'Content-Type: application/json' \      --compressed \
-          --data-binary '{}' \    | grep agentContent | sed -e
-          's/.*"agentContent": "\([^"]*\)".*/\1/' \    | base64 --decode
-          > <agent zip file>
+ Zip compressed raw byte content for agent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ExportAgentResponse) ), @@ -1055,15 +1380,7 @@ The URI to a Google Cloud Storage file containing the agent to import. Note: The URI must start with "gs://". agent_content: - The agent to import. Example for how to import an agent via - the command line: .. raw:: html
curl \      'https:/
-          /dialogflow.googleapis.com/v2beta1/projects/<project_name&g
-          t;/agent:import\       -X POST \       -H 'Authorization:
-          Bearer '$(gcloud auth application-default       print-access-
-          token) \       -H 'Accept: application/json' \       -H
-          'Content-Type: application/json' \       --compressed \
-          --data-binary "{          'agentContent': '$(cat <agent zip
-          file> | base64 -w 0)'       }"
+ Zip compressed raw byte content for agent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ImportAgentRequest) ), @@ -1090,32 +1407,53 @@ The URI to a Google Cloud Storage file containing the agent to restore. Note: The URI must start with "gs://". agent_content: - The agent to restore. Example for how to restore an agent via - the command line: .. raw:: html
curl \      'https:/
-          /dialogflow.googleapis.com/v2beta1/projects/<project_name&g
-          t;/agent:restore\       -X POST \       -H 'Authorization:
-          Bearer '$(gcloud auth application-default       print-access-
-          token) \       -H 'Accept: application/json' \       -H
-          'Content-Type: application/json' \       --compressed \
-          --data-binary "{           'agentContent': '$(cat <agent
-          zip file> | base64 -w 0)'       }"
+ 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]. + + + Attributes: + parent: + Required. The project that the agent is associated with. + 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 + 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 _AGENTS = _descriptor.ServiceDescriptor( name="Agents", full_name="google.cloud.dialogflow.v2beta1.Agents", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=1240, - serialized_end=2188, + serialized_options=_b( + "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + ), + serialized_start=2009, + serialized_end=3976, methods=[ _descriptor.MethodDescriptor( name="GetAgent", @@ -1125,13 +1463,35 @@ input_type=_GETAGENTREQUEST, output_type=_AGENT, serialized_options=_b( - '\202\323\344\223\002$\022"/v2beta1/{parent=projects/*}/agent' + '\202\323\344\223\002V\022"/v2beta1/{parent=projects/*}/agentZ0\022./v2beta1/{parent=projects/*/locations/*}/agent' + ), + ), + _descriptor.MethodDescriptor( + name="SetAgent", + full_name="google.cloud.dialogflow.v2beta1.Agents.SetAgent", + index=1, + 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' + ), + ), + _descriptor.MethodDescriptor( + name="DeleteAgent", + full_name="google.cloud.dialogflow.v2beta1.Agents.DeleteAgent", + index=2, + 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' ), ), _descriptor.MethodDescriptor( name="SearchAgents", full_name="google.cloud.dialogflow.v2beta1.Agents.SearchAgents", - index=1, + index=3, containing_service=None, input_type=_SEARCHAGENTSREQUEST, output_type=_SEARCHAGENTSRESPONSE, @@ -1142,45 +1502,56 @@ _descriptor.MethodDescriptor( name="TrainAgent", full_name="google.cloud.dialogflow.v2beta1.Agents.TrainAgent", - index=2, + index=4, containing_service=None, input_type=_TRAINAGENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002-"(/v2beta1/{parent=projects/*}/agent:train:\001*' + '\202\323\344\223\002h"(/v2beta1/{parent=projects/*}/agent:train:\001*Z9"4/v2beta1/{parent=projects/*/locations/*}/agent:train:\001*' ), ), _descriptor.MethodDescriptor( name="ExportAgent", full_name="google.cloud.dialogflow.v2beta1.Agents.ExportAgent", - index=3, + index=5, containing_service=None, input_type=_EXPORTAGENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002.")/v2beta1/{parent=projects/*}/agent:export:\001*' + '\202\323\344\223\002j")/v2beta1/{parent=projects/*}/agent:export:\001*Z:"5/v2beta1/{parent=projects/*/locations/*}/agent:export:\001*' ), ), _descriptor.MethodDescriptor( name="ImportAgent", full_name="google.cloud.dialogflow.v2beta1.Agents.ImportAgent", - index=4, + index=6, containing_service=None, input_type=_IMPORTAGENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002.")/v2beta1/{parent=projects/*}/agent:import:\001*' + '\202\323\344\223\002j")/v2beta1/{parent=projects/*}/agent:import:\001*Z:"5/v2beta1/{parent=projects/*/locations/*}/agent:import:\001*' ), ), _descriptor.MethodDescriptor( name="RestoreAgent", full_name="google.cloud.dialogflow.v2beta1.Agents.RestoreAgent", - index=5, + index=7, containing_service=None, input_type=_RESTOREAGENTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002/"*/v2beta1/{parent=projects/*}/agent:restore:\001*' + '\202\323\344\223\002l"*/v2beta1/{parent=projects/*}/agent:restore:\001*Z;"6/v2beta1/{parent=projects/*/locations/*}/agent:restore:\001*' + ), + ), + _descriptor.MethodDescriptor( + name="GetValidationResult", + full_name="google.cloud.dialogflow.v2beta1.Agents.GetValidationResult", + index=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" ), ), ], diff --git a/dialogflow_v2beta1/proto/agent_pb2_grpc.py b/dialogflow_v2beta1/proto/agent_pb2_grpc.py index 5722352e4..e3c8f9b88 100644 --- a/dialogflow_v2beta1/proto/agent_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/agent_pb2_grpc.py @@ -4,9 +4,13 @@ from dialogflow_v2beta1.proto import ( agent_pb2 as google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2, ) +from dialogflow_v2beta1.proto import ( + validation_result_pb2 as google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_validation__result__pb2, +) from google.longrunning import ( operations_pb2 as google_dot_longrunning_dot_operations__pb2, ) +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 class AgentsStub(object): @@ -23,7 +27,7 @@ class AgentsStub(object): You can create an agent using both Dialogflow Standard Edition and Dialogflow Enterprise Edition. For details, see [Dialogflow - Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions). + 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 @@ -31,13 +35,13 @@ class AgentsStub(object): Dialogflow provides several [prebuilt - agents](https://cloud.google.com/dialogflow-enterprise/docs/agents-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-enterprise/docs/agents-overview). + documentation](https://cloud.google.com/dialogflow/docs/agents-overview). """ def __init__(self, channel): @@ -51,6 +55,16 @@ def __init__(self, channel): request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.GetAgentRequest.SerializeToString, response_deserializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.Agent.FromString, ) + self.SetAgent = channel.unary_unary( + "/google.cloud.dialogflow.v2beta1.Agents/SetAgent", + request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.SetAgentRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.Agent.FromString, + ) + self.DeleteAgent = channel.unary_unary( + "/google.cloud.dialogflow.v2beta1.Agents/DeleteAgent", + request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.DeleteAgentRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) self.SearchAgents = channel.unary_unary( "/google.cloud.dialogflow.v2beta1.Agents/SearchAgents", request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.SearchAgentsRequest.SerializeToString, @@ -76,6 +90,11 @@ def __init__(self, channel): request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.RestoreAgentRequest.SerializeToString, response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, ) + self.GetValidationResult = channel.unary_unary( + "/google.cloud.dialogflow.v2beta1.Agents/GetValidationResult", + request_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.GetValidationResultRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_validation__result__pb2.ValidationResult.FromString, + ) class AgentsServicer(object): @@ -92,7 +111,7 @@ class AgentsServicer(object): You can create an agent using both Dialogflow Standard Edition and Dialogflow Enterprise Edition. For details, see [Dialogflow - Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions). + 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 @@ -100,13 +119,13 @@ class AgentsServicer(object): Dialogflow provides several [prebuilt - agents](https://cloud.google.com/dialogflow-enterprise/docs/agents-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-enterprise/docs/agents-overview). + documentation](https://cloud.google.com/dialogflow/docs/agents-overview). """ def GetAgent(self, request, context): @@ -116,6 +135,20 @@ def GetAgent(self, request, context): 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. @@ -176,6 +209,14 @@ def RestoreAgent(self, request, context): 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. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + def add_AgentsServicer_to_server(servicer, server): rpc_method_handlers = { @@ -184,6 +225,16 @@ def add_AgentsServicer_to_server(servicer, server): request_deserializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.GetAgentRequest.FromString, response_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.Agent.SerializeToString, ), + "SetAgent": grpc.unary_unary_rpc_method_handler( + servicer.SetAgent, + request_deserializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.SetAgentRequest.FromString, + response_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.Agent.SerializeToString, + ), + "DeleteAgent": grpc.unary_unary_rpc_method_handler( + servicer.DeleteAgent, + request_deserializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.DeleteAgentRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), "SearchAgents": grpc.unary_unary_rpc_method_handler( servicer.SearchAgents, request_deserializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.SearchAgentsRequest.FromString, @@ -209,6 +260,11 @@ def add_AgentsServicer_to_server(servicer, server): request_deserializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.RestoreAgentRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), + "GetValidationResult": grpc.unary_unary_rpc_method_handler( + servicer.GetValidationResult, + request_deserializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.GetValidationResultRequest.FromString, + response_serializer=google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_validation__result__pb2.ValidationResult.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( "google.cloud.dialogflow.v2beta1.Agents", rpc_method_handlers diff --git a/dialogflow_v2beta1/proto/audio_config.proto b/dialogflow_v2beta1/proto/audio_config.proto deleted file mode 100644 index 8045290b2..000000000 --- a/dialogflow_v2beta1/proto/audio_config.proto +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright 2019 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 = "AudioConfigProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -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; -} - -// 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-enterprise/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; - - // Optional. The collection of phrase hints which are used to boost accuracy - // of speech recognition. - // Refer to - // [Cloud Speech API - // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) - // for more details. - repeated string phrase_hints = 4; - - // 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](https://cloud.google.com/speech-to-text/docs/basics#select-model) - // for more details. - string model = 7; -} - -// 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; -} - -// 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 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. 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; -} - -// 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; -} - -// 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. - 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; -} - -// Instructs the speech synthesizer how to generate the output audio content. -message OutputAudioConfig { - // Required. Audio encoding of the synthesized audio content. - OutputAudioEncoding audio_encoding = 1; - - // Optional. 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; - - // Optional. Configuration of how speech should be synthesized. - SynthesizeSpeechConfig synthesize_speech_config = 3; -} diff --git a/dialogflow_v2beta1/proto/audio_config_pb2.py b/dialogflow_v2beta1/proto/audio_config_pb2.py index 76806fc40..52f1647e2 100644 --- a/dialogflow_v2beta1/proto/audio_config_pb2.py +++ b/dialogflow_v2beta1/proto/audio_config_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/audio_config.proto @@ -15,6 +16,7 @@ _sym_db = _symbol_database.Default() +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 @@ -26,9 +28,12 @@ "\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\x1cgoogle/api/annotations.proto"\xb1\x01\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\x14\n\x0cphrase_hints\x18\x04 \x03(\t\x12\r\n\x05model\x18\x07 \x01(\t"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"\xd7\x01\n\x11OutputAudioConfig\x12L\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32\x34.google.cloud.dialogflow.v2beta1.OutputAudioEncoding\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*\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' + '\n8google/cloud/dialogflow_v2beta1/proto/audio_config.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\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"\xfa\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\x14\n\x0cphrase_hints\x18\x04 \x03(\t\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"\xd7\x01\n\x11OutputAudioConfig\x12L\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32\x34.google.cloud.dialogflow.v2beta1.OutputAudioEncoding\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_annotations__pb2.DESCRIPTOR], + dependencies=[ + google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + ], ) _AUDIOENCODING = _descriptor.EnumDescriptor( @@ -96,12 +101,47 @@ ], containing_type=None, serialized_options=None, - serialized_start=818, - serialized_end=1069, + serialized_start=1249, + serialized_end=1500, ) _sym_db.RegisterEnumDescriptor(_AUDIOENCODING) AudioEncoding = enum_type_wrapper.EnumTypeWrapper(_AUDIOENCODING) +_SPEECHMODELVARIANT = _descriptor.EnumDescriptor( + name="SpeechModelVariant", + full_name="google.cloud.dialogflow.v2beta1.SpeechModelVariant", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="SPEECH_MODEL_VARIANT_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="USE_BEST_AVAILABLE", + index=1, + number=1, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="USE_STANDARD", index=2, number=2, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="USE_ENHANCED", index=3, number=3, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=1502, + serialized_end=1620, +) +_sym_db.RegisterEnumDescriptor(_SPEECHMODELVARIANT) + +SpeechModelVariant = enum_type_wrapper.EnumTypeWrapper(_SPEECHMODELVARIANT) _SSMLVOICEGENDER = _descriptor.EnumDescriptor( name="SsmlVoiceGender", full_name="google.cloud.dialogflow.v2beta1.SsmlVoiceGender", @@ -139,8 +179,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1072, - serialized_end=1213, + serialized_start=1623, + serialized_end=1764, ) _sym_db.RegisterEnumDescriptor(_SSMLVOICEGENDER) @@ -182,8 +222,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1216, - serialized_end=1380, + serialized_start=1767, + serialized_end=1931, ) _sym_db.RegisterEnumDescriptor(_OUTPUTAUDIOENCODING) @@ -196,6 +236,10 @@ AUDIO_ENCODING_AMR_WB = 5 AUDIO_ENCODING_OGG_OPUS = 6 AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7 +SPEECH_MODEL_VARIANT_UNSPECIFIED = 0 +USE_BEST_AVAILABLE = 1 +USE_STANDARD = 2 +USE_ENHANCED = 3 SSML_VOICE_GENDER_UNSPECIFIED = 0 SSML_VOICE_GENDER_MALE = 1 SSML_VOICE_GENDER_FEMALE = 2 @@ -206,6 +250,156 @@ OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3 +_SPEECHCONTEXT = _descriptor.Descriptor( + name="SpeechContext", + full_name="google.cloud.dialogflow.v2beta1.SpeechContext", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="phrases", + full_name="google.cloud.dialogflow.v2beta1.SpeechContext.phrases", + index=0, + number=1, + type=9, + cpp_type=9, + 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, + ), + _descriptor.FieldDescriptor( + name="boost", + full_name="google.cloud.dialogflow.v2beta1.SpeechContext.boost", + index=1, + number=2, + type=2, + cpp_type=6, + label=1, + has_default_value=False, + default_value=float(0), + 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=155, + serialized_end=202, +) + + +_SPEECHWORDINFO = _descriptor.Descriptor( + name="SpeechWordInfo", + full_name="google.cloud.dialogflow.v2beta1.SpeechWordInfo", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="word", + full_name="google.cloud.dialogflow.v2beta1.SpeechWordInfo.word", + index=0, + 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=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="start_offset", + full_name="google.cloud.dialogflow.v2beta1.SpeechWordInfo.start_offset", + index=1, + 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, + ), + _descriptor.FieldDescriptor( + name="end_offset", + full_name="google.cloud.dialogflow.v2beta1.SpeechWordInfo.end_offset", + index=2, + 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, + ), + _descriptor.FieldDescriptor( + name="confidence", + full_name="google.cloud.dialogflow.v2beta1.SpeechWordInfo.confidence", + index=3, + number=4, + type=2, + cpp_type=6, + label=1, + has_default_value=False, + default_value=float(0), + 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=205, + serialized_end=351, +) + + _INPUTAUDIOCONFIG = _descriptor.Descriptor( name="InputAudioConfig", full_name="google.cloud.dialogflow.v2beta1.InputAudioConfig", @@ -267,10 +461,28 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="enable_word_info", + full_name="google.cloud.dialogflow.v2beta1.InputAudioConfig.enable_word_info", + index=3, + number=13, + 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=None, + file=DESCRIPTOR, + ), _descriptor.FieldDescriptor( name="phrase_hints", full_name="google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints", - index=3, + index=4, number=4, type=9, cpp_type=9, @@ -285,10 +497,28 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="speech_contexts", + full_name="google.cloud.dialogflow.v2beta1.InputAudioConfig.speech_contexts", + index=5, + number=11, + 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, + ), _descriptor.FieldDescriptor( name="model", full_name="google.cloud.dialogflow.v2beta1.InputAudioConfig.model", - index=4, + index=6, number=7, type=9, cpp_type=9, @@ -303,6 +533,42 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="model_variant", + full_name="google.cloud.dialogflow.v2beta1.InputAudioConfig.model_variant", + index=7, + number=10, + 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=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="single_utterance", + full_name="google.cloud.dialogflow.v2beta1.InputAudioConfig.single_utterance", + index=8, + number=8, + 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=None, + file=DESCRIPTOR, + ), ], extensions=[], nested_types=[], @@ -312,8 +578,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=124, - serialized_end=301, + serialized_start=354, + serialized_end=732, ) @@ -369,8 +635,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=303, - serialized_end=410, + serialized_start=734, + serialized_end=841, ) @@ -480,8 +746,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=413, - serialized_end=597, + serialized_start=844, + serialized_end=1028, ) @@ -555,33 +821,115 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=600, - serialized_end=815, + serialized_start=1031, + serialized_end=1246, ) +_SPEECHWORDINFO.fields_by_name[ + "start_offset" +].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_SPEECHWORDINFO.fields_by_name[ + "end_offset" +].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _INPUTAUDIOCONFIG.fields_by_name["audio_encoding"].enum_type = _AUDIOENCODING +_INPUTAUDIOCONFIG.fields_by_name["speech_contexts"].message_type = _SPEECHCONTEXT +_INPUTAUDIOCONFIG.fields_by_name["model_variant"].enum_type = _SPEECHMODELVARIANT _VOICESELECTIONPARAMS.fields_by_name["ssml_gender"].enum_type = _SSMLVOICEGENDER _SYNTHESIZESPEECHCONFIG.fields_by_name["voice"].message_type = _VOICESELECTIONPARAMS _OUTPUTAUDIOCONFIG.fields_by_name["audio_encoding"].enum_type = _OUTPUTAUDIOENCODING _OUTPUTAUDIOCONFIG.fields_by_name[ "synthesize_speech_config" ].message_type = _SYNTHESIZESPEECHCONFIG +DESCRIPTOR.message_types_by_name["SpeechContext"] = _SPEECHCONTEXT +DESCRIPTOR.message_types_by_name["SpeechWordInfo"] = _SPEECHWORDINFO DESCRIPTOR.message_types_by_name["InputAudioConfig"] = _INPUTAUDIOCONFIG DESCRIPTOR.message_types_by_name["VoiceSelectionParams"] = _VOICESELECTIONPARAMS DESCRIPTOR.message_types_by_name["SynthesizeSpeechConfig"] = _SYNTHESIZESPEECHCONFIG DESCRIPTOR.message_types_by_name["OutputAudioConfig"] = _OUTPUTAUDIOCONFIG DESCRIPTOR.enum_types_by_name["AudioEncoding"] = _AUDIOENCODING +DESCRIPTOR.enum_types_by_name["SpeechModelVariant"] = _SPEECHMODELVARIANT DESCRIPTOR.enum_types_by_name["SsmlVoiceGender"] = _SSMLVOICEGENDER DESCRIPTOR.enum_types_by_name["OutputAudioEncoding"] = _OUTPUTAUDIOENCODING _sym_db.RegisterFileDescriptor(DESCRIPTOR) +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. + + + 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 + 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. + """, + # @@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. + + + Attributes: + word: + The word this info is for. + start_offset: + 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. + end_offset: + 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. + confidence: + 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. + """, + # @@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 how to process the audio content. + __doc__="""Instructs the speech recognizer on how to process the audio content. Attributes: @@ -594,17 +942,29 @@ more details. language_code: Required. The language of the supplied audio. Dialogflow does - not do translations. See `Language Support - `__ for a list of the - currently supported language codes. Note that queries in the - same session do not necessarily need to specify the same + not do translations. See `Language Support `__ 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. + 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. phrase_hints: - Optional. The collection of phrase hints which are used to - boost accuracy of speech recognition. Refer to `Cloud Speech - API documentation `__ for more details. + 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. + speech_contexts: + Optional. 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 @@ -616,6 +976,21 @@ the standard version of the specified model. Refer to `Cloud Speech API documentation `__ for more details. + model_variant: + Optional. 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. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.InputAudioConfig) ), diff --git a/dialogflow_v2beta1/proto/context.proto b/dialogflow_v2beta1/proto/context.proto deleted file mode 100644 index bd5926aa4..000000000 --- a/dialogflow_v2beta1/proto/context.proto +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2019 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/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"; - -// 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-enterprise/docs/contexts-overview). -service Contexts { - // 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" - } - }; - } - - // 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/*}" - } - }; - } - - // 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" - } - }; - } - - // 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" - } - }; - } - - // 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/*}" - } - }; - } - - // 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" - } - }; - } -} - -// Represents a context. -message 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. - string name = 1; - - // 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. - int32 lifespan_count = 2; - - // Optional. The collection of parameters associated with this context. - // Refer to [this - // doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters) - // for syntax. - 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; - - // 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; -} - -// 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; - - // Required. The context to create. - Context context = 2; -} - -// The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2beta1.Contexts.UpdateContext]. -message UpdateContextRequest { - // Required. The context to update. - Context context = 1; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 2; -} - -// 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; -} - -// 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; -} diff --git a/dialogflow_v2beta1/proto/context_pb2.py b/dialogflow_v2beta1/proto/context_pb2.py index fb53e8c3d..2fe918d77 100644 --- a/dialogflow_v2beta1/proto/context_pb2.py +++ b/dialogflow_v2beta1/proto/context_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/context.proto @@ -15,10 +16,10 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__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( @@ -29,14 +30,14 @@ "\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\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.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\x0c\n\x08\x43ontexts\x12\x8e\x02\n\x0cListContexts\x12\x34.google.cloud.dialogflow.v2beta1.ListContextsRequest\x1a\x35.google.cloud.dialogflow.v2beta1.ListContextsResponse"\x90\x01\x82\xd3\xe4\x93\x02\x89\x01\x12\x36/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO\x12M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts\x12\xfd\x01\n\nGetContext\x12\x32.google.cloud.dialogflow.v2beta1.GetContextRequest\x1a(.google.cloud.dialogflow.v2beta1.Context"\x90\x01\x82\xd3\xe4\x93\x02\x89\x01\x12\x36/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}ZO\x12M/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\x12\x95\x02\n\rCreateContext\x12\x35.google.cloud.dialogflow.v2beta1.CreateContextRequest\x1a(.google.cloud.dialogflow.v2beta1.Context"\xa2\x01\x82\xd3\xe4\x93\x02\x9b\x01"6/v2beta1/{parent=projects/*/agent/sessions/*}/contexts:\x07\x63ontextZX"M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:\x07\x63ontext\x12\xa5\x02\n\rUpdateContext\x12\x35.google.cloud.dialogflow.v2beta1.UpdateContextRequest\x1a(.google.cloud.dialogflow.v2beta1.Context"\xb2\x01\x82\xd3\xe4\x93\x02\xab\x01\x32>/v2beta1/{context.name=projects/*/agent/sessions/*/contexts/*}:\x07\x63ontextZ`2U/v2beta1/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:\x07\x63ontext\x12\xf1\x01\n\rDeleteContext\x12\x35.google.cloud.dialogflow.v2beta1.DeleteContextRequest\x1a\x16.google.protobuf.Empty"\x90\x01\x82\xd3\xe4\x93\x02\x89\x01*6/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}ZO*M/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}\x12\xf9\x01\n\x11\x44\x65leteAllContexts\x12\x39.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest\x1a\x16.google.protobuf.Empty"\x90\x01\x82\xd3\xe4\x93\x02\x89\x01*6/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO*M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contextsB\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' + '\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' ), dependencies=[ google_dot_api_dot_annotations__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, ], ) @@ -111,8 +112,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=238, - serialized_end=330, + serialized_start=236, + serialized_end=328, ) @@ -186,8 +187,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=332, - serialized_end=408, + serialized_start=330, + serialized_end=406, ) @@ -243,8 +244,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=410, - serialized_end=517, + serialized_start=408, + serialized_end=515, ) @@ -282,8 +283,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=519, - serialized_end=552, + serialized_start=517, + serialized_end=550, ) @@ -339,8 +340,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=554, - serialized_end=651, + serialized_start=552, + serialized_end=649, ) @@ -396,8 +397,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=654, - serialized_end=784, + serialized_start=652, + serialized_end=782, ) @@ -435,8 +436,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=786, - serialized_end=822, + serialized_start=784, + serialized_end=820, ) @@ -474,8 +475,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=824, - serialized_end=866, + serialized_start=822, + serialized_end=864, ) _CONTEXT.fields_by_name[ @@ -526,8 +527,8 @@ parameters: Optional. The collection of parameters associated with this context. Refer to `this doc - `__ for syntax. + `__ for syntax. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Context) ), @@ -717,9 +718,11 @@ full_name="google.cloud.dialogflow.v2beta1.Contexts", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=869, - serialized_end=2480, + 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, methods=[ _descriptor.MethodDescriptor( name="ListContexts", @@ -729,7 +732,7 @@ input_type=_LISTCONTEXTSREQUEST, output_type=_LISTCONTEXTSRESPONSE, serialized_options=_b( - "\202\323\344\223\002\211\001\0226/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO\022M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" + "\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" ), ), _descriptor.MethodDescriptor( @@ -740,7 +743,7 @@ input_type=_GETCONTEXTREQUEST, output_type=_CONTEXT, serialized_options=_b( - "\202\323\344\223\002\211\001\0226/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}ZO\022M/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" + "\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/*}" ), ), _descriptor.MethodDescriptor( @@ -751,7 +754,7 @@ input_type=_CREATECONTEXTREQUEST, output_type=_CONTEXT, serialized_options=_b( - '\202\323\344\223\002\233\001"6/v2beta1/{parent=projects/*/agent/sessions/*}/contexts:\007contextZX"M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts:\007context' + '\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' ), ), _descriptor.MethodDescriptor( @@ -762,7 +765,7 @@ input_type=_UPDATECONTEXTREQUEST, output_type=_CONTEXT, serialized_options=_b( - "\202\323\344\223\002\253\0012>/v2beta1/{context.name=projects/*/agent/sessions/*/contexts/*}:\007contextZ`2U/v2beta1/{context.name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}:\007context" + "\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" ), ), _descriptor.MethodDescriptor( @@ -773,7 +776,7 @@ input_type=_DELETECONTEXTREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002\211\001*6/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}ZO*M/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/contexts/*}" + "\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/*}" ), ), _descriptor.MethodDescriptor( @@ -784,7 +787,7 @@ input_type=_DELETEALLCONTEXTSREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002\211\001*6/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO*M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts" + "\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" ), ), ], diff --git a/dialogflow_v2beta1/proto/context_pb2_grpc.py b/dialogflow_v2beta1/proto/context_pb2_grpc.py index 6462b3609..fd23ab247 100644 --- a/dialogflow_v2beta1/proto/context_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/context_pb2_grpc.py @@ -25,7 +25,7 @@ class ContextsStub(object): For more information about contexts, see the [Dialogflow - documentation](https://cloud.google.com/dialogflow-enterprise/docs/contexts-overview). + documentation](https://cloud.google.com/dialogflow/docs/contexts-overview). """ def __init__(self, channel): @@ -84,7 +84,7 @@ class ContextsServicer(object): For more information about contexts, see the [Dialogflow - documentation](https://cloud.google.com/dialogflow-enterprise/docs/contexts-overview). + documentation](https://cloud.google.com/dialogflow/docs/contexts-overview). """ def ListContexts(self, request, context): diff --git a/dialogflow_v2beta1/proto/document.proto b/dialogflow_v2beta1/proto/document.proto deleted file mode 100644 index 8bf7dbf7c..000000000 --- a/dialogflow_v2beta1/proto/document.proto +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright 2019 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/resource.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.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"; - -// Manages documents of a knowledge base. -service Documents { - // Returns the list of all documents of the knowledge base. - rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents" - additional_bindings { - get: "/v2beta1/{parent=projects/*/agent/knowledgeBases/*}/documents" - } - }; - } - - // Retrieves the specified document. - rpc GetDocument(GetDocumentRequest) returns (Document) { - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}" - additional_bindings { - get: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" - } - }; - } - - // Creates a new document. - // - // Operation - 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" - } - }; - } - - // Deletes the specified document. - // - // Operation - 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/*}" - } - }; - } - - // Updates the specified document. - // Operation - 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" - } - }; - } - - // 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. - // Operation - 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: "*" - } - }; - } -} - -// A document resource. -// -// Note: resource `projects.agent.knowledgeBases.documents` is deprecated, -// please use `projects.knowledgeBases.documents` instead. -message Document { - // 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; - } - - // The document resource name. - // The name must be empty when creating a document. - // Format: `projects//knowledgeBases//documents/`. - string name = 1; - - // Required. The display name of the document. The name must be 1024 bytes or - // less; otherwise, the creation request fails. - string display_name = 2; - - // Required. The MIME type of this document. - string mime_type = 3; - - // Required. The knowledge type of document content. - repeated KnowledgeType knowledge_types = 4; - - // 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; - } -} - -// 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; - - // Optional. The maximum number of items to return in a single page. By - // default 10 and at most 100. - int32 page_size = 2; - - // Optional. 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.GetDocument][google.cloud.dialogflow.v2beta1.Documents.GetDocument]. -message GetDocumentRequest { - // Required. The name of the document to retrieve. - // Format `projects//knowledgeBases//documents/`. - string name = 1; -} - -// 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; - - // Required. The document to create. - Document document = 2; -} - -// Request message for [Documents.DeleteDocument][google.cloud.dialogflow.v2beta1.Documents.DeleteDocument]. -message DeleteDocumentRequest { - // The name of the document to delete. - // Format: `projects//knowledgeBases//documents/`. - string name = 1; -} - -// Request message for [Documents.UpdateDocument][google.cloud.dialogflow.v2beta1.Documents.UpdateDocument]. -message UpdateDocumentRequest { - // Required. The document to update. - Document document = 1; - - // 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; -} - -// 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. The current state of this operation. - State state = 1; -} - -// Request message for [Documents.ReloadDocument][google.cloud.dialogflow.v2beta1.Documents.ReloadDocument]. -message ReloadDocumentRequest { - // The name of the document to reload. - // Format: `projects//knowledgeBases//documents/` - string name = 1; -} diff --git a/dialogflow_v2beta1/proto/document_pb2.py b/dialogflow_v2beta1/proto/document_pb2.py index 779b03207..5524c536e 100644 --- a/dialogflow_v2beta1/proto/document_pb2.py +++ b/dialogflow_v2beta1/proto/document_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/document.proto @@ -15,13 +16,17 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__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, +) from google.longrunning import ( operations_pb2 as google_dot_longrunning_dot_operations__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.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( @@ -32,15 +37,17 @@ "\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\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.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"%\n\x15ReloadDocumentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t2\x87\x0c\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*B\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' + '\n4google/cloud/dialogflow_v2beta1/proto/document.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.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' ), dependencies=[ google_dot_api_dot_annotations__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, ], ) @@ -67,8 +74,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=490, - serialized_end=565, + serialized_start=570, + serialized_end=645, ) _sym_db.RegisterEnumDescriptor(_DOCUMENT_KNOWLEDGETYPE) @@ -97,8 +104,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1194, - serialized_end=1260, + serialized_start=1274, + serialized_end=1340, ) _sym_db.RegisterEnumDescriptor(_KNOWLEDGEOPERATIONMETADATA_STATE) @@ -253,8 +260,8 @@ fields=[], ) ], - serialized_start=272, - serialized_end=575, + serialized_start=352, + serialized_end=655, ) @@ -328,8 +335,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=577, - serialized_end=654, + serialized_start=657, + serialized_end=734, ) @@ -385,8 +392,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=656, - serialized_end=766, + serialized_start=736, + serialized_end=846, ) @@ -424,8 +431,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=768, - serialized_end=802, + serialized_start=848, + serialized_end=882, ) @@ -481,8 +488,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=804, - serialized_end=904, + serialized_start=884, + serialized_end=984, ) @@ -520,8 +527,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=906, - serialized_end=943, + serialized_start=986, + serialized_end=1023, ) @@ -577,8 +584,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=946, - serialized_end=1079, + serialized_start=1026, + serialized_end=1159, ) @@ -616,8 +623,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1082, - serialized_end=1260, + serialized_start=1162, + serialized_end=1340, ) @@ -645,7 +652,25 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), + _descriptor.FieldDescriptor( + name="gcs_source", + full_name="google.cloud.dialogflow.v2beta1.ReloadDocumentRequest.gcs_source", + index=1, + number=3, + 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, + ), ], extensions=[], nested_types=[], @@ -654,9 +679,17 @@ is_extendable=False, syntax="proto3", extension_ranges=[], - oneofs=[], - serialized_start=1262, - serialized_end=1299, + oneofs=[ + _descriptor.OneofDescriptor( + name="source", + full_name="google.cloud.dialogflow.v2beta1.ReloadDocumentRequest.source", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=1342, + serialized_end=1455, ) _DOCUMENT.fields_by_name["knowledge_types"].enum_type = _DOCUMENT_KNOWLEDGETYPE @@ -687,6 +720,17 @@ "state" ].enum_type = _KNOWLEDGEOPERATIONMETADATA_STATE _KNOWLEDGEOPERATIONMETADATA_STATE.containing_type = _KNOWLEDGEOPERATIONMETADATA +_RELOADDOCUMENTREQUEST.fields_by_name[ + "gcs_source" +].message_type = ( + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_gcs__pb2._GCSSOURCE +) +_RELOADDOCUMENTREQUEST.oneofs_by_name["source"].fields.append( + _RELOADDOCUMENTREQUEST.fields_by_name["gcs_source"] +) +_RELOADDOCUMENTREQUEST.fields_by_name[ + "gcs_source" +].containing_oneof = _RELOADDOCUMENTREQUEST.oneofs_by_name["source"] DESCRIPTOR.message_types_by_name["Document"] = _DOCUMENT DESCRIPTOR.message_types_by_name["ListDocumentsRequest"] = _LISTDOCUMENTSREQUEST DESCRIPTOR.message_types_by_name["ListDocumentsResponse"] = _LISTDOCUMENTSRESPONSE @@ -708,8 +752,8 @@ __module__="google.cloud.dialogflow_v2beta1.proto.document_pb2", __doc__="""A document resource. - Note: resource ``projects.agent.knowledgeBases.documents`` is - deprecated, please use ``projects.knowledgeBases.documents`` instead. + Note: The ``projects.agent.knowledgeBases.documents`` resource is + deprecated; only use ``projects.knowledgeBases.documents``. Attributes: @@ -919,6 +963,12 @@ The name of the document to reload. Format: ``projects//knowledgeBases//documents/`` + source: + The source for document reloading. Optional. If provided, the + 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. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ReloadDocumentRequest) ), @@ -934,9 +984,11 @@ full_name="google.cloud.dialogflow.v2beta1.Documents", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=1302, - serialized_end=2845, + serialized_options=_b( + "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + ), + serialized_start=1458, + serialized_end=3123, methods=[ _descriptor.MethodDescriptor( name="ListDocuments", diff --git a/dialogflow_v2beta1/proto/document_pb2_grpc.py b/dialogflow_v2beta1/proto/document_pb2_grpc.py index a58a3e7ca..e39f710e5 100644 --- a/dialogflow_v2beta1/proto/document_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/document_pb2_grpc.py @@ -57,6 +57,9 @@ class DocumentsServicer(object): 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`. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -64,6 +67,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`. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -72,6 +78,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 """ @@ -82,6 +91,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 """ @@ -91,6 +103,10 @@ 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 """ @@ -103,6 +119,10 @@ def ReloadDocument(self, request, context): 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 """ diff --git a/dialogflow_v2beta1/proto/entity_type.proto b/dialogflow_v2beta1/proto/entity_type.proto deleted file mode 100644 index c49561ff3..000000000 --- a/dialogflow_v2beta1/proto/entity_type.proto +++ /dev/null @@ -1,436 +0,0 @@ -// Copyright 2019 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/resource.proto"; -import "google/longrunning/operations.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 = "EntityTypeProto"; -option java_package = "com.google.cloud.dialogflow.v2beta1"; -option objc_class_prefix = "DF"; - -// 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. -// -// * **Developer** - 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 developer -// 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-enterprise/docs/entities-overview). -service EntityTypes { - // 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" - }; - } - - // Retrieves the specified entity type. - rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) { - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/agent/entityTypes/*}" - }; - } - - // 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" - }; - } - - // 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" - }; - } - - // Deletes the specified entity type. - rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2beta1/{name=projects/*/agent/entityTypes/*}" - }; - } - - // 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: "*" - }; - } - - // 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: "*" - }; - } - - // 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: "*" - }; - } - - // 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: "*" - }; - } - - // 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: "*" - }; - } -} - -// Represents an entity type. -// Entity types serve as a tool for extracting parameter values from natural -// language queries. -message EntityType { - // 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 canonical 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 canonical - // value. - KIND_MAP = 1; - - // List entity types contain a set of entries that do not map to canonical - // values. However, list entity types can contain references to other entity - // types (with or without aliases). - KIND_LIST = 2; - } - - // 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; - - // Required. Indicates the kind of entity type. - Kind kind = 3; - - // Optional. Indicates whether the entity type can be automatically - // expanded. - AutoExpansionMode auto_expansion_mode = 4; - - // Optional. The collection of entity entries associated with the entity type. - repeated Entity entities = 6; -} - -// 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; - - // Optional. The language to list entity synonyms for. If not specified, - // the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; - - // Optional. The maximum number of items to return in a single page. By - // default 100 and at most 1000. - int32 page_size = 3; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 4; -} - -// 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; - - // Optional. The language to retrieve entity synonyms for. If not specified, - // the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; -} - -// 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; - - // Required. The entity type to create. - EntityType entity_type = 2; - - // Optional. The language of entity synonyms defined in `entity_type`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; -} - -// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType]. -message UpdateEntityTypeRequest { - // Required. The entity type to update. - EntityType entity_type = 1; - - // Optional. The language of entity synonyms defined in `entity_type`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 3; -} - -// 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; -} - -// 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; - - // 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. - 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 of entity synonyms defined in `entity_types`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 4; - - // Optional. The mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 5; -} - -// 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; - - // Required. The names entity types to delete. All names must point to the - // same agent as `parent`. - repeated string entity_type_names = 2; -} - -// 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; - - // Required. The entities to create. - repeated EntityType.Entity entities = 2; - - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; -} - -// 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; - - // Required. The entities to update or create. - repeated EntityType.Entity entities = 2; - - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; - - // 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; - - // Required. The canonical `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; - - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; -} - -// 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 b30584c17..fd7bb7e3d 100644 --- a/dialogflow_v2beta1/proto/entity_type_pb2.py +++ b/dialogflow_v2beta1/proto/entity_type_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/entity_type.proto @@ -15,13 +16,14 @@ 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.longrunning import ( operations_pb2 as google_dot_longrunning_dot_operations__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( @@ -32,15 +34,16 @@ "\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\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto"\xd3\x03\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\x1a)\n\x06\x45ntity\x12\r\n\x05value\x18\x01 \x01(\t\x12\x10\n\x08synonyms\x18\x02 \x03(\t"9\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x0c\n\x08KIND_MAP\x10\x01\x12\r\n\tKIND_LIST\x10\x02"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\xfb\x0e\n\x0b\x45ntityTypes\x12\xbc\x01\n\x0fListEntityTypes\x12\x37.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest\x1a\x38.google.cloud.dialogflow.v2beta1.ListEntityTypesResponse"6\x82\xd3\xe4\x93\x02\x30\x12./v2beta1/{parent=projects/*/agent}/entityTypes\x12\xab\x01\n\rGetEntityType\x12\x35.google.cloud.dialogflow.v2beta1.GetEntityTypeRequest\x1a+.google.cloud.dialogflow.v2beta1.EntityType"6\x82\xd3\xe4\x93\x02\x30\x12./v2beta1/{name=projects/*/agent/entityTypes/*}\x12\xbe\x01\n\x10\x43reateEntityType\x12\x38.google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest\x1a+.google.cloud.dialogflow.v2beta1.EntityType"C\x82\xd3\xe4\x93\x02="./v2beta1/{parent=projects/*/agent}/entityTypes:\x0b\x65ntity_type\x12\xca\x01\n\x10UpdateEntityType\x12\x38.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest\x1a+.google.cloud.dialogflow.v2beta1.EntityType"O\x82\xd3\xe4\x93\x02I2:/v2beta1/{entity_type.name=projects/*/agent/entityTypes/*}:\x0b\x65ntity_type\x12\x9c\x01\n\x10\x44\x65leteEntityType\x12\x38.google.cloud.dialogflow.v2beta1.DeleteEntityTypeRequest\x1a\x16.google.protobuf.Empty"6\x82\xd3\xe4\x93\x02\x30*./v2beta1/{name=projects/*/agent/entityTypes/*}\x12\xbe\x01\n\x16\x42\x61tchUpdateEntityTypes\x12>.google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest\x1a\x1d.google.longrunning.Operation"E\x82\xd3\xe4\x93\x02?":/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate:\x01*\x12\xbe\x01\n\x16\x42\x61tchDeleteEntityTypes\x12>.google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest\x1a\x1d.google.longrunning.Operation"E\x82\xd3\xe4\x93\x02?":/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete:\x01*\x12\xc3\x01\n\x13\x42\x61tchCreateEntities\x12;.google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest\x1a\x1d.google.longrunning.Operation"P\x82\xd3\xe4\x93\x02J"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate:\x01*\x12\xc3\x01\n\x13\x42\x61tchUpdateEntities\x12;.google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest\x1a\x1d.google.longrunning.Operation"P\x82\xd3\xe4\x93\x02J"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\x01*\x12\xc3\x01\n\x13\x42\x61tchDeleteEntities\x12;.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest\x1a\x1d.google.longrunning.Operation"P\x82\xd3\xe4\x93\x02J"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\x01*B\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' + '\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' ), 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_longrunning_dot_operations__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, ], ) @@ -64,11 +67,14 @@ _descriptor.EnumValueDescriptor( name="KIND_LIST", index=2, number=2, serialized_options=None, type=None ), + _descriptor.EnumValueDescriptor( + name="KIND_REGEXP", index=3, number=3, serialized_options=None, type=None + ), ], containing_type=None, serialized_options=None, - serialized_start=599, - serialized_end=656, + serialized_start=660, + serialized_end=734, ) _sym_db.RegisterEnumDescriptor(_ENTITYTYPE_KIND) @@ -95,8 +101,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=658, - serialized_end=747, + serialized_start=736, + serialized_end=825, ) _sym_db.RegisterEnumDescriptor(_ENTITYTYPE_AUTOEXPANSIONMODE) @@ -153,8 +159,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=556, - serialized_end=597, + serialized_start=617, + serialized_end=658, ) _ENTITYTYPE = _descriptor.Descriptor( @@ -254,6 +260,24 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="enable_fuzzy_extraction", + full_name="google.cloud.dialogflow.v2beta1.EntityType.enable_fuzzy_extraction", + index=5, + number=7, + 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=None, + file=DESCRIPTOR, + ), ], extensions=[], nested_types=[_ENTITYTYPE_ENTITY], @@ -263,8 +287,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=280, - serialized_end=747, + serialized_start=308, + serialized_end=825, ) @@ -356,8 +380,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=749, - serialized_end=851, + serialized_start=827, + serialized_end=929, ) @@ -413,8 +437,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=853, - serialized_end=970, + serialized_start=931, + serialized_end=1048, ) @@ -470,8 +494,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=972, - serialized_end=1031, + serialized_start=1050, + serialized_end=1109, ) @@ -545,8 +569,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1034, - serialized_end=1164, + serialized_start=1112, + serialized_end=1242, ) @@ -620,8 +644,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1167, - serialized_end=1330, + serialized_start=1245, + serialized_end=1408, ) @@ -659,8 +683,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1332, - serialized_end=1371, + serialized_start=1410, + serialized_end=1449, ) @@ -778,8 +802,8 @@ fields=[], ) ], - serialized_start=1374, - serialized_end=1633, + serialized_start=1452, + serialized_end=1711, ) @@ -817,8 +841,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1635, - serialized_end=1734, + serialized_start=1713, + serialized_end=1812, ) @@ -874,8 +898,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1736, - serialized_end=1810, + serialized_start=1814, + serialized_end=1888, ) @@ -949,8 +973,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1813, - serialized_end=1950, + serialized_start=1891, + serialized_end=2028, ) @@ -1042,8 +1066,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1953, - serialized_end=2139, + serialized_start=2031, + serialized_end=2217, ) @@ -1117,8 +1141,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2141, - serialized_end=2231, + serialized_start=2219, + serialized_end=2309, ) @@ -1156,8 +1180,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2233, - serialized_end=2317, + serialized_start=2311, + serialized_end=2395, ) _ENTITYTYPE_ENTITY.containing_type = _ENTITYTYPE @@ -1284,6 +1308,9 @@ entities: Optional. The collection of entity entries associated with the entity type. + enable_fuzzy_extraction: + Optional. Enables fuzzy entity extraction during + classification. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.EntityType) ), @@ -1308,10 +1335,9 @@ 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. + languages `__ are supported. Note: languages must be enabled in + the agent before they can be used. page_size: Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. @@ -1365,10 +1391,9 @@ 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. + 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.GetEntityTypeRequest) ), @@ -1394,9 +1419,8 @@ 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: + language is used. `Many languages `__ are supported. Note: languages must be enabled in the agent before they can be used. """, @@ -1421,9 +1445,8 @@ 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: + language is used. `Many languages `__ are supported. Note: languages must be enabled in the agent before they can be used. update_mask: @@ -1483,9 +1506,8 @@ 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: + language is used. `Many languages `__ are supported. Note: languages must be enabled in the agent before they can be used. update_mask: @@ -1558,10 +1580,9 @@ 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. + 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.BatchCreateEntitiesRequest) ), @@ -1588,10 +1609,9 @@ 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. + is used. `Many languages `__ are supported. Note: languages + must be enabled in the agent before they can be used. update_mask: Optional. The mask to control which fields get updated. """, @@ -1622,10 +1642,9 @@ 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. + 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.BatchDeleteEntitiesRequest) ), @@ -1658,9 +1677,11 @@ full_name="google.cloud.dialogflow.v2beta1.EntityTypes", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=2320, - serialized_end=4235, + 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, methods=[ _descriptor.MethodDescriptor( name="ListEntityTypes", @@ -1670,7 +1691,7 @@ input_type=_LISTENTITYTYPESREQUEST, output_type=_LISTENTITYTYPESRESPONSE, serialized_options=_b( - "\202\323\344\223\0020\022./v2beta1/{parent=projects/*/agent}/entityTypes" + "\202\323\344\223\002n\022./v2beta1/{parent=projects/*/agent}/entityTypesZ<\022:/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes" ), ), _descriptor.MethodDescriptor( @@ -1681,7 +1702,7 @@ input_type=_GETENTITYTYPEREQUEST, output_type=_ENTITYTYPE, serialized_options=_b( - "\202\323\344\223\0020\022./v2beta1/{name=projects/*/agent/entityTypes/*}" + "\202\323\344\223\002n\022./v2beta1/{name=projects/*/agent/entityTypes/*}Z<\022:/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}" ), ), _descriptor.MethodDescriptor( @@ -1692,7 +1713,7 @@ input_type=_CREATEENTITYTYPEREQUEST, output_type=_ENTITYTYPE, serialized_options=_b( - '\202\323\344\223\002="./v2beta1/{parent=projects/*/agent}/entityTypes:\013entity_type' + '\202\323\344\223\002\210\001"./v2beta1/{parent=projects/*/agent}/entityTypes:\013entity_typeZI":/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:\013entity_type' ), ), _descriptor.MethodDescriptor( @@ -1703,7 +1724,7 @@ input_type=_UPDATEENTITYTYPEREQUEST, output_type=_ENTITYTYPE, serialized_options=_b( - "\202\323\344\223\002I2:/v2beta1/{entity_type.name=projects/*/agent/entityTypes/*}:\013entity_type" + "\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" ), ), _descriptor.MethodDescriptor( @@ -1714,7 +1735,7 @@ input_type=_DELETEENTITYTYPEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\0020*./v2beta1/{name=projects/*/agent/entityTypes/*}" + "\202\323\344\223\002n*./v2beta1/{name=projects/*/agent/entityTypes/*}Z<*:/v2beta1/{name=projects/*/locations/*/agent/entityTypes/*}" ), ), _descriptor.MethodDescriptor( @@ -1725,7 +1746,7 @@ input_type=_BATCHUPDATEENTITYTYPESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002?":/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate:\001*' + '\202\323\344\223\002\214\001":/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate:\001*ZK"F/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchUpdate:\001*' ), ), _descriptor.MethodDescriptor( @@ -1736,7 +1757,7 @@ input_type=_BATCHDELETEENTITYTYPESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002?":/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete:\001*' + '\202\323\344\223\002\214\001":/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete:\001*ZK"F/v2beta1/{parent=projects/*/locations/*/agent}/entityTypes:batchDelete:\001*' ), ), _descriptor.MethodDescriptor( @@ -1747,7 +1768,7 @@ input_type=_BATCHCREATEENTITIESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002J"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate:\001*' + '\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*' ), ), _descriptor.MethodDescriptor( @@ -1758,7 +1779,7 @@ input_type=_BATCHUPDATEENTITIESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002J"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\001*' + '\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*' ), ), _descriptor.MethodDescriptor( @@ -1769,7 +1790,7 @@ input_type=_BATCHDELETEENTITIESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002J"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\001*' + '\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*' ), ), ], diff --git a/dialogflow_v2beta1/proto/entity_type_pb2_grpc.py b/dialogflow_v2beta1/proto/entity_type_pb2_grpc.py index d463457a7..a6bec591b 100644 --- a/dialogflow_v2beta1/proto/entity_type_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/entity_type_pb2_grpc.py @@ -38,7 +38,7 @@ class EntityTypesStub(object): For more information about entity types, see the [Dialogflow - documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview). + documentation](https://cloud.google.com/dialogflow/docs/entities-overview). """ def __init__(self, channel): @@ -127,7 +127,7 @@ class EntityTypesServicer(object): For more information about entity types, see the [Dialogflow - documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview). + documentation](https://cloud.google.com/dialogflow/docs/entities-overview). """ def ListEntityTypes(self, request, context): diff --git a/dialogflow_v2beta1/proto/gcs_pb2.py b/dialogflow_v2beta1/proto/gcs_pb2.py new file mode 100644 index 000000000..82ae3f41d --- /dev/null +++ b/dialogflow_v2beta1/proto/gcs_pb2.py @@ -0,0 +1,98 @@ +# -*- 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")) +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 + + +DESCRIPTOR = _descriptor.FileDescriptor( + 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' + ), + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR], +) + + +_GCSSOURCE = _descriptor.Descriptor( + name="GcsSource", + full_name="google.cloud.dialogflow.v2beta1.GcsSource", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="uri", + full_name="google.cloud.dialogflow.v2beta1.GcsSource.uri", + 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=114, + serialized_end=138, +) + +DESCRIPTOR.message_types_by_name["GcsSource"] = _GCSSOURCE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +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. + + + Attributes: + uri: + 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. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.GcsSource) + ), +) +_sym_db.RegisterMessage(GcsSource) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/dialogflow_v2beta1/proto/gcs_pb2_grpc.py b/dialogflow_v2beta1/proto/gcs_pb2_grpc.py new file mode 100644 index 000000000..07cb78fe0 --- /dev/null +++ b/dialogflow_v2beta1/proto/gcs_pb2_grpc.py @@ -0,0 +1,2 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc diff --git a/dialogflow_v2beta1/proto/intent.proto b/dialogflow_v2beta1/proto/intent.proto deleted file mode 100644 index 9f33f88d2..000000000 --- a/dialogflow_v2beta1/proto/intent.proto +++ /dev/null @@ -1,924 +0,0 @@ -// Copyright 2019 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/resource.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"; - -// 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-enterprise/docs/intents-overview). -service Intents { - // 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" - }; - } - - // Retrieves the specified intent. - rpc GetIntent(GetIntentRequest) returns (Intent) { - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/agent/intents/*}" - }; - } - - // Creates an intent in the specified agent. - rpc CreateIntent(CreateIntentRequest) returns (Intent) { - option (google.api.http) = { - post: "/v2beta1/{parent=projects/*/agent}/intents" - body: "intent" - }; - } - - // Updates the specified intent. - rpc UpdateIntent(UpdateIntentRequest) returns (Intent) { - option (google.api.http) = { - patch: "/v2beta1/{intent.name=projects/*/agent/intents/*}" - body: "intent" - }; - } - - // 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/*}" - }; - } - - // 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: "*" - }; - } - - // 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: "*" - }; - } -} - -// 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. -message 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; - - // 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; - - // 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; - } - - // 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 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; - } - - // 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; - } - - // 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; - - // 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](https://developers.google.com/actions/dialogflow/webhook) - //
{
-      //   "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 = 8; - - // Telephony Gateway. - TELEPHONY = 10; - } - - // 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; - - // 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. - 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; - } - - // Optional. The platform that this message is intended for. - Platform platform = 6; - } - - // 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; - } - - // 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; - - // Required. The name of this intent. - string display_name = 2; - - // Optional. Indicates whether webhooks are enabled for the intent. - WebhookState webhook_state = 6; - - // Optional. The priority of this intent. Higher numbers represent higher - // priorities. If this is zero or unspecified, we use the default - // priority 500000. - // - // Negative numbers mean that the intent is disabled. - int32 priority = 3; - - // Optional. Indicates whether this is a fallback intent. - bool is_fallback = 4; - - // 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]; - - // 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; - - // 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; - - // Optional. The list of context names required for this intent to be - // triggered. - // Format: `projects//agent/sessions/-/contexts/`. - repeated string input_context_names = 7; - - // 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. - repeated string events = 8; - - // Optional. The collection of examples that the agent is - // trained on. - repeated TrainingPhrase training_phrases = 9; - - // Optional. The name of the action associated with the intent. - // Note: The action name must not contain whitespaces. - string action = 10; - - // 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; - - // Optional. Indicates whether to delete all contexts in the current - // session when this intent is matched. - bool reset_contexts = 12; - - // Optional. The collection of parameters associated with the intent. - repeated Parameter parameters = 13; - - // 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 response will be - // taken from among the messages assigned to the DEFAULT_PLATFORM. - repeated Message.Platform default_response_platforms = 15; - - // 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][] or [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.v2beta1.Intents.ListIntents]. -message ListIntentsRequest { - // Required. The agent to list all intents from. - // Format: `projects//agent`. - string parent = 1; - - // Optional. The language to list training phrases, parameters and rich - // messages for. If not specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; - - // 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; - - // Optional. The language to retrieve training phrases, parameters and rich - // messages for. If not specified, the agent's default language is used. - // [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; - - // 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; - - // Required. The intent to create. - Intent intent = 2; - - // 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](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 3; - - // 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; - - // 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](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 2; - - // 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; -} - -// 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; - - // Required. 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 of training phrases, parameters and rich messages - // defined in `intents`. If not specified, the agent's default language is - // used. [Many - // languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) - // are supported. Note: languages must be enabled in the agent before they can - // be used. - string language_code = 4; - - // 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; - - // Required. The collection of intents to delete. Only intent `name` must be - // filled in. - repeated Intent intents = 2; -} - -// 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 9cca87064..c6a48c07f 100644 --- a/dialogflow_v2beta1/proto/intent_pb2.py +++ b/dialogflow_v2beta1/proto/intent_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/intent.proto @@ -16,7 +17,11 @@ 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 dialogflow_v2beta1.proto import ( + audio_config_pb2 as google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_audio__config__pb2, +) from dialogflow_v2beta1.proto import ( context_pb2 as google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2, ) @@ -27,6 +32,7 @@ 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( @@ -37,17 +43,20 @@ "\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\x19google/api/resource.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"\xb6&\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\xfb\x19\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\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\xac\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\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"\x9a\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\nB\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"\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\xb2\t\n\x07Intents\x12\xac\x01\n\x0bListIntents\x12\x33.google.cloud.dialogflow.v2beta1.ListIntentsRequest\x1a\x34.google.cloud.dialogflow.v2beta1.ListIntentsResponse"2\x82\xd3\xe4\x93\x02,\x12*/v2beta1/{parent=projects/*/agent}/intents\x12\x9b\x01\n\tGetIntent\x12\x31.google.cloud.dialogflow.v2beta1.GetIntentRequest\x1a\'.google.cloud.dialogflow.v2beta1.Intent"2\x82\xd3\xe4\x93\x02,\x12*/v2beta1/{name=projects/*/agent/intents/*}\x12\xa9\x01\n\x0c\x43reateIntent\x12\x34.google.cloud.dialogflow.v2beta1.CreateIntentRequest\x1a\'.google.cloud.dialogflow.v2beta1.Intent":\x82\xd3\xe4\x93\x02\x34"*/v2beta1/{parent=projects/*/agent}/intents:\x06intent\x12\xb0\x01\n\x0cUpdateIntent\x12\x34.google.cloud.dialogflow.v2beta1.UpdateIntentRequest\x1a\'.google.cloud.dialogflow.v2beta1.Intent"A\x82\xd3\xe4\x93\x02;21/v2beta1/{intent.name=projects/*/agent/intents/*}:\x06intent\x12\x90\x01\n\x0c\x44\x65leteIntent\x12\x34.google.cloud.dialogflow.v2beta1.DeleteIntentRequest\x1a\x16.google.protobuf.Empty"2\x82\xd3\xe4\x93\x02,**/v2beta1/{name=projects/*/agent/intents/*}\x12\xb2\x01\n\x12\x42\x61tchUpdateIntents\x12:.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest\x1a\x1d.google.longrunning.Operation"A\x82\xd3\xe4\x93\x02;"6/v2beta1/{parent=projects/*/agent}/intents:batchUpdate:\x01*\x12\xb2\x01\n\x12\x42\x61tchDeleteIntents\x12:.google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest\x1a\x1d.google.longrunning.Operation"A\x82\xd3\xe4\x93\x02;"6/v2beta1/{parent=projects/*/agent}/intents:batchDelete:\x01*B\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' + '\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"\xf5M\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\xa6@\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\xac\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\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' ), 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_cloud_dot_dialogflow__v2beta1_dot_proto_dot_audio__config__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.DESCRIPTOR, google_dot_longrunning_dot_operations__pb2.DESCRIPTOR, google_dot_protobuf_dot_duration__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, ], ) @@ -74,8 +83,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=6687, - serialized_end=6750, + serialized_start=11858, + serialized_end=11921, ) _sym_db.RegisterEnumDescriptor(_INTENTVIEW) @@ -110,11 +119,244 @@ ], containing_type=None, serialized_options=None, - serialized_start=1511, - serialized_end=1570, + serialized_start=1627, + serialized_end=1686, ) _sym_db.RegisterEnumDescriptor(_INTENT_TRAININGPHRASE_TYPE) +_INTENT_MESSAGE_RBMCAROUSELCARD_CARDWIDTH = _descriptor.EnumDescriptor( + name="CardWidth", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.CardWidth", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="CARD_WIDTH_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="SMALL", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="MEDIUM", index=2, number=2, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=5882, + serialized_end=5944, +) +_sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_RBMCAROUSELCARD_CARDWIDTH) + +_INTENT_MESSAGE_RBMSTANDALONECARD_CARDORIENTATION = _descriptor.EnumDescriptor( + name="CardOrientation", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.CardOrientation", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="CARD_ORIENTATION_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="HORIZONTAL", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="VERTICAL", index=2, number=2, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=6289, + serialized_end=6370, +) +_sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_RBMSTANDALONECARD_CARDORIENTATION) + +_INTENT_MESSAGE_RBMSTANDALONECARD_THUMBNAILIMAGEALIGNMENT = _descriptor.EnumDescriptor( + name="ThumbnailImageAlignment", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.ThumbnailImageAlignment", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="LEFT", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="RIGHT", index=2, number=2, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=6372, + serialized_end=6461, +) +_sym_db.RegisterEnumDescriptor( + _INTENT_MESSAGE_RBMSTANDALONECARD_THUMBNAILIMAGEALIGNMENT +) + +_INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA_HEIGHT = _descriptor.EnumDescriptor( + name="Height", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.Height", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="HEIGHT_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="SHORT", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="MEDIUM", index=2, number=2, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="TALL", index=3, number=3, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=6840, + serialized_end=6905, +) +_sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA_HEIGHT) + +_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIATYPE = _descriptor.EnumDescriptor( + name="ResponseMediaType", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaType", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="RESPONSE_MEDIA_TYPE_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="AUDIO", index=1, number=1, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=8169, + serialized_end=8236, +) +_sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIATYPE) + +_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION_URLTYPEHINT = _descriptor.EnumDescriptor( + name="UrlTypeHint", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="URL_TYPE_HINT_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="AMP_ACTION", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="AMP_CONTENT", index=2, number=2, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=8938, + serialized_end=9015, +) +_sym_db.RegisterEnumDescriptor( + _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION_URLTYPEHINT +) + +_INTENT_MESSAGE_BROWSECAROUSELCARD_IMAGEDISPLAYOPTIONS = _descriptor.EnumDescriptor( + name="ImageDisplayOptions", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.ImageDisplayOptions", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="IMAGE_DISPLAY_OPTIONS_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="GRAY", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="WHITE", index=2, number=2, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="CROPPED", index=3, number=3, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="BLURRED_BACKGROUND", + index=4, + number=4, + serialized_options=None, + type=None, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=9017, + serialized_end=9135, +) +_sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_BROWSECAROUSELCARD_IMAGEDISPLAYOPTIONS) + +_INTENT_MESSAGE_COLUMNPROPERTIES_HORIZONTALALIGNMENT = _descriptor.EnumDescriptor( + name="HorizontalAlignment", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.HorizontalAlignment", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="HORIZONTAL_ALIGNMENT_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="LEADING", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="CENTER", index=2, number=2, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="TRAILING", index=3, number=3, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=9659, + serialized_end=9757, +) +_sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_COLUMNPROPERTIES_HORIZONTALALIGNMENT) + _INTENT_MESSAGE_PLATFORM = _descriptor.EnumDescriptor( name="Platform", full_name="google.cloud.dialogflow.v2beta1.Intent.Message.Platform", @@ -159,11 +401,18 @@ _descriptor.EnumValueDescriptor( name="TELEPHONY", index=9, number=10, serialized_options=None, type=None ), + _descriptor.EnumValueDescriptor( + name="GOOGLE_HANGOUTS", + index=10, + number=11, + serialized_options=None, + type=None, + ), ], containing_type=None, serialized_options=None, - serialized_start=4906, - serialized_end=5060, + serialized_start=9908, + serialized_end=10083, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_PLATFORM) @@ -197,8 +446,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=5162, - serialized_end=5278, + serialized_start=10185, + serialized_end=10301, ) _sym_db.RegisterEnumDescriptor(_INTENT_WEBHOOKSTATE) @@ -291,8 +540,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1431, - serialized_end=1509, + serialized_start=1547, + serialized_end=1625, ) _INTENT_TRAININGPHRASE = _descriptor.Descriptor( @@ -383,8 +632,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1221, - serialized_end=1570, + serialized_start=1337, + serialized_end=1686, ) _INTENT_PARAMETER = _descriptor.Descriptor( @@ -547,8 +796,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1573, - serialized_end=1745, + serialized_start=1689, + serialized_end=1861, ) _INTENT_MESSAGE_TEXT = _descriptor.Descriptor( @@ -585,8 +834,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3028, - serialized_end=3048, + serialized_start=3691, + serialized_end=3711, ) _INTENT_MESSAGE_IMAGE = _descriptor.Descriptor( @@ -641,8 +890,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3050, - serialized_end=3104, + serialized_start=3713, + serialized_end=3767, ) _INTENT_MESSAGE_QUICKREPLIES = _descriptor.Descriptor( @@ -697,8 +946,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3106, - serialized_end=3158, + serialized_start=3769, + serialized_end=3821, ) _INTENT_MESSAGE_CARD_BUTTON = _descriptor.Descriptor( @@ -753,8 +1002,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3299, - serialized_end=3339, + serialized_start=3962, + serialized_end=4002, ) _INTENT_MESSAGE_CARD = _descriptor.Descriptor( @@ -845,8 +1094,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3161, - serialized_end=3339, + serialized_start=3824, + serialized_end=4002, ) _INTENT_MESSAGE_SIMPLERESPONSE = _descriptor.Descriptor( @@ -919,8 +1168,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3341, - serialized_end=3417, + serialized_start=4004, + serialized_end=4080, ) _INTENT_MESSAGE_SIMPLERESPONSES = _descriptor.Descriptor( @@ -957,8 +1206,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3419, - serialized_end=3526, + serialized_start=4082, + serialized_end=4189, ) _INTENT_MESSAGE_BASICCARD_BUTTON_OPENURIACTION = _descriptor.Descriptor( @@ -995,8 +1244,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3883, - serialized_end=3911, + serialized_start=4546, + serialized_end=4574, ) _INTENT_MESSAGE_BASICCARD_BUTTON = _descriptor.Descriptor( @@ -1051,8 +1300,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3753, - serialized_end=3911, + serialized_start=4416, + serialized_end=4574, ) _INTENT_MESSAGE_BASICCARD = _descriptor.Descriptor( @@ -1161,8 +1410,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3529, - serialized_end=3911, + serialized_start=4192, + serialized_end=4574, ) _INTENT_MESSAGE_SUGGESTION = _descriptor.Descriptor( @@ -1199,8 +1448,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3913, - serialized_end=3940, + serialized_start=4576, + serialized_end=4603, ) _INTENT_MESSAGE_SUGGESTIONS = _descriptor.Descriptor( @@ -1237,8 +1486,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3942, - serialized_end=4036, + serialized_start=4605, + serialized_end=4699, ) _INTENT_MESSAGE_LINKOUTSUGGESTION = _descriptor.Descriptor( @@ -1293,8 +1542,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4038, - serialized_end=4096, + serialized_start=4701, + serialized_end=4759, ) _INTENT_MESSAGE_LISTSELECT_ITEM = _descriptor.Descriptor( @@ -1385,8 +1634,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4209, - serialized_end=4399, + serialized_start=4872, + serialized_end=5062, ) _INTENT_MESSAGE_LISTSELECT = _descriptor.Descriptor( @@ -1441,8 +1690,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4099, - serialized_end=4399, + serialized_start=4762, + serialized_end=5062, ) _INTENT_MESSAGE_CAROUSELSELECT_ITEM = _descriptor.Descriptor( @@ -1533,8 +1782,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4209, - serialized_end=4399, + serialized_start=4872, + serialized_end=5062, ) _INTENT_MESSAGE_CAROUSELSELECT = _descriptor.Descriptor( @@ -1571,8 +1820,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4402, - serialized_end=4695, + serialized_start=5065, + serialized_end=5358, ) _INTENT_MESSAGE_SELECTITEMINFO = _descriptor.Descriptor( @@ -1627,8 +1876,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4697, - serialized_end=4744, + serialized_start=5360, + serialized_end=5407, ) _INTENT_MESSAGE_TELEPHONYPLAYAUDIO = _descriptor.Descriptor( @@ -1665,8 +1914,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4746, - serialized_end=4785, + serialized_start=5409, + serialized_end=5448, ) _INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH = _descriptor.Descriptor( @@ -1729,8 +1978,8 @@ fields=[], ) ], - serialized_start=4787, - serialized_end=4856, + serialized_start=5450, + serialized_end=5519, ) _INTENT_MESSAGE_TELEPHONYTRANSFERCALL = _descriptor.Descriptor( @@ -1767,27 +2016,27 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4858, - serialized_end=4903, + serialized_start=5521, + serialized_end=5566, ) -_INTENT_MESSAGE = _descriptor.Descriptor( - name="Message", - full_name="google.cloud.dialogflow.v2beta1.Intent.Message", +_INTENT_MESSAGE_RBMTEXT = _descriptor.Descriptor( + name="RbmText", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmText", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="text", - full_name="google.cloud.dialogflow.v2beta1.Intent.Message.text", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.text", index=0, number=1, - type=11, - cpp_type=10, + type=9, + cpp_type=9, label=1, has_default_value=False, - default_value=None, + default_value=_b("").decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1797,15 +2046,15 @@ file=DESCRIPTOR, ), _descriptor.FieldDescriptor( - name="image", - full_name="google.cloud.dialogflow.v2beta1.Intent.Message.image", + name="rbm_suggestion", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmText.rbm_suggestion", index=1, number=2, type=11, cpp_type=10, - label=1, + label=3, has_default_value=False, - default_value=None, + default_value=[], message_type=None, enum_type=None, containing_type=None, @@ -1814,16 +2063,36 @@ serialized_options=None, file=DESCRIPTOR, ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=5568, + serialized_end=5678, +) + +_INTENT_MESSAGE_RBMCAROUSELCARD = _descriptor.Descriptor( + name="RbmCarouselCard", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ _descriptor.FieldDescriptor( - name="quick_replies", - full_name="google.cloud.dialogflow.v2beta1.Intent.Message.quick_replies", - index=2, - number=3, - type=11, - cpp_type=10, + name="card_width", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.card_width", + index=0, + number=1, + type=14, + cpp_type=8, label=1, has_default_value=False, - default_value=None, + default_value=0, message_type=None, enum_type=None, containing_type=None, @@ -1833,15 +2102,15 @@ file=DESCRIPTOR, ), _descriptor.FieldDescriptor( - name="card", - full_name="google.cloud.dialogflow.v2beta1.Intent.Message.card", - index=3, - number=4, + name="card_contents", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard.card_contents", + index=1, + number=2, type=11, cpp_type=10, - label=1, + label=3, has_default_value=False, - default_value=None, + default_value=[], message_type=None, enum_type=None, containing_type=None, @@ -1850,16 +2119,36 @@ serialized_options=None, file=DESCRIPTOR, ), + ], + extensions=[], + nested_types=[], + enum_types=[_INTENT_MESSAGE_RBMCAROUSELCARD_CARDWIDTH], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=5681, + serialized_end=5944, +) + +_INTENT_MESSAGE_RBMSTANDALONECARD = _descriptor.Descriptor( + name="RbmStandaloneCard", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ _descriptor.FieldDescriptor( - name="payload", - full_name="google.cloud.dialogflow.v2beta1.Intent.Message.payload", - index=4, - number=5, - type=11, - cpp_type=10, + name="card_orientation", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.card_orientation", + index=0, + number=1, + type=14, + cpp_type=8, label=1, has_default_value=False, - default_value=None, + default_value=0, message_type=None, enum_type=None, containing_type=None, @@ -1869,15 +2158,15 @@ file=DESCRIPTOR, ), _descriptor.FieldDescriptor( - name="simple_responses", - full_name="google.cloud.dialogflow.v2beta1.Intent.Message.simple_responses", - index=5, - number=7, - type=11, - cpp_type=10, + name="thumbnail_image_alignment", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.thumbnail_image_alignment", + index=1, + number=2, + type=14, + cpp_type=8, label=1, has_default_value=False, - default_value=None, + default_value=0, message_type=None, enum_type=None, containing_type=None, @@ -1887,7 +2176,1337 @@ file=DESCRIPTOR, ), _descriptor.FieldDescriptor( - name="basic_card", + name="card_content", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard.card_content", + index=2, + number=3, + 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, + ), + ], + extensions=[], + nested_types=[], + enum_types=[ + _INTENT_MESSAGE_RBMSTANDALONECARD_CARDORIENTATION, + _INTENT_MESSAGE_RBMSTANDALONECARD_THUMBNAILIMAGEALIGNMENT, + ], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=5947, + serialized_end=6461, +) + +_INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA = _descriptor.Descriptor( + name="RbmMedia", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="file_uri", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.file_uri", + 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, + ), + _descriptor.FieldDescriptor( + name="thumbnail_uri", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.thumbnail_uri", + 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, + ), + _descriptor.FieldDescriptor( + name="height", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.RbmMedia.height", + index=2, + number=3, + 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=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[_INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA_HEIGHT], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=6691, + serialized_end=6905, +) + +_INTENT_MESSAGE_RBMCARDCONTENT = _descriptor.Descriptor( + name="RbmCardContent", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="title", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.title", + 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, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.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=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="media", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.media", + index=2, + number=3, + 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, + ), + _descriptor.FieldDescriptor( + name="suggestions", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmCardContent.suggestions", + index=3, + number=4, + 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, + ), + ], + extensions=[], + nested_types=[_INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=6464, + serialized_end=6905, +) + +_INTENT_MESSAGE_RBMSUGGESTION = _descriptor.Descriptor( + name="RbmSuggestion", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="reply", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.reply", + 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, + ), + _descriptor.FieldDescriptor( + name="action", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.action", + 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, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="suggestion", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion.suggestion", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=6908, + serialized_end=7107, +) + +_INTENT_MESSAGE_RBMSUGGESTEDREPLY = _descriptor.Descriptor( + name="RbmSuggestedReply", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="text", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.text", + 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, + ), + _descriptor.FieldDescriptor( + name="postback_data", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply.postback_data", + 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, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=7109, + serialized_end=7165, +) + +_INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONDIAL = _descriptor.Descriptor( + name="RbmSuggestedActionDial", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="phone_number", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial.phone_number", + 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=7574, + serialized_end=7620, +) + +_INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONOPENURI = _descriptor.Descriptor( + name="RbmSuggestedActionOpenUri", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="uri", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri.uri", + 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=7622, + serialized_end=7662, +) + +_INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONSHARELOCATION = _descriptor.Descriptor( + name="RbmSuggestedActionShareLocation", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=7664, + serialized_end=7697, +) + +_INTENT_MESSAGE_RBMSUGGESTEDACTION = _descriptor.Descriptor( + name="RbmSuggestedAction", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="text", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.text", + 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, + ), + _descriptor.FieldDescriptor( + name="postback_data", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.postback_data", + 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, + ), + _descriptor.FieldDescriptor( + name="dial", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.dial", + index=2, + number=3, + 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, + ), + _descriptor.FieldDescriptor( + name="open_url", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.open_url", + index=3, + number=4, + 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, + ), + _descriptor.FieldDescriptor( + name="share_location", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.share_location", + 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=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[ + _INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONDIAL, + _INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONOPENURI, + _INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONSHARELOCATION, + ], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="action", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.action", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=7168, + serialized_end=7707, +) + +_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT = _descriptor.Descriptor( + name="ResponseMediaObject", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.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, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.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=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="large_image", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.large_image", + index=2, + number=3, + 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, + ), + _descriptor.FieldDescriptor( + name="icon", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.icon", + index=3, + number=4, + 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, + ), + _descriptor.FieldDescriptor( + name="content_url", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.content_url", + index=4, + number=5, + 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=[ + _descriptor.OneofDescriptor( + name="image", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.ResponseMediaObject.image", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=7932, + serialized_end=8167, +) + +_INTENT_MESSAGE_MEDIACONTENT = _descriptor.Descriptor( + name="MediaContent", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="media_type", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.media_type", + index=0, + number=1, + 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=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="media_objects", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.MediaContent.media_objects", + index=1, + number=2, + 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, + ), + ], + extensions=[], + nested_types=[_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT], + enum_types=[_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIATYPE], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=7710, + serialized_end=8236, +) + +_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION = _descriptor.Descriptor( + name="OpenUrlAction", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="url", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.url", + 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, + ), + _descriptor.FieldDescriptor( + name="url_type_hint", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.url_type_hint", + index=1, + number=3, + 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=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[ + _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION_URLTYPEHINT + ], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=8767, + serialized_end=9015, +) + +_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM = _descriptor.Descriptor( + name="BrowseCarouselCardItem", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="open_uri_action", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.open_uri_action", + 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, + ), + _descriptor.FieldDescriptor( + name="title", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.title", + 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, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.description", + 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=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="image", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.image", + index=3, + number=4, + 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, + ), + _descriptor.FieldDescriptor( + name="footer", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.footer", + index=4, + number=5, + 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=[ + _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION + ], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=8487, + serialized_end=9015, +) + +_INTENT_MESSAGE_BROWSECAROUSELCARD = _descriptor.Descriptor( + name="BrowseCarouselCard", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="items", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.items", + 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, + ), + _descriptor.FieldDescriptor( + name="image_display_options", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.image_display_options", + index=1, + number=2, + 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=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM], + enum_types=[_INTENT_MESSAGE_BROWSECAROUSELCARD_IMAGEDISPLAYOPTIONS], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=8239, + serialized_end=9135, +) + +_INTENT_MESSAGE_TABLECARD = _descriptor.Descriptor( + name="TableCard", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.TableCard", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="title", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.title", + 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, + ), + _descriptor.FieldDescriptor( + name="subtitle", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.subtitle", + 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, + ), + _descriptor.FieldDescriptor( + name="image", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.image", + index=2, + number=3, + 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, + ), + _descriptor.FieldDescriptor( + name="column_properties", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.column_properties", + index=3, + number=4, + 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, + ), + _descriptor.FieldDescriptor( + name="rows", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.rows", + index=4, + number=5, + 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, + ), + _descriptor.FieldDescriptor( + name="buttons", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.TableCard.buttons", + index=5, + number=6, + 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, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=9138, + serialized_end=9504, +) + +_INTENT_MESSAGE_COLUMNPROPERTIES = _descriptor.Descriptor( + name="ColumnProperties", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="header", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.header", + 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, + ), + _descriptor.FieldDescriptor( + name="horizontal_alignment", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.ColumnProperties.horizontal_alignment", + index=1, + number=2, + 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=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[_INTENT_MESSAGE_COLUMNPROPERTIES_HORIZONTALALIGNMENT], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=9507, + serialized_end=9757, +) + +_INTENT_MESSAGE_TABLECARDROW = _descriptor.Descriptor( + name="TableCardRow", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="cells", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.cells", + 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, + ), + _descriptor.FieldDescriptor( + name="divider_after", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow.divider_after", + index=1, + number=2, + 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=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=9759, + serialized_end=9874, +) + +_INTENT_MESSAGE_TABLECARDCELL = _descriptor.Descriptor( + name="TableCardCell", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="text", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.TableCardCell.text", + 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=9876, + serialized_end=9905, +) + +_INTENT_MESSAGE = _descriptor.Descriptor( + name="Message", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="text", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.text", + 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, + ), + _descriptor.FieldDescriptor( + name="image", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.image", + 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, + ), + _descriptor.FieldDescriptor( + name="quick_replies", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.quick_replies", + index=2, + number=3, + 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, + ), + _descriptor.FieldDescriptor( + name="card", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.card", + index=3, + number=4, + 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, + ), + _descriptor.FieldDescriptor( + name="payload", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.payload", + 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=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="simple_responses", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.simple_responses", + index=5, + number=7, + 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, + ), + _descriptor.FieldDescriptor( + name="basic_card", full_name="google.cloud.dialogflow.v2beta1.Intent.Message.basic_card", index=6, number=8, @@ -2030,10 +3649,118 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="rbm_text", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.rbm_text", + index=14, + number=18, + 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, + ), + _descriptor.FieldDescriptor( + name="rbm_standalone_rich_card", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.rbm_standalone_rich_card", + index=15, + number=19, + 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, + ), + _descriptor.FieldDescriptor( + name="rbm_carousel_rich_card", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.rbm_carousel_rich_card", + index=16, + number=20, + 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, + ), + _descriptor.FieldDescriptor( + name="browse_carousel_card", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.browse_carousel_card", + index=17, + number=22, + 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, + ), + _descriptor.FieldDescriptor( + name="table_card", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.table_card", + index=18, + number=23, + 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, + ), + _descriptor.FieldDescriptor( + name="media_content", + full_name="google.cloud.dialogflow.v2beta1.Intent.Message.media_content", + index=19, + number=24, + 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, + ), _descriptor.FieldDescriptor( name="platform", full_name="google.cloud.dialogflow.v2beta1.Intent.Message.platform", - index=14, + index=20, number=6, type=14, cpp_type=8, @@ -2067,6 +3794,19 @@ _INTENT_MESSAGE_TELEPHONYPLAYAUDIO, _INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH, _INTENT_MESSAGE_TELEPHONYTRANSFERCALL, + _INTENT_MESSAGE_RBMTEXT, + _INTENT_MESSAGE_RBMCAROUSELCARD, + _INTENT_MESSAGE_RBMSTANDALONECARD, + _INTENT_MESSAGE_RBMCARDCONTENT, + _INTENT_MESSAGE_RBMSUGGESTION, + _INTENT_MESSAGE_RBMSUGGESTEDREPLY, + _INTENT_MESSAGE_RBMSUGGESTEDACTION, + _INTENT_MESSAGE_MEDIACONTENT, + _INTENT_MESSAGE_BROWSECAROUSELCARD, + _INTENT_MESSAGE_TABLECARD, + _INTENT_MESSAGE_COLUMNPROPERTIES, + _INTENT_MESSAGE_TABLECARDROW, + _INTENT_MESSAGE_TABLECARDCELL, ], enum_types=[_INTENT_MESSAGE_PLATFORM], serialized_options=None, @@ -2082,8 +3822,8 @@ fields=[], ) ], - serialized_start=1748, - serialized_end=5071, + serialized_start=1864, + serialized_end=10094, ) _INTENT_FOLLOWUPINTENTINFO = _descriptor.Descriptor( @@ -2138,8 +3878,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5073, - serialized_end=5160, + serialized_start=10096, + serialized_end=10183, ) _INTENT = _descriptor.Descriptor( @@ -2518,13 +4258,15 @@ _INTENT_FOLLOWUPINTENTINFO, ], enum_types=[_INTENT_WEBHOOKSTATE], - serialized_options=None, + 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=360, - serialized_end=5278, + serialized_start=476, + serialized_end=10449, ) @@ -2634,8 +4376,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5281, - serialized_end=5445, + serialized_start=10452, + serialized_end=10616, ) @@ -2691,8 +4433,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5447, - serialized_end=5551, + serialized_start=10618, + serialized_end=10722, ) @@ -2766,8 +4508,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5553, - serialized_end=5674, + serialized_start=10724, + serialized_end=10845, ) @@ -2859,8 +4601,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5677, - serialized_end=5860, + serialized_start=10848, + serialized_end=11031, ) @@ -2952,8 +4694,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5863, - serialized_end=6079, + serialized_start=11034, + serialized_end=11250, ) @@ -2991,8 +4733,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6081, - serialized_end=6116, + serialized_start=11252, + serialized_end=11287, ) @@ -3128,8 +4870,8 @@ fields=[], ) ], - serialized_start=6119, - serialized_end=6421, + serialized_start=11290, + serialized_end=11592, ) @@ -3167,8 +4909,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6423, - serialized_end=6509, + serialized_start=11594, + serialized_end=11680, ) @@ -3224,8 +4966,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6511, - serialized_end=6612, + serialized_start=11682, + serialized_end=11783, ) @@ -3263,8 +5005,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6614, - serialized_end=6685, + serialized_start=11785, + serialized_end=11856, ) _INTENT_TRAININGPHRASE_PART.containing_type = _INTENT_TRAININGPHRASE @@ -3334,16 +5076,205 @@ _INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.oneofs_by_name["source"].fields.append( _INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.fields_by_name["text"] ) -_INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.fields_by_name[ - "text" -].containing_oneof = _INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.oneofs_by_name["source"] -_INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.oneofs_by_name["source"].fields.append( - _INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.fields_by_name["ssml"] +_INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.fields_by_name[ + "text" +].containing_oneof = _INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.oneofs_by_name["source"] +_INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.oneofs_by_name["source"].fields.append( + _INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.fields_by_name["ssml"] +) +_INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.fields_by_name[ + "ssml" +].containing_oneof = _INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.oneofs_by_name["source"] +_INTENT_MESSAGE_TELEPHONYTRANSFERCALL.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_RBMTEXT.fields_by_name[ + "rbm_suggestion" +].message_type = _INTENT_MESSAGE_RBMSUGGESTION +_INTENT_MESSAGE_RBMTEXT.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_RBMCAROUSELCARD.fields_by_name[ + "card_width" +].enum_type = _INTENT_MESSAGE_RBMCAROUSELCARD_CARDWIDTH +_INTENT_MESSAGE_RBMCAROUSELCARD.fields_by_name[ + "card_contents" +].message_type = _INTENT_MESSAGE_RBMCARDCONTENT +_INTENT_MESSAGE_RBMCAROUSELCARD.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_RBMCAROUSELCARD_CARDWIDTH.containing_type = ( + _INTENT_MESSAGE_RBMCAROUSELCARD +) +_INTENT_MESSAGE_RBMSTANDALONECARD.fields_by_name[ + "card_orientation" +].enum_type = _INTENT_MESSAGE_RBMSTANDALONECARD_CARDORIENTATION +_INTENT_MESSAGE_RBMSTANDALONECARD.fields_by_name[ + "thumbnail_image_alignment" +].enum_type = _INTENT_MESSAGE_RBMSTANDALONECARD_THUMBNAILIMAGEALIGNMENT +_INTENT_MESSAGE_RBMSTANDALONECARD.fields_by_name[ + "card_content" +].message_type = _INTENT_MESSAGE_RBMCARDCONTENT +_INTENT_MESSAGE_RBMSTANDALONECARD.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_RBMSTANDALONECARD_CARDORIENTATION.containing_type = ( + _INTENT_MESSAGE_RBMSTANDALONECARD +) +_INTENT_MESSAGE_RBMSTANDALONECARD_THUMBNAILIMAGEALIGNMENT.containing_type = ( + _INTENT_MESSAGE_RBMSTANDALONECARD +) +_INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA.fields_by_name[ + "height" +].enum_type = _INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA_HEIGHT +_INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA.containing_type = _INTENT_MESSAGE_RBMCARDCONTENT +_INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA_HEIGHT.containing_type = ( + _INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA +) +_INTENT_MESSAGE_RBMCARDCONTENT.fields_by_name[ + "media" +].message_type = _INTENT_MESSAGE_RBMCARDCONTENT_RBMMEDIA +_INTENT_MESSAGE_RBMCARDCONTENT.fields_by_name[ + "suggestions" +].message_type = _INTENT_MESSAGE_RBMSUGGESTION +_INTENT_MESSAGE_RBMCARDCONTENT.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_RBMSUGGESTION.fields_by_name[ + "reply" +].message_type = _INTENT_MESSAGE_RBMSUGGESTEDREPLY +_INTENT_MESSAGE_RBMSUGGESTION.fields_by_name[ + "action" +].message_type = _INTENT_MESSAGE_RBMSUGGESTEDACTION +_INTENT_MESSAGE_RBMSUGGESTION.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_RBMSUGGESTION.oneofs_by_name["suggestion"].fields.append( + _INTENT_MESSAGE_RBMSUGGESTION.fields_by_name["reply"] +) +_INTENT_MESSAGE_RBMSUGGESTION.fields_by_name[ + "reply" +].containing_oneof = _INTENT_MESSAGE_RBMSUGGESTION.oneofs_by_name["suggestion"] +_INTENT_MESSAGE_RBMSUGGESTION.oneofs_by_name["suggestion"].fields.append( + _INTENT_MESSAGE_RBMSUGGESTION.fields_by_name["action"] +) +_INTENT_MESSAGE_RBMSUGGESTION.fields_by_name[ + "action" +].containing_oneof = _INTENT_MESSAGE_RBMSUGGESTION.oneofs_by_name["suggestion"] +_INTENT_MESSAGE_RBMSUGGESTEDREPLY.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONDIAL.containing_type = ( + _INTENT_MESSAGE_RBMSUGGESTEDACTION +) +_INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONOPENURI.containing_type = ( + _INTENT_MESSAGE_RBMSUGGESTEDACTION +) +_INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONSHARELOCATION.containing_type = ( + _INTENT_MESSAGE_RBMSUGGESTEDACTION +) +_INTENT_MESSAGE_RBMSUGGESTEDACTION.fields_by_name[ + "dial" +].message_type = _INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONDIAL +_INTENT_MESSAGE_RBMSUGGESTEDACTION.fields_by_name[ + "open_url" +].message_type = _INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONOPENURI +_INTENT_MESSAGE_RBMSUGGESTEDACTION.fields_by_name[ + "share_location" +].message_type = _INTENT_MESSAGE_RBMSUGGESTEDACTION_RBMSUGGESTEDACTIONSHARELOCATION +_INTENT_MESSAGE_RBMSUGGESTEDACTION.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_RBMSUGGESTEDACTION.oneofs_by_name["action"].fields.append( + _INTENT_MESSAGE_RBMSUGGESTEDACTION.fields_by_name["dial"] +) +_INTENT_MESSAGE_RBMSUGGESTEDACTION.fields_by_name[ + "dial" +].containing_oneof = _INTENT_MESSAGE_RBMSUGGESTEDACTION.oneofs_by_name["action"] +_INTENT_MESSAGE_RBMSUGGESTEDACTION.oneofs_by_name["action"].fields.append( + _INTENT_MESSAGE_RBMSUGGESTEDACTION.fields_by_name["open_url"] +) +_INTENT_MESSAGE_RBMSUGGESTEDACTION.fields_by_name[ + "open_url" +].containing_oneof = _INTENT_MESSAGE_RBMSUGGESTEDACTION.oneofs_by_name["action"] +_INTENT_MESSAGE_RBMSUGGESTEDACTION.oneofs_by_name["action"].fields.append( + _INTENT_MESSAGE_RBMSUGGESTEDACTION.fields_by_name["share_location"] +) +_INTENT_MESSAGE_RBMSUGGESTEDACTION.fields_by_name[ + "share_location" +].containing_oneof = _INTENT_MESSAGE_RBMSUGGESTEDACTION.oneofs_by_name["action"] +_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT.fields_by_name[ + "large_image" +].message_type = _INTENT_MESSAGE_IMAGE +_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT.fields_by_name[ + "icon" +].message_type = _INTENT_MESSAGE_IMAGE +_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT.containing_type = ( + _INTENT_MESSAGE_MEDIACONTENT +) +_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT.oneofs_by_name["image"].fields.append( + _INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT.fields_by_name["large_image"] +) +_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT.fields_by_name[ + "large_image" +].containing_oneof = _INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT.oneofs_by_name[ + "image" +] +_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT.oneofs_by_name["image"].fields.append( + _INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT.fields_by_name["icon"] +) +_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT.fields_by_name[ + "icon" +].containing_oneof = _INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT.oneofs_by_name[ + "image" +] +_INTENT_MESSAGE_MEDIACONTENT.fields_by_name[ + "media_type" +].enum_type = _INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIATYPE +_INTENT_MESSAGE_MEDIACONTENT.fields_by_name[ + "media_objects" +].message_type = _INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIAOBJECT +_INTENT_MESSAGE_MEDIACONTENT.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_MEDIACONTENT_RESPONSEMEDIATYPE.containing_type = ( + _INTENT_MESSAGE_MEDIACONTENT +) +_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION.fields_by_name[ + "url_type_hint" +].enum_type = ( + _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION_URLTYPEHINT +) +_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION.containing_type = ( + _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM +) +_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION_URLTYPEHINT.containing_type = ( + _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION +) +_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM.fields_by_name[ + "open_uri_action" +].message_type = _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM_OPENURLACTION +_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM.fields_by_name[ + "image" +].message_type = _INTENT_MESSAGE_IMAGE +_INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM.containing_type = ( + _INTENT_MESSAGE_BROWSECAROUSELCARD +) +_INTENT_MESSAGE_BROWSECAROUSELCARD.fields_by_name[ + "items" +].message_type = _INTENT_MESSAGE_BROWSECAROUSELCARD_BROWSECAROUSELCARDITEM +_INTENT_MESSAGE_BROWSECAROUSELCARD.fields_by_name[ + "image_display_options" +].enum_type = _INTENT_MESSAGE_BROWSECAROUSELCARD_IMAGEDISPLAYOPTIONS +_INTENT_MESSAGE_BROWSECAROUSELCARD.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_BROWSECAROUSELCARD_IMAGEDISPLAYOPTIONS.containing_type = ( + _INTENT_MESSAGE_BROWSECAROUSELCARD ) -_INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.fields_by_name[ - "ssml" -].containing_oneof = _INTENT_MESSAGE_TELEPHONYSYNTHESIZESPEECH.oneofs_by_name["source"] -_INTENT_MESSAGE_TELEPHONYTRANSFERCALL.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_TABLECARD.fields_by_name["image"].message_type = _INTENT_MESSAGE_IMAGE +_INTENT_MESSAGE_TABLECARD.fields_by_name[ + "column_properties" +].message_type = _INTENT_MESSAGE_COLUMNPROPERTIES +_INTENT_MESSAGE_TABLECARD.fields_by_name[ + "rows" +].message_type = _INTENT_MESSAGE_TABLECARDROW +_INTENT_MESSAGE_TABLECARD.fields_by_name[ + "buttons" +].message_type = _INTENT_MESSAGE_BASICCARD_BUTTON +_INTENT_MESSAGE_TABLECARD.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_COLUMNPROPERTIES.fields_by_name[ + "horizontal_alignment" +].enum_type = _INTENT_MESSAGE_COLUMNPROPERTIES_HORIZONTALALIGNMENT +_INTENT_MESSAGE_COLUMNPROPERTIES.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_COLUMNPROPERTIES_HORIZONTALALIGNMENT.containing_type = ( + _INTENT_MESSAGE_COLUMNPROPERTIES +) +_INTENT_MESSAGE_TABLECARDROW.fields_by_name[ + "cells" +].message_type = _INTENT_MESSAGE_TABLECARDCELL +_INTENT_MESSAGE_TABLECARDROW.containing_type = _INTENT_MESSAGE +_INTENT_MESSAGE_TABLECARDCELL.containing_type = _INTENT_MESSAGE _INTENT_MESSAGE.fields_by_name["text"].message_type = _INTENT_MESSAGE_TEXT _INTENT_MESSAGE.fields_by_name["image"].message_type = _INTENT_MESSAGE_IMAGE _INTENT_MESSAGE.fields_by_name[ @@ -3374,6 +5305,20 @@ _INTENT_MESSAGE.fields_by_name[ "telephony_transfer_call" ].message_type = _INTENT_MESSAGE_TELEPHONYTRANSFERCALL +_INTENT_MESSAGE.fields_by_name["rbm_text"].message_type = _INTENT_MESSAGE_RBMTEXT +_INTENT_MESSAGE.fields_by_name[ + "rbm_standalone_rich_card" +].message_type = _INTENT_MESSAGE_RBMSTANDALONECARD +_INTENT_MESSAGE.fields_by_name[ + "rbm_carousel_rich_card" +].message_type = _INTENT_MESSAGE_RBMCAROUSELCARD +_INTENT_MESSAGE.fields_by_name[ + "browse_carousel_card" +].message_type = _INTENT_MESSAGE_BROWSECAROUSELCARD +_INTENT_MESSAGE.fields_by_name["table_card"].message_type = _INTENT_MESSAGE_TABLECARD +_INTENT_MESSAGE.fields_by_name[ + "media_content" +].message_type = _INTENT_MESSAGE_MEDIACONTENT _INTENT_MESSAGE.fields_by_name["platform"].enum_type = _INTENT_MESSAGE_PLATFORM _INTENT_MESSAGE.containing_type = _INTENT _INTENT_MESSAGE_PLATFORM.containing_type = _INTENT_MESSAGE @@ -3461,6 +5406,42 @@ _INTENT_MESSAGE.fields_by_name[ "telephony_transfer_call" ].containing_oneof = _INTENT_MESSAGE.oneofs_by_name["message"] +_INTENT_MESSAGE.oneofs_by_name["message"].fields.append( + _INTENT_MESSAGE.fields_by_name["rbm_text"] +) +_INTENT_MESSAGE.fields_by_name[ + "rbm_text" +].containing_oneof = _INTENT_MESSAGE.oneofs_by_name["message"] +_INTENT_MESSAGE.oneofs_by_name["message"].fields.append( + _INTENT_MESSAGE.fields_by_name["rbm_standalone_rich_card"] +) +_INTENT_MESSAGE.fields_by_name[ + "rbm_standalone_rich_card" +].containing_oneof = _INTENT_MESSAGE.oneofs_by_name["message"] +_INTENT_MESSAGE.oneofs_by_name["message"].fields.append( + _INTENT_MESSAGE.fields_by_name["rbm_carousel_rich_card"] +) +_INTENT_MESSAGE.fields_by_name[ + "rbm_carousel_rich_card" +].containing_oneof = _INTENT_MESSAGE.oneofs_by_name["message"] +_INTENT_MESSAGE.oneofs_by_name["message"].fields.append( + _INTENT_MESSAGE.fields_by_name["browse_carousel_card"] +) +_INTENT_MESSAGE.fields_by_name[ + "browse_carousel_card" +].containing_oneof = _INTENT_MESSAGE.oneofs_by_name["message"] +_INTENT_MESSAGE.oneofs_by_name["message"].fields.append( + _INTENT_MESSAGE.fields_by_name["table_card"] +) +_INTENT_MESSAGE.fields_by_name[ + "table_card" +].containing_oneof = _INTENT_MESSAGE.oneofs_by_name["message"] +_INTENT_MESSAGE.oneofs_by_name["message"].fields.append( + _INTENT_MESSAGE.fields_by_name["media_content"] +) +_INTENT_MESSAGE.fields_by_name[ + "media_content" +].containing_oneof = _INTENT_MESSAGE.oneofs_by_name["message"] _INTENT_FOLLOWUPINTENTINFO.containing_type = _INTENT _INTENT.fields_by_name["webhook_state"].enum_type = _INTENT_WEBHOOKSTATE _INTENT.fields_by_name["training_phrases"].message_type = _INTENT_TRAININGPHRASE @@ -3634,7 +5615,7 @@ the parameter value. prompts: Optional. The collection of prompts that the agent can present - to the user in order to collect value for the parameter. + to the user in order to collect a value for the parameter. is_list: Optional. Indicates whether the parameter represents a list of values. @@ -4064,6 +6045,468 @@ # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.TelephonyTransferCall) ), ), + 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. + + + Attributes: + text: + Required. Text sent and displayed to the user. + rbm_suggestion: + 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", + (_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. + + + Attributes: + card_width: + Required. The width of the cards in the carousel. + card_contents: + Required. The cards in the carousel. A carousel must have at + least 2 cards and at most 10. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard) + ), + ), + 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. + + + Attributes: + card_orientation: + Required. Orientation of the card. + thumbnail_image_alignment: + Required if orientation is horizontal. Image preview alignment + for standalone cards with horizontal layout. + card_content: + Required. Card content. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard) + ), + ), + RbmCardContent=_reflection.GeneratedProtocolMessageType( + "RbmCardContent", + (_message.Message,), + dict( + 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 + + + Attributes: + file_uri: + 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. + thumbnail_uri: + 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. + 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. + """, + # @@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 + + + Attributes: + title: + Optional. Title of the card (at most 200 bytes). At least one + of the title, description or media must be set. + description: + Optional. Description of the card (at most 2000 bytes). At + least one of the title, description or media must be set. + media: + 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. + suggestions: + 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", + (_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). + + + Attributes: + suggestion: + Predefined suggested response or action for user to choose + reply: + Predefined replies for user to select instead of typing + action: + Predefined client side actions that user can choose + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestion) + ), + ), + 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. + + + Attributes: + text: + Suggested reply text. + postback_data: + 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. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedReply) + ), + ), + RbmSuggestedAction=_reflection.GeneratedProtocolMessageType( + "RbmSuggestedAction", + (_message.Message,), + dict( + 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). + + + Attributes: + phone_number: + Required. The phone number to fill in the default dialer app. + This field should be in `E.164 + `__ format. An example of + a correctly formatted phone number: +15556767888. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial) + ), + ), + 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. + + + 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", + (_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). + """, + # @@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. + + + Attributes: + text: + Text to display alongside the action. + postback_data: + 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. + action: + Action that needs to be triggered. + dial: + Suggested client side action: Dial a phone number + open_url: + Suggested client side action: Open a URI on device + share_location: + Suggested client side action: Share user location + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.RbmSuggestedAction) + ), + ), + MediaContent=_reflection.GeneratedProtocolMessageType( + "MediaContent", + (_message.Message,), + dict( + 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. + + + Attributes: + name: + Required. Name of media card. + description: + Optional. Description of media card. + image: + Image to show with the media card. + large_image: + Optional. Image to display above media content. + icon: + Optional. Icon to display above media content. + content_url: + 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. + + + Attributes: + media_type: + 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", + (_message.Message,), + dict( + BrowseCarouselCardItem=_reflection.GeneratedProtocolMessageType( + "BrowseCarouselCardItem", + (_message.Message,), + dict( + 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. + + + Attributes: + url: + Required. URL + url_type_hint: + Optional. Specifies the type of viewer that is used when + 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 + + + Attributes: + open_uri_action: + Required. Action to present to the user. + title: + Required. Title of the carousel item. Maximum of two lines of + text. + description: + Optional. Description of the carousel item. Maximum of four + lines of text. + image: + Optional. Hero image for the carousel item. + footer: + Optional. Text that appears at the bottom of the Browse + 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 + + + Attributes: + items: + Required. List of items in the Browse Carousel Card. Minimum + of two items, maximum of ten. + image_display_options: + Optional. Settings for displaying the image. Applies to every + image in [items][google.cloud.dialogflow.v2beta1.Intent.Messag + e.BrowseCarouselCard.items]. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard) + ), + ), + 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. + + + Attributes: + title: + Required. Title of the card. + subtitle: + Optional. Subtitle to the title. + image: + Optional. Image which should be displayed on the card. + column_properties: + Optional. Display properties for the columns in this table. + rows: + Optional. Rows in this table of data. + buttons: + Optional. List of buttons for the card. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.TableCard) + ), + ), + ColumnProperties=_reflection.GeneratedProtocolMessageType( + "ColumnProperties", + (_message.Message,), + dict( + 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. + horizontal_alignment: + 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", + (_message.Message,), + dict( + 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. + divider_after: + 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", + (_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]. + + + 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. @@ -4103,6 +6546,20 @@ Synthesizes speech in Telephony Gateway. telephony_transfer_call: Transfers the call in Telephony Gateway. + rbm_text: + Rich Business Messaging (RBM) text response. RBM allows + businesses to send enriched and branded versions of SMS. See + https://jibe.google.com/business-messaging. + rbm_standalone_rich_card: + Standalone Rich Business Messaging (RBM) rich card response. + rbm_carousel_rich_card: + Rich Business Messaging (RBM) carousel rich card response. + browse_carousel_card: + Browse carousel card for Actions on Google. + table_card: + Table card for Actions on Google. + media_content: + The media content card for Actions on Google. platform: Optional. The platform that this message is intended for. """, @@ -4209,9 +6666,9 @@ Optional. The collection of rich messages corresponding to the ``Response`` field in the Dialogflow console. default_response_platforms: - Optional. The list of platforms for which the first response - will be taken from among the messages assigned to the - DEFAULT\_PLATFORM. + Optional. The list of platforms for which the first responses + 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 @@ -4260,6 +6717,30 @@ _sym_db.RegisterMessage(Intent.Message.TelephonyPlayAudio) _sym_db.RegisterMessage(Intent.Message.TelephonySynthesizeSpeech) _sym_db.RegisterMessage(Intent.Message.TelephonyTransferCall) +_sym_db.RegisterMessage(Intent.Message.RbmText) +_sym_db.RegisterMessage(Intent.Message.RbmCarouselCard) +_sym_db.RegisterMessage(Intent.Message.RbmStandaloneCard) +_sym_db.RegisterMessage(Intent.Message.RbmCardContent) +_sym_db.RegisterMessage(Intent.Message.RbmCardContent.RbmMedia) +_sym_db.RegisterMessage(Intent.Message.RbmSuggestion) +_sym_db.RegisterMessage(Intent.Message.RbmSuggestedReply) +_sym_db.RegisterMessage(Intent.Message.RbmSuggestedAction) +_sym_db.RegisterMessage(Intent.Message.RbmSuggestedAction.RbmSuggestedActionDial) +_sym_db.RegisterMessage(Intent.Message.RbmSuggestedAction.RbmSuggestedActionOpenUri) +_sym_db.RegisterMessage( + Intent.Message.RbmSuggestedAction.RbmSuggestedActionShareLocation +) +_sym_db.RegisterMessage(Intent.Message.MediaContent) +_sym_db.RegisterMessage(Intent.Message.MediaContent.ResponseMediaObject) +_sym_db.RegisterMessage(Intent.Message.BrowseCarouselCard) +_sym_db.RegisterMessage(Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem) +_sym_db.RegisterMessage( + Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction +) +_sym_db.RegisterMessage(Intent.Message.TableCard) +_sym_db.RegisterMessage(Intent.Message.ColumnProperties) +_sym_db.RegisterMessage(Intent.Message.TableCardRow) +_sym_db.RegisterMessage(Intent.Message.TableCardCell) _sym_db.RegisterMessage(Intent.FollowupIntentInfo) ListIntentsRequest = _reflection.GeneratedProtocolMessageType( @@ -4279,9 +6760,8 @@ 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: + language is used. `Many languages `__ are supported. Note: languages must be enabled in the agent before they can be used. intent_view: @@ -4338,11 +6818,10 @@ 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. + agent's default language is used. `Many languages `__ are + supported. Note: languages must be enabled in the agent before + they can be used. intent_view: Optional. The resource view to apply to the returned intent. """, @@ -4370,11 +6849,10 @@ 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. + agent's default language is used. `Many languages `__ are + supported. Note: languages must be enabled in the agent before + they can be used. intent_view: Optional. The resource view to apply to the returned intent. """, @@ -4399,11 +6877,10 @@ 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. + agent's default language is used. `Many languages `__ are + supported. Note: languages must be enabled in the agent before + they can be used. update_mask: Optional. The mask to control which fields get updated. intent_view: @@ -4461,11 +6938,10 @@ 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. + agent's default language is used. `Many languages `__ are + supported. Note: languages must be enabled in the agent before + they can be used. update_mask: Optional. The mask to control which fields get updated. intent_view: @@ -4540,15 +7016,18 @@ DESCRIPTOR._options = None _INTENT_TRAININGPHRASE_TYPE.values_by_name["TEMPLATE"]._options = None _INTENT.fields_by_name["ml_enabled"]._options = None +_INTENT._options = None _INTENTS = _descriptor.ServiceDescriptor( name="Intents", full_name="google.cloud.dialogflow.v2beta1.Intents", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=6753, - serialized_end=7955, + serialized_options=_b( + "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + ), + serialized_start=11924, + serialized_end=13713, methods=[ _descriptor.MethodDescriptor( name="ListIntents", @@ -4558,7 +7037,7 @@ input_type=_LISTINTENTSREQUEST, output_type=_LISTINTENTSRESPONSE, serialized_options=_b( - "\202\323\344\223\002,\022*/v2beta1/{parent=projects/*/agent}/intents" + "\202\323\344\223\002f\022*/v2beta1/{parent=projects/*/agent}/intentsZ8\0226/v2beta1/{parent=projects/*/locations/*/agent}/intents" ), ), _descriptor.MethodDescriptor( @@ -4569,7 +7048,7 @@ input_type=_GETINTENTREQUEST, output_type=_INTENT, serialized_options=_b( - "\202\323\344\223\002,\022*/v2beta1/{name=projects/*/agent/intents/*}" + "\202\323\344\223\002f\022*/v2beta1/{name=projects/*/agent/intents/*}Z8\0226/v2beta1/{name=projects/*/locations/*/agent/intents/*}" ), ), _descriptor.MethodDescriptor( @@ -4580,7 +7059,7 @@ input_type=_CREATEINTENTREQUEST, output_type=_INTENT, serialized_options=_b( - '\202\323\344\223\0024"*/v2beta1/{parent=projects/*/agent}/intents:\006intent' + '\202\323\344\223\002v"*/v2beta1/{parent=projects/*/agent}/intents:\006intentZ@"6/v2beta1/{parent=projects/*/locations/*/agent}/intents:\006intent' ), ), _descriptor.MethodDescriptor( @@ -4591,7 +7070,7 @@ input_type=_UPDATEINTENTREQUEST, output_type=_INTENT, serialized_options=_b( - "\202\323\344\223\002;21/v2beta1/{intent.name=projects/*/agent/intents/*}:\006intent" + "\202\323\344\223\002\204\00121/v2beta1/{intent.name=projects/*/agent/intents/*}:\006intentZG2=/v2beta1/{intent.name=projects/*/locations/*/agent/intents/*}:\006intent" ), ), _descriptor.MethodDescriptor( @@ -4602,7 +7081,7 @@ input_type=_DELETEINTENTREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002,**/v2beta1/{name=projects/*/agent/intents/*}" + "\202\323\344\223\002f**/v2beta1/{name=projects/*/agent/intents/*}Z8*6/v2beta1/{name=projects/*/locations/*/agent/intents/*}" ), ), _descriptor.MethodDescriptor( @@ -4613,7 +7092,7 @@ input_type=_BATCHUPDATEINTENTSREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002;"6/v2beta1/{parent=projects/*/agent}/intents:batchUpdate:\001*' + '\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*' ), ), _descriptor.MethodDescriptor( @@ -4624,7 +7103,7 @@ input_type=_BATCHDELETEINTENTSREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002;"6/v2beta1/{parent=projects/*/agent}/intents:batchDelete:\001*' + '\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*' ), ), ], diff --git a/dialogflow_v2beta1/proto/intent_pb2_grpc.py b/dialogflow_v2beta1/proto/intent_pb2_grpc.py index cea355f7a..cc94fca45 100644 --- a/dialogflow_v2beta1/proto/intent_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/intent_pb2_grpc.py @@ -43,7 +43,7 @@ class IntentsStub(object): For more information about intents, see the [Dialogflow - documentation](https://cloud.google.com/dialogflow-enterprise/docs/intents-overview). + documentation](https://cloud.google.com/dialogflow/docs/intents-overview). """ def __init__(self, channel): @@ -121,7 +121,7 @@ class IntentsServicer(object): For more information about intents, see the [Dialogflow - documentation](https://cloud.google.com/dialogflow-enterprise/docs/intents-overview). + documentation](https://cloud.google.com/dialogflow/docs/intents-overview). """ def ListIntents(self, request, context): diff --git a/dialogflow_v2beta1/proto/knowledge_base.proto b/dialogflow_v2beta1/proto/knowledge_base.proto deleted file mode 100644 index af8d7bd28..000000000 --- a/dialogflow_v2beta1/proto/knowledge_base.proto +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright 2019 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/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"; - -// Manages knowledge bases. -// -// Allows users to setup and maintain knowledge bases with their knowledge data. -service KnowledgeBases { - // Returns the list of all knowledge bases of the specified agent. - rpc ListKnowledgeBases(ListKnowledgeBasesRequest) returns (ListKnowledgeBasesResponse) { - option (google.api.http) = { - get: "/v2beta1/{parent=projects/*}/knowledgeBases" - additional_bindings { - get: "/v2beta1/{parent=projects/*/agent}/knowledgeBases" - } - }; - } - - // Retrieves the specified knowledge base. - rpc GetKnowledgeBase(GetKnowledgeBaseRequest) returns (KnowledgeBase) { - option (google.api.http) = { - get: "/v2beta1/{name=projects/*/knowledgeBases/*}" - additional_bindings { - get: "/v2beta1/{name=projects/*/agent/knowledgeBases/*}" - } - }; - } - - // Creates a knowledge base. - 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" - } - }; - } - - // Deletes the specified knowledge base. - rpc DeleteKnowledgeBase(DeleteKnowledgeBaseRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2beta1/{name=projects/*/knowledgeBases/*}" - additional_bindings { - delete: "/v2beta1/{name=projects/*/agent/knowledgeBases/*}" - } - }; - } - - // Updates the specified knowledge base. - 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" - } - }; - } -} - -// Represents knowledge base resource. -// -// Note: resource `projects.agent.knowledgeBases` is deprecated, please use -// `projects.knowledgeBases` instead. -message KnowledgeBase { - // 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; -} - -// 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; - - // Optional. The maximum number of items to return in a single page. By - // default 10 and at most 100. - int32 page_size = 2; - - // Optional. The next_page_token value returned from a previous list request. - string page_token = 3; -} - -// 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 [KnowledgeBase.GetDocument][]. -message GetKnowledgeBaseRequest { - // Required. The name of the knowledge base to retrieve. - // Format `projects//knowledgeBases/`. - string name = 1; -} - -// 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; - - // Required. The knowledge base to create. - KnowledgeBase knowledge_base = 2; -} - -// 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; - - // 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; - - // 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; -} diff --git a/dialogflow_v2beta1/proto/knowledge_base_pb2.py b/dialogflow_v2beta1/proto/knowledge_base_pb2.py index 2e989850b..e4a566399 100644 --- a/dialogflow_v2beta1/proto/knowledge_base_pb2.py +++ b/dialogflow_v2beta1/proto/knowledge_base_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/knowledge_base.proto @@ -15,9 +16,9 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__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( @@ -28,13 +29,13 @@ "\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\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto"3\n\rKnowledgeBase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \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\x8a\n\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_baseB\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' + '\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"3\n\rKnowledgeBase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \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' ), dependencies=[ google_dot_api_dot_annotations__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, ], ) @@ -91,8 +92,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=215, - serialized_end=266, + serialized_start=213, + serialized_end=264, ) @@ -166,8 +167,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=268, - serialized_end=350, + serialized_start=266, + serialized_end=348, ) @@ -223,8 +224,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=352, - serialized_end=478, + serialized_start=350, + serialized_end=476, ) @@ -262,8 +263,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=480, - serialized_end=519, + serialized_start=478, + serialized_end=517, ) @@ -319,8 +320,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=521, - serialized_end=637, + serialized_start=519, + serialized_end=635, ) @@ -376,8 +377,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=639, - serialized_end=696, + serialized_start=637, + serialized_end=694, ) @@ -433,8 +434,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=699, - serialized_end=848, + serialized_start=697, + serialized_end=846, ) _LISTKNOWLEDGEBASESRESPONSE.fields_by_name[ @@ -476,8 +477,8 @@ __module__="google.cloud.dialogflow_v2beta1.proto.knowledge_base_pb2", __doc__="""Represents knowledge base resource. - Note: resource ``projects.agent.knowledgeBases`` is deprecated, please - use ``projects.knowledgeBases`` instead. + Note: The ``projects.agent.knowledgeBases`` resource is deprecated; only + use ``projects.knowledgeBases``. Attributes: @@ -638,9 +639,11 @@ full_name="google.cloud.dialogflow.v2beta1.KnowledgeBases", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=851, - serialized_end=2141, + serialized_options=_b( + "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + ), + serialized_start=849, + serialized_end=2261, methods=[ _descriptor.MethodDescriptor( name="ListKnowledgeBases", diff --git a/dialogflow_v2beta1/proto/knowledge_base_pb2_grpc.py b/dialogflow_v2beta1/proto/knowledge_base_pb2_grpc.py index ee24609fc..2ef1967a4 100644 --- a/dialogflow_v2beta1/proto/knowledge_base_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/knowledge_base_pb2_grpc.py @@ -54,6 +54,9 @@ class KnowledgeBasesServicer(object): 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`. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -61,6 +64,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`. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -68,6 +74,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`. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -75,6 +84,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`. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -82,6 +94,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`. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") diff --git a/dialogflow_v2beta1/proto/session.proto b/dialogflow_v2beta1/proto/session.proto deleted file mode 100644 index 62018794e..000000000 --- a/dialogflow_v2beta1/proto/session.proto +++ /dev/null @@ -1,586 +0,0 @@ -// Copyright 2019 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/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/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"; - -// 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. -service Sessions { - // 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: "*" - } - }; - } - - // 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 numbers or some type of user and session - // identifiers (preferably hashed). The length of the `Session ID` and - // `User ID` must not exceed 36 characters. - string session = 1; - - // Optional. 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; - - // Optional. 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; - - // Optional. 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. - bytes output_audio = 4; - - // Instructs the speech synthesizer how to generate the output audio. This - // field is populated from the agent-level speech synthesizer configuration, - // if enabled. - OutputAudioConfig output_audio_config = 6; -} - -// Represents the parameters of the conversational query. -message QueryParameters { - // Optional. 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; - - // Optional. The geo location of this conversational query. - google.type.LatLng geo_location = 2; - - // Optional. The collection of contexts to be activated before this query is - // executed. - repeated Context contexts = 3; - - // Optional. Specifies whether to delete all contexts in the current session - // before the new ones are activated. - bool reset_contexts = 4; - - // 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. - repeated SessionEntityType session_entity_types = 5; - - // Optional. This field can be used to pass custom data into the webhook - // associated with the agent. Arbitrary JSON objects are supported. - google.protobuf.Struct payload = 6; - - // Optional. 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; - - // Optional. 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; -} - -// 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 an event was provided as input, `query_text` is not set. - string query_text = 1; - - // The language that was triggered during intent detection. - // See [Language - // Support](https://cloud.google.com/dialogflow-enterprise/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. - 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` and `webhook_state`. - Intent intent = 11; - - // The intent detection confidence. Values range from 0.0 - // (completely uncertain) to 1.0 (completely certain). - // 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; - - // The free-form diagnostic info. For example, this field could contain - // webhook call latency. The string keys of the Struct's fields map can change - // without notice. - 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; - - // 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 -// `StreamingDetectIntent` method. -// -// Multiple request messages should be sent in order: -// -// 1. The first message must contain `session`, `query_input` plus optionally -// `query_params` and/or `single_utterance`. If the client wants to receive -// an audio response, it should also contain `output_audio_config`. -// The message must not contain `input_audio`. -// -// 2. If `query_input` was set to a streaming input audio config, -// all subsequent messages must contain only `input_audio`. -// Otherwise, finish 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 numbers or some type of user and session - // identifiers (preferably hashed). The length of the `Session ID` and - // `User ID` must not exceed 36 characters. - string session = 1; - - // Optional. 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; - - // 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. - // This setting is ignored when `query_input` is a piece of text or an event. - bool single_utterance = 4; - - // Optional. 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; - - // Optional. 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. - 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: `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 `MESSAGE_TYPE_TRANSCRIPT`: `transcript` and possibly `is_final`. -// -// * for `MESSAGE_TYPE_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` = `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` = `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; -} - -// 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-enterprise/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; - - // Optional. The collection of parameters associated with the event. - google.protobuf.Struct parameters = 2; - - // Required. The language of this query. See [Language - // Support](https://cloud.google.com/dialogflow-enterprise/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 { - // Optional. 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 as configured by -// `sentiment_analysis_request_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 deleted file mode 100644 index 3b6f14f14..000000000 --- a/dialogflow_v2beta1/proto/session_entity_type.proto +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright 2019 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/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"; - -// 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. -// -// For more information about entity types, see the -// [Dialogflow -// documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview). -service SessionEntityTypes { - // Returns the list of all session entity types in the specified session. - 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" - } - }; - } - - // Retrieves the specified session entity type. - 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/*}" - } - }; - } - - // Creates a session entity type. - // - // If the specified session entity type already exists, overrides the - // session entity type. - 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" - } - }; - } - - // Updates the specified session entity type. - 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" - } - }; - } - - // Deletes the specified session entity type. - 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/*}" - } - }; - } -} - -// Represents a session entity type. -// -// Extends or replaces a developer entity type at the user session level (we -// refer to the entity types defined at the agent level as "developer entity -// types"). -// -// Note: session entity types apply to all queries, regardless of the language. -message SessionEntityType { - // 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 developer entity type. - ENTITY_OVERRIDE_MODE_OVERRIDE = 1; - - // The collection of session entities extends the collection of entities in - // the corresponding developer 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 developer 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 developer 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; - - // 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; -} - -// 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; - - // Required. The session entity type to create. - SessionEntityType session_entity_type = 2; -} - -// The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType]. -message UpdateSessionEntityTypeRequest { - // 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. - SessionEntityType session_entity_type = 1; - - // 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; -} diff --git a/dialogflow_v2beta1/proto/session_entity_type_pb2.py b/dialogflow_v2beta1/proto/session_entity_type_pb2.py index 0cf0e2250..84b65f43b 100644 --- a/dialogflow_v2beta1/proto/session_entity_type_pb2.py +++ b/dialogflow_v2beta1/proto/session_entity_type_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto @@ -15,12 +16,12 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__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( @@ -31,14 +32,14 @@ "\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\x19google/api/resource.proto\x1a\x37google/cloud/dialogflow_v2beta1/proto/entity_type.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.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\xcb\x0c\n\x12SessionEntityTypes\x12\xb2\x02\n\x16ListSessionEntityTypes\x12>.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest\x1a?.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse"\x96\x01\x82\xd3\xe4\x93\x02\x8f\x01\x12\x39/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypesZR\x12P/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes\x12\xa1\x02\n\x14GetSessionEntityType\x12<.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest\x1a\x32.google.cloud.dialogflow.v2beta1.SessionEntityType"\x96\x01\x82\xd3\xe4\x93\x02\x8f\x01\x12\x39/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}ZR\x12P/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}\x12\xd1\x02\n\x17\x43reateSessionEntityType\x12?.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest\x1a\x32.google.cloud.dialogflow.v2beta1.SessionEntityType"\xc0\x01\x82\xd3\xe4\x93\x02\xb9\x01"9/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes:\x13session_entity_typeZg"P/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes:\x13session_entity_type\x12\xf9\x02\n\x17UpdateSessionEntityType\x12?.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest\x1a\x32.google.cloud.dialogflow.v2beta1.SessionEntityType"\xe8\x01\x82\xd3\xe4\x93\x02\xe1\x01\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_type\x12\x8b\x02\n\x17\x44\x65leteSessionEntityType\x12?.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest\x1a\x16.google.protobuf.Empty"\x96\x01\x82\xd3\xe4\x93\x02\x8f\x01*9/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}ZR*P/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}B\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' + '\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' ), dependencies=[ google_dot_api_dot_annotations__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, ], ) @@ -73,8 +74,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=485, - serialized_end=615, + serialized_start=483, + serialized_end=613, ) _sym_db.RegisterEnumDescriptor(_SESSIONENTITYTYPE_ENTITYOVERRIDEMODE) @@ -149,8 +150,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=278, - serialized_end=615, + serialized_start=276, + serialized_end=613, ) @@ -224,8 +225,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=617, - serialized_end=703, + serialized_start=615, + serialized_end=701, ) @@ -281,8 +282,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=706, - serialized_end=845, + serialized_start=704, + serialized_end=843, ) @@ -320,8 +321,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=847, - serialized_end=890, + serialized_start=845, + serialized_end=888, ) @@ -377,8 +378,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=893, - serialized_end=1022, + serialized_start=891, + serialized_end=1020, ) @@ -434,8 +435,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1025, - serialized_end=1187, + serialized_start=1023, + serialized_end=1185, ) @@ -473,8 +474,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1189, - serialized_end=1235, + serialized_start=1187, + serialized_end=1233, ) _SESSIONENTITYTYPE.fields_by_name[ @@ -727,9 +728,11 @@ full_name="google.cloud.dialogflow.v2beta1.SessionEntityTypes", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=1238, - serialized_end=2849, + 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, methods=[ _descriptor.MethodDescriptor( name="ListSessionEntityTypes", @@ -739,7 +742,7 @@ input_type=_LISTSESSIONENTITYTYPESREQUEST, output_type=_LISTSESSIONENTITYTYPESRESPONSE, serialized_options=_b( - "\202\323\344\223\002\217\001\0229/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypesZR\022P/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes" + "\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" ), ), _descriptor.MethodDescriptor( @@ -750,7 +753,7 @@ input_type=_GETSESSIONENTITYTYPEREQUEST, output_type=_SESSIONENTITYTYPE, serialized_options=_b( - "\202\323\344\223\002\217\001\0229/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}ZR\022P/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + "\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/*}" ), ), _descriptor.MethodDescriptor( @@ -761,7 +764,7 @@ input_type=_CREATESESSIONENTITYTYPEREQUEST, output_type=_SESSIONENTITYTYPE, serialized_options=_b( - '\202\323\344\223\002\271\001"9/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes:\023session_entity_typeZg"P/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes:\023session_entity_type' + '\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' ), ), _descriptor.MethodDescriptor( @@ -772,7 +775,7 @@ input_type=_UPDATESESSIONENTITYTYPEREQUEST, output_type=_SESSIONENTITYTYPE, serialized_options=_b( - "\202\323\344\223\002\341\0012M/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_type" + "\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" ), ), _descriptor.MethodDescriptor( @@ -783,7 +786,7 @@ input_type=_DELETESESSIONENTITYTYPEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002\217\001*9/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}ZR*P/v2beta1/{name=projects/*/agent/environments/*/users/*/sessions/*/entityTypes/*}" + "\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/*}" ), ), ], diff --git a/dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py b/dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py index 537d39021..0e08a4ffb 100644 --- a/dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py +++ b/dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py @@ -18,9 +18,13 @@ class SessionEntityTypesStub(object): 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-enterprise/docs/entities-overview). + documentation](https://cloud.google.com/dialogflow/docs/entities-overview). """ def __init__(self, channel): @@ -67,13 +71,21 @@ class SessionEntityTypesServicer(object): 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-enterprise/docs/entities-overview). + documentation](https://cloud.google.com/dialogflow/docs/entities-overview). """ 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. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -81,6 +93,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. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -91,6 +107,10 @@ def CreateSessionEntityType(self, request, context): 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. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -98,6 +118,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. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -105,6 +129,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. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") diff --git a/dialogflow_v2beta1/proto/session_pb2.py b/dialogflow_v2beta1/proto/session_pb2.py index c0b4ff5f3..e75d73a7b 100644 --- a/dialogflow_v2beta1/proto/session_pb2.py +++ b/dialogflow_v2beta1/proto/session_pb2.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/session.proto @@ -16,6 +17,7 @@ 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 dialogflow_v2beta1.proto import ( agent_pb2 as google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2, @@ -32,9 +34,11 @@ from dialogflow_v2beta1.proto import ( session_entity_type_pb2 as google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__entity__type__pb2, ) +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 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( @@ -45,19 +49,22 @@ "\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" ), serialized_pb=_b( - '\n3google/cloud/dialogflow_v2beta1/proto/session.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.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\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x18google/type/latlng.proto"\x96\x02\n\x13\x44\x65tectIntentRequest\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\x12O\n\x13output_audio_config\x18\x04 \x01(\x0b\x32\x32.google.cloud.dialogflow.v2beta1.OutputAudioConfig\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"\xa9\x03\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"\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"\x86\x03\n\x10KnowledgeAnswers\x12I\n\x07\x61nswers\x18\x01 \x03(\x0b\x32\x38.google.cloud.dialogflow.v2beta1.KnowledgeAnswers.Answer\x1a\xa6\x02\n\x06\x41nswer\x12\x0e\n\x06source\x18\x01 \x01(\t\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"\xb9\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\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"\x8f\x02\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"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\xca\x03\n\x08Sessions\x12\x9e\x02\n\x0c\x44\x65tectIntent\x12\x34.google.cloud.dialogflow.v2beta1.DetectIntentRequest\x1a\x35.google.cloud.dialogflow.v2beta1.DetectIntentResponse"\xa0\x01\x82\xd3\xe4\x93\x02\x99\x01";/v2beta1/{session=projects/*/agent/sessions/*}:detectIntent:\x01*ZW"R/v2beta1/{session=projects/*/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\x42\xaa\x01\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.V2beta1b\x06proto3' + '\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\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x18google/type/latlng.proto\x1a\x17google/api/client.proto"\xbe\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\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"\xa9\x03\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"\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"\xb9\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\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\xaa\x01\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.V2beta1b\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_cloud_dot_dialogflow__v2beta1_dot_proto_dot_agent__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_audio__config__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_context__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_intent__pb2.DESCRIPTOR, google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__entity__type__pb2.DESCRIPTOR, + google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, 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, ], ) @@ -87,8 +94,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2832, - serialized_end=2925, + serialized_start=3003, + serialized_end=3096, ) _sym_db.RegisterEnumDescriptor(_KNOWLEDGEANSWERS_ANSWER_MATCHCONFIDENCELEVEL) @@ -118,8 +125,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3867, - serialized_end=3955, + serialized_start=4186, + serialized_end=4274, ) _sym_db.RegisterEnumDescriptor(_STREAMINGRECOGNITIONRESULT_MESSAGETYPE) @@ -146,7 +153,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\372A#\n!dialogflow.googleapis.com/Session"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -230,8 +237,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=506, - serialized_end=784, + serialized_start=596, + serialized_end=914, ) @@ -359,8 +366,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=787, - serialized_end=1126, + serialized_start=917, + serialized_end=1256, ) @@ -524,8 +531,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1129, - serialized_end=1554, + serialized_start=1259, + serialized_end=1684, ) @@ -607,8 +614,8 @@ fields=[], ) ], - serialized_start=1557, - serialized_end=1775, + serialized_start=1687, + serialized_end=1905, ) @@ -916,8 +923,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1778, - serialized_end=2532, + serialized_start=1908, + serialized_end=2662, ) @@ -943,7 +950,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\372A$\n"dialogflow.googleapis.com/Document'), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1027,8 +1034,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2631, - serialized_end=2925, + serialized_start=2761, + serialized_end=3096, ) _KNOWLEDGEANSWERS = _descriptor.Descriptor( @@ -1065,8 +1072,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2535, - serialized_end=2925, + serialized_start=2665, + serialized_end=3096, ) @@ -1194,8 +1201,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2928, - serialized_end=3241, + serialized_start=3099, + serialized_end=3412, ) @@ -1341,8 +1348,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3244, - serialized_end=3681, + serialized_start=3415, + serialized_end=3852, ) @@ -1425,6 +1432,60 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="stability", + full_name="google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.stability", + index=4, + number=6, + type=2, + cpp_type=6, + label=1, + has_default_value=False, + default_value=float(0), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="speech_word_info", + full_name="google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.speech_word_info", + index=5, + number=7, + 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, + ), + _descriptor.FieldDescriptor( + name="speech_end_offset", + full_name="google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.speech_end_offset", + index=6, + number=8, + 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, + ), ], extensions=[], nested_types=[], @@ -1434,8 +1495,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3684, - serialized_end=3955, + serialized_start=3855, + serialized_end=4274, ) @@ -1491,8 +1552,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3957, - serialized_end=4005, + serialized_start=4276, + serialized_end=4324, ) @@ -1566,8 +1627,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4007, - serialized_end=4101, + serialized_start=4326, + serialized_end=4420, ) @@ -1605,8 +1666,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4103, - serialized_end=4173, + serialized_start=4422, + serialized_end=4492, ) @@ -1644,8 +1705,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4175, - serialized_end=4274, + serialized_start=4494, + serialized_end=4593, ) @@ -1701,8 +1762,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4276, - serialized_end=4321, + serialized_start=4595, + serialized_end=4640, ) _DETECTINTENTREQUEST.fields_by_name["query_params"].message_type = _QUERYPARAMETERS @@ -1827,6 +1888,14 @@ _STREAMINGRECOGNITIONRESULT.fields_by_name[ "message_type" ].enum_type = _STREAMINGRECOGNITIONRESULT_MESSAGETYPE +_STREAMINGRECOGNITIONRESULT.fields_by_name[ + "speech_word_info" +].message_type = ( + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_audio__config__pb2._SPEECHWORDINFO +) +_STREAMINGRECOGNITIONRESULT.fields_by_name[ + "speech_end_offset" +].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _STREAMINGRECOGNITIONRESULT_MESSAGETYPE.containing_type = _STREAMINGRECOGNITIONRESULT _EVENTINPUT.fields_by_name[ "parameters" @@ -1874,9 +1943,9 @@ 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 + 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 numbers or some type of user + ``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. query_params: @@ -1940,9 +2009,8 @@ generating audio. If no default platform text responses exist, the generated audio content will be empty. output_audio_config: - Instructs the speech synthesizer how to generate the output - audio. This field is populated from the agent-level speech - synthesizer configuration, if enabled. + The config used by the speech synthesizer to generate the + output audio. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DetectIntentResponse) ), @@ -2007,7 +2075,7 @@ 1. An audio config which instructs the speech recognizer how to process the speech audio. - 2. A conversational query in the form of text,. + 2. A conversational query in the form of text. 3. An event that specifies which intent to trigger. @@ -2039,18 +2107,19 @@ Attributes: query_text: - 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 an event was provided as input, - ``query_text`` is not set. + 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. language_code: The language that was triggered during intent detection. See - `Language Support `__ for a list of the - currently supported language codes. + `Language Support `__ for a list of the currently supported + language codes. speech_recognition_confidence: The Speech recognition confidence between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that @@ -2065,11 +2134,11 @@ parameters: The collection of extracted parameters. 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. + 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. fulfillment_text: The text to be pronounced to the user or shown on the screen. Note: This is a legacy field, ``fulfillment_messages`` should @@ -2092,13 +2161,18 @@ intent: The intent that matched the conversational query. Some, not all fields are filled in this message, including but not - limited to: ``name``, ``display_name`` and ``webhook_state``. + limited to: ``name``, ``display_name``, ``end_interaction`` + and ``is_fallback``. intent_detection_confidence: The intent detection confidence. Values range from 0.0 - (completely uncertain) to 1.0 (completely certain). If there - are ``multiple knowledge_answers`` messages, this value is set - to the greatest ``knowledgeAnswers.match_confidence`` value in - the list. + (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. diagnostic_info: The free-form diagnostic info. For example, this field could contain webhook call latency. The string keys of the Struct's @@ -2184,19 +2258,37 @@ DESCRIPTOR=_STREAMINGDETECTINTENTREQUEST, __module__="google.cloud.dialogflow_v2beta1.proto.session_pb2", __doc__="""The top-level message sent by the client to the - ``StreamingDetectIntent`` method. + [StreamingDetectIntent][] method. Multiple request messages should be sent in order: - 1. The first message must contain ``session``, ``query_input`` plus - optionally ``query_params`` and/or ``single_utterance``. If the - client wants to receive an audio response, it should also contain - ``output_audio_config``. The message must not contain - ``input_audio``. + 1. The first message must contain + [StreamingDetectIntentRequest.session][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.session], + [StreamingDetectIntentRequest.query\_input] plus optionally + [StreamingDetectIntentRequest.query\_params]. If the client wants to + receive an audio response, it should also contain + [StreamingDetectIntentRequest.output\_audio\_config][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.output\_audio\_config]. + The message must not contain + [StreamingDetectIntentRequest.input\_audio][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.input\_audio]. + 2. If + [StreamingDetectIntentRequest.query\_input][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query\_input] + was set to + [StreamingDetectIntentRequest.query\_input.audio\_config][], all + subsequent messages must contain + [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 [StreamingDetectIntentRequest.query\_input.text][]. + + However, note that: - 2. If ``query_input`` was set to a streaming input audio config, all - subsequent messages must contain only ``input_audio``. Otherwise, - finish the request stream. + - 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: @@ -2207,9 +2299,9 @@ ID>/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 + 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 numbers or some type of user and + 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. query_params: @@ -2221,14 +2313,17 @@ form of text, or 3. an event that specifies which intent to trigger. 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. This setting is ignored - when ``query_input`` is a piece of text or an event. + DEPRECATED. Please use [InputAudioConfig.single\_utterance][go + ogle.cloud.dialogflow.v2beta1.InputAudioConfig.single\_utteran + ce] instead. 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. This setting + is ignored when ``query_input`` is a piece of text or an + event. output_audio_config: Optional. Instructs the speech synthesizer how to generate the output audio. If this field is not set and agent-level speech @@ -2293,6 +2388,12 @@ Specifies the status of the webhook request. output_audio: 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. output_audio_config: The config used by the speech synthesizer to generate the output audio. @@ -2326,7 +2427,7 @@ 6. transcript: " that is" - 7. message\_type: ``MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE`` + 7. message\_type: ``END_OF_SINGLE_UTTERANCE`` 8. transcript: " that is the question" is\_final: true @@ -2336,10 +2437,9 @@ In each response we populate: - - for ``MESSAGE_TYPE_TRANSCRIPT``: ``transcript`` and possibly - ``is_final``. + - for ``TRANSCRIPT``: ``transcript`` and possibly ``is_final``. - - for ``MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE``: only ``message_type``. + - for ``END_OF_SINGLE_UTTERANCE``: only ``message_type``. Attributes: @@ -2347,14 +2447,13 @@ Type of the result message. transcript: Transcript text representing the words that the user spoke. - Populated if and only if ``message_type`` = - ``MESSAGE_TYPE_TRANSCRIPT``. + Populated if and only if ``message_type`` = ``TRANSCRIPT``. is_final: 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`` = - ``MESSAGE_TYPE_TRANSCRIPT``. + ``TRANSCRIPT``. confidence: The Speech confidence between 0.0 and 1.0 for the current portion of audio. A higher number indicates an estimated @@ -2363,6 +2462,24 @@ 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. + 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. + 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. + 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) ), @@ -2384,11 +2501,10 @@ processed. Text length must not exceed 256 characters. language_code: Required. The language of this conversational query. See - `Language Support `__ 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. + `Language Support `__ 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. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.TextInput) ), @@ -2416,12 +2532,11 @@ Optional. The collection of parameters associated with the event. language_code: - Required. The language of this query. See `Language Support - `__ 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. + Required. The language of this query. See `Language Support `__ + 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. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.EventInput) ), @@ -2493,15 +2608,19 @@ DESCRIPTOR._options = None +_DETECTINTENTREQUEST.fields_by_name["session"]._options = None +_KNOWLEDGEANSWERS_ANSWER.fields_by_name["source"]._options = None _SESSIONS = _descriptor.ServiceDescriptor( name="Sessions", full_name="google.cloud.dialogflow.v2beta1.Sessions", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=4324, - serialized_end=4782, + serialized_options=_b( + "\312A\031dialogflow.googleapis.com\322AYhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + ), + serialized_start=4643, + serialized_end=5402, methods=[ _descriptor.MethodDescriptor( name="DetectIntent", @@ -2511,7 +2630,7 @@ input_type=_DETECTINTENTREQUEST, output_type=_DETECTINTENTRESPONSE, serialized_options=_b( - '\202\323\344\223\002\231\001";/v2beta1/{session=projects/*/agent/sessions/*}:detectIntent:\001*ZW"R/v2beta1/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent:\001*' + '\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*' ), ), _descriptor.MethodDescriptor( diff --git a/dialogflow_v2beta1/proto/validation_result_pb2.py b/dialogflow_v2beta1/proto/validation_result_pb2.py new file mode 100644 index 000000000..5c1290437 --- /dev/null +++ b/dialogflow_v2beta1/proto/validation_result_pb2.py @@ -0,0 +1,240 @@ +# -*- 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")) +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 + + +DESCRIPTOR = _descriptor.FileDescriptor( + 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' + ), + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR], +) + + +_VALIDATIONERROR_SEVERITY = _descriptor.EnumDescriptor( + name="Severity", + full_name="google.cloud.dialogflow.v2beta1.ValidationError.Severity", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="SEVERITY_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="INFO", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="WARNING", index=2, number=2, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="ERROR", index=3, number=3, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="CRITICAL", index=4, number=4, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=265, + serialized_end=349, +) +_sym_db.RegisterEnumDescriptor(_VALIDATIONERROR_SEVERITY) + + +_VALIDATIONERROR = _descriptor.Descriptor( + name="ValidationError", + full_name="google.cloud.dialogflow.v2beta1.ValidationError", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="severity", + full_name="google.cloud.dialogflow.v2beta1.ValidationError.severity", + index=0, + number=1, + 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=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="entries", + full_name="google.cloud.dialogflow.v2beta1.ValidationError.entries", + index=1, + number=3, + type=9, + cpp_type=9, + 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, + ), + _descriptor.FieldDescriptor( + name="error_message", + full_name="google.cloud.dialogflow.v2beta1.ValidationError.error_message", + index=2, + number=4, + 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=[_VALIDATIONERROR_SEVERITY], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=129, + serialized_end=349, +) + + +_VALIDATIONRESULT = _descriptor.Descriptor( + name="ValidationResult", + full_name="google.cloud.dialogflow.v2beta1.ValidationResult", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="validation_errors", + full_name="google.cloud.dialogflow.v2beta1.ValidationResult.validation_errors", + 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, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=351, + serialized_end=446, +) + +_VALIDATIONERROR.fields_by_name["severity"].enum_type = _VALIDATIONERROR_SEVERITY +_VALIDATIONERROR_SEVERITY.containing_type = _VALIDATIONERROR +_VALIDATIONRESULT.fields_by_name["validation_errors"].message_type = _VALIDATIONERROR +DESCRIPTOR.message_types_by_name["ValidationError"] = _VALIDATIONERROR +DESCRIPTOR.message_types_by_name["ValidationResult"] = _VALIDATIONRESULT +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +ValidationError = _reflection.GeneratedProtocolMessageType( + "ValidationError", + (_message.Message,), + dict( + 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 + 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. + 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. + + + Attributes: + validation_errors: + Contains all validation errors. + """, + # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ValidationResult) + ), +) +_sym_db.RegisterMessage(ValidationResult) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/dialogflow_v2beta1/proto/validation_result_pb2_grpc.py b/dialogflow_v2beta1/proto/validation_result_pb2_grpc.py new file mode 100644 index 000000000..07cb78fe0 --- /dev/null +++ b/dialogflow_v2beta1/proto/validation_result_pb2_grpc.py @@ -0,0 +1,2 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc diff --git a/dialogflow_v2beta1/proto/webhook.proto b/dialogflow_v2beta1/proto/webhook.proto deleted file mode 100644 index 433c8c0b5..000000000 --- a/dialogflow_v2beta1/proto/webhook.proto +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2019 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. -message WebhookResponse { - // Optional. The text to be shown on the screen. This value is passed directly - // to `QueryResult.fulfillment_text`. - string fulfillment_text = 1; - - // Optional. The collection of rich messages to present to the user. This - // value is passed directly to `QueryResult.fulfillment_messages`. - repeated Intent.Message fulfillment_messages = 2; - - // Optional. This value is passed directly to `QueryResult.webhook_source`. - string source = 3; - - // 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](https://developers.google.com/actions/dialogflow/webhook) - //
{
-  //   "google": {
-  //     "expectUserResponse": true,
-  //     "richResponse": {
-  //       "items": [
-  //         {
-  //           "simpleResponse": {
-  //             "textToSpeech": "this is a simple response"
-  //           }
-  //         }
-  //       ]
-  //     }
-  //   }
-  // }
- google.protobuf.Struct payload = 4; - - // Optional. The collection of output contexts. This value is passed directly - // to `QueryResult.output_contexts`. - repeated Context output_contexts = 5; - - // Optional. Makes the platform immediately invoke another `DetectIntent` call - // internally with the specified event as input. - 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; -} - -// 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 Telephony Gateway 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 082e6caf4..9ca5e1165 100644 --- a/dialogflow_v2beta1/proto/webhook_pb2.py +++ b/dialogflow_v2beta1/proto/webhook_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/webhook.proto @@ -38,7 +39,7 @@ "\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"\xdb\x02\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"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' + '\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, @@ -295,6 +296,24 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="session_entity_types", + full_name="google.cloud.dialogflow.v2beta1.WebhookResponse.session_entity_types", + index=7, + number=10, + 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, + ), ], extensions=[], nested_types=[], @@ -305,7 +324,7 @@ extension_ranges=[], oneofs=[], serialized_start=680, - serialized_end=1027, + serialized_end=1109, ) @@ -379,8 +398,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1029, - serialized_end=1133, + serialized_start=1111, + serialized_end=1215, ) _WEBHOOKREQUEST.fields_by_name[ @@ -414,6 +433,11 @@ ].message_type = ( google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__pb2._EVENTINPUT ) +_WEBHOOKRESPONSE.fields_by_name[ + "session_entity_types" +].message_type = ( + google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__entity__type__pb2._SESSIONENTITYTYPE +) _ORIGINALDETECTINTENTREQUEST.fields_by_name[ "payload" ].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT @@ -498,12 +522,21 @@ followup_event_input: Optional. Makes the platform immediately invoke another ``DetectIntent`` call internally with the specified event as - input. + input. 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 gateway) use this information to close interaction with an end user. Default is false. + 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``. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.WebhookResponse) ), diff --git a/dialogflow_v2beta1/types.py b/dialogflow_v2beta1/types.py index 3417cfbf5..f8ea0821f 100644 --- a/dialogflow_v2beta1/types.py +++ b/dialogflow_v2beta1/types.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import import sys @@ -24,22 +25,27 @@ 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 gcs_pb2 from dialogflow_v2beta1.proto import intent_pb2 from dialogflow_v2beta1.proto import knowledge_base_pb2 from dialogflow_v2beta1.proto import session_entity_type_pb2 from dialogflow_v2beta1.proto import session_pb2 +from dialogflow_v2beta1.proto import validation_result_pb2 from dialogflow_v2beta1.proto import webhook_pb2 from google.longrunning import operations_pb2 from google.protobuf import any_pb2 +from google.protobuf import duration_pb2 from google.protobuf import empty_pb2 from google.protobuf import field_mask_pb2 from google.protobuf import struct_pb2 from google.rpc import status_pb2 from google.type import latlng_pb2 + _shared_modules = [ operations_pb2, any_pb2, + duration_pb2, empty_pb2, field_mask_pb2, struct_pb2, @@ -53,16 +59,18 @@ context_pb2, document_pb2, entity_type_pb2, + gcs_pb2, intent_pb2, knowledge_base_pb2, session_entity_type_pb2, session_pb2, + validation_result_pb2, webhook_pb2, ] names = [] -for module in _shared_modules: +for module in _shared_modules: # pragma: NO COVER for name, message in get_messages(module).items(): setattr(sys.modules[__name__], name, message) names.append(name) @@ -72,4 +80,5 @@ setattr(sys.modules[__name__], name, message) names.append(name) + __all__ = tuple(sorted(names)) diff --git a/noxfile.py b/noxfile.py index 94124d6e1..75ed6f8ff 100644 --- a/noxfile.py +++ b/noxfile.py @@ -23,6 +23,7 @@ "dialogflow", "dialogflow_v2", "dialogflow_v2beta1", + "tests", "docs", "noxfile.py", "setup.py", 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 593a7961e..419c61676 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,18 +1,19 @@ { - "updateTime": "2019-04-25T21:28:11.174569Z", + "updateTime": "2019-10-15T18:30:20.394737Z", "sources": [ { "generator": { "name": "artman", - "version": "0.17.0", - "dockerImage": "googleapis/artman@sha256:c58f4ec3838eb4e0718eb1bccc6512bd6850feaa85a360a9e38f6f848ec73bc2" + "version": "0.39.0", + "dockerImage": "googleapis/artman@sha256:72554d0b3bdc0b4ac7d6726a6a606c00c14b454339037ed86be94574fb05d9f3" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "9855995ff904c3c83a84415c00b91612ee5da4b2" + "sha": "c6e62c7e5e61e6dae7fdc3bc3de81f60e6a9445c", + "internalRef": "274798600" } } ], @@ -24,7 +25,7 @@ "apiVersion": "v2beta1", "language": "python", "generator": "gapic", - "config": "google/cloud/dialogflow/artman_dialogflow_v2beta1.yaml" + "config": "google/cloud/dialogflow/v2beta1/artman_dialogflow_v2beta1.yaml" } }, { @@ -34,7 +35,7 @@ "apiVersion": "v2", "language": "python", "generator": "gapic", - "config": "google/cloud/dialogflow/artman_dialogflow_v2.yaml" + "config": "google/cloud/dialogflow/v2/artman_dialogflow_v2.yaml" } } ] diff --git a/synth.py b/synth.py index a4b95553e..8b59cfd43 100644 --- a/synth.py +++ b/synth.py @@ -23,7 +23,7 @@ for version in versions: - library = gapic.py_library("dialogflow", version, include_protos=True) + library = gapic.py_library("dialogflow", version, config_path=version + '/artman_dialogflow_' + version + '.yaml', include_protos=True) s.move( library, @@ -94,6 +94,13 @@ '}\\"\n\g<1>', ) +# Docstring has '-----' which is interpreted as RST section title +s.replace( + "dialogflow_v2beta1/proto/intent_pb2.py", + "\s+-----------", + "" +) + s.replace('dialogflow_v2/proto/agent_pb2.py', ':math:', '') s.replace('dialogflow_v2/proto/agent_pb2.py', ':raw-latex:', '') diff --git a/tests/unit/gapic/v2/test_agents_client_v2.py b/tests/unit/gapic/v2/test_agents_client_v2.py index fe5b82eb2..8106dfd60 100644 --- a/tests/unit/gapic/v2/test_agents_client_v2.py +++ b/tests/unit/gapic/v2/test_agents_client_v2.py @@ -13,6 +13,7 @@ # 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 @@ -63,6 +64,91 @@ class CustomException(Exception): class TestAgentsClient(object): + 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 + agent = {} + + response = client.set_agent(agent) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = agent_pb2.SetAgentRequest(agent=agent) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_set_agent_exception(self): + # Mock the API response + 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.AgentsClient() + + # Setup request + agent = {} + + with pytest.raises(CustomException): + client.set_agent(agent) + + 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 + client = dialogflow_v2.AgentsClient() + + # Setup Request + parent = client.project_path("[PROJECT]") + + client.delete_agent(parent) + + assert len(channel.requests) == 1 + expected_request = agent_pb2.DeleteAgentRequest(parent=parent) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_agent_exception(self): + # Mock the API response + 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.AgentsClient() + + # Setup request + parent = client.project_path("[PROJECT]") + + with pytest.raises(CustomException): + client.delete_agent(parent) + def test_get_agent(self): # Setup Expected Response parent_2 = "parent21175163357" diff --git a/tests/unit/gapic/v2/test_contexts_client_v2.py b/tests/unit/gapic/v2/test_contexts_client_v2.py index 92b494a58..d3926425d 100644 --- a/tests/unit/gapic/v2/test_contexts_client_v2.py +++ b/tests/unit/gapic/v2/test_contexts_client_v2.py @@ -13,6 +13,7 @@ # 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 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 e5675befe..2a1322b78 100644 --- a/tests/unit/gapic/v2/test_entity_types_client_v2.py +++ b/tests/unit/gapic/v2/test_entity_types_client_v2.py @@ -13,6 +13,7 @@ # 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 @@ -113,7 +114,12 @@ def test_get_entity_type(self): # Setup Expected Response name_2 = "name2-1052831874" display_name = "displayName1615086568" - expected_response = {"name": name_2, "display_name": display_name} + enable_fuzzy_extraction = True + expected_response = { + "name": name_2, + "display_name": display_name, + "enable_fuzzy_extraction": enable_fuzzy_extraction, + } expected_response = entity_type_pb2.EntityType(**expected_response) # Mock the API response @@ -152,7 +158,12 @@ def test_create_entity_type(self): # Setup Expected Response name = "name3373707" display_name = "displayName1615086568" - expected_response = {"name": name, "display_name": display_name} + enable_fuzzy_extraction = True + expected_response = { + "name": name, + "display_name": display_name, + "enable_fuzzy_extraction": enable_fuzzy_extraction, + } expected_response = entity_type_pb2.EntityType(**expected_response) # Mock the API response @@ -195,7 +206,12 @@ def test_update_entity_type(self): # Setup Expected Response name = "name3373707" display_name = "displayName1615086568" - expected_response = {"name": name, "display_name": display_name} + enable_fuzzy_extraction = True + expected_response = { + "name": name, + "display_name": display_name, + "enable_fuzzy_extraction": enable_fuzzy_extraction, + } expected_response = entity_type_pb2.EntityType(**expected_response) # Mock the API response diff --git a/tests/unit/gapic/v2/test_intents_client_v2.py b/tests/unit/gapic/v2/test_intents_client_v2.py index 78cb9ac7e..66e28eb33 100644 --- a/tests/unit/gapic/v2/test_intents_client_v2.py +++ b/tests/unit/gapic/v2/test_intents_client_v2.py @@ -13,6 +13,7 @@ # 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 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 270d1e333..ba735cb9c 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 @@ -13,6 +13,7 @@ # 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 diff --git a/tests/unit/gapic/v2/test_sessions_client_v2.py b/tests/unit/gapic/v2/test_sessions_client_v2.py index 55a57ca06..ae708c671 100644 --- a/tests/unit/gapic/v2/test_sessions_client_v2.py +++ b/tests/unit/gapic/v2/test_sessions_client_v2.py @@ -13,6 +13,7 @@ # 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 diff --git a/tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py index 9ae91def8..74c6739d4 100644 --- a/tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py @@ -13,6 +13,7 @@ # 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 @@ -22,6 +23,7 @@ import dialogflow_v2beta1 from dialogflow_v2beta1.proto import agent_pb2 +from dialogflow_v2beta1.proto import validation_result_pb2 from google.longrunning import operations_pb2 from google.protobuf import empty_pb2 @@ -63,6 +65,91 @@ class CustomException(Exception): class TestAgentsClient(object): + 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 + agent = {} + + response = client.set_agent(agent) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = agent_pb2.SetAgentRequest(agent=agent) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_set_agent_exception(self): + # Mock the API response + 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.AgentsClient() + + # Setup request + agent = {} + + with pytest.raises(CustomException): + client.set_agent(agent) + + 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 + client = dialogflow_v2beta1.AgentsClient() + + # Setup Request + parent = client.project_path("[PROJECT]") + + client.delete_agent(parent) + + assert len(channel.requests) == 1 + expected_request = agent_pb2.DeleteAgentRequest(parent=parent) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_agent_exception(self): + # Mock the API response + 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.AgentsClient() + + # Setup request + parent = client.project_path("[PROJECT]") + + with pytest.raises(CustomException): + client.delete_agent(parent) + def test_get_agent(self): # Setup Expected Response parent_2 = "parent21175163357" @@ -360,3 +447,34 @@ def test_restore_agent_exception(self): response = client.restore_agent(parent) exception = response.exception() assert exception.errors[0] == error + + def test_get_validation_result(self): + # Setup Expected Response + expected_response = {} + expected_response = validation_result_pb2.ValidationResult(**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() + + response = client.get_validation_result() + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = agent_pb2.GetValidationResultRequest() + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_get_validation_result_exception(self): + # Mock the API response + 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.AgentsClient() + + with pytest.raises(CustomException): + client.get_validation_result() diff --git a/tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py index 2bd38a7f2..fc87cd02f 100644 --- a/tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py @@ -13,6 +13,7 @@ # 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 diff --git a/tests/unit/gapic/v2beta1/test_documents_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_documents_client_v2beta1.py index 6d2c27fad..db0b69e26 100644 --- a/tests/unit/gapic/v2beta1/test_documents_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_documents_client_v2beta1.py @@ -13,6 +13,7 @@ # 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 @@ -268,35 +269,61 @@ def test_delete_document_exception(self): def test_update_document(self): # Setup Expected Response name = "name3373707" - done = True - expected_response = {"name": name, "done": done} - expected_response = operations_pb2.Operation(**expected_response) + display_name = "displayName1615086568" + mime_type = "mimeType-196041627" + content_uri = "contentUri-388807514" + expected_response = { + "name": name, + "display_name": display_name, + "mime_type": mime_type, + "content_uri": content_uri, + } + expected_response = document_pb2.Document(**expected_response) + operation = operations_pb2.Operation( + name="operations/test_update_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.update_document() - assert expected_response == response + # Setup Request + document = {} + + response = client.update_document(document) + result = response.result() + assert expected_response == result assert len(channel.requests) == 1 - expected_request = document_pb2.UpdateDocumentRequest() + expected_request = document_pb2.UpdateDocumentRequest(document=document) actual_request = channel.requests[0][1] assert expected_request == actual_request def test_update_document_exception(self): + # Setup Response + error = status_pb2.Status() + operation = operations_pb2.Operation( + name="operations/test_update_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.update_document() + # Setup Request + document = {} + + response = client.update_document(document) + exception = response.exception() + assert exception.errors[0] == error def test_reload_document(self): # Setup Expected Response 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 7aff98107..293b94a64 100644 --- a/tests/unit/gapic/v2beta1/test_entity_types_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_entity_types_client_v2beta1.py @@ -13,6 +13,7 @@ # 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 @@ -113,7 +114,12 @@ def test_get_entity_type(self): # Setup Expected Response name_2 = "name2-1052831874" display_name = "displayName1615086568" - expected_response = {"name": name_2, "display_name": display_name} + enable_fuzzy_extraction = True + expected_response = { + "name": name_2, + "display_name": display_name, + "enable_fuzzy_extraction": enable_fuzzy_extraction, + } expected_response = entity_type_pb2.EntityType(**expected_response) # Mock the API response @@ -152,7 +158,12 @@ def test_create_entity_type(self): # Setup Expected Response name = "name3373707" display_name = "displayName1615086568" - expected_response = {"name": name, "display_name": display_name} + enable_fuzzy_extraction = True + expected_response = { + "name": name, + "display_name": display_name, + "enable_fuzzy_extraction": enable_fuzzy_extraction, + } expected_response = entity_type_pb2.EntityType(**expected_response) # Mock the API response @@ -195,7 +206,12 @@ def test_update_entity_type(self): # Setup Expected Response name = "name3373707" display_name = "displayName1615086568" - expected_response = {"name": name, "display_name": display_name} + enable_fuzzy_extraction = True + expected_response = { + "name": name, + "display_name": display_name, + "enable_fuzzy_extraction": enable_fuzzy_extraction, + } expected_response = entity_type_pb2.EntityType(**expected_response) # Mock the API response diff --git a/tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py index b02cf6044..d07c9c5a1 100644 --- a/tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py @@ -13,6 +13,7 @@ # 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 diff --git a/tests/unit/gapic/v2beta1/test_knowledge_bases_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_knowledge_bases_client_v2beta1.py index d7615e653..85ad45c67 100644 --- a/tests/unit/gapic/v2beta1/test_knowledge_bases_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_knowledge_bases_client_v2beta1.py @@ -13,6 +13,7 @@ # 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 @@ -235,11 +236,16 @@ def test_update_knowledge_base(self): create_channel.return_value = channel client = dialogflow_v2beta1.KnowledgeBasesClient() - response = client.update_knowledge_base() + # Setup Request + knowledge_base = {} + + response = client.update_knowledge_base(knowledge_base) assert expected_response == response assert len(channel.requests) == 1 - expected_request = knowledge_base_pb2.UpdateKnowledgeBaseRequest() + expected_request = knowledge_base_pb2.UpdateKnowledgeBaseRequest( + knowledge_base=knowledge_base + ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -251,5 +257,8 @@ def test_update_knowledge_base_exception(self): create_channel.return_value = channel client = dialogflow_v2beta1.KnowledgeBasesClient() + # Setup request + knowledge_base = {} + with pytest.raises(CustomException): - client.update_knowledge_base() + client.update_knowledge_base(knowledge_base) 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 fea6ec252..45072ae1f 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 @@ -13,6 +13,7 @@ # 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 diff --git a/tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py b/tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py index 62553bce4..986c635a3 100644 --- a/tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py +++ b/tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py @@ -13,6 +13,7 @@ # 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