diff --git a/packages/google-cloud-dialogflow/LICENSE b/packages/google-cloud-dialogflow/LICENSE index 724a8807144b..a8ee855de2aa 100644 --- a/packages/google-cloud-dialogflow/LICENSE +++ b/packages/google-cloud-dialogflow/LICENSE @@ -1,6 +1,6 @@ Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -192,7 +192,7 @@ 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 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/google-cloud-dialogflow/MANIFEST.in b/packages/google-cloud-dialogflow/MANIFEST.in index 30ee3dbb80ea..9cbf175afe6b 100644 --- a/packages/google-cloud-dialogflow/MANIFEST.in +++ b/packages/google-cloud-dialogflow/MANIFEST.in @@ -1,4 +1,5 @@ include README.rst LICENSE recursive-include google *.json *.proto +recursive-include tests * global-exclude *.py[co] global-exclude __pycache__ diff --git a/packages/google-cloud-dialogflow/dialogflow_v2/gapic/agents_client.py b/packages/google-cloud-dialogflow/dialogflow_v2/gapic/agents_client.py index 605649c17336..01f2d6f8b8b6 100755 --- a/packages/google-cloud-dialogflow/dialogflow_v2/gapic/agents_client.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2/gapic/agents_client.py @@ -177,7 +177,7 @@ def get_agent(self, Retrieves the specified agent. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.AgentsClient() >>> @@ -230,7 +230,7 @@ def search_agents(self, Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.AgentsClient() >>> @@ -312,7 +312,7 @@ def train_agent(self, metadata: [google.protobuf.Struct][google.protobuf.Struct]> Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.AgentsClient() >>> @@ -378,7 +378,7 @@ def export_agent(self, metadata: [google.protobuf.Struct][google.protobuf.Struct]> Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.AgentsClient() >>> @@ -455,7 +455,7 @@ def import_agent(self, metadata: [google.protobuf.Struct][google.protobuf.Struct]> Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.AgentsClient() >>> @@ -554,7 +554,7 @@ def restore_agent(self, metadata: [google.protobuf.Struct][google.protobuf.Struct]> Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.AgentsClient() >>> diff --git a/packages/google-cloud-dialogflow/dialogflow_v2/gapic/contexts_client.py b/packages/google-cloud-dialogflow/dialogflow_v2/gapic/contexts_client.py index 0b3bc32d8b5e..5261d4d1b68f 100755 --- a/packages/google-cloud-dialogflow/dialogflow_v2/gapic/contexts_client.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2/gapic/contexts_client.py @@ -183,7 +183,7 @@ def list_contexts(self, Returns the list of all contexts in the specified session. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.ContextsClient() >>> @@ -261,7 +261,7 @@ def get_context(self, Retrieves the specified context. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.ContextsClient() >>> @@ -308,7 +308,7 @@ def create_context(self, Creates a context. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.ContextsClient() >>> @@ -362,7 +362,7 @@ def update_context(self, Updates the specified context. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.ContextsClient() >>> @@ -415,7 +415,7 @@ def delete_context(self, Deletes the specified context. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.ContextsClient() >>> @@ -458,7 +458,7 @@ def delete_all_contexts(self, Deletes all active contexts in the specified session. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.ContextsClient() >>> diff --git a/packages/google-cloud-dialogflow/dialogflow_v2/gapic/entity_types_client.py b/packages/google-cloud-dialogflow/dialogflow_v2/gapic/entity_types_client.py index 5a1be54be0ed..1ff99227dcc7 100755 --- a/packages/google-cloud-dialogflow/dialogflow_v2/gapic/entity_types_client.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2/gapic/entity_types_client.py @@ -216,7 +216,7 @@ def list_entity_types(self, Returns the list of all entity types in the specified agent. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.EntityTypesClient() >>> @@ -301,7 +301,7 @@ def get_entity_type(self, Retrieves the specified entity type. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.EntityTypesClient() >>> @@ -357,7 +357,7 @@ def create_entity_type(self, Creates an entity type in the specified agent. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.EntityTypesClient() >>> @@ -418,7 +418,7 @@ def update_entity_type(self, Updates the specified entity type. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.EntityTypesClient() >>> @@ -478,7 +478,7 @@ def delete_entity_type(self, Deletes the specified entity type. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.EntityTypesClient() >>> @@ -529,7 +529,7 @@ def batch_update_entity_types( metadata: [google.protobuf.Struct][google.protobuf.Struct]> Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.EntityTypesClient() >>> @@ -623,7 +623,7 @@ def batch_delete_entity_types( metadata: [google.protobuf.Struct][google.protobuf.Struct]> Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.EntityTypesClient() >>> @@ -695,7 +695,7 @@ def batch_create_entities(self, Operation Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.EntityTypesClient() >>> @@ -776,7 +776,7 @@ def batch_update_entities(self, metadata: [google.protobuf.Struct][google.protobuf.Struct]> Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.EntityTypesClient() >>> @@ -859,7 +859,7 @@ def batch_delete_entities(self, metadata: [google.protobuf.Struct][google.protobuf.Struct]> Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.EntityTypesClient() >>> diff --git a/packages/google-cloud-dialogflow/dialogflow_v2/gapic/intents_client.py b/packages/google-cloud-dialogflow/dialogflow_v2/gapic/intents_client.py index ccc51b68eb3e..4c3b27e07fe6 100755 --- a/packages/google-cloud-dialogflow/dialogflow_v2/gapic/intents_client.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2/gapic/intents_client.py @@ -208,7 +208,7 @@ def list_intents(self, Returns the list of all intents in the specified agent. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.IntentsClient() >>> @@ -296,7 +296,7 @@ def get_intent(self, Retrieves the specified intent. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.IntentsClient() >>> @@ -355,7 +355,7 @@ def create_intent(self, Creates an intent in the specified agent. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.IntentsClient() >>> @@ -419,7 +419,7 @@ def update_intent(self, Updates the specified intent. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.IntentsClient() >>> @@ -482,7 +482,7 @@ def delete_intent(self, Deletes the specified intent. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.IntentsClient() >>> @@ -532,7 +532,7 @@ def batch_update_intents(self, Operation Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.IntentsClient() >>> @@ -626,7 +626,7 @@ def batch_delete_intents(self, Operation Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.IntentsClient() >>> diff --git a/packages/google-cloud-dialogflow/dialogflow_v2/gapic/session_entity_types_client.py b/packages/google-cloud-dialogflow/dialogflow_v2/gapic/session_entity_types_client.py index a6e94f6d8747..9216db741f12 100755 --- a/packages/google-cloud-dialogflow/dialogflow_v2/gapic/session_entity_types_client.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2/gapic/session_entity_types_client.py @@ -182,7 +182,7 @@ def list_session_entity_types( Returns the list of all session entity types in the specified session. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.SessionEntityTypesClient() >>> @@ -261,7 +261,7 @@ def get_session_entity_type( Retrieves the specified session entity type. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.SessionEntityTypesClient() >>> @@ -311,7 +311,7 @@ def create_session_entity_type( Creates a session entity type. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.SessionEntityTypesClient() >>> @@ -366,7 +366,7 @@ def update_session_entity_type( Updates the specified session entity type. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.SessionEntityTypesClient() >>> @@ -422,7 +422,7 @@ def delete_session_entity_type( Deletes the specified session entity type. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.SessionEntityTypesClient() >>> diff --git a/packages/google-cloud-dialogflow/dialogflow_v2/gapic/sessions_client.py b/packages/google-cloud-dialogflow/dialogflow_v2/gapic/sessions_client.py index 5c502738dbee..5d98a5ecdc02 100755 --- a/packages/google-cloud-dialogflow/dialogflow_v2/gapic/sessions_client.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2/gapic/sessions_client.py @@ -153,7 +153,7 @@ def detect_intent(self, results of future queries. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.SessionsClient() >>> @@ -231,7 +231,7 @@ def streaming_detect_intent( EXPERIMENTAL: This method interface might change in the future. Example: - >>> from google.cloud import dialogflow_v2 + >>> import dialogflow_v2 >>> >>> client = dialogflow_v2.SessionsClient() >>> diff --git a/packages/google-cloud-dialogflow/dialogflow_v2/proto/agent_pb2.py b/packages/google-cloud-dialogflow/dialogflow_v2/proto/agent_pb2.py index 5c69ffe55c1a..bda10041c79c 100755 --- a/packages/google-cloud-dialogflow/dialogflow_v2/proto/agent_pb2.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2/proto/agent_pb2.py @@ -671,19 +671,7 @@ 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:: - - curl 'https://dialogflow.googleapis.com/v2/projects//agent:export' - -X POST - -H 'Authorization: Bearer '$(gcloud auth print-access-token) - -H 'Accept: application/json' - -H 'Content-Type: application/json' - --compressed - --data-binary '{}' - \| grep agentContent - \| sed -e 's/.*"agentContent":"([^"]*)".\*/:raw-latex:`\1`/' - \| base64 --decode > + The exported agent. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ExportAgentResponse) )) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/__init__.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/__init__.py index 36cf869c72ff..8b3c06d557c6 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/__init__.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/__init__.py @@ -1,10 +1,10 @@ -# Copyright 2017, Google LLC +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -63,4 +63,5 @@ class SessionsClient(sessions_client.SessionsClient): 'EntityTypesClient', 'IntentsClient', 'SessionEntityTypesClient', - 'SessionsClient', ) + 'SessionsClient', +) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/agents_client.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/agents_client.py index b85ea0cb5114..f31da00ccca1 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/agents_client.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/agents_client.py @@ -1,25 +1,17 @@ -# Copyright 2017, Google LLC +# -*- coding: utf8 -*- +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# -# EDITING INSTRUCTIONS -# This file was generated from the file -# https://github.com/google/googleapis/blob/master/google/cloud/dialogflow/v2beta1/agent.proto, -# and updates to that file get reflected here through a refresh process. -# For the short term, the refresh process will only be runnable by Google engineers. -# -# The only allowed edits are to method and file documentation. A 3-way -# merge preserves those additions if the generated source changes. """Accesses the google.cloud.dialogflow.v2beta1 Agents API.""" import functools @@ -35,24 +27,45 @@ import google.api_core.path_template import google.api_core.protobuf_helpers +from google.protobuf import empty_pb2 +from google.protobuf import struct_pb2 + from dialogflow_v2beta1.gapic import agents_client_config from dialogflow_v2beta1.gapic import enums from dialogflow_v2beta1.proto import agent_pb2 -from google.protobuf import empty_pb2 -from google.protobuf import struct_pb2 +from dialogflow_v2beta1.proto import agent_pb2_grpc -_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution('dialogflow').version +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution('dialogflow', + ).version class AgentsClient(object): """ - Manages conversational agents. - - - Refer to `agents documentation `_ for - more details about agents. - - Standard methods. + Agents are best described as Natural Language Understanding (NLU) modules + that transform user requests into actionable data. You can include agents + in your app, product, or service to determine user intent and respond to the + user in a natural way. + + After you create an agent, you can add ``Intents``, ``Contexts``, + ``Entity Types``, ``Webhooks``, and so on to + manage the flow of a conversation and match user input to predefined intents + and actions. + + You can create an agent using both Dialogflow Standard Edition and + Dialogflow Enterprise Edition. For details, see + `Dialogflow Editions `_. + + You can save your agent for backup or versioning by exporting the agent by + using the ``ExportAgent`` method. You can import a saved + agent by using the ``ImportAgent`` method. + + Dialogflow provides several + `prebuilt agents `_ for common + conversation scenarios such as determining a date and time, converting + currency, and so on. + + For more information about agents, see the + `Dialogflow documentation `__. """ SERVICE_ADDRESS = 'dialogflow.googleapis.com:443' @@ -63,15 +76,16 @@ class AgentsClient(object): _DEFAULT_SCOPES = ('https://www.googleapis.com/auth/cloud-platform', ) # The name of the interface for this client. This is the key used to find - # method configuration in the client_config dictionary - _INTERFACE_NAME = ('google.cloud.dialogflow.v2beta1.Agents') + # method configuration in the client_config dictionary. + _INTERFACE_NAME = 'google.cloud.dialogflow.v2beta1.Agents' @classmethod def project_path(cls, project): - """Returns a fully-qualified project resource name string.""" + """Return a fully-qualified project string.""" return google.api_core.path_template.expand( 'projects/{project}', - project=project, ) + project=project, + ) def __init__(self, channel=None, @@ -82,35 +96,38 @@ def __init__(self, Args: channel (grpc.Channel): A ``Channel`` instance through - which to make calls. If specified, then the ``credentials`` - argument is ignored. + which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. credentials (google.auth.credentials.Credentials): The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. - client_config (dict): - A dictionary of call options for each method. If not specified - the default configuration is used. Generally, you only need - to set this if you're developing your own client library. + client_config (dict): A dictionary of call options for each + method. If not specified, the default configuration is used. client_info (google.api_core.gapic_v1.client_info.ClientInfo): The client info used to send a user-agent string along with API requests. If ``None``, then default info will be used. Generally, you only need to set this if you're developing your own client library. """ + # If both `channel` and `credentials` are specified, raise an + # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - 'channel and credentials arguments to {} are mutually ' - 'exclusive.'.format(self.__class__.__name__)) + 'The `channel` and `credentials` arguments to {} are mutually ' + 'exclusive.'.format(self.__class__.__name__), ) + # Create the channel. if channel is None: channel = google.api_core.grpc_helpers.create_channel( self.SERVICE_ADDRESS, credentials=credentials, - scopes=self._DEFAULT_SCOPES) + scopes=self._DEFAULT_SCOPES, + ) - self.agents_stub = (agent_pb2.AgentsStub(channel)) + # Create the gRPC stubs. + self.agents_stub = (agent_pb2_grpc.AgentsStub(channel)) # Operations client for methods that return long-running operations # futures. @@ -120,49 +137,62 @@ def __init__(self, if client_info is None: client_info = ( google.api_core.gapic_v1.client_info.DEFAULT_CLIENT_INFO) - client_info.gapic_version = _GAPIC_LIBRARY_VERSION - interface_config = client_config['interfaces'][self._INTERFACE_NAME] + # Parse out the default settings for retry and timeout for each RPC + # from the client configuration. + # (Ordinarily, these are the defaults specified in the `*_config.py` + # file next to this one.) method_configs = google.api_core.gapic_v1.config.parse_method_configs( - interface_config) + client_config['interfaces'][self._INTERFACE_NAME], ) + # Write the "inner API call" methods to the class. + # These are wrapped versions of the gRPC stub methods, with retry and + # timeout configuration applied, called by the public methods on + # this class. self._get_agent = google.api_core.gapic_v1.method.wrap_method( self.agents_stub.GetAgent, default_retry=method_configs['GetAgent'].retry, default_timeout=method_configs['GetAgent'].timeout, - client_info=client_info) + client_info=client_info, + ) self._search_agents = google.api_core.gapic_v1.method.wrap_method( self.agents_stub.SearchAgents, default_retry=method_configs['SearchAgents'].retry, default_timeout=method_configs['SearchAgents'].timeout, - client_info=client_info) + client_info=client_info, + ) self._train_agent = google.api_core.gapic_v1.method.wrap_method( self.agents_stub.TrainAgent, default_retry=method_configs['TrainAgent'].retry, default_timeout=method_configs['TrainAgent'].timeout, - client_info=client_info) + client_info=client_info, + ) self._export_agent = google.api_core.gapic_v1.method.wrap_method( self.agents_stub.ExportAgent, default_retry=method_configs['ExportAgent'].retry, default_timeout=method_configs['ExportAgent'].timeout, - client_info=client_info) + client_info=client_info, + ) self._import_agent = google.api_core.gapic_v1.method.wrap_method( self.agents_stub.ImportAgent, default_retry=method_configs['ImportAgent'].retry, default_timeout=method_configs['ImportAgent'].timeout, - client_info=client_info) + client_info=client_info, + ) self._restore_agent = google.api_core.gapic_v1.method.wrap_method( self.agents_stub.RestoreAgent, default_retry=method_configs['RestoreAgent'].retry, default_timeout=method_configs['RestoreAgent'].timeout, - client_info=client_info) + client_info=client_info, + ) # Service calls def get_agent(self, parent, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Retrieves the specified agent. @@ -184,6 +214,8 @@ def get_agent(self, 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:`~dialogflow_v2beta1.types.Agent` instance. @@ -195,14 +227,19 @@ def get_agent(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ - request = agent_pb2.GetAgentRequest(parent=parent) - return self._get_agent(request, retry=retry, timeout=timeout) + if metadata is None: + metadata = [] + metadata = list(metadata) + request = agent_pb2.GetAgentRequest(parent=parent, ) + return self._get_agent( + request, retry=retry, timeout=timeout, metadata=metadata) def search_agents(self, parent, page_size=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Returns the list of agents. @@ -245,6 +282,8 @@ def search_agents(self, 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.gax.PageIterator` instance. By default, this @@ -259,28 +298,38 @@ def search_agents(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = agent_pb2.SearchAgentsRequest( - parent=parent, page_size=page_size) + parent=parent, + page_size=page_size, + ) iterator = google.api_core.page_iterator.GRPCIterator( client=None, method=functools.partial( - self._search_agents, retry=retry, timeout=timeout), + self._search_agents, + retry=retry, + timeout=timeout, + metadata=metadata), request=request, items_field='agents', request_token_field='page_token', - response_token_field='next_page_token') + response_token_field='next_page_token', + ) return iterator def train_agent(self, parent, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Trains the specified agent. - Operation + Operation Example: >>> import dialogflow_v2beta1 @@ -309,6 +358,8 @@ def train_agent(self, 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:`~dialogflow_v2beta1.types._OperationFuture` instance. @@ -320,25 +371,31 @@ def train_agent(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ - request = agent_pb2.TrainAgentRequest(parent=parent) - operation = self._train_agent(request, retry=retry, timeout=timeout) + if metadata is None: + metadata = [] + metadata = list(metadata) + request = agent_pb2.TrainAgentRequest(parent=parent, ) + operation = self._train_agent( + request, retry=retry, timeout=timeout, metadata=metadata) return google.api_core.operation.from_gapic( operation, self.operations_client, empty_pb2.Empty, - metadata_type=struct_pb2.Struct) + metadata_type=struct_pb2.Struct, + ) def export_agent(self, parent, agent_uri=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Exports the specified agent to a ZIP file. - Operation + Operation Example: >>> import dialogflow_v2beta1 @@ -361,7 +418,8 @@ def export_agent(self, Args: parent (str): Required. The project that the agent to export is associated with. Format: ``projects/``. - agent_uri (str): Optional. The URI to export the agent to. Note: The URI must start with + agent_uri (str): Optional. The Google Cloud Storage URI to export the agent to. + Note: The URI must start with \"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 @@ -369,6 +427,8 @@ def export_agent(self, 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:`~dialogflow_v2beta1.types._OperationFuture` instance. @@ -380,21 +440,29 @@ def export_agent(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = agent_pb2.ExportAgentRequest( - parent=parent, agent_uri=agent_uri) - operation = self._export_agent(request, retry=retry, timeout=timeout) + parent=parent, + agent_uri=agent_uri, + ) + operation = self._export_agent( + request, retry=retry, timeout=timeout, metadata=metadata) return google.api_core.operation.from_gapic( operation, self.operations_client, agent_pb2.ExportAgentResponse, - metadata_type=struct_pb2.Struct) + metadata_type=struct_pb2.Struct, + ) def import_agent(self, parent, agent_uri=None, agent_content=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Imports the specified agent from a ZIP file. @@ -403,8 +471,8 @@ def import_agent(self, versions from ImportAgentRequest. - Operation + Operation Example: >>> import dialogflow_v2beta1 @@ -427,15 +495,32 @@ def import_agent(self, Args: parent (str): Required. The project that the agent to import is associated with. Format: ``projects/``. - agent_uri (str): The URI to a file containing the agent to import. Note: The URI must - start with \"gs://\". + 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: + + curl \ + 'https://dialogflow.googleapis.com/v2beta1/projects//agent:import\ + -X POST \ + -H 'Authorization: Bearer '$(gcloud auth print-access-token) \ + -H 'Accept: application/json' \ + -H 'Content-Type: application/json' \ + --compressed \ + --data-binary \"{ + :: + + 'agentContent': '$(cat | base64 -w 0)' + }\" retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. 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:`~dialogflow_v2beta1.types._OperationFuture` instance. @@ -447,36 +532,45 @@ def import_agent(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) # 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( agent_uri=agent_uri, - agent_content=agent_content, ) + agent_content=agent_content, + ) request = agent_pb2.ImportAgentRequest( - parent=parent, agent_uri=agent_uri, agent_content=agent_content) - operation = self._import_agent(request, retry=retry, timeout=timeout) + parent=parent, + agent_uri=agent_uri, + agent_content=agent_content, + ) + operation = self._import_agent( + request, retry=retry, timeout=timeout, metadata=metadata) return google.api_core.operation.from_gapic( operation, self.operations_client, empty_pb2.Empty, - metadata_type=struct_pb2.Struct) + metadata_type=struct_pb2.Struct, + ) def restore_agent(self, parent, agent_uri=None, agent_content=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ 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 + Operation Example: >>> import dialogflow_v2beta1 @@ -499,15 +593,33 @@ def restore_agent(self, Args: parent (str): Required. The project that the agent to restore is associated with. Format: ``projects/``. - agent_uri (str): The URI to a file containing the agent to restore. Note: The URI must - start with \"gs://\". + 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: + + curl \ + 'https://dialogflow.googleapis.com/v2beta1/projects//agent:restore\ + -X POST \ + -H 'Authorization: Bearer '$(gcloud auth print-access-token) \ + -H 'Accept: application/json' \ + -H 'Content-Type: application/json' \ + --compressed \ + --data-binary \"{ + :: + + 'agentContent': '$(cat | base64 -w 0)' + }\" \ + retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. 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:`~dialogflow_v2beta1.types._OperationFuture` instance. @@ -519,17 +631,26 @@ def restore_agent(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) # 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( agent_uri=agent_uri, - agent_content=agent_content, ) + agent_content=agent_content, + ) request = agent_pb2.RestoreAgentRequest( - parent=parent, agent_uri=agent_uri, agent_content=agent_content) - operation = self._restore_agent(request, retry=retry, timeout=timeout) + parent=parent, + agent_uri=agent_uri, + agent_content=agent_content, + ) + operation = self._restore_agent( + request, retry=retry, timeout=timeout, metadata=metadata) return google.api_core.operation.from_gapic( operation, self.operations_client, empty_pb2.Empty, - metadata_type=struct_pb2.Struct) + metadata_type=struct_pb2.Struct, + ) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/contexts_client.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/contexts_client.py index 121072edefc0..6510c749797e 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/contexts_client.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/contexts_client.py @@ -1,25 +1,17 @@ -# Copyright 2017, Google LLC +# -*- coding: utf8 -*- +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# -# EDITING INSTRUCTIONS -# This file was generated from the file -# https://github.com/google/googleapis/blob/master/google/cloud/dialogflow/v2beta1/context.proto, -# and updates to that file get reflected here through a refresh process. -# For the short term, the refresh process will only be runnable by Google engineers. -# -# The only allowed edits are to method and file documentation. A 3-way -# merge preserves those additions if the generated source changes. """Accesses the google.cloud.dialogflow.v2beta1 Contexts API.""" import functools @@ -36,22 +28,36 @@ from dialogflow_v2beta1.gapic import enums from dialogflow_v2beta1.proto import agent_pb2 from dialogflow_v2beta1.proto import context_pb2 +from dialogflow_v2beta1.proto import context_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 +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution('dialogflow', + ).version class ContextsClient(object): """ - Manages contexts. - - - Refer to `contexts documentation `_ - for more details about contexts. - - Standard methods. + A context represents additional information included with user input or with + an intent returned by the Dialogflow API. Contexts are helpful for + differentiating user input which may be vague or have a different meaning + depending on additional details from your application such as user setting + and preferences, previous user input, where the user is in your application, + geographic location, and so on. + + You can include contexts as input parameters of a + ``DetectIntent`` (or + ``StreamingDetectIntent``) request, + or as output contexts included in the returned intent. + Contexts expire when an intent is matched, after the number of ``DetectIntent`` + requests specified by the ``lifespan_count`` parameter, or after 10 minutes + if no intents are matched for a ``DetectIntent`` request. + + For more information about contexts, see the + `Dialogflow documentation `__. """ SERVICE_ADDRESS = 'dialogflow.googleapis.com:443' @@ -62,25 +68,51 @@ class ContextsClient(object): _DEFAULT_SCOPES = ('https://www.googleapis.com/auth/cloud-platform', ) # The name of the interface for this client. This is the key used to find - # method configuration in the client_config dictionary - _INTERFACE_NAME = ('google.cloud.dialogflow.v2beta1.Contexts') + # method configuration in the client_config dictionary. + _INTERFACE_NAME = 'google.cloud.dialogflow.v2beta1.Contexts' @classmethod def session_path(cls, project, session): - """Returns a fully-qualified session resource name string.""" + """Return a fully-qualified session string.""" return google.api_core.path_template.expand( 'projects/{project}/agent/sessions/{session}', project=project, - session=session, ) + session=session, + ) + + @classmethod + def environment_session_path(cls, project, environment, user, session): + """Return a fully-qualified environment_session string.""" + return google.api_core.path_template.expand( + 'projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}', + project=project, + environment=environment, + user=user, + session=session, + ) @classmethod def context_path(cls, project, session, context): - """Returns a fully-qualified context resource name string.""" + """Return a fully-qualified context string.""" return google.api_core.path_template.expand( 'projects/{project}/agent/sessions/{session}/contexts/{context}', project=project, session=session, - context=context, ) + context=context, + ) + + @classmethod + def environment_context_path(cls, project, environment, user, session, + context): + """Return a fully-qualified environment_context string.""" + return google.api_core.path_template.expand( + 'projects/{project}/agent/sessions/{environment}/users/{user}/{session}/contexts/{context}', + project=project, + environment=environment, + user=user, + session=session, + context=context, + ) def __init__(self, channel=None, @@ -91,83 +123,99 @@ def __init__(self, Args: channel (grpc.Channel): A ``Channel`` instance through - which to make calls. If specified, then the ``credentials`` - argument is ignored. + which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. credentials (google.auth.credentials.Credentials): The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. - client_config (dict): - A dictionary of call options for each method. If not specified - the default configuration is used. Generally, you only need - to set this if you're developing your own client library. + client_config (dict): A dictionary of call options for each + method. If not specified, the default configuration is used. client_info (google.api_core.gapic_v1.client_info.ClientInfo): The client info used to send a user-agent string along with API requests. If ``None``, then default info will be used. Generally, you only need to set this if you're developing your own client library. """ + # If both `channel` and `credentials` are specified, raise an + # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - 'channel and credentials arguments to {} are mutually ' - 'exclusive.'.format(self.__class__.__name__)) + 'The `channel` and `credentials` arguments to {} are mutually ' + 'exclusive.'.format(self.__class__.__name__), ) + # Create the channel. if channel is None: channel = google.api_core.grpc_helpers.create_channel( self.SERVICE_ADDRESS, credentials=credentials, - scopes=self._DEFAULT_SCOPES) + scopes=self._DEFAULT_SCOPES, + ) - self.contexts_stub = (context_pb2.ContextsStub(channel)) + # Create the gRPC stubs. + self.contexts_stub = (context_pb2_grpc.ContextsStub(channel)) if client_info is None: client_info = ( google.api_core.gapic_v1.client_info.DEFAULT_CLIENT_INFO) - client_info.gapic_version = _GAPIC_LIBRARY_VERSION - interface_config = client_config['interfaces'][self._INTERFACE_NAME] + # Parse out the default settings for retry and timeout for each RPC + # from the client configuration. + # (Ordinarily, these are the defaults specified in the `*_config.py` + # file next to this one.) method_configs = google.api_core.gapic_v1.config.parse_method_configs( - interface_config) + client_config['interfaces'][self._INTERFACE_NAME], ) + # Write the "inner API call" methods to the class. + # These are wrapped versions of the gRPC stub methods, with retry and + # timeout configuration applied, called by the public methods on + # this class. self._list_contexts = google.api_core.gapic_v1.method.wrap_method( self.contexts_stub.ListContexts, default_retry=method_configs['ListContexts'].retry, default_timeout=method_configs['ListContexts'].timeout, - client_info=client_info) + client_info=client_info, + ) self._get_context = google.api_core.gapic_v1.method.wrap_method( self.contexts_stub.GetContext, default_retry=method_configs['GetContext'].retry, default_timeout=method_configs['GetContext'].timeout, - client_info=client_info) + client_info=client_info, + ) self._create_context = google.api_core.gapic_v1.method.wrap_method( self.contexts_stub.CreateContext, default_retry=method_configs['CreateContext'].retry, default_timeout=method_configs['CreateContext'].timeout, - client_info=client_info) + client_info=client_info, + ) self._update_context = google.api_core.gapic_v1.method.wrap_method( self.contexts_stub.UpdateContext, default_retry=method_configs['UpdateContext'].retry, default_timeout=method_configs['UpdateContext'].timeout, - client_info=client_info) + client_info=client_info, + ) self._delete_context = google.api_core.gapic_v1.method.wrap_method( self.contexts_stub.DeleteContext, default_retry=method_configs['DeleteContext'].retry, default_timeout=method_configs['DeleteContext'].timeout, - client_info=client_info) + client_info=client_info, + ) self._delete_all_contexts = google.api_core.gapic_v1.method.wrap_method( self.contexts_stub.DeleteAllContexts, default_retry=method_configs['DeleteAllContexts'].retry, default_timeout=method_configs['DeleteAllContexts'].timeout, - client_info=client_info) + client_info=client_info, + ) # Service calls def list_contexts(self, parent, page_size=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Returns the list of all contexts in the specified session. @@ -192,7 +240,12 @@ def list_contexts(self, Args: parent (str): Required. The session to list all contexts from. - Format: ``projects//agent/sessions/``. + Format: ``projects//agent/sessions/`` or + ``projects//agent/environments//users//sessions/``. Note: Environments and users are under + construction and will be available soon. If is not + specified, we assume default 'draft' environment. If is not + specified, we assume default '-' user. page_size (int): The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page @@ -204,6 +257,8 @@ def list_contexts(self, 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.gax.PageIterator` instance. By default, this @@ -218,22 +273,32 @@ def list_contexts(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = context_pb2.ListContextsRequest( - parent=parent, page_size=page_size) + parent=parent, + page_size=page_size, + ) iterator = google.api_core.page_iterator.GRPCIterator( client=None, method=functools.partial( - self._list_contexts, retry=retry, timeout=timeout), + self._list_contexts, + retry=retry, + timeout=timeout, + metadata=metadata), request=request, items_field='contexts', request_token_field='page_token', - response_token_field='next_page_token') + response_token_field='next_page_token', + ) return iterator def get_context(self, name, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Retrieves the specified context. @@ -248,13 +313,20 @@ def get_context(self, Args: name (str): Required. The name of the context. Format: - ``projects//agent/sessions//contexts/``. + ``projects//agent/sessions//contexts/`` + or ``projects//agent/environments//users//sessions//contexts/``. Note: Environments and + users are under construction and will be available soon. If is not specified, we assume default 'draft' environment. If + 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. 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:`~dialogflow_v2beta1.types.Context` instance. @@ -266,14 +338,19 @@ def get_context(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ - request = context_pb2.GetContextRequest(name=name) - return self._get_context(request, retry=retry, timeout=timeout) + if metadata is None: + metadata = [] + metadata = list(metadata) + request = context_pb2.GetContextRequest(name=name, ) + return self._get_context( + request, retry=retry, timeout=timeout, metadata=metadata) def create_context(self, parent, context, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Creates a context. @@ -283,13 +360,20 @@ def create_context(self, >>> client = dialogflow_v2beta1.ContextsClient() >>> >>> parent = client.session_path('[PROJECT]', '[SESSION]') + >>> + >>> # TODO: Initialize ``context``: >>> context = {} >>> >>> response = client.create_context(parent, context) Args: parent (str): Required. The session to create a context for. - Format: ``projects//agent/sessions/``. + Format: ``projects//agent/sessions/`` or + ``projects//agent/environments//users//sessions/``. Note: Environments and users are under + construction and will be available soon. If is not + specified, we assume default 'draft' environment. If is not + specified, we assume default '-' user. context (Union[dict, ~dialogflow_v2beta1.types.Context]): Required. The context to create. If a dict is provided, it must be of the same form as the protobuf message :class:`~dialogflow_v2beta1.types.Context` @@ -299,6 +383,8 @@ def create_context(self, 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:`~dialogflow_v2beta1.types.Context` instance. @@ -310,15 +396,22 @@ def create_context(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = context_pb2.CreateContextRequest( - parent=parent, context=context) - return self._create_context(request, retry=retry, timeout=timeout) + parent=parent, + context=context, + ) + return self._create_context( + request, retry=retry, timeout=timeout, metadata=metadata) def update_context(self, context, update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Updates the specified context. @@ -327,13 +420,13 @@ def update_context(self, >>> >>> client = dialogflow_v2beta1.ContextsClient() >>> + >>> # TODO: Initialize ``context``: >>> context = {} >>> >>> response = client.update_context(context) Args: - context (Union[dict, ~dialogflow_v2beta1.types.Context]): Required. The context to update. Format: - ``projects//agent/sessions//contexts/``. + context (Union[dict, ~dialogflow_v2beta1.types.Context]): Required. The context to update. If a dict is provided, it must be of the same form as the protobuf message :class:`~dialogflow_v2beta1.types.Context` update_mask (Union[dict, ~dialogflow_v2beta1.types.FieldMask]): Optional. The mask to control which fields get updated. @@ -345,6 +438,8 @@ def update_context(self, 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:`~dialogflow_v2beta1.types.Context` instance. @@ -356,14 +451,21 @@ def update_context(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = context_pb2.UpdateContextRequest( - context=context, update_mask=update_mask) - return self._update_context(request, retry=retry, timeout=timeout) + context=context, + update_mask=update_mask, + ) + return self._update_context( + request, retry=retry, timeout=timeout, metadata=metadata) def delete_context(self, name, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Deletes the specified context. @@ -378,13 +480,21 @@ def delete_context(self, Args: name (str): Required. The name of the context to delete. Format: - ``projects//agent/sessions//contexts/``. + ``projects//agent/sessions//contexts/`` + or ``projects//agent/environments//users//sessions//contexts/``. Note: Environments and + users are under construction and will be available soon. If is not specified, we assume default 'draft' environment. If + 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. 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 @@ -393,13 +503,18 @@ def delete_context(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ - request = context_pb2.DeleteContextRequest(name=name) - self._delete_context(request, retry=retry, timeout=timeout) + if metadata is None: + metadata = [] + metadata = list(metadata) + request = context_pb2.DeleteContextRequest(name=name, ) + self._delete_context( + request, retry=retry, timeout=timeout, metadata=metadata) def delete_all_contexts(self, parent, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Deletes all active contexts in the specified session. @@ -414,13 +529,20 @@ def delete_all_contexts(self, Args: parent (str): Required. The name of the session to delete all contexts from. Format: - ``projects//agent/sessions/``. + ``projects//agent/sessions/`` or ``projects//agent/environments//users//sessions/``. Note: Environments and users are under construction and will be + available soon. If is not specified we assume default + 'draft' environment. If 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. 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 @@ -429,5 +551,9 @@ def delete_all_contexts(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ - request = context_pb2.DeleteAllContextsRequest(parent=parent) - self._delete_all_contexts(request, retry=retry, timeout=timeout) + if metadata is None: + metadata = [] + metadata = list(metadata) + request = context_pb2.DeleteAllContextsRequest(parent=parent, ) + self._delete_all_contexts( + request, retry=retry, timeout=timeout, metadata=metadata) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/entity_types_client.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/entity_types_client.py index 32260fe44bd7..003aebd006eb 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/entity_types_client.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/entity_types_client.py @@ -1,25 +1,17 @@ -# Copyright 2017, Google LLC +# -*- coding: utf8 -*- +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# -# EDITING INSTRUCTIONS -# This file was generated from the file -# https://github.com/google/googleapis/blob/master/google/cloud/dialogflow/v2beta1/entity_type.proto, -# and updates to that file get reflected here through a refresh process. -# For the short term, the refresh process will only be runnable by Google engineers. -# -# The only allowed edits are to method and file documentation. A 3-way -# merge preserves those additions if the generated source changes. """Accesses the google.cloud.dialogflow.v2beta1 EntityTypes API.""" import functools @@ -40,22 +32,44 @@ from dialogflow_v2beta1.proto import agent_pb2 from dialogflow_v2beta1.proto import context_pb2 from dialogflow_v2beta1.proto import entity_type_pb2 +from dialogflow_v2beta1.proto import entity_type_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 +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution('dialogflow', + ).version class EntityTypesClient(object): """ - Manages agent entity types. - - - Refer to `entities documentation `_ - for more details about entity types. - - Standard methods. + 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 `__. """ SERVICE_ADDRESS = 'dialogflow.googleapis.com:443' @@ -66,23 +80,25 @@ class EntityTypesClient(object): _DEFAULT_SCOPES = ('https://www.googleapis.com/auth/cloud-platform', ) # The name of the interface for this client. This is the key used to find - # method configuration in the client_config dictionary - _INTERFACE_NAME = ('google.cloud.dialogflow.v2beta1.EntityTypes') + # method configuration in the client_config dictionary. + _INTERFACE_NAME = 'google.cloud.dialogflow.v2beta1.EntityTypes' @classmethod def project_agent_path(cls, project): - """Returns a fully-qualified project_agent resource name string.""" + """Return a fully-qualified project_agent string.""" return google.api_core.path_template.expand( 'projects/{project}/agent', - project=project, ) + project=project, + ) @classmethod def entity_type_path(cls, project, entity_type): - """Returns a fully-qualified entity_type resource name string.""" + """Return a fully-qualified entity_type string.""" return google.api_core.path_template.expand( 'projects/{project}/agent/entityTypes/{entity_type}', project=project, - entity_type=entity_type, ) + entity_type=entity_type, + ) def __init__(self, channel=None, @@ -93,35 +109,38 @@ def __init__(self, Args: channel (grpc.Channel): A ``Channel`` instance through - which to make calls. If specified, then the ``credentials`` - argument is ignored. + which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. credentials (google.auth.credentials.Credentials): The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. - client_config (dict): - A dictionary of call options for each method. If not specified - the default configuration is used. Generally, you only need - to set this if you're developing your own client library. + client_config (dict): A dictionary of call options for each + method. If not specified, the default configuration is used. client_info (google.api_core.gapic_v1.client_info.ClientInfo): The client info used to send a user-agent string along with API requests. If ``None``, then default info will be used. Generally, you only need to set this if you're developing your own client library. """ + # If both `channel` and `credentials` are specified, raise an + # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - 'channel and credentials arguments to {} are mutually ' - 'exclusive.'.format(self.__class__.__name__)) + 'The `channel` and `credentials` arguments to {} are mutually ' + 'exclusive.'.format(self.__class__.__name__), ) + # Create the channel. if channel is None: channel = google.api_core.grpc_helpers.create_channel( self.SERVICE_ADDRESS, credentials=credentials, - scopes=self._DEFAULT_SCOPES) + scopes=self._DEFAULT_SCOPES, + ) - self.entity_types_stub = (entity_type_pb2.EntityTypesStub(channel)) + # Create the gRPC stubs. + self.entity_types_stub = (entity_type_pb2_grpc.EntityTypesStub(channel)) # Operations client for methods that return long-running operations # futures. @@ -131,63 +150,79 @@ def __init__(self, if client_info is None: client_info = ( google.api_core.gapic_v1.client_info.DEFAULT_CLIENT_INFO) - client_info.gapic_version = _GAPIC_LIBRARY_VERSION - interface_config = client_config['interfaces'][self._INTERFACE_NAME] + # Parse out the default settings for retry and timeout for each RPC + # from the client configuration. + # (Ordinarily, these are the defaults specified in the `*_config.py` + # file next to this one.) method_configs = google.api_core.gapic_v1.config.parse_method_configs( - interface_config) + client_config['interfaces'][self._INTERFACE_NAME], ) + # Write the "inner API call" methods to the class. + # These are wrapped versions of the gRPC stub methods, with retry and + # timeout configuration applied, called by the public methods on + # this class. self._list_entity_types = google.api_core.gapic_v1.method.wrap_method( self.entity_types_stub.ListEntityTypes, default_retry=method_configs['ListEntityTypes'].retry, default_timeout=method_configs['ListEntityTypes'].timeout, - client_info=client_info) + client_info=client_info, + ) self._get_entity_type = google.api_core.gapic_v1.method.wrap_method( self.entity_types_stub.GetEntityType, default_retry=method_configs['GetEntityType'].retry, default_timeout=method_configs['GetEntityType'].timeout, - client_info=client_info) + client_info=client_info, + ) self._create_entity_type = google.api_core.gapic_v1.method.wrap_method( self.entity_types_stub.CreateEntityType, default_retry=method_configs['CreateEntityType'].retry, default_timeout=method_configs['CreateEntityType'].timeout, - client_info=client_info) + client_info=client_info, + ) self._update_entity_type = google.api_core.gapic_v1.method.wrap_method( self.entity_types_stub.UpdateEntityType, default_retry=method_configs['UpdateEntityType'].retry, default_timeout=method_configs['UpdateEntityType'].timeout, - client_info=client_info) + client_info=client_info, + ) self._delete_entity_type = google.api_core.gapic_v1.method.wrap_method( self.entity_types_stub.DeleteEntityType, default_retry=method_configs['DeleteEntityType'].retry, default_timeout=method_configs['DeleteEntityType'].timeout, - client_info=client_info) + client_info=client_info, + ) self._batch_update_entity_types = google.api_core.gapic_v1.method.wrap_method( self.entity_types_stub.BatchUpdateEntityTypes, default_retry=method_configs['BatchUpdateEntityTypes'].retry, default_timeout=method_configs['BatchUpdateEntityTypes'].timeout, - client_info=client_info) + client_info=client_info, + ) self._batch_delete_entity_types = google.api_core.gapic_v1.method.wrap_method( self.entity_types_stub.BatchDeleteEntityTypes, default_retry=method_configs['BatchDeleteEntityTypes'].retry, default_timeout=method_configs['BatchDeleteEntityTypes'].timeout, - client_info=client_info) + client_info=client_info, + ) self._batch_create_entities = google.api_core.gapic_v1.method.wrap_method( self.entity_types_stub.BatchCreateEntities, default_retry=method_configs['BatchCreateEntities'].retry, default_timeout=method_configs['BatchCreateEntities'].timeout, - client_info=client_info) + client_info=client_info, + ) self._batch_update_entities = google.api_core.gapic_v1.method.wrap_method( self.entity_types_stub.BatchUpdateEntities, default_retry=method_configs['BatchUpdateEntities'].retry, default_timeout=method_configs['BatchUpdateEntities'].timeout, - client_info=client_info) + client_info=client_info, + ) self._batch_delete_entities = google.api_core.gapic_v1.method.wrap_method( self.entity_types_stub.BatchDeleteEntities, default_retry=method_configs['BatchDeleteEntities'].retry, default_timeout=method_configs['BatchDeleteEntities'].timeout, - client_info=client_info) + client_info=client_info, + ) # Service calls def list_entity_types(self, @@ -195,7 +230,8 @@ def list_entity_types(self, language_code=None, page_size=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Returns the list of all entity types in the specified agent. @@ -237,6 +273,8 @@ def list_entity_types(self, 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.gax.PageIterator` instance. By default, this @@ -251,23 +289,34 @@ def list_entity_types(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = entity_type_pb2.ListEntityTypesRequest( - parent=parent, language_code=language_code, page_size=page_size) + parent=parent, + language_code=language_code, + page_size=page_size, + ) iterator = google.api_core.page_iterator.GRPCIterator( client=None, method=functools.partial( - self._list_entity_types, retry=retry, timeout=timeout), + self._list_entity_types, + retry=retry, + timeout=timeout, + metadata=metadata), request=request, items_field='entity_types', request_token_field='page_token', - response_token_field='next_page_token') + response_token_field='next_page_token', + ) return iterator def get_entity_type(self, name, language_code=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Retrieves the specified entity type. @@ -294,6 +343,8 @@ def get_entity_type(self, 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:`~dialogflow_v2beta1.types.EntityType` instance. @@ -305,16 +356,23 @@ def get_entity_type(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = entity_type_pb2.GetEntityTypeRequest( - name=name, language_code=language_code) - return self._get_entity_type(request, retry=retry, timeout=timeout) + name=name, + language_code=language_code, + ) + return self._get_entity_type( + request, retry=retry, timeout=timeout, metadata=metadata) def create_entity_type(self, parent, entity_type, language_code=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Creates an entity type in the specified agent. @@ -324,6 +382,8 @@ def create_entity_type(self, >>> client = dialogflow_v2beta1.EntityTypesClient() >>> >>> parent = client.project_agent_path('[PROJECT]') + >>> + >>> # TODO: Initialize ``entity_type``: >>> entity_type = {} >>> >>> response = client.create_entity_type(parent, entity_type) @@ -345,6 +405,8 @@ def create_entity_type(self, 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:`~dialogflow_v2beta1.types.EntityType` instance. @@ -356,18 +418,24 @@ def create_entity_type(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = entity_type_pb2.CreateEntityTypeRequest( parent=parent, entity_type=entity_type, - language_code=language_code) - return self._create_entity_type(request, retry=retry, timeout=timeout) + language_code=language_code, + ) + return self._create_entity_type( + request, retry=retry, timeout=timeout, metadata=metadata) def update_entity_type(self, entity_type, language_code=None, update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Updates the specified entity type. @@ -376,6 +444,7 @@ def update_entity_type(self, >>> >>> client = dialogflow_v2beta1.EntityTypesClient() >>> + >>> # TODO: Initialize ``entity_type``: >>> entity_type = {} >>> >>> response = client.update_entity_type(entity_type) @@ -399,6 +468,8 @@ def update_entity_type(self, 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:`~dialogflow_v2beta1.types.EntityType` instance. @@ -410,16 +481,22 @@ def update_entity_type(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = entity_type_pb2.UpdateEntityTypeRequest( entity_type=entity_type, language_code=language_code, - update_mask=update_mask) - return self._update_entity_type(request, retry=retry, timeout=timeout) + update_mask=update_mask, + ) + return self._update_entity_type( + request, retry=retry, timeout=timeout, metadata=metadata) def delete_entity_type(self, name, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Deletes the specified entity type. @@ -441,6 +518,8 @@ def delete_entity_type(self, 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 @@ -449,8 +528,12 @@ def delete_entity_type(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ - request = entity_type_pb2.DeleteEntityTypeRequest(name=name) - self._delete_entity_type(request, retry=retry, timeout=timeout) + if metadata is None: + metadata = [] + metadata = list(metadata) + request = entity_type_pb2.DeleteEntityTypeRequest(name=name, ) + self._delete_entity_type( + request, retry=retry, timeout=timeout, metadata=metadata) def batch_update_entity_types( self, @@ -460,12 +543,13 @@ def batch_update_entity_types( language_code=None, update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Updates/Creates multiple entity types in the specified agent. - Operation + Operation Example: >>> import dialogflow_v2beta1 @@ -488,9 +572,10 @@ def batch_update_entity_types( Args: parent (str): Required. The name of the agent to update or create entity types in. Format: ``projects//agent``. - entity_type_batch_uri (str): The URI to a file containing entity types to update or create. The file - format can be either a serialized proto (of EntityBatch type) or a JSON - object. Note: The URI must start with \"gs://\". + entity_type_batch_uri (str): 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://\". entity_type_batch_inline (Union[dict, ~dialogflow_v2beta1.types.EntityTypeBatch]): The collection of entity type to update or create. If a dict is provided, it must be of the same form as the protobuf message :class:`~dialogflow_v2beta1.types.EntityTypeBatch` @@ -508,6 +593,8 @@ def batch_update_entity_types( 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:`~dialogflow_v2beta1.types._OperationFuture` instance. @@ -519,37 +606,44 @@ def batch_update_entity_types( to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) # 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( entity_type_batch_uri=entity_type_batch_uri, - entity_type_batch_inline=entity_type_batch_inline, ) + entity_type_batch_inline=entity_type_batch_inline, + ) request = entity_type_pb2.BatchUpdateEntityTypesRequest( parent=parent, entity_type_batch_uri=entity_type_batch_uri, entity_type_batch_inline=entity_type_batch_inline, language_code=language_code, - update_mask=update_mask) + update_mask=update_mask, + ) operation = self._batch_update_entity_types( - request, retry=retry, timeout=timeout) + request, retry=retry, timeout=timeout, metadata=metadata) return google.api_core.operation.from_gapic( operation, self.operations_client, entity_type_pb2.BatchUpdateEntityTypesResponse, - metadata_type=struct_pb2.Struct) + metadata_type=struct_pb2.Struct, + ) def batch_delete_entity_types( self, parent, entity_type_names, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Deletes entity types in the specified agent. - Operation + Operation Example: >>> import dialogflow_v2beta1 @@ -557,6 +651,8 @@ def batch_delete_entity_types( >>> client = dialogflow_v2beta1.EntityTypesClient() >>> >>> parent = client.project_agent_path('[PROJECT]') + >>> + >>> # TODO: Initialize ``entity_type_names``: >>> entity_type_names = [] >>> >>> response = client.batch_delete_entity_types(parent, entity_type_names) @@ -581,6 +677,8 @@ def batch_delete_entity_types( 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:`~dialogflow_v2beta1.types._OperationFuture` instance. @@ -592,27 +690,34 @@ def batch_delete_entity_types( to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = entity_type_pb2.BatchDeleteEntityTypesRequest( - parent=parent, entity_type_names=entity_type_names) + parent=parent, + entity_type_names=entity_type_names, + ) operation = self._batch_delete_entity_types( - request, retry=retry, timeout=timeout) + request, retry=retry, timeout=timeout, metadata=metadata) return google.api_core.operation.from_gapic( operation, self.operations_client, empty_pb2.Empty, - metadata_type=struct_pb2.Struct) + metadata_type=struct_pb2.Struct, + ) def batch_create_entities(self, parent, entities, language_code=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Creates multiple new entities in the specified entity type (extends the existing collection of entries). - Operation + Operation Example: >>> import dialogflow_v2beta1 @@ -620,6 +725,8 @@ def batch_create_entities(self, >>> client = dialogflow_v2beta1.EntityTypesClient() >>> >>> parent = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]') + >>> + >>> # TODO: Initialize ``entities``: >>> entities = [] >>> >>> response = client.batch_create_entities(parent, entities) @@ -650,6 +757,8 @@ def batch_create_entities(self, 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:`~dialogflow_v2beta1.types._OperationFuture` instance. @@ -661,15 +770,22 @@ def batch_create_entities(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = entity_type_pb2.BatchCreateEntitiesRequest( - parent=parent, entities=entities, language_code=language_code) + parent=parent, + entities=entities, + language_code=language_code, + ) operation = self._batch_create_entities( - request, retry=retry, timeout=timeout) + request, retry=retry, timeout=timeout, metadata=metadata) return google.api_core.operation.from_gapic( operation, self.operations_client, empty_pb2.Empty, - metadata_type=struct_pb2.Struct) + metadata_type=struct_pb2.Struct, + ) def batch_update_entities(self, parent, @@ -677,13 +793,14 @@ def batch_update_entities(self, language_code=None, update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Updates entities in the specified entity type (replaces the existing collection of entries). - Operation + Operation Example: >>> import dialogflow_v2beta1 @@ -691,6 +808,8 @@ def batch_update_entities(self, >>> client = dialogflow_v2beta1.EntityTypesClient() >>> >>> parent = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]') + >>> + >>> # TODO: Initialize ``entities``: >>> entities = [] >>> >>> response = client.batch_update_entities(parent, entities) @@ -724,6 +843,8 @@ def batch_update_entities(self, 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:`~dialogflow_v2beta1.types._OperationFuture` instance. @@ -735,30 +856,36 @@ def batch_update_entities(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = entity_type_pb2.BatchUpdateEntitiesRequest( parent=parent, entities=entities, language_code=language_code, - update_mask=update_mask) + update_mask=update_mask, + ) operation = self._batch_update_entities( - request, retry=retry, timeout=timeout) + request, retry=retry, timeout=timeout, metadata=metadata) return google.api_core.operation.from_gapic( operation, self.operations_client, empty_pb2.Empty, - metadata_type=struct_pb2.Struct) + metadata_type=struct_pb2.Struct, + ) def batch_delete_entities(self, parent, entity_values, language_code=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Deletes entities in the specified entity type. - Operation + Operation Example: >>> import dialogflow_v2beta1 @@ -766,6 +893,8 @@ def batch_delete_entities(self, >>> client = dialogflow_v2beta1.EntityTypesClient() >>> >>> parent = client.entity_type_path('[PROJECT]', '[ENTITY_TYPE]') + >>> + >>> # TODO: Initialize ``entity_values``: >>> entity_values = [] >>> >>> response = client.batch_delete_entities(parent, entity_values) @@ -796,6 +925,8 @@ def batch_delete_entities(self, 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:`~dialogflow_v2beta1.types._OperationFuture` instance. @@ -807,14 +938,19 @@ def batch_delete_entities(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = entity_type_pb2.BatchDeleteEntitiesRequest( parent=parent, entity_values=entity_values, - language_code=language_code) + language_code=language_code, + ) operation = self._batch_delete_entities( - request, retry=retry, timeout=timeout) + request, retry=retry, timeout=timeout, metadata=metadata) return google.api_core.operation.from_gapic( operation, self.operations_client, empty_pb2.Empty, - metadata_type=struct_pb2.Struct) + metadata_type=struct_pb2.Struct, + ) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/enums.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/enums.py index d5924e5f3a73..725d03bb2c81 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/enums.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/enums.py @@ -1,10 +1,10 @@ -# Copyright 2017, Google LLC +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -117,6 +117,27 @@ class AutoExpansionMode(object): AUTO_EXPANSION_MODE_DEFAULT = 1 +class SessionEntityType(object): + class EntityOverrideMode(object): + """ + The types of modifications for a session entity type. + + Attributes: + ENTITY_OVERRIDE_MODE_UNSPECIFIED (int): Not specified. This value should be never used. + ENTITY_OVERRIDE_MODE_OVERRIDE (int): The collection of session entities overrides the collection of entities + in the corresponding developer entity type. + ENTITY_OVERRIDE_MODE_SUPPLEMENT (int): The collection of session entities extends the collection of entities in + the corresponding developer entity type. + Calls to ``ListSessionEntityTypes``, ``GetSessionEntityType``, + ``CreateSessionEntityType`` and ``UpdateSessionEntityType`` return the full + collection of entities from the developer entity type in the agent's + default language and the session entity type. + """ + ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0 + ENTITY_OVERRIDE_MODE_OVERRIDE = 1 + ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2 + + class Intent(object): class WebhookState(object): """ @@ -163,6 +184,70 @@ class Platform(object): LINE (int): Line. VIBER (int): Viber. ACTIONS_ON_GOOGLE (int): Actions on Google. + When using Actions on Google, you can choose one of the specific + Intent.Message types that mention support for Actions on Google, + or you can use the advanced Intent.Message.payload field. + The payload field provides access to AoG features not available in the + specific message types. + If using the Intent.Message.payload field, it should have a structure + similar to the JSON message shown here. For more information, see + [Actions on Google Webhook + Format](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\"
+                }
+              }
""" PLATFORM_UNSPECIFIED = 0 FACEBOOK = 1 @@ -175,44 +260,6 @@ class Platform(object): ACTIONS_ON_GOOGLE = 8 -class Agent(object): - class MatchMode(object): - """ - Match mode determines how intents are detected from user queries. - - Attributes: - MATCH_MODE_UNSPECIFIED (int): Not specified. - MATCH_MODE_HYBRID (int): Best for agents with a small number of examples in intents and/or wide - use of templates syntax and composite entities. - MATCH_MODE_ML_ONLY (int): 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_UNSPECIFIED = 0 - MATCH_MODE_HYBRID = 1 - MATCH_MODE_ML_ONLY = 2 - - -class SessionEntityType(object): - class EntityOverrideMode(object): - """ - The types of modifications for a session entity type. - - Attributes: - ENTITY_OVERRIDE_MODE_UNSPECIFIED (int): Not specified. This value should be never used. - ENTITY_OVERRIDE_MODE_OVERRIDE (int): The collection of session entities overrides the collection of entities - in the corresponding developer entity type. - ENTITY_OVERRIDE_MODE_SUPPLEMENT (int): The collection of session entities extends the collection of entities in - the corresponding developer entity type. - Calls to ``ListSessionEntityTypes``, ``GetSessionEntityType``, - ``CreateSessionEntityType`` and ``UpdateSessionEntityType`` return the full - collection of entities from the developer entity type and the session - entity type. - """ - ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0 - ENTITY_OVERRIDE_MODE_OVERRIDE = 1 - ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2 - - class StreamingRecognitionResult(object): class MessageType(object): """ @@ -232,3 +279,20 @@ class MessageType(object): MESSAGE_TYPE_UNSPECIFIED = 0 TRANSCRIPT = 1 END_OF_SINGLE_UTTERANCE = 2 + + +class Agent(object): + class MatchMode(object): + """ + Match mode determines how intents are detected from user queries. + + Attributes: + MATCH_MODE_UNSPECIFIED (int): Not specified. + MATCH_MODE_HYBRID (int): Best for agents with a small number of examples in intents and/or wide + use of templates syntax and composite entities. + MATCH_MODE_ML_ONLY (int): 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_UNSPECIFIED = 0 + MATCH_MODE_HYBRID = 1 + MATCH_MODE_ML_ONLY = 2 diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/intents_client.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/intents_client.py index 8fd3f46878bb..a97749d78d89 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/intents_client.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/intents_client.py @@ -1,25 +1,17 @@ -# Copyright 2017, Google LLC +# -*- coding: utf8 -*- +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# -# EDITING INSTRUCTIONS -# This file was generated from the file -# https://github.com/google/googleapis/blob/master/google/cloud/dialogflow/v2beta1/intent.proto, -# and updates to that file get reflected here through a refresh process. -# For the short term, the refresh process will only be runnable by Google engineers. -# -# The only allowed edits are to method and file documentation. A 3-way -# merge preserves those additions if the generated source changes. """Accesses the google.cloud.dialogflow.v2beta1 Intents API.""" import functools @@ -41,22 +33,48 @@ from dialogflow_v2beta1.proto import context_pb2 from dialogflow_v2beta1.proto import entity_type_pb2 from dialogflow_v2beta1.proto import intent_pb2 +from dialogflow_v2beta1.proto import intent_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 +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution('dialogflow', + ).version class IntentsClient(object): """ - Manages agent intents. - - - Refer to `intents documentation `_ for - more details about agent intents. - - Standard methods. + An intent represents a mapping between input from a user and an action to + be taken by your application. When you pass user input to the + ``DetectIntent`` (or + ``StreamingDetectIntent``) method, the + Dialogflow API analyzes the input and searches + for a matching intent. If no match is found, the Dialogflow API returns a + fallback intent (``is_fallback`` = true). + + You can provide additional information for the Dialogflow API to use to + match user input to an intent by adding the following to your intent. + + * **Contexts** - provide additional context for intent analysis. For + example, if an intent is related to an object in your application that + plays music, you can provide a context to determine when to match the + intent if the user input is “turn it off”. You can include a context + that matches the intent when there is previous user input of + \"play music\", and not when there is previous user input of + \"turn on the light\". + * **Events** - allow for matching an intent by using an event name + instead of user input. Your application can provide an event name and + related parameters to the Dialogflow API to match an intent. For + example, when your application starts, you can send a welcome event + with a user name parameter to the Dialogflow API to match an intent with + a personalized welcome message for the user. + * **Training phrases** - provide examples of user input to train the + Dialogflow API agent to better match intents. + + For more information about intents, see the + `Dialogflow documentation `__. """ SERVICE_ADDRESS = 'dialogflow.googleapis.com:443' @@ -67,31 +85,42 @@ class IntentsClient(object): _DEFAULT_SCOPES = ('https://www.googleapis.com/auth/cloud-platform', ) # The name of the interface for this client. This is the key used to find - # method configuration in the client_config dictionary - _INTERFACE_NAME = ('google.cloud.dialogflow.v2beta1.Intents') + # method configuration in the client_config dictionary. + _INTERFACE_NAME = 'google.cloud.dialogflow.v2beta1.Intents' @classmethod def project_agent_path(cls, project): - """Returns a fully-qualified project_agent resource name string.""" + """Return a fully-qualified project_agent string.""" return google.api_core.path_template.expand( 'projects/{project}/agent', - project=project, ) + project=project, + ) @classmethod def intent_path(cls, project, intent): - """Returns a fully-qualified intent resource name string.""" + """Return a fully-qualified intent string.""" return google.api_core.path_template.expand( 'projects/{project}/agent/intents/{intent}', project=project, - intent=intent, ) + intent=intent, + ) @classmethod def agent_path(cls, project, agent): - """Returns a fully-qualified agent resource name string.""" + """Return a fully-qualified agent string.""" return google.api_core.path_template.expand( 'projects/{project}/agents/{agent}', project=project, - agent=agent, ) + agent=agent, + ) + + @classmethod + def project_path(cls, project): + """Return a fully-qualified project string.""" + return google.api_core.path_template.expand( + 'projects/{project}', + project=project, + ) def __init__(self, channel=None, @@ -102,35 +131,38 @@ def __init__(self, Args: channel (grpc.Channel): A ``Channel`` instance through - which to make calls. If specified, then the ``credentials`` - argument is ignored. + which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. credentials (google.auth.credentials.Credentials): The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. - client_config (dict): - A dictionary of call options for each method. If not specified - the default configuration is used. Generally, you only need - to set this if you're developing your own client library. + client_config (dict): A dictionary of call options for each + method. If not specified, the default configuration is used. client_info (google.api_core.gapic_v1.client_info.ClientInfo): The client info used to send a user-agent string along with API requests. If ``None``, then default info will be used. Generally, you only need to set this if you're developing your own client library. """ + # If both `channel` and `credentials` are specified, raise an + # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - 'channel and credentials arguments to {} are mutually ' - 'exclusive.'.format(self.__class__.__name__)) + 'The `channel` and `credentials` arguments to {} are mutually ' + 'exclusive.'.format(self.__class__.__name__), ) + # Create the channel. if channel is None: channel = google.api_core.grpc_helpers.create_channel( self.SERVICE_ADDRESS, credentials=credentials, - scopes=self._DEFAULT_SCOPES) + scopes=self._DEFAULT_SCOPES, + ) - self.intents_stub = (intent_pb2.IntentsStub(channel)) + # Create the gRPC stubs. + self.intents_stub = (intent_pb2_grpc.IntentsStub(channel)) # Operations client for methods that return long-running operations # futures. @@ -140,48 +172,61 @@ def __init__(self, if client_info is None: client_info = ( google.api_core.gapic_v1.client_info.DEFAULT_CLIENT_INFO) - client_info.gapic_version = _GAPIC_LIBRARY_VERSION - interface_config = client_config['interfaces'][self._INTERFACE_NAME] + # Parse out the default settings for retry and timeout for each RPC + # from the client configuration. + # (Ordinarily, these are the defaults specified in the `*_config.py` + # file next to this one.) method_configs = google.api_core.gapic_v1.config.parse_method_configs( - interface_config) + client_config['interfaces'][self._INTERFACE_NAME], ) + # Write the "inner API call" methods to the class. + # These are wrapped versions of the gRPC stub methods, with retry and + # timeout configuration applied, called by the public methods on + # this class. self._list_intents = google.api_core.gapic_v1.method.wrap_method( self.intents_stub.ListIntents, default_retry=method_configs['ListIntents'].retry, default_timeout=method_configs['ListIntents'].timeout, - client_info=client_info) + client_info=client_info, + ) self._get_intent = google.api_core.gapic_v1.method.wrap_method( self.intents_stub.GetIntent, default_retry=method_configs['GetIntent'].retry, default_timeout=method_configs['GetIntent'].timeout, - client_info=client_info) + client_info=client_info, + ) self._create_intent = google.api_core.gapic_v1.method.wrap_method( self.intents_stub.CreateIntent, default_retry=method_configs['CreateIntent'].retry, default_timeout=method_configs['CreateIntent'].timeout, - client_info=client_info) + client_info=client_info, + ) self._update_intent = google.api_core.gapic_v1.method.wrap_method( self.intents_stub.UpdateIntent, default_retry=method_configs['UpdateIntent'].retry, default_timeout=method_configs['UpdateIntent'].timeout, - client_info=client_info) + client_info=client_info, + ) self._delete_intent = google.api_core.gapic_v1.method.wrap_method( self.intents_stub.DeleteIntent, default_retry=method_configs['DeleteIntent'].retry, default_timeout=method_configs['DeleteIntent'].timeout, - client_info=client_info) + client_info=client_info, + ) self._batch_update_intents = google.api_core.gapic_v1.method.wrap_method( self.intents_stub.BatchUpdateIntents, default_retry=method_configs['BatchUpdateIntents'].retry, default_timeout=method_configs['BatchUpdateIntents'].timeout, - client_info=client_info) + client_info=client_info, + ) self._batch_delete_intents = google.api_core.gapic_v1.method.wrap_method( self.intents_stub.BatchDeleteIntents, default_retry=method_configs['BatchDeleteIntents'].retry, default_timeout=method_configs['BatchDeleteIntents'].timeout, - client_info=client_info) + client_info=client_info, + ) # Service calls def list_intents(self, @@ -190,7 +235,8 @@ def list_intents(self, intent_view=None, page_size=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Returns the list of all intents in the specified agent. @@ -233,6 +279,8 @@ def list_intents(self, 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.gax.PageIterator` instance. By default, this @@ -247,19 +295,27 @@ def list_intents(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = intent_pb2.ListIntentsRequest( parent=parent, language_code=language_code, intent_view=intent_view, - page_size=page_size) + page_size=page_size, + ) iterator = google.api_core.page_iterator.GRPCIterator( client=None, method=functools.partial( - self._list_intents, retry=retry, timeout=timeout), + self._list_intents, + retry=retry, + timeout=timeout, + metadata=metadata), request=request, items_field='intents', request_token_field='page_token', - response_token_field='next_page_token') + response_token_field='next_page_token', + ) return iterator def get_intent(self, @@ -267,7 +323,8 @@ def get_intent(self, language_code=None, intent_view=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Retrieves the specified intent. @@ -295,6 +352,8 @@ def get_intent(self, 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:`~dialogflow_v2beta1.types.Intent` instance. @@ -306,9 +365,16 @@ def get_intent(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = intent_pb2.GetIntentRequest( - name=name, language_code=language_code, intent_view=intent_view) - return self._get_intent(request, retry=retry, timeout=timeout) + name=name, + language_code=language_code, + intent_view=intent_view, + ) + return self._get_intent( + request, retry=retry, timeout=timeout, metadata=metadata) def create_intent(self, parent, @@ -316,7 +382,8 @@ def create_intent(self, language_code=None, intent_view=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Creates an intent in the specified agent. @@ -326,6 +393,8 @@ def create_intent(self, >>> client = dialogflow_v2beta1.IntentsClient() >>> >>> parent = client.project_agent_path('[PROJECT]') + >>> + >>> # TODO: Initialize ``intent``: >>> intent = {} >>> >>> response = client.create_intent(parent, intent) @@ -348,6 +417,8 @@ def create_intent(self, 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:`~dialogflow_v2beta1.types.Intent` instance. @@ -359,12 +430,17 @@ def create_intent(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = intent_pb2.CreateIntentRequest( parent=parent, intent=intent, language_code=language_code, - intent_view=intent_view) - return self._create_intent(request, retry=retry, timeout=timeout) + intent_view=intent_view, + ) + return self._create_intent( + request, retry=retry, timeout=timeout, metadata=metadata) def update_intent(self, intent, @@ -372,7 +448,8 @@ def update_intent(self, update_mask=None, intent_view=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Updates the specified intent. @@ -381,7 +458,10 @@ def update_intent(self, >>> >>> client = dialogflow_v2beta1.IntentsClient() >>> + >>> # TODO: Initialize ``intent``: >>> intent = {} + >>> + >>> # TODO: Initialize ``language_code``: >>> language_code = '' >>> >>> response = client.update_intent(intent, language_code) @@ -406,6 +486,8 @@ def update_intent(self, 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:`~dialogflow_v2beta1.types.Intent` instance. @@ -417,17 +499,23 @@ def update_intent(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = intent_pb2.UpdateIntentRequest( intent=intent, language_code=language_code, update_mask=update_mask, - intent_view=intent_view) - return self._update_intent(request, retry=retry, timeout=timeout) + intent_view=intent_view, + ) + return self._update_intent( + request, retry=retry, timeout=timeout, metadata=metadata) def delete_intent(self, name, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Deletes the specified intent. @@ -449,6 +537,8 @@ def delete_intent(self, 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 @@ -457,8 +547,12 @@ def delete_intent(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ - request = intent_pb2.DeleteIntentRequest(name=name) - self._delete_intent(request, retry=retry, timeout=timeout) + if metadata is None: + metadata = [] + metadata = list(metadata) + request = intent_pb2.DeleteIntentRequest(name=name, ) + self._delete_intent( + request, retry=retry, timeout=timeout, metadata=metadata) def batch_update_intents(self, parent, @@ -468,11 +562,12 @@ def batch_update_intents(self, update_mask=None, intent_view=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Updates/Creates multiple intents in the specified agent. - Operation + Operation Example: >>> import dialogflow_v2beta1 @@ -480,6 +575,8 @@ def batch_update_intents(self, >>> client = dialogflow_v2beta1.IntentsClient() >>> >>> parent = client.agent_path('[PROJECT]', '[AGENT]') + >>> + >>> # TODO: Initialize ``language_code``: >>> language_code = '' >>> >>> response = client.batch_update_intents(parent, language_code) @@ -501,9 +598,9 @@ def batch_update_intents(self, used. [More than a dozen languages](https://dialogflow.com/docs/reference/language) are supported. Note: languages must be enabled in the agent, before they can be used. - intent_batch_uri (str): The URI to a file containing intents to update or create. The file - format can be either a serialized proto (of IntentBatch type) or JSON - object. Note: The URI must start with \"gs://\". + intent_batch_uri (str): The URI to a Google Cloud Storage file containing intents to update or + create. The file format can either be a serialized proto (of IntentBatch + type) or JSON object. Note: The URI must start with \"gs://\". intent_batch_inline (Union[dict, ~dialogflow_v2beta1.types.IntentBatch]): The collection of intents to update or create. If a dict is provided, it must be of the same form as the protobuf message :class:`~dialogflow_v2beta1.types.IntentBatch` @@ -517,6 +614,8 @@ def batch_update_intents(self, 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:`~dialogflow_v2beta1.types._OperationFuture` instance. @@ -528,11 +627,15 @@ def batch_update_intents(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) # 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( intent_batch_uri=intent_batch_uri, - intent_batch_inline=intent_batch_inline, ) + intent_batch_inline=intent_batch_inline, + ) request = intent_pb2.BatchUpdateIntentsRequest( parent=parent, @@ -540,24 +643,27 @@ def batch_update_intents(self, intent_batch_uri=intent_batch_uri, intent_batch_inline=intent_batch_inline, update_mask=update_mask, - intent_view=intent_view) + intent_view=intent_view, + ) operation = self._batch_update_intents( - request, retry=retry, timeout=timeout) + request, retry=retry, timeout=timeout, metadata=metadata) return google.api_core.operation.from_gapic( operation, self.operations_client, intent_pb2.BatchUpdateIntentsResponse, - metadata_type=struct_pb2.Struct) + metadata_type=struct_pb2.Struct, + ) def batch_delete_intents(self, parent, intents, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Deletes intents in the specified agent. - Operation + Operation Example: >>> import dialogflow_v2beta1 @@ -565,6 +671,8 @@ def batch_delete_intents(self, >>> client = dialogflow_v2beta1.IntentsClient() >>> >>> parent = client.project_path('[PROJECT]') + >>> + >>> # TODO: Initialize ``intents``: >>> intents = [] >>> >>> response = client.batch_delete_intents(parent, intents) @@ -591,6 +699,8 @@ def batch_delete_intents(self, 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:`~dialogflow_v2beta1.types._OperationFuture` instance. @@ -602,12 +712,18 @@ def batch_delete_intents(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = intent_pb2.BatchDeleteIntentsRequest( - parent=parent, intents=intents) + parent=parent, + intents=intents, + ) operation = self._batch_delete_intents( - request, retry=retry, timeout=timeout) + request, retry=retry, timeout=timeout, metadata=metadata) return google.api_core.operation.from_gapic( operation, self.operations_client, empty_pb2.Empty, - metadata_type=struct_pb2.Struct) + metadata_type=struct_pb2.Struct, + ) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/session_entity_types_client.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/session_entity_types_client.py index 0505bbd30887..50df44f39779 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/session_entity_types_client.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/session_entity_types_client.py @@ -1,25 +1,17 @@ -# Copyright 2017, Google LLC +# -*- coding: utf8 -*- +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# -# EDITING INSTRUCTIONS -# This file was generated from the file -# https://github.com/google/googleapis/blob/master/google/cloud/dialogflow/v2beta1/session_entity_type.proto, -# and updates to that file get reflected here through a refresh process. -# For the short term, the refresh process will only be runnable by Google engineers. -# -# The only allowed edits are to method and file documentation. A 3-way -# merge preserves those additions if the generated source changes. """Accesses the google.cloud.dialogflow.v2beta1 SessionEntityTypes API.""" import functools @@ -39,22 +31,31 @@ from dialogflow_v2beta1.proto import entity_type_pb2 from dialogflow_v2beta1.proto import intent_pb2 from dialogflow_v2beta1.proto import session_entity_type_pb2 +from dialogflow_v2beta1.proto import session_entity_type_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 +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution('dialogflow', + ).version class SessionEntityTypesClient(object): """ - Manages session entity types. - - Session entity types can be redefined on a session level, allowing for - specific concepts, like a user's playlists. - - - Standard methods. + 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 `__. """ SERVICE_ADDRESS = 'dialogflow.googleapis.com:443' @@ -65,25 +66,51 @@ class SessionEntityTypesClient(object): _DEFAULT_SCOPES = ('https://www.googleapis.com/auth/cloud-platform', ) # The name of the interface for this client. This is the key used to find - # method configuration in the client_config dictionary - _INTERFACE_NAME = ('google.cloud.dialogflow.v2beta1.SessionEntityTypes') + # method configuration in the client_config dictionary. + _INTERFACE_NAME = 'google.cloud.dialogflow.v2beta1.SessionEntityTypes' @classmethod def session_path(cls, project, session): - """Returns a fully-qualified session resource name string.""" + """Return a fully-qualified session string.""" return google.api_core.path_template.expand( 'projects/{project}/agent/sessions/{session}', project=project, - session=session, ) + session=session, + ) + + @classmethod + def environment_session_path(cls, project, environment, user, session): + """Return a fully-qualified environment_session string.""" + return google.api_core.path_template.expand( + 'projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}', + project=project, + environment=environment, + user=user, + session=session, + ) @classmethod def session_entity_type_path(cls, project, session, entity_type): - """Returns a fully-qualified session_entity_type resource name string.""" + """Return a fully-qualified session_entity_type string.""" return google.api_core.path_template.expand( 'projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}', project=project, session=session, - entity_type=entity_type, ) + entity_type=entity_type, + ) + + @classmethod + def environment_session_entity_type_path(cls, project, environment, user, + session, entity_type): + """Return a fully-qualified environment_session_entity_type string.""" + return google.api_core.path_template.expand( + 'projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}', + project=project, + environment=environment, + user=user, + session=session, + entity_type=entity_type, + ) def __init__(self, channel=None, @@ -94,72 +121,86 @@ def __init__(self, Args: channel (grpc.Channel): A ``Channel`` instance through - which to make calls. If specified, then the ``credentials`` - argument is ignored. + which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. credentials (google.auth.credentials.Credentials): The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. - client_config (dict): - A dictionary of call options for each method. If not specified - the default configuration is used. Generally, you only need - to set this if you're developing your own client library. + client_config (dict): A dictionary of call options for each + method. If not specified, the default configuration is used. client_info (google.api_core.gapic_v1.client_info.ClientInfo): The client info used to send a user-agent string along with API requests. If ``None``, then default info will be used. Generally, you only need to set this if you're developing your own client library. """ + # If both `channel` and `credentials` are specified, raise an + # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - 'channel and credentials arguments to {} are mutually ' - 'exclusive.'.format(self.__class__.__name__)) + 'The `channel` and `credentials` arguments to {} are mutually ' + 'exclusive.'.format(self.__class__.__name__), ) + # Create the channel. if channel is None: channel = google.api_core.grpc_helpers.create_channel( self.SERVICE_ADDRESS, credentials=credentials, - scopes=self._DEFAULT_SCOPES) + scopes=self._DEFAULT_SCOPES, + ) + # Create the gRPC stubs. self.session_entity_types_stub = ( - session_entity_type_pb2.SessionEntityTypesStub(channel)) + session_entity_type_pb2_grpc.SessionEntityTypesStub(channel)) if client_info is None: client_info = ( google.api_core.gapic_v1.client_info.DEFAULT_CLIENT_INFO) - client_info.gapic_version = _GAPIC_LIBRARY_VERSION - interface_config = client_config['interfaces'][self._INTERFACE_NAME] + # Parse out the default settings for retry and timeout for each RPC + # from the client configuration. + # (Ordinarily, these are the defaults specified in the `*_config.py` + # file next to this one.) method_configs = google.api_core.gapic_v1.config.parse_method_configs( - interface_config) + client_config['interfaces'][self._INTERFACE_NAME], ) + # Write the "inner API call" methods to the class. + # These are wrapped versions of the gRPC stub methods, with retry and + # timeout configuration applied, called by the public methods on + # this class. self._list_session_entity_types = google.api_core.gapic_v1.method.wrap_method( self.session_entity_types_stub.ListSessionEntityTypes, default_retry=method_configs['ListSessionEntityTypes'].retry, default_timeout=method_configs['ListSessionEntityTypes'].timeout, - client_info=client_info) + client_info=client_info, + ) self._get_session_entity_type = google.api_core.gapic_v1.method.wrap_method( self.session_entity_types_stub.GetSessionEntityType, default_retry=method_configs['GetSessionEntityType'].retry, default_timeout=method_configs['GetSessionEntityType'].timeout, - client_info=client_info) + client_info=client_info, + ) self._create_session_entity_type = google.api_core.gapic_v1.method.wrap_method( self.session_entity_types_stub.CreateSessionEntityType, default_retry=method_configs['CreateSessionEntityType'].retry, default_timeout=method_configs['CreateSessionEntityType'].timeout, - client_info=client_info) + client_info=client_info, + ) self._update_session_entity_type = google.api_core.gapic_v1.method.wrap_method( self.session_entity_types_stub.UpdateSessionEntityType, default_retry=method_configs['UpdateSessionEntityType'].retry, default_timeout=method_configs['UpdateSessionEntityType'].timeout, - client_info=client_info) + client_info=client_info, + ) self._delete_session_entity_type = google.api_core.gapic_v1.method.wrap_method( self.session_entity_types_stub.DeleteSessionEntityType, default_retry=method_configs['DeleteSessionEntityType'].retry, default_timeout=method_configs['DeleteSessionEntityType'].timeout, - client_info=client_info) + client_info=client_info, + ) # Service calls def list_session_entity_types( @@ -167,7 +208,8 @@ def list_session_entity_types( parent, page_size=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Returns the list of all session entity types in the specified session. @@ -192,7 +234,12 @@ def list_session_entity_types( Args: parent (str): Required. The session to list all session entity types from. - Format: ``projects//agent/sessions/``. + Format: ``projects//agent/sessions/`` or + ``projects//agent/environments//users// + sessions/``. + Note: Environments and users are under construction and will be available + soon. If is not specified, we assume default 'draft' + environment. If is not specified, we assume default '-' user. page_size (int): The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page @@ -204,6 +251,8 @@ def list_session_entity_types( 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.gax.PageIterator` instance. By default, this @@ -218,23 +267,33 @@ def list_session_entity_types( to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = session_entity_type_pb2.ListSessionEntityTypesRequest( - parent=parent, page_size=page_size) + parent=parent, + page_size=page_size, + ) iterator = google.api_core.page_iterator.GRPCIterator( client=None, method=functools.partial( - self._list_session_entity_types, retry=retry, timeout=timeout), + self._list_session_entity_types, + retry=retry, + timeout=timeout, + metadata=metadata), request=request, items_field='session_entity_types', request_token_field='page_token', - response_token_field='next_page_token') + response_token_field='next_page_token', + ) return iterator def get_session_entity_type( self, name, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Retrieves the specified session entity type. @@ -250,13 +309,20 @@ def get_session_entity_type( Args: name (str): Required. The name of the session entity type. Format: ``projects//agent/sessions//entityTypes/``. + Display Name>`` or ``projects//agent/environments//users//sessions// + entityTypes/``. + Note: Environments and users re under construction and will be available + soon. If is not specified, we assume default 'draft' + environment. If 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. 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:`~dialogflow_v2beta1.types.SessionEntityType` instance. @@ -268,17 +334,21 @@ def get_session_entity_type( to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = session_entity_type_pb2.GetSessionEntityTypeRequest( - name=name) + name=name, ) return self._get_session_entity_type( - request, retry=retry, timeout=timeout) + request, retry=retry, timeout=timeout, metadata=metadata) def create_session_entity_type( self, parent, session_entity_type, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Creates a session entity type. @@ -288,13 +358,20 @@ def create_session_entity_type( >>> client = dialogflow_v2beta1.SessionEntityTypesClient() >>> >>> parent = client.session_path('[PROJECT]', '[SESSION]') + >>> + >>> # TODO: Initialize ``session_entity_type``: >>> session_entity_type = {} >>> >>> response = client.create_session_entity_type(parent, session_entity_type) Args: parent (str): Required. The session to create a session entity type for. - Format: ``projects//agent/sessions/``. + Format: ``projects//agent/sessions/`` or + ``projects//agent/environments//users// + sessions/``. + Note: Environments and users are under construction and will be available + soon. If is not specified, we assume default 'draft' + environment. If is not specified, we assume default '-' user. session_entity_type (Union[dict, ~dialogflow_v2beta1.types.SessionEntityType]): Required. The session entity type to create. If a dict is provided, it must be of the same form as the protobuf message :class:`~dialogflow_v2beta1.types.SessionEntityType` @@ -304,6 +381,8 @@ def create_session_entity_type( 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:`~dialogflow_v2beta1.types.SessionEntityType` instance. @@ -315,17 +394,23 @@ def create_session_entity_type( to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = session_entity_type_pb2.CreateSessionEntityTypeRequest( - parent=parent, session_entity_type=session_entity_type) + parent=parent, + session_entity_type=session_entity_type, + ) return self._create_session_entity_type( - request, retry=retry, timeout=timeout) + request, retry=retry, timeout=timeout, metadata=metadata) def update_session_entity_type( self, session_entity_type, update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Updates the specified session entity type. @@ -334,6 +419,7 @@ def update_session_entity_type( >>> >>> client = dialogflow_v2beta1.SessionEntityTypesClient() >>> + >>> # TODO: Initialize ``session_entity_type``: >>> session_entity_type = {} >>> >>> response = client.update_session_entity_type(session_entity_type) @@ -341,7 +427,12 @@ def update_session_entity_type( Args: session_entity_type (Union[dict, ~dialogflow_v2beta1.types.SessionEntityType]): Required. The entity type to update. Format: ``projects//agent/sessions//entityTypes/``. + Display Name>`` or ``projects//agent/environments//users//sessions//entityTypes/``. + Note: Environments and users are under construction and will be available + soon. If is not specified, we assume default 'draft' + environment. If is not specified, we assume default '-' user. If a dict is provided, it must be of the same form as the protobuf message :class:`~dialogflow_v2beta1.types.SessionEntityType` update_mask (Union[dict, ~dialogflow_v2beta1.types.FieldMask]): Optional. The mask to control which fields get updated. @@ -353,6 +444,8 @@ def update_session_entity_type( 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:`~dialogflow_v2beta1.types.SessionEntityType` instance. @@ -364,16 +457,22 @@ def update_session_entity_type( to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = session_entity_type_pb2.UpdateSessionEntityTypeRequest( - session_entity_type=session_entity_type, update_mask=update_mask) + session_entity_type=session_entity_type, + update_mask=update_mask, + ) return self._update_session_entity_type( - request, retry=retry, timeout=timeout) + request, retry=retry, timeout=timeout, metadata=metadata) def delete_session_entity_type( self, name, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Deletes the specified session entity type. @@ -389,13 +488,20 @@ def delete_session_entity_type( Args: name (str): Required. The name of the entity type to delete. Format: ``projects//agent/sessions//entityTypes/``. + Display Name>`` or ``projects//agent/environments//users//sessions//entityTypes/``. + Note: Environments and users are under construction and will be available + soon. If is not specified, we assume default 'draft' + environment. If 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. 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 @@ -404,6 +510,10 @@ def delete_session_entity_type( to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = session_entity_type_pb2.DeleteSessionEntityTypeRequest( - name=name) - self._delete_session_entity_type(request, retry=retry, timeout=timeout) + name=name, ) + self._delete_session_entity_type( + request, retry=retry, timeout=timeout, metadata=metadata) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/sessions_client.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/sessions_client.py index a1c95f578ad0..4891b3f4662d 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/sessions_client.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/gapic/sessions_client.py @@ -1,25 +1,17 @@ -# Copyright 2017, Google LLC +# -*- coding: utf8 -*- +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# -# EDITING INSTRUCTIONS -# This file was generated from the file -# https://github.com/google/googleapis/blob/master/google/cloud/dialogflow/v2beta1/session.proto, -# and updates to that file get reflected here through a refresh process. -# For the short term, the refresh process will only be runnable by Google engineers. -# -# The only allowed edits are to method and file documentation. A 3-way -# merge preserves those additions if the generated source changes. """Accesses the google.cloud.dialogflow.v2beta1 Sessions API.""" import pkg_resources @@ -38,19 +30,23 @@ from dialogflow_v2beta1.proto import intent_pb2 from dialogflow_v2beta1.proto import session_entity_type_pb2 from dialogflow_v2beta1.proto import session_pb2 +from dialogflow_v2beta1.proto import session_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 +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution('dialogflow', + ).version class SessionsClient(object): """ - Manages user sessions. - - - Custom methods. + A session represents an interaction with a user. You retrieve user input + and pass it to the ``DetectIntent`` (or + ``StreamingDetectIntent``) method to determine + user intent and respond. """ SERVICE_ADDRESS = 'dialogflow.googleapis.com:443' @@ -61,16 +57,28 @@ class SessionsClient(object): _DEFAULT_SCOPES = ('https://www.googleapis.com/auth/cloud-platform', ) # The name of the interface for this client. This is the key used to find - # method configuration in the client_config dictionary - _INTERFACE_NAME = ('google.cloud.dialogflow.v2beta1.Sessions') + # method configuration in the client_config dictionary. + _INTERFACE_NAME = 'google.cloud.dialogflow.v2beta1.Sessions' @classmethod def session_path(cls, project, session): - """Returns a fully-qualified session resource name string.""" + """Return a fully-qualified session string.""" return google.api_core.path_template.expand( 'projects/{project}/agent/sessions/{session}', project=project, - session=session, ) + session=session, + ) + + @classmethod + def environment_session_path(cls, project, environment, user, session): + """Return a fully-qualified environment_session string.""" + return google.api_core.path_template.expand( + 'projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}', + project=project, + environment=environment, + user=user, + session=session, + ) def __init__(self, channel=None, @@ -81,56 +89,67 @@ def __init__(self, Args: channel (grpc.Channel): A ``Channel`` instance through - which to make calls. If specified, then the ``credentials`` - argument is ignored. + which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. credentials (google.auth.credentials.Credentials): The authorization credentials to attach to requests. These credentials identify this application to the service. If none are specified, the client will attempt to ascertain the credentials from the environment. - client_config (dict): - A dictionary of call options for each method. If not specified - the default configuration is used. Generally, you only need - to set this if you're developing your own client library. + client_config (dict): A dictionary of call options for each + method. If not specified, the default configuration is used. client_info (google.api_core.gapic_v1.client_info.ClientInfo): The client info used to send a user-agent string along with API requests. If ``None``, then default info will be used. Generally, you only need to set this if you're developing your own client library. """ + # If both `channel` and `credentials` are specified, raise an + # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - 'channel and credentials arguments to {} are mutually ' - 'exclusive.'.format(self.__class__.__name__)) + 'The `channel` and `credentials` arguments to {} are mutually ' + 'exclusive.'.format(self.__class__.__name__), ) + # Create the channel. if channel is None: channel = google.api_core.grpc_helpers.create_channel( self.SERVICE_ADDRESS, credentials=credentials, - scopes=self._DEFAULT_SCOPES) + scopes=self._DEFAULT_SCOPES, + ) - self.sessions_stub = (session_pb2.SessionsStub(channel)) + # Create the gRPC stubs. + self.sessions_stub = (session_pb2_grpc.SessionsStub(channel)) if client_info is None: client_info = ( google.api_core.gapic_v1.client_info.DEFAULT_CLIENT_INFO) - client_info.gapic_version = _GAPIC_LIBRARY_VERSION - interface_config = client_config['interfaces'][self._INTERFACE_NAME] + # Parse out the default settings for retry and timeout for each RPC + # from the client configuration. + # (Ordinarily, these are the defaults specified in the `*_config.py` + # file next to this one.) method_configs = google.api_core.gapic_v1.config.parse_method_configs( - interface_config) + client_config['interfaces'][self._INTERFACE_NAME], ) + # Write the "inner API call" methods to the class. + # These are wrapped versions of the gRPC stub methods, with retry and + # timeout configuration applied, called by the public methods on + # this class. self._detect_intent = google.api_core.gapic_v1.method.wrap_method( self.sessions_stub.DetectIntent, default_retry=method_configs['DetectIntent'].retry, default_timeout=method_configs['DetectIntent'].timeout, - client_info=client_info) + client_info=client_info, + ) self._streaming_detect_intent = google.api_core.gapic_v1.method.wrap_method( self.sessions_stub.StreamingDetectIntent, default_retry=method_configs['StreamingDetectIntent'].retry, default_timeout=method_configs['StreamingDetectIntent'].timeout, - client_info=client_info) + client_info=client_info, + ) # Service calls def detect_intent(self, @@ -139,7 +158,8 @@ def detect_intent(self, query_params=None, input_audio=None, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts @@ -152,16 +172,23 @@ def detect_intent(self, >>> client = dialogflow_v2beta1.SessionsClient() >>> >>> session = client.session_path('[PROJECT]', '[SESSION]') + >>> + >>> # TODO: Initialize ``query_input``: >>> query_input = {} >>> >>> response = client.detect_intent(session, query_input) Args: session (str): 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. + ``projects//agent/sessions/``, or + ``projects//agent/environments//users//sessions/``. Note: Environments and users are under + construction and will be available soon. If is not + specified, we assume default 'draft' environment. If is not + specified, we are using \"-\". It’s up to the API caller to choose an + appropriate . and . They can be a random numbers or + some type of user and session identifiers (preferably hashed). The length + of the and must not exceed 36 characters. query_input (Union[dict, ~dialogflow_v2beta1.types.QueryInput]): Required. The input specification. It can be set to: 1. an audio config @@ -186,6 +213,8 @@ def detect_intent(self, 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:`~dialogflow_v2beta1.types.DetectIntentResponse` instance. @@ -197,18 +226,24 @@ def detect_intent(self, to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) request = session_pb2.DetectIntentRequest( session=session, query_input=query_input, query_params=query_params, - input_audio=input_audio) - return self._detect_intent(request, retry=retry, timeout=timeout) + input_audio=input_audio, + ) + return self._detect_intent( + request, retry=retry, timeout=timeout, metadata=metadata) def streaming_detect_intent( self, requests, retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT): + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None): """ Processes a natural language query in audio format in a streaming fashion and returns structured, actionable data as a result. This method is only @@ -221,7 +256,10 @@ def streaming_detect_intent( >>> >>> client = dialogflow_v2beta1.SessionsClient() >>> + >>> # TODO: Initialize ``session``: >>> session = '' + >>> + >>> # TODO: Initialize ``query_input``: >>> query_input = {} >>> request = {'session': session, 'query_input': query_input} >>> @@ -239,6 +277,8 @@ def streaming_detect_intent( 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: Iterable[~dialogflow_v2beta1.types.StreamingDetectIntentResponse]. @@ -250,5 +290,8 @@ def streaming_detect_intent( to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. """ + if metadata is None: + metadata = [] + metadata = list(metadata) return self._streaming_detect_intent( - requests, retry=retry, timeout=timeout) + requests, retry=retry, timeout=timeout, metadata=metadata) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/agent_pb2.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/agent_pb2.py index c2f62dfcaa17..6fe4c97f69ad 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/agent_pb2.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/agent_pb2.py @@ -70,70 +70,70 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='display_name', full_name='google.cloud.dialogflow.v2beta1.Agent.display_name', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='default_language_code', full_name='google.cloud.dialogflow.v2beta1.Agent.default_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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='supported_language_codes', full_name='google.cloud.dialogflow.v2beta1.Agent.supported_language_codes', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='time_zone', full_name='google.cloud.dialogflow.v2beta1.Agent.time_zone', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='description', full_name='google.cloud.dialogflow.v2beta1.Agent.description', index=5, number=6, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='avatar_uri', full_name='google.cloud.dialogflow.v2beta1.Agent.avatar_uri', index=6, number=7, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='enable_logging', full_name='google.cloud.dialogflow.v2beta1.Agent.enable_logging', index=7, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='match_mode', full_name='google.cloud.dialogflow.v2beta1.Agent.match_mode', index=8, number=9, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='classification_threshold', full_name='google.cloud.dialogflow.v2beta1.Agent.classification_threshold', index=9, number=10, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -165,7 +165,7 @@ 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -196,21 +196,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='page_size', full_name='google.cloud.dialogflow.v2beta1.SearchAgentsRequest.page_size', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='page_token', full_name='google.cloud.dialogflow.v2beta1.SearchAgentsRequest.page_token', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -241,14 +241,14 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='next_page_token', full_name='google.cloud.dialogflow.v2beta1.SearchAgentsResponse.next_page_token', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -279,7 +279,7 @@ 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -310,14 +310,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='agent_uri', full_name='google.cloud.dialogflow.v2beta1.ExportAgentRequest.agent_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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -348,14 +348,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='agent_content', full_name='google.cloud.dialogflow.v2beta1.ExportAgentResponse.agent_content', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -389,21 +389,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='agent_uri', full_name='google.cloud.dialogflow.v2beta1.ImportAgentRequest.agent_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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='agent_content', full_name='google.cloud.dialogflow.v2beta1.ImportAgentRequest.agent_content', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -437,21 +437,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='agent_uri', full_name='google.cloud.dialogflow.v2beta1.RestoreAgentRequest.agent_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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='agent_content', full_name='google.cloud.dialogflow.v2beta1.RestoreAgentRequest.agent_content', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -505,7 +505,7 @@ Agent = _reflection.GeneratedProtocolMessageType('Agent', (_message.Message,), dict( DESCRIPTOR = _AGENT, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.agent_pb2' + __module__ = 'dialogflow_v2beta1.proto.agent_pb2' , __doc__ = """Represents a conversational agent. @@ -534,8 +534,8 @@ 500 characters. If exceeded, the request is rejected. avatar_uri: Optional. The URI of the agent's avatar. Avatars are used - throughout API.AI console and in the self-hosted `Web Demo - `__ + throughout the Dialogflow console and in the self-hosted `Web + Demo `__ integration. enable_logging: Optional. Determines whether this agent should log @@ -559,9 +559,10 @@ GetAgentRequest = _reflection.GeneratedProtocolMessageType('GetAgentRequest', (_message.Message,), dict( DESCRIPTOR = _GETAGENTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.agent_pb2' + __module__ = 'dialogflow_v2beta1.proto.agent_pb2' , - __doc__ = """The request message for [Agents.GetAgent]. + __doc__ = """The request message for + [Agents.GetAgent][google.cloud.dialogflow.v2beta1.Agents.GetAgent]. Attributes: @@ -575,9 +576,10 @@ SearchAgentsRequest = _reflection.GeneratedProtocolMessageType('SearchAgentsRequest', (_message.Message,), dict( DESCRIPTOR = _SEARCHAGENTSREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.agent_pb2' + __module__ = 'dialogflow_v2beta1.proto.agent_pb2' , - __doc__ = """The request message for [Agents.SearchAgents]. + __doc__ = """The request message for + [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents]. Attributes: @@ -597,9 +599,10 @@ SearchAgentsResponse = _reflection.GeneratedProtocolMessageType('SearchAgentsResponse', (_message.Message,), dict( DESCRIPTOR = _SEARCHAGENTSRESPONSE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.agent_pb2' + __module__ = 'dialogflow_v2beta1.proto.agent_pb2' , - __doc__ = """The response message for [Agents.SearchAgents]. + __doc__ = """The response message for + [Agents.SearchAgents][google.cloud.dialogflow.v2beta1.Agents.SearchAgents]. Attributes: @@ -616,9 +619,10 @@ TrainAgentRequest = _reflection.GeneratedProtocolMessageType('TrainAgentRequest', (_message.Message,), dict( DESCRIPTOR = _TRAINAGENTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.agent_pb2' + __module__ = 'dialogflow_v2beta1.proto.agent_pb2' , - __doc__ = """The request message for [Agents.TrainAgent]. + __doc__ = """The request message for + [Agents.TrainAgent][google.cloud.dialogflow.v2beta1.Agents.TrainAgent]. Attributes: @@ -632,9 +636,10 @@ ExportAgentRequest = _reflection.GeneratedProtocolMessageType('ExportAgentRequest', (_message.Message,), dict( DESCRIPTOR = _EXPORTAGENTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.agent_pb2' + __module__ = 'dialogflow_v2beta1.proto.agent_pb2' , - __doc__ = """The request message for [Agents.ExportAgent]. + __doc__ = """The request message for + [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent]. Attributes: @@ -642,9 +647,9 @@ Required. The project that the agent to export is associated with. Format: ``projects/``. agent_uri: - Optional. The URI to export the agent to. Note: The URI must - start with "gs://". If left unspecified, the serialized agent - is returned inline. + Optional. The Google Cloud Storage URI to export the agent to. + Note: The URI must start with "gs://". If left unspecified, + the serialized agent is returned inline. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ExportAgentRequest) )) @@ -652,9 +657,10 @@ ExportAgentResponse = _reflection.GeneratedProtocolMessageType('ExportAgentResponse', (_message.Message,), dict( DESCRIPTOR = _EXPORTAGENTRESPONSE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.agent_pb2' + __module__ = 'dialogflow_v2beta1.proto.agent_pb2' , - __doc__ = """The response message for [Agents.ExportAgent]. + __doc__ = """The response message for + [Agents.ExportAgent][google.cloud.dialogflow.v2beta1.Agents.ExportAgent]. Attributes: @@ -662,7 +668,8 @@ Required. The exported agent. agent_uri: The URI to a file containing the exported agent. This field is - populated only if ``agent_uri`` + populated only if ``agent_uri`` is specified in + ``ExportAgentRequest``. agent_content: The exported agent. """, @@ -672,9 +679,10 @@ ImportAgentRequest = _reflection.GeneratedProtocolMessageType('ImportAgentRequest', (_message.Message,), dict( DESCRIPTOR = _IMPORTAGENTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.agent_pb2' + __module__ = 'dialogflow_v2beta1.proto.agent_pb2' , - __doc__ = """The request message for [Agents.ImportAgent]. + __doc__ = """The request message for + [Agents.ImportAgent][google.cloud.dialogflow.v2beta1.Agents.ImportAgent]. Attributes: @@ -684,8 +692,8 @@ agent: Required. The agent to import. agent_uri: - The URI to a file containing the agent to import. Note: The - URI must start with "gs://". + 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. """, @@ -695,9 +703,10 @@ RestoreAgentRequest = _reflection.GeneratedProtocolMessageType('RestoreAgentRequest', (_message.Message,), dict( DESCRIPTOR = _RESTOREAGENTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.agent_pb2' + __module__ = 'dialogflow_v2beta1.proto.agent_pb2' , - __doc__ = """The request message for [Agents.RestoreAgent]. + __doc__ = """The request message for + [Agents.RestoreAgent][google.cloud.dialogflow.v2beta1.Agents.RestoreAgent]. Attributes: @@ -707,8 +716,8 @@ agent: Required. The agent to restore. agent_uri: - The URI to a file containing the agent to restore. Note: The - URI must start with "gs://". + 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. """, @@ -719,394 +728,73 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n#com.google.cloud.dialogflow.v2beta1B\nAgentProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1')) -try: - # THESE ELEMENTS WILL BE DEPRECATED. - # Please use the generated *_pb2_grpc.py files instead. - import grpc - from grpc.beta import implementations as beta_implementations - from grpc.beta import interfaces as beta_interfaces - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities +_AGENTS = _descriptor.ServiceDescriptor( + name='Agents', + full_name='google.cloud.dialogflow.v2beta1.Agents', + file=DESCRIPTOR, + index=0, + options=None, + serialized_start=1213, + serialized_end=2161, + methods=[ + _descriptor.MethodDescriptor( + name='GetAgent', + full_name='google.cloud.dialogflow.v2beta1.Agents.GetAgent', + index=0, + containing_service=None, + input_type=_GETAGENTREQUEST, + output_type=_AGENT, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002$\022\"/v2beta1/{parent=projects/*}/agent')), + ), + _descriptor.MethodDescriptor( + name='SearchAgents', + full_name='google.cloud.dialogflow.v2beta1.Agents.SearchAgents', + index=1, + containing_service=None, + input_type=_SEARCHAGENTSREQUEST, + output_type=_SEARCHAGENTSRESPONSE, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002+\022)/v2beta1/{parent=projects/*}/agent:search')), + ), + _descriptor.MethodDescriptor( + name='TrainAgent', + full_name='google.cloud.dialogflow.v2beta1.Agents.TrainAgent', + index=2, + containing_service=None, + input_type=_TRAINAGENTREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002-\"(/v2beta1/{parent=projects/*}/agent:train:\001*')), + ), + _descriptor.MethodDescriptor( + name='ExportAgent', + full_name='google.cloud.dialogflow.v2beta1.Agents.ExportAgent', + index=3, + containing_service=None, + input_type=_EXPORTAGENTREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002.\")/v2beta1/{parent=projects/*}/agent:export:\001*')), + ), + _descriptor.MethodDescriptor( + name='ImportAgent', + full_name='google.cloud.dialogflow.v2beta1.Agents.ImportAgent', + index=4, + containing_service=None, + input_type=_IMPORTAGENTREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002.\")/v2beta1/{parent=projects/*}/agent:import:\001*')), + ), + _descriptor.MethodDescriptor( + name='RestoreAgent', + full_name='google.cloud.dialogflow.v2beta1.Agents.RestoreAgent', + index=5, + containing_service=None, + input_type=_RESTOREAGENTREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002/\"*/v2beta1/{parent=projects/*}/agent:restore:\001*')), + ), +]) +_sym_db.RegisterServiceDescriptor(_AGENTS) + +DESCRIPTOR.services_by_name['Agents'] = _AGENTS - class AgentsStub(object): - """Manages conversational agents. - - - Refer to [documentation](https://dialogflow.com/docs/agents) for more details - # about agents. - - Standard methods. - """ - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.GetAgent = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Agents/GetAgent', - request_serializer=GetAgentRequest.SerializeToString, - response_deserializer=Agent.FromString, - ) - self.SearchAgents = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Agents/SearchAgents', - request_serializer=SearchAgentsRequest.SerializeToString, - response_deserializer=SearchAgentsResponse.FromString, - ) - self.TrainAgent = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Agents/TrainAgent', - request_serializer=TrainAgentRequest.SerializeToString, - response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ) - self.ExportAgent = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Agents/ExportAgent', - request_serializer=ExportAgentRequest.SerializeToString, - response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ) - self.ImportAgent = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Agents/ImportAgent', - request_serializer=ImportAgentRequest.SerializeToString, - response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ) - self.RestoreAgent = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Agents/RestoreAgent', - request_serializer=RestoreAgentRequest.SerializeToString, - response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ) - - - class AgentsServicer(object): - """Manages conversational agents. - - - Refer to [documentation](https://dialogflow.com/docs/agents) for more details - # about agents. - - Standard methods. - """ - - def GetAgent(self, request, context): - """Retrieves the specified agent. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def SearchAgents(self, request, context): - """Returns the list of agents. - - Since there is at most one conversational agent per project, this method is - useful primarily for listing all agents across projects the caller has - access to. One can achieve that with a wildcard project collection id "-". - Refer to [List - Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def TrainAgent(self, request, context): - """Trains the specified agent. - - - Operation - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ExportAgent(self, request, context): - """Exports the specified agent to a ZIP file. - - - Operation - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ImportAgent(self, request, context): - """Imports the specified agent from a ZIP file. - - Uploads new intents and entity types without deleting the existing ones. - Intents and entity types with the same name are replaced with the new - versions from ImportAgentRequest. - - - Operation - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def RestoreAgent(self, request, context): - """Restores the specified agent from a ZIP file. - - Replaces the current agent version with a new one. All the intents and - entity types in the older version are deleted. - - - Operation - """ - 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 = { - 'GetAgent': grpc.unary_unary_rpc_method_handler( - servicer.GetAgent, - request_deserializer=GetAgentRequest.FromString, - response_serializer=Agent.SerializeToString, - ), - 'SearchAgents': grpc.unary_unary_rpc_method_handler( - servicer.SearchAgents, - request_deserializer=SearchAgentsRequest.FromString, - response_serializer=SearchAgentsResponse.SerializeToString, - ), - 'TrainAgent': grpc.unary_unary_rpc_method_handler( - servicer.TrainAgent, - request_deserializer=TrainAgentRequest.FromString, - response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ), - 'ExportAgent': grpc.unary_unary_rpc_method_handler( - servicer.ExportAgent, - request_deserializer=ExportAgentRequest.FromString, - response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ), - 'ImportAgent': grpc.unary_unary_rpc_method_handler( - servicer.ImportAgent, - request_deserializer=ImportAgentRequest.FromString, - response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ), - 'RestoreAgent': grpc.unary_unary_rpc_method_handler( - servicer.RestoreAgent, - request_deserializer=RestoreAgentRequest.FromString, - response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'google.cloud.dialogflow.v2beta1.Agents', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - class BetaAgentsServicer(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - """Manages conversational agents. - - - Refer to [documentation](https://dialogflow.com/docs/agents) for more details - # about agents. - - Standard methods. - """ - def GetAgent(self, request, context): - """Retrieves the specified agent. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def SearchAgents(self, request, context): - """Returns the list of agents. - - Since there is at most one conversational agent per project, this method is - useful primarily for listing all agents across projects the caller has - access to. One can achieve that with a wildcard project collection id "-". - Refer to [List - Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def TrainAgent(self, request, context): - """Trains the specified agent. - - - Operation - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def ExportAgent(self, request, context): - """Exports the specified agent to a ZIP file. - - - Operation - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def ImportAgent(self, request, context): - """Imports the specified agent from a ZIP file. - - Uploads new intents and entity types without deleting the existing ones. - Intents and entity types with the same name are replaced with the new - versions from ImportAgentRequest. - - - Operation - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def RestoreAgent(self, request, context): - """Restores the specified agent from a ZIP file. - - Replaces the current agent version with a new one. All the intents and - entity types in the older version are deleted. - - - Operation - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - - - class BetaAgentsStub(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - """Manages conversational agents. - - - Refer to [documentation](https://dialogflow.com/docs/agents) for more details - # about agents. - - Standard methods. - """ - def GetAgent(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Retrieves the specified agent. - """ - raise NotImplementedError() - GetAgent.future = None - def SearchAgents(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Returns the list of agents. - - Since there is at most one conversational agent per project, this method is - useful primarily for listing all agents across projects the caller has - access to. One can achieve that with a wildcard project collection id "-". - Refer to [List - Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). - """ - raise NotImplementedError() - SearchAgents.future = None - def TrainAgent(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Trains the specified agent. - - - Operation - """ - raise NotImplementedError() - TrainAgent.future = None - def ExportAgent(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Exports the specified agent to a ZIP file. - - - Operation - """ - raise NotImplementedError() - ExportAgent.future = None - def ImportAgent(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """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 - """ - raise NotImplementedError() - ImportAgent.future = None - def RestoreAgent(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """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 - """ - raise NotImplementedError() - RestoreAgent.future = None - - - def beta_create_Agents_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_deserializers = { - ('google.cloud.dialogflow.v2beta1.Agents', 'ExportAgent'): ExportAgentRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Agents', 'GetAgent'): GetAgentRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Agents', 'ImportAgent'): ImportAgentRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Agents', 'RestoreAgent'): RestoreAgentRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Agents', 'SearchAgents'): SearchAgentsRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Agents', 'TrainAgent'): TrainAgentRequest.FromString, - } - response_serializers = { - ('google.cloud.dialogflow.v2beta1.Agents', 'ExportAgent'): google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Agents', 'GetAgent'): Agent.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Agents', 'ImportAgent'): google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Agents', 'RestoreAgent'): google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Agents', 'SearchAgents'): SearchAgentsResponse.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Agents', 'TrainAgent'): google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - } - method_implementations = { - ('google.cloud.dialogflow.v2beta1.Agents', 'ExportAgent'): face_utilities.unary_unary_inline(servicer.ExportAgent), - ('google.cloud.dialogflow.v2beta1.Agents', 'GetAgent'): face_utilities.unary_unary_inline(servicer.GetAgent), - ('google.cloud.dialogflow.v2beta1.Agents', 'ImportAgent'): face_utilities.unary_unary_inline(servicer.ImportAgent), - ('google.cloud.dialogflow.v2beta1.Agents', 'RestoreAgent'): face_utilities.unary_unary_inline(servicer.RestoreAgent), - ('google.cloud.dialogflow.v2beta1.Agents', 'SearchAgents'): face_utilities.unary_unary_inline(servicer.SearchAgents), - ('google.cloud.dialogflow.v2beta1.Agents', 'TrainAgent'): face_utilities.unary_unary_inline(servicer.TrainAgent), - } - server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) - return beta_implementations.server(method_implementations, options=server_options) - - - def beta_create_Agents_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_serializers = { - ('google.cloud.dialogflow.v2beta1.Agents', 'ExportAgent'): ExportAgentRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Agents', 'GetAgent'): GetAgentRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Agents', 'ImportAgent'): ImportAgentRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Agents', 'RestoreAgent'): RestoreAgentRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Agents', 'SearchAgents'): SearchAgentsRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Agents', 'TrainAgent'): TrainAgentRequest.SerializeToString, - } - response_deserializers = { - ('google.cloud.dialogflow.v2beta1.Agents', 'ExportAgent'): google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ('google.cloud.dialogflow.v2beta1.Agents', 'GetAgent'): Agent.FromString, - ('google.cloud.dialogflow.v2beta1.Agents', 'ImportAgent'): google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ('google.cloud.dialogflow.v2beta1.Agents', 'RestoreAgent'): google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ('google.cloud.dialogflow.v2beta1.Agents', 'SearchAgents'): SearchAgentsResponse.FromString, - ('google.cloud.dialogflow.v2beta1.Agents', 'TrainAgent'): google_dot_longrunning_dot_operations__pb2.Operation.FromString, - } - cardinalities = { - 'ExportAgent': cardinality.Cardinality.UNARY_UNARY, - 'GetAgent': cardinality.Cardinality.UNARY_UNARY, - 'ImportAgent': cardinality.Cardinality.UNARY_UNARY, - 'RestoreAgent': cardinality.Cardinality.UNARY_UNARY, - 'SearchAgents': cardinality.Cardinality.UNARY_UNARY, - 'TrainAgent': cardinality.Cardinality.UNARY_UNARY, - } - stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) - return beta_implementations.dynamic_stub(channel, 'google.cloud.dialogflow.v2beta1.Agents', cardinalities, options=stub_options) -except ImportError: - pass # @@protoc_insertion_point(module_scope) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/agent_pb2_grpc.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/agent_pb2_grpc.py index 83a7d80caf37..9f1f89a39d3b 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/agent_pb2_grpc.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/agent_pb2_grpc.py @@ -6,13 +6,31 @@ class AgentsStub(object): - """Manages conversational agents. - - - Refer to [documentation](https://dialogflow.com/docs/agents) for more details - # about agents. - - Standard methods. + """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](/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://dialogflow.com/docs/prebuilt-agents) for common + conversation scenarios such as determining a date and time, converting + currency, and so on. + + For more information about agents, see the + [Dialogflow documentation](https://dialogflow.com/docs/agents). """ def __init__(self, channel): @@ -54,13 +72,31 @@ def __init__(self, channel): class AgentsServicer(object): - """Manages conversational agents. - - - Refer to [documentation](https://dialogflow.com/docs/agents) for more details - # about agents. - - Standard methods. + """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](/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://dialogflow.com/docs/prebuilt-agents) for common + conversation scenarios such as determining a date and time, converting + currency, and so on. + + For more information about agents, see the + [Dialogflow documentation](https://dialogflow.com/docs/agents). """ def GetAgent(self, request, context): @@ -87,8 +123,8 @@ def TrainAgent(self, request, context): """Trains the specified agent. - Operation + Operation """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -98,8 +134,8 @@ def ExportAgent(self, request, context): """Exports the specified agent to a ZIP file. - Operation + Operation """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -113,8 +149,8 @@ def ImportAgent(self, request, context): versions from ImportAgentRequest. - Operation + Operation """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -127,8 +163,8 @@ def RestoreAgent(self, request, context): entity types in the older version are deleted. - Operation + Operation """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/context_pb2.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/context_pb2.py index f07fbecb0cbf..136142ca664f 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/context_pb2.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/context_pb2.py @@ -23,7 +23,7 @@ name='google/cloud/dialogflow_v2beta1/proto/context.proto', package='google.cloud.dialogflow.v2beta1', syntax='proto3', - serialized_pb=_b('\n3google/cloud/dialogflow_v2beta1/proto/context.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\"\\\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\xbf\x08\n\x08\x43ontexts\x12\xbb\x01\n\x0cListContexts\x12\x34.google.cloud.dialogflow.v2beta1.ListContextsRequest\x1a\x35.google.cloud.dialogflow.v2beta1.ListContextsResponse\">\x82\xd3\xe4\x93\x02\x38\x12\x36/v2beta1/{parent=projects/*/agent/sessions/*}/contexts\x12\xaa\x01\n\nGetContext\x12\x32.google.cloud.dialogflow.v2beta1.GetContextRequest\x1a(.google.cloud.dialogflow.v2beta1.Context\">\x82\xd3\xe4\x93\x02\x38\x12\x36/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}\x12\xb9\x01\n\rCreateContext\x12\x35.google.cloud.dialogflow.v2beta1.CreateContextRequest\x1a(.google.cloud.dialogflow.v2beta1.Context\"G\x82\xd3\xe4\x93\x02\x41\"6/v2beta1/{parent=projects/*/agent/sessions/*}/contexts:\x07\x63ontext\x12\xc1\x01\n\rUpdateContext\x12\x35.google.cloud.dialogflow.v2beta1.UpdateContextRequest\x1a(.google.cloud.dialogflow.v2beta1.Context\"O\x82\xd3\xe4\x93\x02I2>/v2beta1/{context.name=projects/*/agent/sessions/*/contexts/*}:\x07\x63ontext\x12\x9e\x01\n\rDeleteContext\x12\x35.google.cloud.dialogflow.v2beta1.DeleteContextRequest\x1a\x16.google.protobuf.Empty\">\x82\xd3\xe4\x93\x02\x38*6/v2beta1/{name=projects/*/agent/sessions/*/contexts/*}\x12\xa6\x01\n\x11\x44\x65leteAllContexts\x12\x39.google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest\x1a\x16.google.protobuf.Empty\">\x82\xd3\xe4\x93\x02\x38*6/v2beta1/{parent=projects/*/agent/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') + serialized_pb=_b('\n3google/cloud/dialogflow_v2beta1/proto/context.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\"\\\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') , dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) @@ -43,21 +43,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='lifespan_count', full_name='google.cloud.dialogflow.v2beta1.Context.lifespan_count', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='parameters', full_name='google.cloud.dialogflow.v2beta1.Context.parameters', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -88,21 +88,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='page_size', full_name='google.cloud.dialogflow.v2beta1.ListContextsRequest.page_size', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='page_token', full_name='google.cloud.dialogflow.v2beta1.ListContextsRequest.page_token', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -133,14 +133,14 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='next_page_token', full_name='google.cloud.dialogflow.v2beta1.ListContextsResponse.next_page_token', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -171,7 +171,7 @@ 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -202,14 +202,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='context', full_name='google.cloud.dialogflow.v2beta1.CreateContextRequest.context', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -240,14 +240,14 @@ has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_mask', full_name='google.cloud.dialogflow.v2beta1.UpdateContextRequest.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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -278,7 +278,7 @@ 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -309,7 +309,7 @@ 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -343,7 +343,7 @@ Context = _reflection.GeneratedProtocolMessageType('Context', (_message.Message,), dict( DESCRIPTOR = _CONTEXT, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.context_pb2' + __module__ = 'dialogflow_v2beta1.proto.context_pb2' , __doc__ = """Represents a context. @@ -352,8 +352,13 @@ name: Required. The unique identifier of the context. Format: ``projects//agent/sessions//contexts/``. Note: The Context ID is always - converted to lowercase. + ID>/contexts/``, or ``projects//agent/environments//users//sessions//contexts/``. Note: + Environments and users are under construction and will be + available soon. The Context ID is always converted to + lowercase. If is not specified, we assume default 'draft' + environment. If is not specified, we assume default '-' user. lifespan_count: Optional. The number of conversational query requests after which the context expires. If set to ``0`` (the default) the @@ -371,15 +376,21 @@ ListContextsRequest = _reflection.GeneratedProtocolMessageType('ListContextsRequest', (_message.Message,), dict( DESCRIPTOR = _LISTCONTEXTSREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.context_pb2' + __module__ = 'dialogflow_v2beta1.proto.context_pb2' , - __doc__ = """The request message for [Contexts.ListContexts]. + __doc__ = """The request message for + [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts]. Attributes: parent: Required. The session to list all contexts from. Format: - ``projects//agent/sessions/``. + ``projects//agent/sessions/`` or + ``projects//agent/environments//users//sessions/``. Note: + Environments and users are under construction and will be + available soon. If is not specified, we assume default 'draft' + environment. If is not specified, we assume default '-' user. page_size: Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. @@ -393,9 +404,10 @@ ListContextsResponse = _reflection.GeneratedProtocolMessageType('ListContextsResponse', (_message.Message,), dict( DESCRIPTOR = _LISTCONTEXTSRESPONSE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.context_pb2' + __module__ = 'dialogflow_v2beta1.proto.context_pb2' , - __doc__ = """The response message for [Contexts.ListContexts]. + __doc__ = """The response message for + [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts]. Attributes: @@ -412,15 +424,22 @@ GetContextRequest = _reflection.GeneratedProtocolMessageType('GetContextRequest', (_message.Message,), dict( DESCRIPTOR = _GETCONTEXTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.context_pb2' + __module__ = 'dialogflow_v2beta1.proto.context_pb2' , - __doc__ = """The request message for [Contexts.GetContext]. + __doc__ = """The request message for + [Contexts.GetContext][google.cloud.dialogflow.v2beta1.Contexts.GetContext]. Attributes: name: Required. The name of the context. Format: ``projects//agent/sessions//contexts/``. + ID>/agent/sessions//contexts/`` or + ``projects//agent/environments//users//sessions//contexts/``. Note: Environments and users are under construction and + will be available soon. If is not specified, we assume default + 'draft' environment. If is not specified, we assume default + '-' user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.GetContextRequest) )) @@ -428,15 +447,21 @@ CreateContextRequest = _reflection.GeneratedProtocolMessageType('CreateContextRequest', (_message.Message,), dict( DESCRIPTOR = _CREATECONTEXTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.context_pb2' + __module__ = 'dialogflow_v2beta1.proto.context_pb2' , - __doc__ = """The request message for [Contexts.CreateContext]. + __doc__ = """The request message for + [Contexts.CreateContext][google.cloud.dialogflow.v2beta1.Contexts.CreateContext]. Attributes: parent: Required. The session to create a context for. Format: - ``projects//agent/sessions/``. + ``projects//agent/sessions/`` or + ``projects//agent/environments//users//sessions/``. Note: + Environments and users are under construction and will be + available soon. If is not specified, we assume default 'draft' + environment. If is not specified, we assume default '-' user. context: Required. The context to create. """, @@ -446,15 +471,15 @@ UpdateContextRequest = _reflection.GeneratedProtocolMessageType('UpdateContextRequest', (_message.Message,), dict( DESCRIPTOR = _UPDATECONTEXTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.context_pb2' + __module__ = 'dialogflow_v2beta1.proto.context_pb2' , - __doc__ = """The request message for [Contexts.UpdateContext]. + __doc__ = """The request message for + [Contexts.UpdateContext][google.cloud.dialogflow.v2beta1.Contexts.UpdateContext]. Attributes: context: - Required. The context to update. Format: ``projects//agent/sessions//contexts/``. + Required. The context to update. update_mask: Optional. The mask to control which fields get updated. """, @@ -464,16 +489,22 @@ DeleteContextRequest = _reflection.GeneratedProtocolMessageType('DeleteContextRequest', (_message.Message,), dict( DESCRIPTOR = _DELETECONTEXTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.context_pb2' + __module__ = 'dialogflow_v2beta1.proto.context_pb2' , - __doc__ = """The request message for [Contexts.DeleteContext]. + __doc__ = """The request message for + [Contexts.DeleteContext][google.cloud.dialogflow.v2beta1.Contexts.DeleteContext]. Attributes: name: Required. The name of the context to delete. Format: ``projects//agent/sessions//contexts/``. + ID>/contexts/`` or ``projects//agent/environments//users//sessions//contexts/``. Note: + Environments and users are under construction and will be + available soon. If is not specified, we assume default 'draft' + environment. If is not specified, we assume default '-' user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DeleteContextRequest) )) @@ -481,15 +512,21 @@ DeleteAllContextsRequest = _reflection.GeneratedProtocolMessageType('DeleteAllContextsRequest', (_message.Message,), dict( DESCRIPTOR = _DELETEALLCONTEXTSREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.context_pb2' + __module__ = 'dialogflow_v2beta1.proto.context_pb2' , - __doc__ = """The request message for [Contexts.DeleteAllContexts]. + __doc__ = """The request message for + [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContexts]. Attributes: parent: Required. The name of the session to delete all contexts from. - Format: ``projects//agent/sessions/``. + Format: ``projects//agent/sessions/`` + or ``projects//agent/environments//users//sessions/``. Note: + Environments and users are under construction and will be + available soon. If is not specified we assume default 'draft' + environment. If is not specified, we assume default '-' user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest) )) @@ -498,307 +535,73 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n#com.google.cloud.dialogflow.v2beta1B\014ContextProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1')) -try: - # THESE ELEMENTS WILL BE DEPRECATED. - # Please use the generated *_pb2_grpc.py files instead. - import grpc - from grpc.beta import implementations as beta_implementations - from grpc.beta import interfaces as beta_interfaces - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities - - - class ContextsStub(object): - """Manages contexts. - - - Refer to [documentation](https://dialogflow.com/docs/contexts) for more - # details about contexts. - - Standard methods. - """ - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.ListContexts = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Contexts/ListContexts', - request_serializer=ListContextsRequest.SerializeToString, - response_deserializer=ListContextsResponse.FromString, - ) - self.GetContext = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Contexts/GetContext', - request_serializer=GetContextRequest.SerializeToString, - response_deserializer=Context.FromString, - ) - self.CreateContext = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Contexts/CreateContext', - request_serializer=CreateContextRequest.SerializeToString, - response_deserializer=Context.FromString, - ) - self.UpdateContext = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Contexts/UpdateContext', - request_serializer=UpdateContextRequest.SerializeToString, - response_deserializer=Context.FromString, - ) - self.DeleteContext = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Contexts/DeleteContext', - request_serializer=DeleteContextRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.DeleteAllContexts = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Contexts/DeleteAllContexts', - request_serializer=DeleteAllContextsRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - - - class ContextsServicer(object): - """Manages contexts. - - - Refer to [documentation](https://dialogflow.com/docs/contexts) for more - # details about contexts. - - Standard methods. - """ - - def ListContexts(self, request, context): - """Returns the list of all contexts in the specified session. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetContext(self, request, context): - """Retrieves the specified context. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def CreateContext(self, request, context): - """Creates a context. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def UpdateContext(self, request, context): - """Updates the specified context. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def DeleteContext(self, request, context): - """Deletes the specified context. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def DeleteAllContexts(self, request, context): - """Deletes all active contexts in the specified session. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - - def add_ContextsServicer_to_server(servicer, server): - rpc_method_handlers = { - 'ListContexts': grpc.unary_unary_rpc_method_handler( - servicer.ListContexts, - request_deserializer=ListContextsRequest.FromString, - response_serializer=ListContextsResponse.SerializeToString, - ), - 'GetContext': grpc.unary_unary_rpc_method_handler( - servicer.GetContext, - request_deserializer=GetContextRequest.FromString, - response_serializer=Context.SerializeToString, - ), - 'CreateContext': grpc.unary_unary_rpc_method_handler( - servicer.CreateContext, - request_deserializer=CreateContextRequest.FromString, - response_serializer=Context.SerializeToString, - ), - 'UpdateContext': grpc.unary_unary_rpc_method_handler( - servicer.UpdateContext, - request_deserializer=UpdateContextRequest.FromString, - response_serializer=Context.SerializeToString, - ), - 'DeleteContext': grpc.unary_unary_rpc_method_handler( - servicer.DeleteContext, - request_deserializer=DeleteContextRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'DeleteAllContexts': grpc.unary_unary_rpc_method_handler( - servicer.DeleteAllContexts, - request_deserializer=DeleteAllContextsRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'google.cloud.dialogflow.v2beta1.Contexts', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - class BetaContextsServicer(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - """Manages contexts. - - - Refer to [documentation](https://dialogflow.com/docs/contexts) for more - # details about contexts. - - Standard methods. - """ - def ListContexts(self, request, context): - """Returns the list of all contexts in the specified session. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def GetContext(self, request, context): - """Retrieves the specified context. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def CreateContext(self, request, context): - """Creates a context. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def UpdateContext(self, request, context): - """Updates the specified context. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def DeleteContext(self, request, context): - """Deletes the specified context. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def DeleteAllContexts(self, request, context): - """Deletes all active contexts in the specified session. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - - - class BetaContextsStub(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - """Manages contexts. - - - Refer to [documentation](https://dialogflow.com/docs/contexts) for more - # details about contexts. - - Standard methods. - """ - def ListContexts(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Returns the list of all contexts in the specified session. - """ - raise NotImplementedError() - ListContexts.future = None - def GetContext(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Retrieves the specified context. - """ - raise NotImplementedError() - GetContext.future = None - def CreateContext(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Creates a context. - """ - raise NotImplementedError() - CreateContext.future = None - def UpdateContext(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Updates the specified context. - """ - raise NotImplementedError() - UpdateContext.future = None - def DeleteContext(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Deletes the specified context. - """ - raise NotImplementedError() - DeleteContext.future = None - def DeleteAllContexts(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Deletes all active contexts in the specified session. - """ - raise NotImplementedError() - DeleteAllContexts.future = None - - - def beta_create_Contexts_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_deserializers = { - ('google.cloud.dialogflow.v2beta1.Contexts', 'CreateContext'): CreateContextRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'DeleteAllContexts'): DeleteAllContextsRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'DeleteContext'): DeleteContextRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'GetContext'): GetContextRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'ListContexts'): ListContextsRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'UpdateContext'): UpdateContextRequest.FromString, - } - response_serializers = { - ('google.cloud.dialogflow.v2beta1.Contexts', 'CreateContext'): Context.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'DeleteAllContexts'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'DeleteContext'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'GetContext'): Context.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'ListContexts'): ListContextsResponse.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'UpdateContext'): Context.SerializeToString, - } - method_implementations = { - ('google.cloud.dialogflow.v2beta1.Contexts', 'CreateContext'): face_utilities.unary_unary_inline(servicer.CreateContext), - ('google.cloud.dialogflow.v2beta1.Contexts', 'DeleteAllContexts'): face_utilities.unary_unary_inline(servicer.DeleteAllContexts), - ('google.cloud.dialogflow.v2beta1.Contexts', 'DeleteContext'): face_utilities.unary_unary_inline(servicer.DeleteContext), - ('google.cloud.dialogflow.v2beta1.Contexts', 'GetContext'): face_utilities.unary_unary_inline(servicer.GetContext), - ('google.cloud.dialogflow.v2beta1.Contexts', 'ListContexts'): face_utilities.unary_unary_inline(servicer.ListContexts), - ('google.cloud.dialogflow.v2beta1.Contexts', 'UpdateContext'): face_utilities.unary_unary_inline(servicer.UpdateContext), - } - server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) - return beta_implementations.server(method_implementations, options=server_options) - - - def beta_create_Contexts_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_serializers = { - ('google.cloud.dialogflow.v2beta1.Contexts', 'CreateContext'): CreateContextRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'DeleteAllContexts'): DeleteAllContextsRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'DeleteContext'): DeleteContextRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'GetContext'): GetContextRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'ListContexts'): ListContextsRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'UpdateContext'): UpdateContextRequest.SerializeToString, - } - response_deserializers = { - ('google.cloud.dialogflow.v2beta1.Contexts', 'CreateContext'): Context.FromString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'DeleteAllContexts'): google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'DeleteContext'): google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'GetContext'): Context.FromString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'ListContexts'): ListContextsResponse.FromString, - ('google.cloud.dialogflow.v2beta1.Contexts', 'UpdateContext'): Context.FromString, - } - cardinalities = { - 'CreateContext': cardinality.Cardinality.UNARY_UNARY, - 'DeleteAllContexts': cardinality.Cardinality.UNARY_UNARY, - 'DeleteContext': cardinality.Cardinality.UNARY_UNARY, - 'GetContext': cardinality.Cardinality.UNARY_UNARY, - 'ListContexts': cardinality.Cardinality.UNARY_UNARY, - 'UpdateContext': cardinality.Cardinality.UNARY_UNARY, - } - stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) - return beta_implementations.dynamic_stub(channel, 'google.cloud.dialogflow.v2beta1.Contexts', cardinalities, options=stub_options) -except ImportError: - pass + +_CONTEXTS = _descriptor.ServiceDescriptor( + name='Contexts', + full_name='google.cloud.dialogflow.v2beta1.Contexts', + file=DESCRIPTOR, + index=0, + options=None, + serialized_start=842, + serialized_end=2453, + methods=[ + _descriptor.MethodDescriptor( + name='ListContexts', + full_name='google.cloud.dialogflow.v2beta1.Contexts.ListContexts', + index=0, + containing_service=None, + input_type=_LISTCONTEXTSREQUEST, + output_type=_LISTCONTEXTSRESPONSE, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002\211\001\0226/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO\022M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts')), + ), + _descriptor.MethodDescriptor( + name='GetContext', + full_name='google.cloud.dialogflow.v2beta1.Contexts.GetContext', + index=1, + containing_service=None, + input_type=_GETCONTEXTREQUEST, + output_type=_CONTEXT, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _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/*}')), + ), + _descriptor.MethodDescriptor( + name='CreateContext', + full_name='google.cloud.dialogflow.v2beta1.Contexts.CreateContext', + index=2, + containing_service=None, + input_type=_CREATECONTEXTREQUEST, + output_type=_CONTEXT, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _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')), + ), + _descriptor.MethodDescriptor( + name='UpdateContext', + full_name='google.cloud.dialogflow.v2beta1.Contexts.UpdateContext', + index=3, + containing_service=None, + input_type=_UPDATECONTEXTREQUEST, + output_type=_CONTEXT, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _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')), + ), + _descriptor.MethodDescriptor( + name='DeleteContext', + full_name='google.cloud.dialogflow.v2beta1.Contexts.DeleteContext', + index=4, + containing_service=None, + input_type=_DELETECONTEXTREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _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/*}')), + ), + _descriptor.MethodDescriptor( + name='DeleteAllContexts', + full_name='google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContexts', + index=5, + containing_service=None, + input_type=_DELETEALLCONTEXTSREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002\211\001*6/v2beta1/{parent=projects/*/agent/sessions/*}/contextsZO*M/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/contexts')), + ), +]) +_sym_db.RegisterServiceDescriptor(_CONTEXTS) + +DESCRIPTOR.services_by_name['Contexts'] = _CONTEXTS + # @@protoc_insertion_point(module_scope) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/context_pb2_grpc.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/context_pb2_grpc.py index 097becae08f3..efb61736561f 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/context_pb2_grpc.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/context_pb2_grpc.py @@ -6,13 +6,23 @@ class ContextsStub(object): - """Manages contexts. - - - Refer to [documentation](https://dialogflow.com/docs/contexts) for more - # details about contexts. - - Standard methods. + """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 10 minutes + if no intents are matched for a `DetectIntent` request. + + For more information about contexts, see the + [Dialogflow documentation](https://dialogflow.com/docs/contexts). """ def __init__(self, channel): @@ -54,13 +64,23 @@ def __init__(self, channel): class ContextsServicer(object): - """Manages contexts. - - - Refer to [documentation](https://dialogflow.com/docs/contexts) for more - # details about contexts. - - Standard methods. + """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 10 minutes + if no intents are matched for a `DetectIntent` request. + + For more information about contexts, see the + [Dialogflow documentation](https://dialogflow.com/docs/contexts). """ def ListContexts(self, request, context): diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/entity_type_pb2.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/entity_type_pb2.py index fb2cc26c5e6f..074cc3ad7f02 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/entity_type_pb2.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/entity_type_pb2.py @@ -92,14 +92,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='synonyms', full_name='google.cloud.dialogflow.v2beta1.EntityType.Entity.synonyms', index=1, number=2, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -129,35 +129,35 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='display_name', full_name='google.cloud.dialogflow.v2beta1.EntityType.display_name', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='kind', full_name='google.cloud.dialogflow.v2beta1.EntityType.kind', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='auto_expansion_mode', full_name='google.cloud.dialogflow.v2beta1.EntityType.auto_expansion_mode', index=3, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='entities', full_name='google.cloud.dialogflow.v2beta1.EntityType.entities', index=4, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -190,28 +190,28 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.ListEntityTypesRequest.language_code', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='page_size', full_name='google.cloud.dialogflow.v2beta1.ListEntityTypesRequest.page_size', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='page_token', full_name='google.cloud.dialogflow.v2beta1.ListEntityTypesRequest.page_token', index=3, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -242,14 +242,14 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='next_page_token', full_name='google.cloud.dialogflow.v2beta1.ListEntityTypesResponse.next_page_token', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -280,14 +280,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.GetEntityTypeRequest.language_code', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -318,21 +318,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='entity_type', full_name='google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest.entity_type', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.CreateEntityTypeRequest.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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -363,21 +363,21 @@ has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest.language_code', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_mask', full_name='google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest.update_mask', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -408,7 +408,7 @@ 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -439,35 +439,35 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='entity_type_batch_uri', full_name='google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.entity_type_batch_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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='entity_type_batch_inline', full_name='google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.entity_type_batch_inline', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.language_code', index=3, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_mask', full_name='google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesRequest.update_mask', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -501,7 +501,7 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -532,14 +532,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='entity_type_names', full_name='google.cloud.dialogflow.v2beta1.BatchDeleteEntityTypesRequest.entity_type_names', index=1, number=2, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -570,21 +570,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='entities', full_name='google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest.entities', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.BatchCreateEntitiesRequest.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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -615,28 +615,28 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='entities', full_name='google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.entities', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_mask', full_name='google.cloud.dialogflow.v2beta1.BatchUpdateEntitiesRequest.update_mask', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -667,21 +667,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='entity_values', full_name='google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest.entity_values', index=1, number=2, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest.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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -712,7 +712,7 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -772,7 +772,7 @@ Entity = _reflection.GeneratedProtocolMessageType('Entity', (_message.Message,), dict( DESCRIPTOR = _ENTITYTYPE_ENTITY, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , __doc__ = """Optional. Represents an entity. @@ -792,7 +792,7 @@ )) , DESCRIPTOR = _ENTITYTYPE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , __doc__ = """Represents an entity type. Entity types serve as a tool for extracting parameter values from natural language queries. @@ -800,8 +800,10 @@ Attributes: name: - Required. The unique identifier of the entity type. Format: - ``projects//agent/entityTypes/``. + Required for all methods except ``create`` (``create`` + populates the name automatically. The unique identifier of the + entity type. Format: ``projects//agent/entityTypes/``. display_name: Required. The name of the entity. kind: @@ -820,9 +822,10 @@ ListEntityTypesRequest = _reflection.GeneratedProtocolMessageType('ListEntityTypesRequest', (_message.Message,), dict( DESCRIPTOR = _LISTENTITYTYPESREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , - __doc__ = """The request message for [EntityTypes.ListEntityTypes]. + __doc__ = """The request message for + [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes]. Attributes: @@ -849,9 +852,10 @@ ListEntityTypesResponse = _reflection.GeneratedProtocolMessageType('ListEntityTypesResponse', (_message.Message,), dict( DESCRIPTOR = _LISTENTITYTYPESRESPONSE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , - __doc__ = """The response message for [EntityTypes.ListEntityTypes]. + __doc__ = """The response message for + [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes]. Attributes: @@ -869,9 +873,10 @@ GetEntityTypeRequest = _reflection.GeneratedProtocolMessageType('GetEntityTypeRequest', (_message.Message,), dict( DESCRIPTOR = _GETENTITYTYPEREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , - __doc__ = """The request message for [EntityTypes.GetEntityType]. + __doc__ = """The request message for + [EntityTypes.GetEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType]. Attributes: @@ -892,9 +897,10 @@ CreateEntityTypeRequest = _reflection.GeneratedProtocolMessageType('CreateEntityTypeRequest', (_message.Message,), dict( DESCRIPTOR = _CREATEENTITYTYPEREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , - __doc__ = """The request message for [EntityTypes.CreateEntityType]. + __doc__ = """The request message for + [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.CreateEntityType]. Attributes: @@ -917,9 +923,10 @@ UpdateEntityTypeRequest = _reflection.GeneratedProtocolMessageType('UpdateEntityTypeRequest', (_message.Message,), dict( DESCRIPTOR = _UPDATEENTITYTYPEREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , - __doc__ = """The request message for [EntityTypes.UpdateEntityType]. + __doc__ = """The request message for + [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType]. Attributes: @@ -942,9 +949,10 @@ DeleteEntityTypeRequest = _reflection.GeneratedProtocolMessageType('DeleteEntityTypeRequest', (_message.Message,), dict( DESCRIPTOR = _DELETEENTITYTYPEREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , - __doc__ = """The request message for [EntityTypes.DeleteEntityType]. + __doc__ = """The request message for + [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.DeleteEntityType]. Attributes: @@ -958,9 +966,10 @@ BatchUpdateEntityTypesRequest = _reflection.GeneratedProtocolMessageType('BatchUpdateEntityTypesRequest', (_message.Message,), dict( DESCRIPTOR = _BATCHUPDATEENTITYTYPESREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , - __doc__ = """The request message for [EntityTypes.BatchUpdateEntityTypes]. + __doc__ = """The request message for + [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]. Attributes: @@ -973,10 +982,10 @@ update an existing entity type. \* If ``name`` is not specified, we create a new entity type. entity_type_batch_uri: - The URI to a file containing entity types to update or create. - The file format can be either a serialized proto (of - EntityBatch type) or a JSON object. Note: The URI must start - with "gs://". + 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://". entity_type_batch_inline: The collection of entity type to update or create. language_code: @@ -995,9 +1004,10 @@ BatchUpdateEntityTypesResponse = _reflection.GeneratedProtocolMessageType('BatchUpdateEntityTypesResponse', (_message.Message,), dict( DESCRIPTOR = _BATCHUPDATEENTITYTYPESRESPONSE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , - __doc__ = """The response message for [EntityTypes.BatchUpdateEntityTypes]. + __doc__ = """The response message for + [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]. Attributes: @@ -1010,9 +1020,10 @@ BatchDeleteEntityTypesRequest = _reflection.GeneratedProtocolMessageType('BatchDeleteEntityTypesRequest', (_message.Message,), dict( DESCRIPTOR = _BATCHDELETEENTITYTYPESREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , - __doc__ = """The request message for [EntityTypes.BatchDeleteEntityTypes]. + __doc__ = """The request message for + [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypes]. Attributes: @@ -1029,9 +1040,10 @@ BatchCreateEntitiesRequest = _reflection.GeneratedProtocolMessageType('BatchCreateEntitiesRequest', (_message.Message,), dict( DESCRIPTOR = _BATCHCREATEENTITIESREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , - __doc__ = """The request message for [EntityTypes.BatchCreateEntities]. + __doc__ = """The request message for + [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntities]. Attributes: @@ -1055,9 +1067,10 @@ BatchUpdateEntitiesRequest = _reflection.GeneratedProtocolMessageType('BatchUpdateEntitiesRequest', (_message.Message,), dict( DESCRIPTOR = _BATCHUPDATEENTITIESREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , - __doc__ = """The response message for [EntityTypes.BatchCreateEntities]. + __doc__ = """The response message for + [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntities]. Attributes: @@ -1084,9 +1097,10 @@ BatchDeleteEntitiesRequest = _reflection.GeneratedProtocolMessageType('BatchDeleteEntitiesRequest', (_message.Message,), dict( DESCRIPTOR = _BATCHDELETEENTITIESREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , - __doc__ = """The request message for [EntityTypes.BatchDeleteEntities]. + __doc__ = """The request message for + [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntities]. Attributes: @@ -1112,7 +1126,7 @@ EntityTypeBatch = _reflection.GeneratedProtocolMessageType('EntityTypeBatch', (_message.Message,), dict( DESCRIPTOR = _ENTITYTYPEBATCH, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.entity_type_pb2' , __doc__ = """This message is a wrapper around a collection of entity types. @@ -1128,483 +1142,109 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n#com.google.cloud.dialogflow.v2beta1B\017EntityTypeProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1')) -try: - # THESE ELEMENTS WILL BE DEPRECATED. - # Please use the generated *_pb2_grpc.py files instead. - import grpc - from grpc.beta import implementations as beta_implementations - from grpc.beta import interfaces as beta_interfaces - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities +_ENTITYTYPES = _descriptor.ServiceDescriptor( + name='EntityTypes', + full_name='google.cloud.dialogflow.v2beta1.EntityTypes', + file=DESCRIPTOR, + index=0, + options=None, + serialized_start=2293, + serialized_end=4208, + methods=[ + _descriptor.MethodDescriptor( + name='ListEntityTypes', + full_name='google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes', + index=0, + containing_service=None, + input_type=_LISTENTITYTYPESREQUEST, + output_type=_LISTENTITYTYPESRESPONSE, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\0020\022./v2beta1/{parent=projects/*/agent}/entityTypes')), + ), + _descriptor.MethodDescriptor( + name='GetEntityType', + full_name='google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType', + index=1, + containing_service=None, + input_type=_GETENTITYTYPEREQUEST, + output_type=_ENTITYTYPE, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\0020\022./v2beta1/{name=projects/*/agent/entityTypes/*}')), + ), + _descriptor.MethodDescriptor( + name='CreateEntityType', + full_name='google.cloud.dialogflow.v2beta1.EntityTypes.CreateEntityType', + index=2, + containing_service=None, + input_type=_CREATEENTITYTYPEREQUEST, + output_type=_ENTITYTYPE, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002=\"./v2beta1/{parent=projects/*/agent}/entityTypes:\013entity_type')), + ), + _descriptor.MethodDescriptor( + name='UpdateEntityType', + full_name='google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType', + index=3, + containing_service=None, + input_type=_UPDATEENTITYTYPEREQUEST, + output_type=_ENTITYTYPE, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002I2:/v2beta1/{entity_type.name=projects/*/agent/entityTypes/*}:\013entity_type')), + ), + _descriptor.MethodDescriptor( + name='DeleteEntityType', + full_name='google.cloud.dialogflow.v2beta1.EntityTypes.DeleteEntityType', + index=4, + containing_service=None, + input_type=_DELETEENTITYTYPEREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\0020*./v2beta1/{name=projects/*/agent/entityTypes/*}')), + ), + _descriptor.MethodDescriptor( + name='BatchUpdateEntityTypes', + full_name='google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes', + index=5, + containing_service=None, + input_type=_BATCHUPDATEENTITYTYPESREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002?\":/v2beta1/{parent=projects/*/agent}/entityTypes:batchUpdate:\001*')), + ), + _descriptor.MethodDescriptor( + name='BatchDeleteEntityTypes', + full_name='google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypes', + index=6, + containing_service=None, + input_type=_BATCHDELETEENTITYTYPESREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002?\":/v2beta1/{parent=projects/*/agent}/entityTypes:batchDelete:\001*')), + ), + _descriptor.MethodDescriptor( + name='BatchCreateEntities', + full_name='google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntities', + index=7, + containing_service=None, + input_type=_BATCHCREATEENTITIESREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002J\"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate:\001*')), + ), + _descriptor.MethodDescriptor( + name='BatchUpdateEntities', + full_name='google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntities', + index=8, + containing_service=None, + input_type=_BATCHUPDATEENTITIESREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002J\"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate:\001*')), + ), + _descriptor.MethodDescriptor( + name='BatchDeleteEntities', + full_name='google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntities', + index=9, + containing_service=None, + input_type=_BATCHDELETEENTITIESREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002J\"E/v2beta1/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete:\001*')), + ), +]) +_sym_db.RegisterServiceDescriptor(_ENTITYTYPES) + +DESCRIPTOR.services_by_name['EntityTypes'] = _ENTITYTYPES - class EntityTypesStub(object): - """Manages agent entity types. - - - Refer to [documentation](https://dialogflow.com/docs/entities) for more - # details about entity types. - - Standard methods. - """ - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.ListEntityTypes = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.EntityTypes/ListEntityTypes', - request_serializer=ListEntityTypesRequest.SerializeToString, - response_deserializer=ListEntityTypesResponse.FromString, - ) - self.GetEntityType = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.EntityTypes/GetEntityType', - request_serializer=GetEntityTypeRequest.SerializeToString, - response_deserializer=EntityType.FromString, - ) - self.CreateEntityType = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.EntityTypes/CreateEntityType', - request_serializer=CreateEntityTypeRequest.SerializeToString, - response_deserializer=EntityType.FromString, - ) - self.UpdateEntityType = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.EntityTypes/UpdateEntityType', - request_serializer=UpdateEntityTypeRequest.SerializeToString, - response_deserializer=EntityType.FromString, - ) - self.DeleteEntityType = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.EntityTypes/DeleteEntityType', - request_serializer=DeleteEntityTypeRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.BatchUpdateEntityTypes = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.EntityTypes/BatchUpdateEntityTypes', - request_serializer=BatchUpdateEntityTypesRequest.SerializeToString, - response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ) - self.BatchDeleteEntityTypes = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.EntityTypes/BatchDeleteEntityTypes', - request_serializer=BatchDeleteEntityTypesRequest.SerializeToString, - response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ) - self.BatchCreateEntities = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.EntityTypes/BatchCreateEntities', - request_serializer=BatchCreateEntitiesRequest.SerializeToString, - response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ) - self.BatchUpdateEntities = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.EntityTypes/BatchUpdateEntities', - request_serializer=BatchUpdateEntitiesRequest.SerializeToString, - response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ) - self.BatchDeleteEntities = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.EntityTypes/BatchDeleteEntities', - request_serializer=BatchDeleteEntitiesRequest.SerializeToString, - response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ) - - - class EntityTypesServicer(object): - """Manages agent entity types. - - - Refer to [documentation](https://dialogflow.com/docs/entities) for more - # details about entity types. - - Standard methods. - """ - - def ListEntityTypes(self, request, context): - """Returns the list of all entity types in the specified agent. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetEntityType(self, request, context): - """Retrieves the specified entity type. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def CreateEntityType(self, request, context): - """Creates an entity type in the specified agent. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def UpdateEntityType(self, request, context): - """Updates the specified entity type. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def DeleteEntityType(self, request, context): - """Deletes the specified entity type. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def BatchUpdateEntityTypes(self, request, context): - """Updates/Creates multiple entity types in the specified agent. - - Operation - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def BatchDeleteEntityTypes(self, request, context): - """Deletes entity types in the specified agent. - - Operation - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def BatchCreateEntities(self, request, context): - """Creates multiple new entities in the specified entity type (extends the - existing collection of entries). - - Operation - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def BatchUpdateEntities(self, request, context): - """Updates entities in the specified entity type (replaces the existing - collection of entries). - - Operation - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def BatchDeleteEntities(self, request, context): - """Deletes entities in the specified entity type. - - Operation - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - - def add_EntityTypesServicer_to_server(servicer, server): - rpc_method_handlers = { - 'ListEntityTypes': grpc.unary_unary_rpc_method_handler( - servicer.ListEntityTypes, - request_deserializer=ListEntityTypesRequest.FromString, - response_serializer=ListEntityTypesResponse.SerializeToString, - ), - 'GetEntityType': grpc.unary_unary_rpc_method_handler( - servicer.GetEntityType, - request_deserializer=GetEntityTypeRequest.FromString, - response_serializer=EntityType.SerializeToString, - ), - 'CreateEntityType': grpc.unary_unary_rpc_method_handler( - servicer.CreateEntityType, - request_deserializer=CreateEntityTypeRequest.FromString, - response_serializer=EntityType.SerializeToString, - ), - 'UpdateEntityType': grpc.unary_unary_rpc_method_handler( - servicer.UpdateEntityType, - request_deserializer=UpdateEntityTypeRequest.FromString, - response_serializer=EntityType.SerializeToString, - ), - 'DeleteEntityType': grpc.unary_unary_rpc_method_handler( - servicer.DeleteEntityType, - request_deserializer=DeleteEntityTypeRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'BatchUpdateEntityTypes': grpc.unary_unary_rpc_method_handler( - servicer.BatchUpdateEntityTypes, - request_deserializer=BatchUpdateEntityTypesRequest.FromString, - response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ), - 'BatchDeleteEntityTypes': grpc.unary_unary_rpc_method_handler( - servicer.BatchDeleteEntityTypes, - request_deserializer=BatchDeleteEntityTypesRequest.FromString, - response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ), - 'BatchCreateEntities': grpc.unary_unary_rpc_method_handler( - servicer.BatchCreateEntities, - request_deserializer=BatchCreateEntitiesRequest.FromString, - response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ), - 'BatchUpdateEntities': grpc.unary_unary_rpc_method_handler( - servicer.BatchUpdateEntities, - request_deserializer=BatchUpdateEntitiesRequest.FromString, - response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ), - 'BatchDeleteEntities': grpc.unary_unary_rpc_method_handler( - servicer.BatchDeleteEntities, - request_deserializer=BatchDeleteEntitiesRequest.FromString, - response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'google.cloud.dialogflow.v2beta1.EntityTypes', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - class BetaEntityTypesServicer(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - """Manages agent entity types. - - - Refer to [documentation](https://dialogflow.com/docs/entities) for more - # details about entity types. - - Standard methods. - """ - def ListEntityTypes(self, request, context): - """Returns the list of all entity types in the specified agent. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def GetEntityType(self, request, context): - """Retrieves the specified entity type. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def CreateEntityType(self, request, context): - """Creates an entity type in the specified agent. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def UpdateEntityType(self, request, context): - """Updates the specified entity type. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def DeleteEntityType(self, request, context): - """Deletes the specified entity type. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def BatchUpdateEntityTypes(self, request, context): - """Updates/Creates multiple entity types in the specified agent. - - Operation - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def BatchDeleteEntityTypes(self, request, context): - """Deletes entity types in the specified agent. - - Operation - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def BatchCreateEntities(self, request, context): - """Creates multiple new entities in the specified entity type (extends the - existing collection of entries). - - Operation - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def BatchUpdateEntities(self, request, context): - """Updates entities in the specified entity type (replaces the existing - collection of entries). - - Operation - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def BatchDeleteEntities(self, request, context): - """Deletes entities in the specified entity type. - - Operation - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - - - class BetaEntityTypesStub(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - """Manages agent entity types. - - - Refer to [documentation](https://dialogflow.com/docs/entities) for more - # details about entity types. - - Standard methods. - """ - def ListEntityTypes(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Returns the list of all entity types in the specified agent. - """ - raise NotImplementedError() - ListEntityTypes.future = None - def GetEntityType(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Retrieves the specified entity type. - """ - raise NotImplementedError() - GetEntityType.future = None - def CreateEntityType(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Creates an entity type in the specified agent. - """ - raise NotImplementedError() - CreateEntityType.future = None - def UpdateEntityType(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Updates the specified entity type. - """ - raise NotImplementedError() - UpdateEntityType.future = None - def DeleteEntityType(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Deletes the specified entity type. - """ - raise NotImplementedError() - DeleteEntityType.future = None - def BatchUpdateEntityTypes(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Updates/Creates multiple entity types in the specified agent. - - Operation - """ - raise NotImplementedError() - BatchUpdateEntityTypes.future = None - def BatchDeleteEntityTypes(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Deletes entity types in the specified agent. - - Operation - """ - raise NotImplementedError() - BatchDeleteEntityTypes.future = None - def BatchCreateEntities(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Creates multiple new entities in the specified entity type (extends the - existing collection of entries). - - Operation - """ - raise NotImplementedError() - BatchCreateEntities.future = None - def BatchUpdateEntities(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Updates entities in the specified entity type (replaces the existing - collection of entries). - - Operation - """ - raise NotImplementedError() - BatchUpdateEntities.future = None - def BatchDeleteEntities(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Deletes entities in the specified entity type. - - Operation - """ - raise NotImplementedError() - BatchDeleteEntities.future = None - - - def beta_create_EntityTypes_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_deserializers = { - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchCreateEntities'): BatchCreateEntitiesRequest.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchDeleteEntities'): BatchDeleteEntitiesRequest.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchDeleteEntityTypes'): BatchDeleteEntityTypesRequest.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchUpdateEntities'): BatchUpdateEntitiesRequest.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchUpdateEntityTypes'): BatchUpdateEntityTypesRequest.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'CreateEntityType'): CreateEntityTypeRequest.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'DeleteEntityType'): DeleteEntityTypeRequest.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'GetEntityType'): GetEntityTypeRequest.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'ListEntityTypes'): ListEntityTypesRequest.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'UpdateEntityType'): UpdateEntityTypeRequest.FromString, - } - response_serializers = { - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchCreateEntities'): google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchDeleteEntities'): google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchDeleteEntityTypes'): google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchUpdateEntities'): google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchUpdateEntityTypes'): google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'CreateEntityType'): EntityType.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'DeleteEntityType'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'GetEntityType'): EntityType.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'ListEntityTypes'): ListEntityTypesResponse.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'UpdateEntityType'): EntityType.SerializeToString, - } - method_implementations = { - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchCreateEntities'): face_utilities.unary_unary_inline(servicer.BatchCreateEntities), - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchDeleteEntities'): face_utilities.unary_unary_inline(servicer.BatchDeleteEntities), - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchDeleteEntityTypes'): face_utilities.unary_unary_inline(servicer.BatchDeleteEntityTypes), - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchUpdateEntities'): face_utilities.unary_unary_inline(servicer.BatchUpdateEntities), - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchUpdateEntityTypes'): face_utilities.unary_unary_inline(servicer.BatchUpdateEntityTypes), - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'CreateEntityType'): face_utilities.unary_unary_inline(servicer.CreateEntityType), - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'DeleteEntityType'): face_utilities.unary_unary_inline(servicer.DeleteEntityType), - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'GetEntityType'): face_utilities.unary_unary_inline(servicer.GetEntityType), - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'ListEntityTypes'): face_utilities.unary_unary_inline(servicer.ListEntityTypes), - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'UpdateEntityType'): face_utilities.unary_unary_inline(servicer.UpdateEntityType), - } - server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) - return beta_implementations.server(method_implementations, options=server_options) - - - def beta_create_EntityTypes_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_serializers = { - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchCreateEntities'): BatchCreateEntitiesRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchDeleteEntities'): BatchDeleteEntitiesRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchDeleteEntityTypes'): BatchDeleteEntityTypesRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchUpdateEntities'): BatchUpdateEntitiesRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchUpdateEntityTypes'): BatchUpdateEntityTypesRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'CreateEntityType'): CreateEntityTypeRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'DeleteEntityType'): DeleteEntityTypeRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'GetEntityType'): GetEntityTypeRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'ListEntityTypes'): ListEntityTypesRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'UpdateEntityType'): UpdateEntityTypeRequest.SerializeToString, - } - response_deserializers = { - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchCreateEntities'): google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchDeleteEntities'): google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchDeleteEntityTypes'): google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchUpdateEntities'): google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'BatchUpdateEntityTypes'): google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'CreateEntityType'): EntityType.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'DeleteEntityType'): google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'GetEntityType'): EntityType.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'ListEntityTypes'): ListEntityTypesResponse.FromString, - ('google.cloud.dialogflow.v2beta1.EntityTypes', 'UpdateEntityType'): EntityType.FromString, - } - cardinalities = { - 'BatchCreateEntities': cardinality.Cardinality.UNARY_UNARY, - 'BatchDeleteEntities': cardinality.Cardinality.UNARY_UNARY, - 'BatchDeleteEntityTypes': cardinality.Cardinality.UNARY_UNARY, - 'BatchUpdateEntities': cardinality.Cardinality.UNARY_UNARY, - 'BatchUpdateEntityTypes': cardinality.Cardinality.UNARY_UNARY, - 'CreateEntityType': cardinality.Cardinality.UNARY_UNARY, - 'DeleteEntityType': cardinality.Cardinality.UNARY_UNARY, - 'GetEntityType': cardinality.Cardinality.UNARY_UNARY, - 'ListEntityTypes': cardinality.Cardinality.UNARY_UNARY, - 'UpdateEntityType': cardinality.Cardinality.UNARY_UNARY, - } - stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) - return beta_implementations.dynamic_stub(channel, 'google.cloud.dialogflow.v2beta1.EntityTypes', cardinalities, options=stub_options) -except ImportError: - pass # @@protoc_insertion_point(module_scope) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/entity_type_pb2_grpc.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/entity_type_pb2_grpc.py index 2477d47e52f9..f7e4c300dcbc 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/entity_type_pb2_grpc.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/entity_type_pb2_grpc.py @@ -7,13 +7,33 @@ class EntityTypesStub(object): - """Manages agent entity types. + """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. - Refer to [documentation](https://dialogflow.com/docs/entities) for more - # details about entity types. + There are three types of entities: - Standard methods. + * **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://dialogflow.com/docs/entities). """ def __init__(self, channel): @@ -75,13 +95,33 @@ def __init__(self, channel): class EntityTypesServicer(object): - """Manages agent entity types. + """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. - Refer to [documentation](https://dialogflow.com/docs/entities) for more - # details about entity types. + * **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. - Standard methods. + For more information about entity types, see the + [Dialogflow documentation](https://dialogflow.com/docs/entities). """ def ListEntityTypes(self, request, context): @@ -122,8 +162,8 @@ def DeleteEntityType(self, request, context): def BatchUpdateEntityTypes(self, request, context): """Updates/Creates multiple entity types in the specified agent. - Operation + Operation """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -132,8 +172,8 @@ def BatchUpdateEntityTypes(self, request, context): def BatchDeleteEntityTypes(self, request, context): """Deletes entity types in the specified agent. - Operation + Operation """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -143,7 +183,7 @@ def BatchCreateEntities(self, request, context): """Creates multiple new entities in the specified entity type (extends the existing collection of entries). - Operation + Operation """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -153,8 +193,8 @@ def BatchUpdateEntities(self, request, context): """Updates entities in the specified entity type (replaces the existing collection of entries). - Operation + Operation """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -163,8 +203,8 @@ def BatchUpdateEntities(self, request, context): def BatchDeleteEntities(self, request, context): """Deletes entities in the specified entity type. - Operation + Operation """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/intent_pb2.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/intent_pb2.py index d18873115fed..72d354dc41e1 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/intent_pb2.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/intent_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/intent.proto @@ -26,7 +27,7 @@ name='google/cloud/dialogflow_v2beta1/proto/intent.proto', package='google.cloud.dialogflow.v2beta1', syntax='proto3', - serialized_pb=_b('\n2google/cloud/dialogflow_v2beta1/proto/intent.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x33google/cloud/dialogflow_v2beta1/proto/context.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xf6!\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\x12\n\nml_enabled\x18\x05 \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\xd9\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\"7\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45XAMPLE\x10\x01\x12\x0c\n\x08TEMPLATE\x10\x02\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\xf1\x15\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\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\x1a\n\x05Image\x12\x11\n\timage_uri\x18\x01 \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\"\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\"\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') + serialized_pb=_b('\n2google/cloud/dialogflow_v2beta1/proto/intent.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x33google/cloud/dialogflow_v2beta1/proto/context.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xa7\"\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\x12\n\nml_enabled\x18\x05 \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\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\xd9\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\"7\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45XAMPLE\x10\x01\x12\x0c\n\x08TEMPLATE\x10\x02\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\x8d\x16\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\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\"\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\"\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') , dependencies=[google_dot_api_dot_annotations__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_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) @@ -47,8 +48,8 @@ ], containing_type=None, options=None, - serialized_start=6052, - serialized_end=6115, + serialized_start=6101, + serialized_end=6164, ) _sym_db.RegisterEnumDescriptor(_INTENTVIEW) @@ -78,8 +79,8 @@ ], containing_type=None, options=None, - serialized_start=1402, - serialized_end=1457, + serialized_start=1423, + serialized_end=1478, ) _sym_db.RegisterEnumDescriptor(_INTENT_TRAININGPHRASE_TYPE) @@ -128,8 +129,8 @@ ], containing_type=None, options=None, - serialized_start=4286, - serialized_end=4425, + serialized_start=4335, + serialized_end=4474, ) _sym_db.RegisterEnumDescriptor(_INTENT_MESSAGE_PLATFORM) @@ -154,8 +155,8 @@ ], containing_type=None, options=None, - serialized_start=4527, - serialized_end=4643, + serialized_start=4576, + serialized_end=4692, ) _sym_db.RegisterEnumDescriptor(_INTENT_WEBHOOKSTATE) @@ -173,28 +174,28 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='entity_type', full_name='google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.entity_type', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='alias', full_name='google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.alias', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='user_defined', full_name='google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.user_defined', index=3, number=4, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -207,8 +208,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1322, - serialized_end=1400, + serialized_start=1343, + serialized_end=1421, ) _INTENT_TRAININGPHRASE = _descriptor.Descriptor( @@ -224,28 +225,28 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='type', full_name='google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.type', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='parts', full_name='google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.parts', index=2, number=3, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='times_added_count', full_name='google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.times_added_count', index=3, number=4, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -259,8 +260,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1112, - serialized_end=1457, + serialized_start=1133, + serialized_end=1478, ) _INTENT_PARAMETER = _descriptor.Descriptor( @@ -276,56 +277,56 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='display_name', full_name='google.cloud.dialogflow.v2beta1.Intent.Parameter.display_name', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='google.cloud.dialogflow.v2beta1.Intent.Parameter.value', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='default_value', full_name='google.cloud.dialogflow.v2beta1.Intent.Parameter.default_value', index=3, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='entity_type_display_name', full_name='google.cloud.dialogflow.v2beta1.Intent.Parameter.entity_type_display_name', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='mandatory', full_name='google.cloud.dialogflow.v2beta1.Intent.Parameter.mandatory', index=5, number=6, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='prompts', full_name='google.cloud.dialogflow.v2beta1.Intent.Parameter.prompts', index=6, number=7, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='is_list', full_name='google.cloud.dialogflow.v2beta1.Intent.Parameter.is_list', index=7, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -338,8 +339,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1460, - serialized_end=1632, + serialized_start=1481, + serialized_end=1653, ) _INTENT_MESSAGE_TEXT = _descriptor.Descriptor( @@ -355,7 +356,7 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -368,8 +369,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2595, - serialized_end=2615, + serialized_start=2616, + serialized_end=2636, ) _INTENT_MESSAGE_IMAGE = _descriptor.Descriptor( @@ -385,7 +386,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='accessibility_text', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.Image.accessibility_text', 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, + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -398,8 +406,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2617, - serialized_end=2643, + serialized_start=2638, + serialized_end=2692, ) _INTENT_MESSAGE_QUICKREPLIES = _descriptor.Descriptor( @@ -415,14 +423,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='quick_replies', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.QuickReplies.quick_replies', index=1, number=2, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -435,8 +443,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2645, - serialized_end=2697, + serialized_start=2694, + serialized_end=2746, ) _INTENT_MESSAGE_CARD_BUTTON = _descriptor.Descriptor( @@ -452,14 +460,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='postback', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.Card.Button.postback', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -472,8 +480,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2838, - serialized_end=2878, + serialized_start=2887, + serialized_end=2927, ) _INTENT_MESSAGE_CARD = _descriptor.Descriptor( @@ -489,28 +497,28 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='subtitle', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.Card.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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='image_uri', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.Card.image_uri', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='buttons', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.Card.buttons', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -523,8 +531,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2700, - serialized_end=2878, + serialized_start=2749, + serialized_end=2927, ) _INTENT_MESSAGE_SIMPLERESPONSE = _descriptor.Descriptor( @@ -540,21 +548,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='ssml', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.ssml', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='display_text', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.SimpleResponse.display_text', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -567,8 +575,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2880, - serialized_end=2956, + serialized_start=2929, + serialized_end=3005, ) _INTENT_MESSAGE_SIMPLERESPONSES = _descriptor.Descriptor( @@ -584,7 +592,7 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -597,8 +605,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2958, - serialized_end=3065, + serialized_start=3007, + serialized_end=3114, ) _INTENT_MESSAGE_BASICCARD_BUTTON_OPENURIACTION = _descriptor.Descriptor( @@ -614,7 +622,7 @@ 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -627,8 +635,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3422, - serialized_end=3450, + serialized_start=3471, + serialized_end=3499, ) _INTENT_MESSAGE_BASICCARD_BUTTON = _descriptor.Descriptor( @@ -644,14 +652,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='open_uri_action', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.Button.open_uri_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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -664,8 +672,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3292, - serialized_end=3450, + serialized_start=3341, + serialized_end=3499, ) _INTENT_MESSAGE_BASICCARD = _descriptor.Descriptor( @@ -681,35 +689,35 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='subtitle', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='formatted_text', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.formatted_text', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='image', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='buttons', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.BasicCard.buttons', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -722,8 +730,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3068, - serialized_end=3450, + serialized_start=3117, + serialized_end=3499, ) _INTENT_MESSAGE_SUGGESTION = _descriptor.Descriptor( @@ -739,7 +747,7 @@ 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -752,8 +760,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3452, - serialized_end=3479, + serialized_start=3501, + serialized_end=3528, ) _INTENT_MESSAGE_SUGGESTIONS = _descriptor.Descriptor( @@ -769,7 +777,7 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -782,8 +790,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3481, - serialized_end=3575, + serialized_start=3530, + serialized_end=3624, ) _INTENT_MESSAGE_LINKOUTSUGGESTION = _descriptor.Descriptor( @@ -799,14 +807,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='uri', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.LinkOutSuggestion.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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -819,8 +827,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3577, - serialized_end=3635, + serialized_start=3626, + serialized_end=3684, ) _INTENT_MESSAGE_LISTSELECT_ITEM = _descriptor.Descriptor( @@ -836,28 +844,28 @@ has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='title', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='description', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='image', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.Item.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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -870,8 +878,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3748, - serialized_end=3938, + serialized_start=3797, + serialized_end=3987, ) _INTENT_MESSAGE_LISTSELECT = _descriptor.Descriptor( @@ -887,14 +895,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='items', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.ListSelect.items', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -907,8 +915,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3638, - serialized_end=3938, + serialized_start=3687, + serialized_end=3987, ) _INTENT_MESSAGE_CAROUSELSELECT_ITEM = _descriptor.Descriptor( @@ -924,28 +932,28 @@ has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='title', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='description', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='image', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.CarouselSelect.Item.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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -958,8 +966,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3748, - serialized_end=3938, + serialized_start=3797, + serialized_end=3987, ) _INTENT_MESSAGE_CAROUSELSELECT = _descriptor.Descriptor( @@ -975,7 +983,7 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -988,8 +996,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3941, - serialized_end=4234, + serialized_start=3990, + serialized_end=4283, ) _INTENT_MESSAGE_SELECTITEMINFO = _descriptor.Descriptor( @@ -1005,14 +1013,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='synonyms', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.SelectItemInfo.synonyms', index=1, number=2, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1025,8 +1033,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4236, - serialized_end=4283, + serialized_start=4285, + serialized_end=4332, ) _INTENT_MESSAGE = _descriptor.Descriptor( @@ -1042,84 +1050,84 @@ has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + 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, - options=None), + 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, - options=None), + 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, - options=None), + 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, - options=None), + 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='basic_card', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.basic_card', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='suggestions', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.suggestions', index=7, number=9, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='link_out_suggestion', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.link_out_suggestion', index=8, number=10, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='list_select', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.list_select', index=9, number=11, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='carousel_select', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.carousel_select', index=10, number=12, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='platform', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.platform', index=11, number=6, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1136,8 +1144,8 @@ name='message', full_name='google.cloud.dialogflow.v2beta1.Intent.Message.message', index=0, containing_type=None, fields=[]), ], - serialized_start=1635, - serialized_end=4436, + serialized_start=1656, + serialized_end=4485, ) _INTENT_FOLLOWUPINTENTINFO = _descriptor.Descriptor( @@ -1153,14 +1161,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='parent_followup_intent_name', full_name='google.cloud.dialogflow.v2beta1.Intent.FollowupIntentInfo.parent_followup_intent_name', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1173,8 +1181,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4438, - serialized_end=4525, + serialized_start=4487, + serialized_end=4574, ) _INTENT = _descriptor.Descriptor( @@ -1190,126 +1198,133 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='display_name', full_name='google.cloud.dialogflow.v2beta1.Intent.display_name', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='webhook_state', full_name='google.cloud.dialogflow.v2beta1.Intent.webhook_state', index=2, number=6, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='priority', full_name='google.cloud.dialogflow.v2beta1.Intent.priority', index=3, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='is_fallback', full_name='google.cloud.dialogflow.v2beta1.Intent.is_fallback', index=4, number=4, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='ml_enabled', full_name='google.cloud.dialogflow.v2beta1.Intent.ml_enabled', index=5, number=5, 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, - options=None), + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='ml_disabled', full_name='google.cloud.dialogflow.v2beta1.Intent.ml_disabled', index=6, + number=19, 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, + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='input_context_names', full_name='google.cloud.dialogflow.v2beta1.Intent.input_context_names', index=6, + name='input_context_names', full_name='google.cloud.dialogflow.v2beta1.Intent.input_context_names', index=7, number=7, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='events', full_name='google.cloud.dialogflow.v2beta1.Intent.events', index=7, + name='events', full_name='google.cloud.dialogflow.v2beta1.Intent.events', index=8, number=8, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='training_phrases', full_name='google.cloud.dialogflow.v2beta1.Intent.training_phrases', index=8, + name='training_phrases', full_name='google.cloud.dialogflow.v2beta1.Intent.training_phrases', index=9, number=9, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='action', full_name='google.cloud.dialogflow.v2beta1.Intent.action', index=9, + name='action', full_name='google.cloud.dialogflow.v2beta1.Intent.action', index=10, number=10, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='output_contexts', full_name='google.cloud.dialogflow.v2beta1.Intent.output_contexts', index=10, + name='output_contexts', full_name='google.cloud.dialogflow.v2beta1.Intent.output_contexts', index=11, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='reset_contexts', full_name='google.cloud.dialogflow.v2beta1.Intent.reset_contexts', index=11, + name='reset_contexts', full_name='google.cloud.dialogflow.v2beta1.Intent.reset_contexts', index=12, number=12, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='parameters', full_name='google.cloud.dialogflow.v2beta1.Intent.parameters', index=12, + name='parameters', full_name='google.cloud.dialogflow.v2beta1.Intent.parameters', index=13, number=13, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='messages', full_name='google.cloud.dialogflow.v2beta1.Intent.messages', index=13, + name='messages', full_name='google.cloud.dialogflow.v2beta1.Intent.messages', index=14, number=14, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='default_response_platforms', full_name='google.cloud.dialogflow.v2beta1.Intent.default_response_platforms', index=14, + name='default_response_platforms', full_name='google.cloud.dialogflow.v2beta1.Intent.default_response_platforms', index=15, number=15, type=14, cpp_type=8, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='root_followup_intent_name', full_name='google.cloud.dialogflow.v2beta1.Intent.root_followup_intent_name', index=15, + name='root_followup_intent_name', full_name='google.cloud.dialogflow.v2beta1.Intent.root_followup_intent_name', index=16, number=16, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='parent_followup_intent_name', full_name='google.cloud.dialogflow.v2beta1.Intent.parent_followup_intent_name', index=16, + name='parent_followup_intent_name', full_name='google.cloud.dialogflow.v2beta1.Intent.parent_followup_intent_name', index=17, number=17, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='followup_intent_info', full_name='google.cloud.dialogflow.v2beta1.Intent.followup_intent_info', index=17, + name='followup_intent_info', full_name='google.cloud.dialogflow.v2beta1.Intent.followup_intent_info', index=18, number=18, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1324,7 +1339,7 @@ oneofs=[ ], serialized_start=301, - serialized_end=4643, + serialized_end=4692, ) @@ -1341,35 +1356,35 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.ListIntentsRequest.language_code', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='intent_view', full_name='google.cloud.dialogflow.v2beta1.ListIntentsRequest.intent_view', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='page_size', full_name='google.cloud.dialogflow.v2beta1.ListIntentsRequest.page_size', index=3, number=4, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='page_token', full_name='google.cloud.dialogflow.v2beta1.ListIntentsRequest.page_token', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1382,8 +1397,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4646, - serialized_end=4810, + serialized_start=4695, + serialized_end=4859, ) @@ -1400,14 +1415,14 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='next_page_token', full_name='google.cloud.dialogflow.v2beta1.ListIntentsResponse.next_page_token', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1420,8 +1435,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4812, - serialized_end=4916, + serialized_start=4861, + serialized_end=4965, ) @@ -1438,21 +1453,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.GetIntentRequest.language_code', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='intent_view', full_name='google.cloud.dialogflow.v2beta1.GetIntentRequest.intent_view', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1465,8 +1480,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4918, - serialized_end=5039, + serialized_start=4967, + serialized_end=5088, ) @@ -1483,28 +1498,28 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='intent', full_name='google.cloud.dialogflow.v2beta1.CreateIntentRequest.intent', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.CreateIntentRequest.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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='intent_view', full_name='google.cloud.dialogflow.v2beta1.CreateIntentRequest.intent_view', index=3, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1517,8 +1532,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5042, - serialized_end=5225, + serialized_start=5091, + serialized_end=5274, ) @@ -1535,28 +1550,28 @@ has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.UpdateIntentRequest.language_code', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_mask', full_name='google.cloud.dialogflow.v2beta1.UpdateIntentRequest.update_mask', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='intent_view', full_name='google.cloud.dialogflow.v2beta1.UpdateIntentRequest.intent_view', index=3, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1569,8 +1584,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5228, - serialized_end=5444, + serialized_start=5277, + serialized_end=5493, ) @@ -1587,7 +1602,7 @@ 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1600,8 +1615,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5446, - serialized_end=5481, + serialized_start=5495, + serialized_end=5530, ) @@ -1618,42 +1633,42 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='intent_batch_uri', full_name='google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.intent_batch_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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='intent_batch_inline', full_name='google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.intent_batch_inline', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.language_code', index=3, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_mask', full_name='google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.update_mask', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='intent_view', full_name='google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.intent_view', index=5, number=6, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1669,8 +1684,8 @@ name='intent_batch', full_name='google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest.intent_batch', index=0, containing_type=None, fields=[]), ], - serialized_start=5484, - serialized_end=5786, + serialized_start=5533, + serialized_end=5835, ) @@ -1687,7 +1702,7 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1700,8 +1715,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5788, - serialized_end=5874, + serialized_start=5837, + serialized_end=5923, ) @@ -1718,14 +1733,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='intents', full_name='google.cloud.dialogflow.v2beta1.BatchDeleteIntentsRequest.intents', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1738,8 +1753,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5876, - serialized_end=5977, + serialized_start=5925, + serialized_end=6026, ) @@ -1756,7 +1771,7 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -1769,8 +1784,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5979, - serialized_end=6050, + serialized_start=6028, + serialized_end=6099, ) _INTENT_TRAININGPHRASE_PART.containing_type = _INTENT_TRAININGPHRASE @@ -1905,7 +1920,7 @@ Part = _reflection.GeneratedProtocolMessageType('Part', (_message.Message,), dict( DESCRIPTOR = _INTENT_TRAININGPHRASE_PART, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """Represents a part of a training phrase. @@ -1930,7 +1945,7 @@ )) , DESCRIPTOR = _INTENT_TRAININGPHRASE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """Represents an example or template that the agent is trained on. @@ -1957,7 +1972,7 @@ Parameter = _reflection.GeneratedProtocolMessageType('Parameter', (_message.Message,), dict( DESCRIPTOR = _INTENT_PARAMETER, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """Represents intent parameters. @@ -2001,7 +2016,7 @@ Text = _reflection.GeneratedProtocolMessageType('Text', (_message.Message,), dict( DESCRIPTOR = _INTENT_MESSAGE_TEXT, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """The text response message. @@ -2016,7 +2031,7 @@ Image = _reflection.GeneratedProtocolMessageType('Image', (_message.Message,), dict( DESCRIPTOR = _INTENT_MESSAGE_IMAGE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """The image response message. @@ -2024,6 +2039,9 @@ Attributes: image_uri: Optional. The public URI to an image file. + accessibility_text: + Optional. A text description of the image to be used for + accessibility, e.g., screen readers. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Intent.Message.Image) )) @@ -2031,7 +2049,7 @@ QuickReplies = _reflection.GeneratedProtocolMessageType('QuickReplies', (_message.Message,), dict( DESCRIPTOR = _INTENT_MESSAGE_QUICKREPLIES, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """The quick replies response message. @@ -2050,7 +2068,7 @@ Button = _reflection.GeneratedProtocolMessageType('Button', (_message.Message,), dict( DESCRIPTOR = _INTENT_MESSAGE_CARD_BUTTON, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """Optional. Contains information about a button. @@ -2066,7 +2084,7 @@ )) , DESCRIPTOR = _INTENT_MESSAGE_CARD, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """The card response message. @@ -2087,7 +2105,7 @@ SimpleResponse = _reflection.GeneratedProtocolMessageType('SimpleResponse', (_message.Message,), dict( DESCRIPTOR = _INTENT_MESSAGE_SIMPLERESPONSE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """The simple response message containing speech or text. @@ -2109,9 +2127,12 @@ SimpleResponses = _reflection.GeneratedProtocolMessageType('SimpleResponses', (_message.Message,), dict( DESCRIPTOR = _INTENT_MESSAGE_SIMPLERESPONSES, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , - __doc__ = """The collection of simple response candidates. + __doc__ = """The collection of simple response candidates. This message in + ``QueryResult.fulfillment_messages`` and + ``WebhookResponse.fulfillment_messages`` should contain only one + ``SimpleResponse``. Attributes: @@ -2128,7 +2149,7 @@ OpenUriAction = _reflection.GeneratedProtocolMessageType('OpenUriAction', (_message.Message,), dict( DESCRIPTOR = _INTENT_MESSAGE_BASICCARD_BUTTON_OPENURIACTION, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """Opens the given URI. @@ -2141,7 +2162,7 @@ )) , DESCRIPTOR = _INTENT_MESSAGE_BASICCARD_BUTTON, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """The button object that appears at the bottom of a card. @@ -2156,7 +2177,7 @@ )) , DESCRIPTOR = _INTENT_MESSAGE_BASICCARD, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """The basic card message. Useful for displaying information. @@ -2179,7 +2200,7 @@ Suggestion = _reflection.GeneratedProtocolMessageType('Suggestion', (_message.Message,), dict( DESCRIPTOR = _INTENT_MESSAGE_SUGGESTION, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """The suggestion chip message that the user can tap to quickly post a reply to the conversation. @@ -2195,7 +2216,7 @@ Suggestions = _reflection.GeneratedProtocolMessageType('Suggestions', (_message.Message,), dict( DESCRIPTOR = _INTENT_MESSAGE_SUGGESTIONS, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """The collection of suggestions. @@ -2210,7 +2231,7 @@ LinkOutSuggestion = _reflection.GeneratedProtocolMessageType('LinkOutSuggestion', (_message.Message,), dict( DESCRIPTOR = _INTENT_MESSAGE_LINKOUTSUGGESTION, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """The suggestion chip message that allows the user to jump out to the app or website associated with this agent. @@ -2231,7 +2252,7 @@ Item = _reflection.GeneratedProtocolMessageType('Item', (_message.Message,), dict( DESCRIPTOR = _INTENT_MESSAGE_LISTSELECT_ITEM, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """An item in the list. @@ -2250,7 +2271,7 @@ )) , DESCRIPTOR = _INTENT_MESSAGE_LISTSELECT, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """The card for presenting a list of options to select from. @@ -2269,7 +2290,7 @@ Item = _reflection.GeneratedProtocolMessageType('Item', (_message.Message,), dict( DESCRIPTOR = _INTENT_MESSAGE_CAROUSELSELECT_ITEM, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """An item in the carousel. @@ -2288,7 +2309,7 @@ )) , DESCRIPTOR = _INTENT_MESSAGE_CAROUSELSELECT, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """The card for presenting a carousel of options to select from. @@ -2303,7 +2324,7 @@ SelectItemInfo = _reflection.GeneratedProtocolMessageType('SelectItemInfo', (_message.Message,), dict( DESCRIPTOR = _INTENT_MESSAGE_SELECTITEMINFO, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """Additional info about the select item for when it is triggered in a dialog. @@ -2321,36 +2342,39 @@ )) , DESCRIPTOR = _INTENT_MESSAGE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , - __doc__ = """Corresponds to the ``Response`` field in API.AI console. + __doc__ = """Corresponds to the ``Response`` field in the Dialogflow console. Attributes: message: Required. The rich response message. text: - The text response. + Returns a text response. image: - The image response. + Displays an image. quick_replies: - The quick replies response. + Displays quick replies. card: - The card response. + Displays a card. payload: - The response containing a custom payload. + Returns a response containing a custom, platform-specific + payload. See the Intent.Message.Platform type for a + description of the structure that may be required for your + platform. simple_responses: - The voice and text-only responses for Actions on Google. + Returns a voice or text-only response for Actions on Google. basic_card: - The basic card response for Actions on Google. + Displays a basic card for Actions on Google. suggestions: - The suggestion chips for Actions on Google. + Displays suggestion chips for Actions on Google. link_out_suggestion: - The link out suggestion chip for Actions on Google. + Displays a link out suggestion chip for Actions on Google. list_select: - The list card response for Actions on Google. + Displays a list card for Actions on Google. carousel_select: - The carousel card response for Actions on Google. + Displays a carousel card for Actions on Google. platform: Optional. The platform that this message is intended for. """, @@ -2360,7 +2384,7 @@ FollowupIntentInfo = _reflection.GeneratedProtocolMessageType('FollowupIntentInfo', (_message.Message,), dict( DESCRIPTOR = _INTENT_FOLLOWUPINTENTINFO, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """Represents a single followup intent in the chain. @@ -2377,7 +2401,7 @@ )) , DESCRIPTOR = _INTENT, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """Represents an intent. Intents convert a number of user expressions or patterns into an action. An action is an extraction of a user command or @@ -2386,8 +2410,10 @@ Attributes: name: - Required. The unique identifier of this intent. Format: - ``projects//agent/intents/``. + Required for all methods except ``create`` (``create`` + populates the name automatically. The unique identifier of + this intent. Format: ``projects//agent/intents/``. display_name: Required. The name of this intent. webhook_state: @@ -2401,10 +2427,25 @@ Optional. Indicates whether this is a fallback intent. ml_enabled: Optional. Indicates whether Machine Learning is enabled for - the intent. + 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 neither ``ml_enabled`` nor ``ml_disabled`` field is + set, 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. + ml_disabled: + 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. input_context_names: Optional. The list of context names required for this intent - to be triggered. + to be triggered. Format: ``projects//agent/sessions/-/contexts/``. events: Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all @@ -2430,7 +2471,7 @@ intent. messages: Optional. The collection of rich messages corresponding to the - ``Response`` field in API.AI console. + ``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 @@ -2477,9 +2518,10 @@ ListIntentsRequest = _reflection.GeneratedProtocolMessageType('ListIntentsRequest', (_message.Message,), dict( DESCRIPTOR = _LISTINTENTSREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , - __doc__ = """The request message for [Intents.ListIntents]. + __doc__ = """The request message for + [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents]. Attributes: @@ -2508,9 +2550,10 @@ ListIntentsResponse = _reflection.GeneratedProtocolMessageType('ListIntentsResponse', (_message.Message,), dict( DESCRIPTOR = _LISTINTENTSRESPONSE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , - __doc__ = """The response message for [Intents.ListIntents]. + __doc__ = """The response message for + [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents]. Attributes: @@ -2527,9 +2570,10 @@ GetIntentRequest = _reflection.GeneratedProtocolMessageType('GetIntentRequest', (_message.Message,), dict( DESCRIPTOR = _GETINTENTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , - __doc__ = """The request message for [Intents.GetIntent]. + __doc__ = """The request message for + [Intents.GetIntent][google.cloud.dialogflow.v2beta1.Intents.GetIntent]. Attributes: @@ -2552,9 +2596,10 @@ CreateIntentRequest = _reflection.GeneratedProtocolMessageType('CreateIntentRequest', (_message.Message,), dict( DESCRIPTOR = _CREATEINTENTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , - __doc__ = """The request message for [Intents.CreateIntent]. + __doc__ = """The request message for + [Intents.CreateIntent][google.cloud.dialogflow.v2beta1.Intents.CreateIntent]. Attributes: @@ -2579,9 +2624,10 @@ UpdateIntentRequest = _reflection.GeneratedProtocolMessageType('UpdateIntentRequest', (_message.Message,), dict( DESCRIPTOR = _UPDATEINTENTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , - __doc__ = """The request message for [Intents.UpdateIntent]. + __doc__ = """The request message for + [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent]. Attributes: @@ -2606,9 +2652,10 @@ DeleteIntentRequest = _reflection.GeneratedProtocolMessageType('DeleteIntentRequest', (_message.Message,), dict( DESCRIPTOR = _DELETEINTENTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , - __doc__ = """The request message for [Intents.DeleteIntent]. + __doc__ = """The request message for + [Intents.DeleteIntent][google.cloud.dialogflow.v2beta1.Intents.DeleteIntent]. Attributes: @@ -2622,9 +2669,10 @@ BatchUpdateIntentsRequest = _reflection.GeneratedProtocolMessageType('BatchUpdateIntentsRequest', (_message.Message,), dict( DESCRIPTOR = _BATCHUPDATEINTENTSREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , - __doc__ = """The request message for [Intents.BatchUpdateIntents]. + __doc__ = """The request message for + [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents]. Attributes: @@ -2634,9 +2682,10 @@ intent_batch: Required. The source of the intent batch. intent_batch_uri: - The URI to a file containing intents to update or create. The - file format can be either a serialized proto (of IntentBatch - type) or JSON object. Note: The URI must start with "gs://". + 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://". intent_batch_inline: The collection of intents to update or create. language_code: @@ -2657,9 +2706,10 @@ BatchUpdateIntentsResponse = _reflection.GeneratedProtocolMessageType('BatchUpdateIntentsResponse', (_message.Message,), dict( DESCRIPTOR = _BATCHUPDATEINTENTSRESPONSE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , - __doc__ = """The response message for [Intents.BatchUpdateIntents]. + __doc__ = """The response message for + [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents]. Attributes: @@ -2672,9 +2722,10 @@ BatchDeleteIntentsRequest = _reflection.GeneratedProtocolMessageType('BatchDeleteIntentsRequest', (_message.Message,), dict( DESCRIPTOR = _BATCHDELETEINTENTSREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , - __doc__ = """The request message for [Intents.BatchDeleteIntents]. + __doc__ = """The request message for + [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntents]. Attributes: @@ -2691,7 +2742,7 @@ IntentBatch = _reflection.GeneratedProtocolMessageType('IntentBatch', (_message.Message,), dict( DESCRIPTOR = _INTENTBATCH, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.intent_pb2' + __module__ = 'dialogflow_v2beta1.proto.intent_pb2' , __doc__ = """This message is a wrapper around a collection of intents. @@ -2707,351 +2758,82 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n#com.google.cloud.dialogflow.v2beta1B\013IntentProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1')) -try: - # THESE ELEMENTS WILL BE DEPRECATED. - # Please use the generated *_pb2_grpc.py files instead. - import grpc - from grpc.beta import implementations as beta_implementations - from grpc.beta import interfaces as beta_interfaces - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities - - - class IntentsStub(object): - """Manages agent intents. - - - Refer to [documentation](https://dialogflow.com/docs/intents) for more - # details about agent intents. - - Standard methods. - """ - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.ListIntents = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Intents/ListIntents', - request_serializer=ListIntentsRequest.SerializeToString, - response_deserializer=ListIntentsResponse.FromString, - ) - self.GetIntent = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Intents/GetIntent', - request_serializer=GetIntentRequest.SerializeToString, - response_deserializer=Intent.FromString, - ) - self.CreateIntent = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Intents/CreateIntent', - request_serializer=CreateIntentRequest.SerializeToString, - response_deserializer=Intent.FromString, - ) - self.UpdateIntent = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Intents/UpdateIntent', - request_serializer=UpdateIntentRequest.SerializeToString, - response_deserializer=Intent.FromString, - ) - self.DeleteIntent = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Intents/DeleteIntent', - request_serializer=DeleteIntentRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.BatchUpdateIntents = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Intents/BatchUpdateIntents', - request_serializer=BatchUpdateIntentsRequest.SerializeToString, - response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ) - self.BatchDeleteIntents = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Intents/BatchDeleteIntents', - request_serializer=BatchDeleteIntentsRequest.SerializeToString, - response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ) - - - class IntentsServicer(object): - """Manages agent intents. - - - Refer to [documentation](https://dialogflow.com/docs/intents) for more - # details about agent intents. - - Standard methods. - """ - - def ListIntents(self, request, context): - """Returns the list of all intents in the specified agent. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetIntent(self, request, context): - """Retrieves the specified intent. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def CreateIntent(self, request, context): - """Creates an intent in the specified agent. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def UpdateIntent(self, request, context): - """Updates the specified intent. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def DeleteIntent(self, request, context): - """Deletes the specified intent. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def BatchUpdateIntents(self, request, context): - """Updates/Creates multiple intents in the specified agent. - - Operation - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def BatchDeleteIntents(self, request, context): - """Deletes intents in the specified agent. - - Operation - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - - def add_IntentsServicer_to_server(servicer, server): - rpc_method_handlers = { - 'ListIntents': grpc.unary_unary_rpc_method_handler( - servicer.ListIntents, - request_deserializer=ListIntentsRequest.FromString, - response_serializer=ListIntentsResponse.SerializeToString, - ), - 'GetIntent': grpc.unary_unary_rpc_method_handler( - servicer.GetIntent, - request_deserializer=GetIntentRequest.FromString, - response_serializer=Intent.SerializeToString, - ), - 'CreateIntent': grpc.unary_unary_rpc_method_handler( - servicer.CreateIntent, - request_deserializer=CreateIntentRequest.FromString, - response_serializer=Intent.SerializeToString, - ), - 'UpdateIntent': grpc.unary_unary_rpc_method_handler( - servicer.UpdateIntent, - request_deserializer=UpdateIntentRequest.FromString, - response_serializer=Intent.SerializeToString, - ), - 'DeleteIntent': grpc.unary_unary_rpc_method_handler( - servicer.DeleteIntent, - request_deserializer=DeleteIntentRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'BatchUpdateIntents': grpc.unary_unary_rpc_method_handler( - servicer.BatchUpdateIntents, - request_deserializer=BatchUpdateIntentsRequest.FromString, - response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ), - 'BatchDeleteIntents': grpc.unary_unary_rpc_method_handler( - servicer.BatchDeleteIntents, - request_deserializer=BatchDeleteIntentsRequest.FromString, - response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'google.cloud.dialogflow.v2beta1.Intents', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - class BetaIntentsServicer(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - """Manages agent intents. - - - Refer to [documentation](https://dialogflow.com/docs/intents) for more - # details about agent intents. - - Standard methods. - """ - def ListIntents(self, request, context): - """Returns the list of all intents in the specified agent. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def GetIntent(self, request, context): - """Retrieves the specified intent. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def CreateIntent(self, request, context): - """Creates an intent in the specified agent. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def UpdateIntent(self, request, context): - """Updates the specified intent. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def DeleteIntent(self, request, context): - """Deletes the specified intent. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def BatchUpdateIntents(self, request, context): - """Updates/Creates multiple intents in the specified agent. - - Operation - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def BatchDeleteIntents(self, request, context): - """Deletes intents in the specified agent. - - Operation - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - - - class BetaIntentsStub(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - """Manages agent intents. - - - Refer to [documentation](https://dialogflow.com/docs/intents) for more - # details about agent intents. - - Standard methods. - """ - def ListIntents(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Returns the list of all intents in the specified agent. - """ - raise NotImplementedError() - ListIntents.future = None - def GetIntent(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Retrieves the specified intent. - """ - raise NotImplementedError() - GetIntent.future = None - def CreateIntent(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Creates an intent in the specified agent. - """ - raise NotImplementedError() - CreateIntent.future = None - def UpdateIntent(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Updates the specified intent. - """ - raise NotImplementedError() - UpdateIntent.future = None - def DeleteIntent(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Deletes the specified intent. - """ - raise NotImplementedError() - DeleteIntent.future = None - def BatchUpdateIntents(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Updates/Creates multiple intents in the specified agent. - - Operation - """ - raise NotImplementedError() - BatchUpdateIntents.future = None - def BatchDeleteIntents(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Deletes intents in the specified agent. - - Operation - """ - raise NotImplementedError() - BatchDeleteIntents.future = None - - - def beta_create_Intents_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_deserializers = { - ('google.cloud.dialogflow.v2beta1.Intents', 'BatchDeleteIntents'): BatchDeleteIntentsRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Intents', 'BatchUpdateIntents'): BatchUpdateIntentsRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Intents', 'CreateIntent'): CreateIntentRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Intents', 'DeleteIntent'): DeleteIntentRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Intents', 'GetIntent'): GetIntentRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Intents', 'ListIntents'): ListIntentsRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Intents', 'UpdateIntent'): UpdateIntentRequest.FromString, - } - response_serializers = { - ('google.cloud.dialogflow.v2beta1.Intents', 'BatchDeleteIntents'): google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Intents', 'BatchUpdateIntents'): google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Intents', 'CreateIntent'): Intent.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Intents', 'DeleteIntent'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Intents', 'GetIntent'): Intent.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Intents', 'ListIntents'): ListIntentsResponse.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Intents', 'UpdateIntent'): Intent.SerializeToString, - } - method_implementations = { - ('google.cloud.dialogflow.v2beta1.Intents', 'BatchDeleteIntents'): face_utilities.unary_unary_inline(servicer.BatchDeleteIntents), - ('google.cloud.dialogflow.v2beta1.Intents', 'BatchUpdateIntents'): face_utilities.unary_unary_inline(servicer.BatchUpdateIntents), - ('google.cloud.dialogflow.v2beta1.Intents', 'CreateIntent'): face_utilities.unary_unary_inline(servicer.CreateIntent), - ('google.cloud.dialogflow.v2beta1.Intents', 'DeleteIntent'): face_utilities.unary_unary_inline(servicer.DeleteIntent), - ('google.cloud.dialogflow.v2beta1.Intents', 'GetIntent'): face_utilities.unary_unary_inline(servicer.GetIntent), - ('google.cloud.dialogflow.v2beta1.Intents', 'ListIntents'): face_utilities.unary_unary_inline(servicer.ListIntents), - ('google.cloud.dialogflow.v2beta1.Intents', 'UpdateIntent'): face_utilities.unary_unary_inline(servicer.UpdateIntent), - } - server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) - return beta_implementations.server(method_implementations, options=server_options) - - - def beta_create_Intents_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_serializers = { - ('google.cloud.dialogflow.v2beta1.Intents', 'BatchDeleteIntents'): BatchDeleteIntentsRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Intents', 'BatchUpdateIntents'): BatchUpdateIntentsRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Intents', 'CreateIntent'): CreateIntentRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Intents', 'DeleteIntent'): DeleteIntentRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Intents', 'GetIntent'): GetIntentRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Intents', 'ListIntents'): ListIntentsRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Intents', 'UpdateIntent'): UpdateIntentRequest.SerializeToString, - } - response_deserializers = { - ('google.cloud.dialogflow.v2beta1.Intents', 'BatchDeleteIntents'): google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ('google.cloud.dialogflow.v2beta1.Intents', 'BatchUpdateIntents'): google_dot_longrunning_dot_operations__pb2.Operation.FromString, - ('google.cloud.dialogflow.v2beta1.Intents', 'CreateIntent'): Intent.FromString, - ('google.cloud.dialogflow.v2beta1.Intents', 'DeleteIntent'): google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ('google.cloud.dialogflow.v2beta1.Intents', 'GetIntent'): Intent.FromString, - ('google.cloud.dialogflow.v2beta1.Intents', 'ListIntents'): ListIntentsResponse.FromString, - ('google.cloud.dialogflow.v2beta1.Intents', 'UpdateIntent'): Intent.FromString, - } - cardinalities = { - 'BatchDeleteIntents': cardinality.Cardinality.UNARY_UNARY, - 'BatchUpdateIntents': cardinality.Cardinality.UNARY_UNARY, - 'CreateIntent': cardinality.Cardinality.UNARY_UNARY, - 'DeleteIntent': cardinality.Cardinality.UNARY_UNARY, - 'GetIntent': cardinality.Cardinality.UNARY_UNARY, - 'ListIntents': cardinality.Cardinality.UNARY_UNARY, - 'UpdateIntent': cardinality.Cardinality.UNARY_UNARY, - } - stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) - return beta_implementations.dynamic_stub(channel, 'google.cloud.dialogflow.v2beta1.Intents', cardinalities, options=stub_options) -except ImportError: - pass + +_INTENTS = _descriptor.ServiceDescriptor( + name='Intents', + full_name='google.cloud.dialogflow.v2beta1.Intents', + file=DESCRIPTOR, + index=0, + options=None, + serialized_start=6167, + serialized_end=7369, + methods=[ + _descriptor.MethodDescriptor( + name='ListIntents', + full_name='google.cloud.dialogflow.v2beta1.Intents.ListIntents', + index=0, + containing_service=None, + input_type=_LISTINTENTSREQUEST, + output_type=_LISTINTENTSRESPONSE, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002,\022*/v2beta1/{parent=projects/*/agent}/intents')), + ), + _descriptor.MethodDescriptor( + name='GetIntent', + full_name='google.cloud.dialogflow.v2beta1.Intents.GetIntent', + index=1, + containing_service=None, + input_type=_GETINTENTREQUEST, + output_type=_INTENT, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002,\022*/v2beta1/{name=projects/*/agent/intents/*}')), + ), + _descriptor.MethodDescriptor( + name='CreateIntent', + full_name='google.cloud.dialogflow.v2beta1.Intents.CreateIntent', + index=2, + containing_service=None, + input_type=_CREATEINTENTREQUEST, + output_type=_INTENT, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\0024\"*/v2beta1/{parent=projects/*/agent}/intents:\006intent')), + ), + _descriptor.MethodDescriptor( + name='UpdateIntent', + full_name='google.cloud.dialogflow.v2beta1.Intents.UpdateIntent', + index=3, + containing_service=None, + input_type=_UPDATEINTENTREQUEST, + output_type=_INTENT, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002;21/v2beta1/{intent.name=projects/*/agent/intents/*}:\006intent')), + ), + _descriptor.MethodDescriptor( + name='DeleteIntent', + full_name='google.cloud.dialogflow.v2beta1.Intents.DeleteIntent', + index=4, + containing_service=None, + input_type=_DELETEINTENTREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002,**/v2beta1/{name=projects/*/agent/intents/*}')), + ), + _descriptor.MethodDescriptor( + name='BatchUpdateIntents', + full_name='google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents', + index=5, + containing_service=None, + input_type=_BATCHUPDATEINTENTSREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002;\"6/v2beta1/{parent=projects/*/agent}/intents:batchUpdate:\001*')), + ), + _descriptor.MethodDescriptor( + name='BatchDeleteIntents', + full_name='google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntents', + index=6, + containing_service=None, + input_type=_BATCHDELETEINTENTSREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002;\"6/v2beta1/{parent=projects/*/agent}/intents:batchDelete:\001*')), + ), +]) +_sym_db.RegisterServiceDescriptor(_INTENTS) + +DESCRIPTOR.services_by_name['Intents'] = _INTENTS + # @@protoc_insertion_point(module_scope) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/intent_pb2_grpc.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/intent_pb2_grpc.py index 0723bb21fa74..7d6f00d457f3 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/intent_pb2_grpc.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/intent_pb2_grpc.py @@ -1,3 +1,4 @@ +# -*- coding: utf8 -*- # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc @@ -7,13 +8,37 @@ class IntentsStub(object): - """Manages agent intents. - - - Refer to [documentation](https://dialogflow.com/docs/intents) for more - # details about agent intents. - - Standard methods. + """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://dialogflow.com/docs/intents). """ def __init__(self, channel): @@ -60,13 +85,37 @@ def __init__(self, channel): class IntentsServicer(object): - """Manages agent intents. - - - Refer to [documentation](https://dialogflow.com/docs/intents) for more - # details about agent intents. - - Standard methods. + """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://dialogflow.com/docs/intents). """ def ListIntents(self, request, context): @@ -107,7 +156,7 @@ def DeleteIntent(self, request, context): def BatchUpdateIntents(self, request, context): """Updates/Creates multiple intents in the specified agent. - Operation + Operation """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -116,7 +165,7 @@ def BatchUpdateIntents(self, request, context): def BatchDeleteIntents(self, request, context): """Deletes intents in the specified agent. - Operation + Operation """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_entity_type_pb2.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_entity_type_pb2.py index e804a3a848f8..12d6297ac498 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_entity_type_pb2.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_entity_type_pb2.py @@ -23,7 +23,7 @@ name='google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto', package='google.cloud.dialogflow.v2beta1', syntax='proto3', - serialized_pb=_b('\n?google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x37google/cloud/dialogflow_v2beta1/proto/entity_type.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\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\xdf\x08\n\x12SessionEntityTypes\x12\xdc\x01\n\x16ListSessionEntityTypes\x12>.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest\x1a?.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse\"A\x82\xd3\xe4\x93\x02;\x12\x39/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes\x12\xcb\x01\n\x14GetSessionEntityType\x12<.google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest\x1a\x32.google.cloud.dialogflow.v2beta1.SessionEntityType\"A\x82\xd3\xe4\x93\x02;\x12\x39/v2beta1/{name=projects/*/agent/sessions/*/entityTypes/*}\x12\xe6\x01\n\x17\x43reateSessionEntityType\x12?.google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest\x1a\x32.google.cloud.dialogflow.v2beta1.SessionEntityType\"V\x82\xd3\xe4\x93\x02P\"9/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypes:\x13session_entity_type\x12\xfa\x01\n\x17UpdateSessionEntityType\x12?.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest\x1a\x32.google.cloud.dialogflow.v2beta1.SessionEntityType\"j\x82\xd3\xe4\x93\x02\x64\x32M/v2beta1/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}:\x13session_entity_type\x12\xb5\x01\n\x17\x44\x65leteSessionEntityType\x12?.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest\x1a\x16.google.protobuf.Empty\"A\x82\xd3\xe4\x93\x02;*9/v2beta1/{name=projects/*/agent/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') + serialized_pb=_b('\n?google/cloud/dialogflow_v2beta1/proto/session_entity_type.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x37google/cloud/dialogflow_v2beta1/proto/entity_type.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\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') , dependencies=[google_dot_api_dot_annotations__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,]) @@ -69,21 +69,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='entity_override_mode', full_name='google.cloud.dialogflow.v2beta1.SessionEntityType.entity_override_mode', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='entities', full_name='google.cloud.dialogflow.v2beta1.SessionEntityType.entities', index=2, number=3, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -115,21 +115,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='page_size', full_name='google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest.page_size', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='page_token', full_name='google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest.page_token', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -160,14 +160,14 @@ has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='next_page_token', full_name='google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse.next_page_token', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -198,7 +198,7 @@ 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -229,14 +229,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='session_entity_type', full_name='google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest.session_entity_type', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -267,14 +267,14 @@ has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_mask', full_name='google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest.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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -305,7 +305,7 @@ 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -340,7 +340,7 @@ SessionEntityType = _reflection.GeneratedProtocolMessageType('SessionEntityType', (_message.Message,), dict( DESCRIPTOR = _SESSIONENTITYTYPE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_entity_type_pb2' , __doc__ = """Represents a session entity type. @@ -356,7 +356,13 @@ name: Required. The unique identifier of this session entity type. Format: ``projects//agent/sessions//entityTypes/``. + ID>/entityTypes/``, or + ``projects//agent/environments//users//sessions //entityTypes/``. Note: Environments and users are under + construction and will be available soon. If is not specified, + we assume default 'draft' environment. If is not specified, we + assume default '-' user. entity_override_mode: Required. Indicates whether the additional data should override or supplement the developer entity type definition. @@ -370,15 +376,21 @@ ListSessionEntityTypesRequest = _reflection.GeneratedProtocolMessageType('ListSessionEntityTypesRequest', (_message.Message,), dict( DESCRIPTOR = _LISTSESSIONENTITYTYPESREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_entity_type_pb2' , - __doc__ = """The request message for [SessionEntityTypes.ListSessionEntityTypes]. + __doc__ = """The request message for + [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes]. Attributes: parent: Required. The session to list all session entity types from. - Format: ``projects//agent/sessions/``. + Format: ``projects//agent/sessions/`` + or ``projects//agent/environments//users// sessions/``. Note: + Environments and users are under construction and will be + available soon. If is not specified, we assume default 'draft' + environment. If is not specified, we assume default '-' user. page_size: Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. @@ -392,9 +404,10 @@ ListSessionEntityTypesResponse = _reflection.GeneratedProtocolMessageType('ListSessionEntityTypesResponse', (_message.Message,), dict( DESCRIPTOR = _LISTSESSIONENTITYTYPESRESPONSE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_entity_type_pb2' , - __doc__ = """The response message for [SessionEntityTypes.ListSessionEntityTypes]. + __doc__ = """The response message for + [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes]. Attributes: @@ -412,16 +425,23 @@ GetSessionEntityTypeRequest = _reflection.GeneratedProtocolMessageType('GetSessionEntityTypeRequest', (_message.Message,), dict( DESCRIPTOR = _GETSESSIONENTITYTYPEREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_entity_type_pb2' , - __doc__ = """The request message for [SessionEntityTypes.GetSessionEntityType]. + __doc__ = """The request message for + [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityType]. Attributes: name: Required. The name of the session entity type. Format: ``projects//agent/sessions//entityTypes/``. + ID>/entityTypes/`` or + ``projects//agent/environments//users//sessions// entityTypes/``. Note: Environments and users re under + construction and will be available soon. If is not specified, + we assume default 'draft' environment. If is not specified, we + assume default '-' user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest) )) @@ -429,15 +449,21 @@ CreateSessionEntityTypeRequest = _reflection.GeneratedProtocolMessageType('CreateSessionEntityTypeRequest', (_message.Message,), dict( DESCRIPTOR = _CREATESESSIONENTITYTYPEREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_entity_type_pb2' , - __doc__ = """The request message for [SessionEntityTypes.CreateSessionEntityType]. + __doc__ = """The request message for + [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityType]. Attributes: parent: Required. The session to create a session entity type for. - Format: ``projects//agent/sessions/``. + Format: ``projects//agent/sessions/`` + or ``projects//agent/environments//users// sessions/``. Note: + Environments and users are under construction and will be + available soon. If is not specified, we assume default 'draft' + environment. If is not specified, we assume default '-' user. session_entity_type: Required. The session entity type to create. """, @@ -447,16 +473,23 @@ UpdateSessionEntityTypeRequest = _reflection.GeneratedProtocolMessageType('UpdateSessionEntityTypeRequest', (_message.Message,), dict( DESCRIPTOR = _UPDATESESSIONENTITYTYPEREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_entity_type_pb2' , - __doc__ = """The request message for [SessionEntityTypes.UpdateSessionEntityType]. + __doc__ = """The request message for + [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType]. Attributes: session_entity_type: Required. The entity type to update. Format: ``projects//agent/sessions//entityTypes/``. + ID>/entityTypes/`` or + ``projects//agent/environments//users//sessions//entityTypes/``. Note: Environments and users are under + construction and will be available soon. If is not specified, + we assume default 'draft' environment. If is not specified, we + assume default '-' user. update_mask: Optional. The mask to control which fields get updated. """, @@ -466,16 +499,23 @@ DeleteSessionEntityTypeRequest = _reflection.GeneratedProtocolMessageType('DeleteSessionEntityTypeRequest', (_message.Message,), dict( DESCRIPTOR = _DELETESESSIONENTITYTYPEREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_entity_type_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_entity_type_pb2' , - __doc__ = """The request message for [SessionEntityTypes.DeleteSessionEntityType]. + __doc__ = """The request message for + [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityType]. Attributes: name: Required. The name of the entity type to delete. Format: ``projects//agent/sessions//entityTypes/``. + ID>/entityTypes/`` or + ``projects//agent/environments//users//sessions//entityTypes/``. Note: Environments and users are under + construction and will be available soon. If is not specified, + we assume default 'draft' environment. If is not specified, we + assume default '-' user. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest) )) @@ -484,275 +524,64 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n#com.google.cloud.dialogflow.v2beta1B\026SessionEntityTypeProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1')) -try: - # THESE ELEMENTS WILL BE DEPRECATED. - # Please use the generated *_pb2_grpc.py files instead. - import grpc - from grpc.beta import implementations as beta_implementations - from grpc.beta import interfaces as beta_interfaces - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities - - - class SessionEntityTypesStub(object): - """Manages session entity types. - - Session entity types can be redefined on a session level, allowing for - specific concepts, like a user's playlists. - - - Standard methods. - """ - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.ListSessionEntityTypes = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.SessionEntityTypes/ListSessionEntityTypes', - request_serializer=ListSessionEntityTypesRequest.SerializeToString, - response_deserializer=ListSessionEntityTypesResponse.FromString, - ) - self.GetSessionEntityType = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.SessionEntityTypes/GetSessionEntityType', - request_serializer=GetSessionEntityTypeRequest.SerializeToString, - response_deserializer=SessionEntityType.FromString, - ) - self.CreateSessionEntityType = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.SessionEntityTypes/CreateSessionEntityType', - request_serializer=CreateSessionEntityTypeRequest.SerializeToString, - response_deserializer=SessionEntityType.FromString, - ) - self.UpdateSessionEntityType = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.SessionEntityTypes/UpdateSessionEntityType', - request_serializer=UpdateSessionEntityTypeRequest.SerializeToString, - response_deserializer=SessionEntityType.FromString, - ) - self.DeleteSessionEntityType = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.SessionEntityTypes/DeleteSessionEntityType', - request_serializer=DeleteSessionEntityTypeRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - - - class SessionEntityTypesServicer(object): - """Manages session entity types. - - Session entity types can be redefined on a session level, allowing for - specific concepts, like a user's playlists. - - - Standard methods. - """ - - def ListSessionEntityTypes(self, request, context): - """Returns the list of all session entity types in the specified session. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetSessionEntityType(self, request, context): - """Retrieves the specified session entity type. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def CreateSessionEntityType(self, request, context): - """Creates a session entity type. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def UpdateSessionEntityType(self, request, context): - """Updates the specified session entity type. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def DeleteSessionEntityType(self, request, context): - """Deletes the specified session entity type. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - - def add_SessionEntityTypesServicer_to_server(servicer, server): - rpc_method_handlers = { - 'ListSessionEntityTypes': grpc.unary_unary_rpc_method_handler( - servicer.ListSessionEntityTypes, - request_deserializer=ListSessionEntityTypesRequest.FromString, - response_serializer=ListSessionEntityTypesResponse.SerializeToString, - ), - 'GetSessionEntityType': grpc.unary_unary_rpc_method_handler( - servicer.GetSessionEntityType, - request_deserializer=GetSessionEntityTypeRequest.FromString, - response_serializer=SessionEntityType.SerializeToString, - ), - 'CreateSessionEntityType': grpc.unary_unary_rpc_method_handler( - servicer.CreateSessionEntityType, - request_deserializer=CreateSessionEntityTypeRequest.FromString, - response_serializer=SessionEntityType.SerializeToString, - ), - 'UpdateSessionEntityType': grpc.unary_unary_rpc_method_handler( - servicer.UpdateSessionEntityType, - request_deserializer=UpdateSessionEntityTypeRequest.FromString, - response_serializer=SessionEntityType.SerializeToString, - ), - 'DeleteSessionEntityType': grpc.unary_unary_rpc_method_handler( - servicer.DeleteSessionEntityType, - request_deserializer=DeleteSessionEntityTypeRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'google.cloud.dialogflow.v2beta1.SessionEntityTypes', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - class BetaSessionEntityTypesServicer(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - """Manages session entity types. - - Session entity types can be redefined on a session level, allowing for - specific concepts, like a user's playlists. - - - Standard methods. - """ - def ListSessionEntityTypes(self, request, context): - """Returns the list of all session entity types in the specified session. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def GetSessionEntityType(self, request, context): - """Retrieves the specified session entity type. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def CreateSessionEntityType(self, request, context): - """Creates a session entity type. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def UpdateSessionEntityType(self, request, context): - """Updates the specified session entity type. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def DeleteSessionEntityType(self, request, context): - """Deletes the specified session entity type. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - - - class BetaSessionEntityTypesStub(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - """Manages session entity types. - - Session entity types can be redefined on a session level, allowing for - specific concepts, like a user's playlists. - - - Standard methods. - """ - def ListSessionEntityTypes(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Returns the list of all session entity types in the specified session. - """ - raise NotImplementedError() - ListSessionEntityTypes.future = None - def GetSessionEntityType(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Retrieves the specified session entity type. - """ - raise NotImplementedError() - GetSessionEntityType.future = None - def CreateSessionEntityType(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Creates a session entity type. - """ - raise NotImplementedError() - CreateSessionEntityType.future = None - def UpdateSessionEntityType(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Updates the specified session entity type. - """ - raise NotImplementedError() - UpdateSessionEntityType.future = None - def DeleteSessionEntityType(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """Deletes the specified session entity type. - """ - raise NotImplementedError() - DeleteSessionEntityType.future = None - - - def beta_create_SessionEntityTypes_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_deserializers = { - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'CreateSessionEntityType'): CreateSessionEntityTypeRequest.FromString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'DeleteSessionEntityType'): DeleteSessionEntityTypeRequest.FromString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'GetSessionEntityType'): GetSessionEntityTypeRequest.FromString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'ListSessionEntityTypes'): ListSessionEntityTypesRequest.FromString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'UpdateSessionEntityType'): UpdateSessionEntityTypeRequest.FromString, - } - response_serializers = { - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'CreateSessionEntityType'): SessionEntityType.SerializeToString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'DeleteSessionEntityType'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'GetSessionEntityType'): SessionEntityType.SerializeToString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'ListSessionEntityTypes'): ListSessionEntityTypesResponse.SerializeToString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'UpdateSessionEntityType'): SessionEntityType.SerializeToString, - } - method_implementations = { - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'CreateSessionEntityType'): face_utilities.unary_unary_inline(servicer.CreateSessionEntityType), - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'DeleteSessionEntityType'): face_utilities.unary_unary_inline(servicer.DeleteSessionEntityType), - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'GetSessionEntityType'): face_utilities.unary_unary_inline(servicer.GetSessionEntityType), - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'ListSessionEntityTypes'): face_utilities.unary_unary_inline(servicer.ListSessionEntityTypes), - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'UpdateSessionEntityType'): face_utilities.unary_unary_inline(servicer.UpdateSessionEntityType), - } - server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) - return beta_implementations.server(method_implementations, options=server_options) - - - def beta_create_SessionEntityTypes_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_serializers = { - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'CreateSessionEntityType'): CreateSessionEntityTypeRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'DeleteSessionEntityType'): DeleteSessionEntityTypeRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'GetSessionEntityType'): GetSessionEntityTypeRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'ListSessionEntityTypes'): ListSessionEntityTypesRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'UpdateSessionEntityType'): UpdateSessionEntityTypeRequest.SerializeToString, - } - response_deserializers = { - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'CreateSessionEntityType'): SessionEntityType.FromString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'DeleteSessionEntityType'): google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'GetSessionEntityType'): SessionEntityType.FromString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'ListSessionEntityTypes'): ListSessionEntityTypesResponse.FromString, - ('google.cloud.dialogflow.v2beta1.SessionEntityTypes', 'UpdateSessionEntityType'): SessionEntityType.FromString, - } - cardinalities = { - 'CreateSessionEntityType': cardinality.Cardinality.UNARY_UNARY, - 'DeleteSessionEntityType': cardinality.Cardinality.UNARY_UNARY, - 'GetSessionEntityType': cardinality.Cardinality.UNARY_UNARY, - 'ListSessionEntityTypes': cardinality.Cardinality.UNARY_UNARY, - 'UpdateSessionEntityType': cardinality.Cardinality.UNARY_UNARY, - } - stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) - return beta_implementations.dynamic_stub(channel, 'google.cloud.dialogflow.v2beta1.SessionEntityTypes', cardinalities, options=stub_options) -except ImportError: - pass + +_SESSIONENTITYTYPES = _descriptor.ServiceDescriptor( + name='SessionEntityTypes', + full_name='google.cloud.dialogflow.v2beta1.SessionEntityTypes', + file=DESCRIPTOR, + index=0, + options=None, + serialized_start=1211, + serialized_end=2822, + methods=[ + _descriptor.MethodDescriptor( + name='ListSessionEntityTypes', + full_name='google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes', + index=0, + containing_service=None, + input_type=_LISTSESSIONENTITYTYPESREQUEST, + output_type=_LISTSESSIONENTITYTYPESRESPONSE, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _b('\202\323\344\223\002\217\001\0229/v2beta1/{parent=projects/*/agent/sessions/*}/entityTypesZR\022P/v2beta1/{parent=projects/*/agent/environments/*/users/*/sessions/*}/entityTypes')), + ), + _descriptor.MethodDescriptor( + name='GetSessionEntityType', + full_name='google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityType', + index=1, + containing_service=None, + input_type=_GETSESSIONENTITYTYPEREQUEST, + output_type=_SESSIONENTITYTYPE, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _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/*}')), + ), + _descriptor.MethodDescriptor( + name='CreateSessionEntityType', + full_name='google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityType', + index=2, + containing_service=None, + input_type=_CREATESESSIONENTITYTYPEREQUEST, + output_type=_SESSIONENTITYTYPE, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _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')), + ), + _descriptor.MethodDescriptor( + name='UpdateSessionEntityType', + full_name='google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType', + index=3, + containing_service=None, + input_type=_UPDATESESSIONENTITYTYPEREQUEST, + output_type=_SESSIONENTITYTYPE, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _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')), + ), + _descriptor.MethodDescriptor( + name='DeleteSessionEntityType', + full_name='google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityType', + index=4, + containing_service=None, + input_type=_DELETESESSIONENTITYTYPEREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _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/*}')), + ), +]) +_sym_db.RegisterServiceDescriptor(_SESSIONENTITYTYPES) + +DESCRIPTOR.services_by_name['SessionEntityTypes'] = _SESSIONENTITYTYPES + # @@protoc_insertion_point(module_scope) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py index 84936ad426bc..b2b2ea0f1d3c 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py @@ -6,13 +6,18 @@ class SessionEntityTypesStub(object): - """Manages session entity types. - - Session entity types can be redefined on a session level, allowing for - specific concepts, like a user's playlists. - - - Standard methods. + """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://dialogflow.com/docs/entities). """ def __init__(self, channel): @@ -49,13 +54,18 @@ def __init__(self, channel): class SessionEntityTypesServicer(object): - """Manages session entity types. - - Session entity types can be redefined on a session level, allowing for - specific concepts, like a user's playlists. - - - Standard methods. + """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://dialogflow.com/docs/entities). """ def ListSessionEntityTypes(self, request, context): diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_pb2.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_pb2.py index 97a25437864f..f49247d9f111 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_pb2.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_pb2.py @@ -1,4 +1,4 @@ -# coding: utf8 +# -*- coding: utf8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dialogflow_v2beta1/proto/session.proto @@ -28,7 +28,7 @@ name='google/cloud/dialogflow_v2beta1/proto/session.proto', package='google.cloud.dialogflow.v2beta1', syntax='proto3', - serialized_pb=_b('\n3google/cloud/dialogflow_v2beta1/proto/session.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.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\"\xc5\x01\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\x12\x13\n\x0binput_audio\x18\x05 \x01(\x0c\"\x9b\x01\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\x12*\n\x0ewebhook_status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\"\x9f\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:\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\"\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\"\xc7\x04\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\"\xe8\x01\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\x12\x13\n\x0binput_audio\x18\x06 \x01(\x0c\"\xfd\x01\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\x12*\n\x0ewebhook_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\xfb\x01\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\"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\"\xa2\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\"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*\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\xed\x02\n\x08Sessions\x12\xc3\x01\n\x0c\x44\x65tectIntent\x12\x34.google.cloud.dialogflow.v2beta1.DetectIntentRequest\x1a\x35.google.cloud.dialogflow.v2beta1.DetectIntentResponse\"F\x82\xd3\xe4\x93\x02@\";/v2beta1/{session=projects/*/agent/sessions/*}:detectIntent:\x01*\x12\x9a\x01\n\x15StreamingDetectIntent\x12=.google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest\x1a>.google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse(\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') + serialized_pb=_b('\n3google/cloud/dialogflow_v2beta1/proto/session.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.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\"\xc5\x01\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\x12\x13\n\x0binput_audio\x18\x05 \x01(\x0c\"\x9b\x01\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\x12*\n\x0ewebhook_status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\"\x9f\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:\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\"\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\"\xc7\x04\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\"\xe8\x01\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\x12\x13\n\x0binput_audio\x18\x06 \x01(\x0c\"\xfd\x01\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\x12*\n\x0ewebhook_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\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\"\xa2\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\"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*\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\xc8\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\x9a\x01\n\x15StreamingDetectIntent\x12=.google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest\x1a>.google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse(\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') , dependencies=[google_dot_api_dot_annotations__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_struct__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,google_dot_type_dot_latlng__pb2.DESCRIPTOR,]) @@ -73,8 +73,8 @@ ], containing_type=None, options=None, - serialized_start=2881, - serialized_end=3132, + serialized_start=2901, + serialized_end=3152, ) _sym_db.RegisterEnumDescriptor(_AUDIOENCODING) @@ -110,8 +110,8 @@ ], containing_type=None, options=None, - serialized_start=2479, - serialized_end=2567, + serialized_start=2499, + serialized_end=2587, ) _sym_db.RegisterEnumDescriptor(_STREAMINGRECOGNITIONRESULT_MESSAGETYPE) @@ -129,28 +129,28 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='query_params', full_name='google.cloud.dialogflow.v2beta1.DetectIntentRequest.query_params', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='query_input', full_name='google.cloud.dialogflow.v2beta1.DetectIntentRequest.query_input', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='input_audio', full_name='google.cloud.dialogflow.v2beta1.DetectIntentRequest.input_audio', index=3, number=5, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -181,21 +181,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='query_result', full_name='google.cloud.dialogflow.v2beta1.DetectIntentResponse.query_result', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='webhook_status', full_name='google.cloud.dialogflow.v2beta1.DetectIntentResponse.webhook_status', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -226,42 +226,42 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='geo_location', full_name='google.cloud.dialogflow.v2beta1.QueryParameters.geo_location', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='contexts', full_name='google.cloud.dialogflow.v2beta1.QueryParameters.contexts', index=2, number=3, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='reset_contexts', full_name='google.cloud.dialogflow.v2beta1.QueryParameters.reset_contexts', index=3, number=4, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='session_entity_types', full_name='google.cloud.dialogflow.v2beta1.QueryParameters.session_entity_types', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='payload', full_name='google.cloud.dialogflow.v2beta1.QueryParameters.payload', index=5, number=6, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -292,21 +292,21 @@ has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='text', full_name='google.cloud.dialogflow.v2beta1.QueryInput.text', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='event', full_name='google.cloud.dialogflow.v2beta1.QueryInput.event', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -340,98 +340,98 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.QueryResult.language_code', index=1, number=15, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='speech_recognition_confidence', full_name='google.cloud.dialogflow.v2beta1.QueryResult.speech_recognition_confidence', index=2, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='action', full_name='google.cloud.dialogflow.v2beta1.QueryResult.action', index=3, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='parameters', full_name='google.cloud.dialogflow.v2beta1.QueryResult.parameters', index=4, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='all_required_params_present', full_name='google.cloud.dialogflow.v2beta1.QueryResult.all_required_params_present', index=5, number=5, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='fulfillment_text', full_name='google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text', index=6, number=6, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='fulfillment_messages', full_name='google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages', index=7, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='webhook_source', full_name='google.cloud.dialogflow.v2beta1.QueryResult.webhook_source', index=8, number=8, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='webhook_payload', full_name='google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload', index=9, number=9, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='output_contexts', full_name='google.cloud.dialogflow.v2beta1.QueryResult.output_contexts', index=10, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='intent', full_name='google.cloud.dialogflow.v2beta1.QueryResult.intent', index=11, number=11, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='intent_detection_confidence', full_name='google.cloud.dialogflow.v2beta1.QueryResult.intent_detection_confidence', index=12, number=12, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='diagnostic_info', full_name='google.cloud.dialogflow.v2beta1.QueryResult.diagnostic_info', index=13, number=14, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -462,35 +462,35 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='query_params', full_name='google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_params', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='query_input', full_name='google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_input', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='single_utterance', full_name='google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.single_utterance', index=3, number=4, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='input_audio', full_name='google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.input_audio', index=4, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -521,28 +521,28 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='recognition_result', full_name='google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.recognition_result', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='query_result', full_name='google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.query_result', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='webhook_status', full_name='google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.webhook_status', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -573,21 +573,28 @@ has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='transcript', full_name='google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.transcript', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='is_final', full_name='google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.is_final', index=2, number=3, 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, - options=None), + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='confidence', full_name='google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.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, + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -602,7 +609,7 @@ oneofs=[ ], serialized_start=2316, - serialized_end=2567, + serialized_end=2587, ) @@ -619,28 +626,28 @@ has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sample_rate_hertz', full_name='google.cloud.dialogflow.v2beta1.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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='phrase_hints', full_name='google.cloud.dialogflow.v2beta1.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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -653,8 +660,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2570, - serialized_end=2732, + serialized_start=2590, + serialized_end=2752, ) @@ -671,14 +678,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.TextInput.language_code', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -691,8 +698,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2734, - serialized_end=2782, + serialized_start=2754, + serialized_end=2802, ) @@ -709,21 +716,21 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='parameters', full_name='google.cloud.dialogflow.v2beta1.EventInput.parameters', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language_code', full_name='google.cloud.dialogflow.v2beta1.EventInput.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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -736,8 +743,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2784, - serialized_end=2878, + serialized_start=2804, + serialized_end=2898, ) _DETECTINTENTREQUEST.fields_by_name['query_params'].message_type = _QUERYPARAMETERS @@ -791,19 +798,24 @@ DetectIntentRequest = _reflection.GeneratedProtocolMessageType('DetectIntentRequest', (_message.Message,), dict( DESCRIPTOR = _DETECTINTENTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_pb2' , __doc__ = """The request to detect user's intent. - - + + Attributes: session: 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. + Format: ``projects//agent/sessions/``, + or ``projects//agent/environments//users//sessions/``. Note: + Environments and users are under construction and will be + available soon. If is not specified, we assume default 'draft' + environment. If is not specified, we are using "-". It’s up to + the API caller to choose an appropriate . and . They can be a + random numbers or some type of user and session identifiers + (preferably hashed). The length of the and must not exceed 36 + characters. query_params: Optional. The parameters of this query. query_input: @@ -824,11 +836,11 @@ DetectIntentResponse = _reflection.GeneratedProtocolMessageType('DetectIntentResponse', (_message.Message,), dict( DESCRIPTOR = _DETECTINTENTRESPONSE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_pb2' , __doc__ = """The message returned from the DetectIntent method. - - + + Attributes: response_id: The unique identifier of the response. It can be used to @@ -846,11 +858,11 @@ QueryParameters = _reflection.GeneratedProtocolMessageType('QueryParameters', (_message.Message,), dict( DESCRIPTOR = _QUERYPARAMETERS, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_pb2' , __doc__ = """Represents the parameters of the conversational query. - - + + Attributes: time_zone: Optional. The time zone of this conversational query from the @@ -880,20 +892,18 @@ QueryInput = _reflection.GeneratedProtocolMessageType('QueryInput', (_message.Message,), dict( DESCRIPTOR = _QUERYINPUT, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_pb2' , __doc__ = """Represents the query input. It can contain either: - - 1. an audio config which instructs the speech recognizer how to process - the speech audio, - - 2. a conversational query in the form of text, or - - 3. an event that specifies which intent to trigger. - - - - + + 1. An audio config which instructs the speech recognizer how to process + the speech audio. + + 2. A conversational query in the form of text,. + + 3. An event that specifies which intent to trigger. + + Attributes: input: Required. The input specification. @@ -911,11 +921,11 @@ QueryResult = _reflection.GeneratedProtocolMessageType('QueryResult', (_message.Message,), dict( DESCRIPTOR = _QUERYRESULT, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_pb2' , __doc__ = """Represents the result of conversational query or event processing. - - + + Attributes: query_text: The original conversational query text: - If natural language @@ -931,11 +941,15 @@ `__ for a list of the currently supported language codes. speech_recognition_confidence: - The confidence estimate 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 - populated if natural speech audio was provided as input. + 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. You + should not rely on this field as it isn't guaranteed to be + accurate, or even set. In particular this field isn't set in + Webhook calls and for StreamingDetectIntent since the + streaming endpoint has separate confidence estimates per + portion of the audio in StreamingRecognitionResult. action: The action name from the matched intent. parameters: @@ -980,32 +994,35 @@ StreamingDetectIntentRequest = _reflection.GeneratedProtocolMessageType('StreamingDetectIntentRequest', (_message.Message,), dict( DESCRIPTOR = _STREAMINGDETECTINTENTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_pb2' , __doc__ = """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. - - - - + + 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 - to choose an appropriate . 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. + ID>/agent/sessions/``, or ``projects//agent/environments//users//sessions/``. Note: Environments and users are + under construction and will be available soon. If is not + specified, we assume default 'draft' environment. If is not + specified, we are using "-". It’s up to the API caller to + choose an appropriate . and . They can be a random numbers or + some type of user and session identifiers (preferably hashed). + The length of the and must not exceed 36 characters. query_params: Optional. The parameters of this query. query_input: @@ -1015,11 +1032,14 @@ form of text, or 3. an event that specifies which intent to trigger. single_utterance: - Optional. If ``true``, the recognizer will detect a single - spoken utterance in input audio. When it detects that the user - has paused or stopped speaking, it will cease recognition. - This setting is ignored when ``query_input`` is a piece of - text or an event. + 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. input_audio: Optional. The input audio content to be recognized. Must be sent if ``query_input`` was set to a streaming input audio @@ -1032,24 +1052,22 @@ StreamingDetectIntentResponse = _reflection.GeneratedProtocolMessageType('StreamingDetectIntentResponse', (_message.Message,), dict( DESCRIPTOR = _STREAMINGDETECTINTENTRESPONSE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_pb2' , __doc__ = """The top-level message returned from the ``StreamingDetectIntent`` method. - + Multiple response messages can be returned in order: - + 1. If the input was set to streaming audio, the first one or more messages contain ``recognition_result``. Each ``recognition_result`` represents a more complete transcript of what the user said. The last ``recognition_result`` has ``is_final`` set to ``true``. - + 2. The next message contains ``response_id``, ``query_result`` and optionally ``webhook_status`` if a WebHook was called. - - - - + + Attributes: response_id: The unique identifier of the response. It can be used to @@ -1068,45 +1086,43 @@ StreamingRecognitionResult = _reflection.GeneratedProtocolMessageType('StreamingRecognitionResult', (_message.Message,), dict( DESCRIPTOR = _STREAMINGRECOGNITIONRESULT, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_pb2' , __doc__ = """Contains a speech recognition result corresponding to a portion of the audio that is currently being processed or an indication that this is the end of the single requested utterance. - + Example: - + 1. transcript: "tube" - + 2. transcript: "to be a" - + 3. transcript: "to be" - + 4. transcript: "to be or not to be" is\_final: true - + 5. transcript: " that's" - + 6. transcript: " that is" - + 7. recognition\_event\_type: ``RECOGNITION_EVENT_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 ``event_type``. - - - - + + Attributes: message_type: Type of the result message. @@ -1115,11 +1131,21 @@ Populated if and only if ``event_type`` = ``RECOGNITION_EVENT_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 ``event_type`` = + The default of 0.0 is a sentinel value indicating + ``confidence`` was not set. 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 ``event_type`` = ``RECOGNITION_EVENT_TRANSCRIPT``. + confidence: + 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. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.StreamingRecognitionResult) )) @@ -1127,11 +1153,11 @@ InputAudioConfig = _reflection.GeneratedProtocolMessageType('InputAudioConfig', (_message.Message,), dict( DESCRIPTOR = _INPUTAUDIOCONFIG, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_pb2' + __module__ = 'dialogflow_v2beta1.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. @@ -1158,11 +1184,11 @@ TextInput = _reflection.GeneratedProtocolMessageType('TextInput', (_message.Message,), dict( DESCRIPTOR = _TEXTINPUT, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_pb2' , __doc__ = """Represents the natural language text to be processed. - - + + Attributes: text: Required. The UTF-8 encoded natural language text to be @@ -1180,7 +1206,7 @@ EventInput = _reflection.GeneratedProtocolMessageType('EventInput', (_message.Message,), dict( DESCRIPTOR = _EVENTINPUT, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.session_pb2' + __module__ = 'dialogflow_v2beta1.proto.session_pb2' , __doc__ = """Events allow for matching intents by event name instead of the natural language input. For instance, input @@ -1188,8 +1214,8 @@ trigger a personalized welcome response. The parameter ``name`` may be used by the agent in the response: ``“Hello #welcome_event.name! What can I do for you today?”``. - - + + Attributes: name: Required. The unique identifier of the event. @@ -1197,7 +1223,7 @@ Optional. The collection of parameters associated with the event. language_code: - Optional. The language of this query. See `Language Support + 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 @@ -1210,181 +1236,37 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n#com.google.cloud.dialogflow.v2beta1B\014SessionProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1')) -try: - # THESE ELEMENTS WILL BE DEPRECATED. - # Please use the generated *_pb2_grpc.py files instead. - import grpc - from grpc.beta import implementations as beta_implementations - from grpc.beta import interfaces as beta_interfaces - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities - - - class SessionsStub(object): - """Manages user sessions. - - - Custom methods. - """ - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.DetectIntent = channel.unary_unary( - '/google.cloud.dialogflow.v2beta1.Sessions/DetectIntent', - request_serializer=DetectIntentRequest.SerializeToString, - response_deserializer=DetectIntentResponse.FromString, - ) - self.StreamingDetectIntent = channel.stream_stream( - '/google.cloud.dialogflow.v2beta1.Sessions/StreamingDetectIntent', - request_serializer=StreamingDetectIntentRequest.SerializeToString, - response_deserializer=StreamingDetectIntentResponse.FromString, - ) - - - class SessionsServicer(object): - """Manages user sessions. - - Custom methods. - """ - - def DetectIntent(self, request, context): - """Processes a natural language query and returns structured, actionable data - as a result. This method is not idempotent, because it may cause contexts - and session entity types to be updated, which in turn might affect - results of future queries. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def StreamingDetectIntent(self, request_iterator, context): - """Processes a natural language query in audio format in a streaming fashion - and returns structured, actionable data as a result. This method is only - available via the gRPC API (not REST). - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - - def add_SessionsServicer_to_server(servicer, server): - rpc_method_handlers = { - 'DetectIntent': grpc.unary_unary_rpc_method_handler( - servicer.DetectIntent, - request_deserializer=DetectIntentRequest.FromString, - response_serializer=DetectIntentResponse.SerializeToString, - ), - 'StreamingDetectIntent': grpc.stream_stream_rpc_method_handler( - servicer.StreamingDetectIntent, - request_deserializer=StreamingDetectIntentRequest.FromString, - response_serializer=StreamingDetectIntentResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'google.cloud.dialogflow.v2beta1.Sessions', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - class BetaSessionsServicer(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - """Manages user sessions. - - - Custom methods. - """ - def DetectIntent(self, request, context): - """Processes a natural language query and returns structured, actionable data - as a result. This method is not idempotent, because it may cause contexts - and session entity types to be updated, which in turn might affect - results of future queries. - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - def StreamingDetectIntent(self, request_iterator, context): - """Processes a natural language query in audio format in a streaming fashion - and returns structured, actionable data as a result. This method is only - available via the gRPC API (not REST). - """ - context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) - - - class BetaSessionsStub(object): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This class was generated - only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" - """Manages user sessions. - - - Custom methods. - """ - def DetectIntent(self, request, timeout, metadata=None, with_call=False, protocol_options=None): - """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. - """ - raise NotImplementedError() - DetectIntent.future = None - def StreamingDetectIntent(self, request_iterator, timeout, metadata=None, with_call=False, protocol_options=None): - """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). - """ - raise NotImplementedError() - - - def beta_create_Sessions_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - """The Beta API is deprecated for 0.15.0 and later. - - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_deserializers = { - ('google.cloud.dialogflow.v2beta1.Sessions', 'DetectIntent'): DetectIntentRequest.FromString, - ('google.cloud.dialogflow.v2beta1.Sessions', 'StreamingDetectIntent'): StreamingDetectIntentRequest.FromString, - } - response_serializers = { - ('google.cloud.dialogflow.v2beta1.Sessions', 'DetectIntent'): DetectIntentResponse.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Sessions', 'StreamingDetectIntent'): StreamingDetectIntentResponse.SerializeToString, - } - method_implementations = { - ('google.cloud.dialogflow.v2beta1.Sessions', 'DetectIntent'): face_utilities.unary_unary_inline(servicer.DetectIntent), - ('google.cloud.dialogflow.v2beta1.Sessions', 'StreamingDetectIntent'): face_utilities.stream_stream_inline(servicer.StreamingDetectIntent), - } - server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) - return beta_implementations.server(method_implementations, options=server_options) - - - def beta_create_Sessions_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - """The Beta API is deprecated for 0.15.0 and later. +_SESSIONS = _descriptor.ServiceDescriptor( + name='Sessions', + full_name='google.cloud.dialogflow.v2beta1.Sessions', + file=DESCRIPTOR, + index=0, + options=None, + serialized_start=3155, + serialized_end=3611, + methods=[ + _descriptor.MethodDescriptor( + name='DetectIntent', + full_name='google.cloud.dialogflow.v2beta1.Sessions.DetectIntent', + index=0, + containing_service=None, + input_type=_DETECTINTENTREQUEST, + output_type=_DETECTINTENTRESPONSE, + options=_descriptor._ParseOptions(descriptor_pb2.MethodOptions(), _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*')), + ), + _descriptor.MethodDescriptor( + name='StreamingDetectIntent', + full_name='google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent', + index=1, + containing_service=None, + input_type=_STREAMINGDETECTINTENTREQUEST, + output_type=_STREAMINGDETECTINTENTRESPONSE, + options=None, + ), +]) +_sym_db.RegisterServiceDescriptor(_SESSIONS) + +DESCRIPTOR.services_by_name['Sessions'] = _SESSIONS - It is recommended to use the GA API (classes and functions in this - file not marked beta) for all further purposes. This function was - generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" - request_serializers = { - ('google.cloud.dialogflow.v2beta1.Sessions', 'DetectIntent'): DetectIntentRequest.SerializeToString, - ('google.cloud.dialogflow.v2beta1.Sessions', 'StreamingDetectIntent'): StreamingDetectIntentRequest.SerializeToString, - } - response_deserializers = { - ('google.cloud.dialogflow.v2beta1.Sessions', 'DetectIntent'): DetectIntentResponse.FromString, - ('google.cloud.dialogflow.v2beta1.Sessions', 'StreamingDetectIntent'): StreamingDetectIntentResponse.FromString, - } - cardinalities = { - 'DetectIntent': cardinality.Cardinality.UNARY_UNARY, - 'StreamingDetectIntent': cardinality.Cardinality.STREAM_STREAM, - } - stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) - return beta_implementations.dynamic_stub(channel, 'google.cloud.dialogflow.v2beta1.Sessions', cardinalities, options=stub_options) -except ImportError: - pass # @@protoc_insertion_point(module_scope) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_pb2_grpc.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_pb2_grpc.py index f96c1a9dabee..7bf264c45f9e 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_pb2_grpc.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/session_pb2_grpc.py @@ -5,10 +5,10 @@ class SessionsStub(object): - """Manages user sessions. - - - Custom methods. + """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. """ def __init__(self, channel): @@ -30,10 +30,10 @@ def __init__(self, channel): class SessionsServicer(object): - """Manages user sessions. - - - Custom methods. + """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. """ def DetectIntent(self, request, context): diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/webhook_pb2.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/webhook_pb2.py index ec870b5cba59..c97ccaceb800 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/webhook_pb2.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/proto/webhook_pb2.py @@ -24,7 +24,7 @@ name='google/cloud/dialogflow_v2beta1/proto/webhook.proto', package='google.cloud.dialogflow.v2beta1', syntax='proto3', - serialized_pb=_b('\n3google/cloud/dialogflow_v2beta1/proto/webhook.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\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\x1cgoogle/protobuf/struct.proto\"\xe3\x01\n\x0eWebhookRequest\x12\x13\n\x0bresponse_id\x18\x01 \x01(\t\x12\x42\n\x0cquery_result\x18\x02 \x01(\x0b\x32,.google.cloud.dialogflow.v2beta1.QueryResult\x12\x64\n\x1eoriginal_detect_intent_request\x18\x03 \x01(\x0b\x32<.google.cloud.dialogflow.v2beta1.OriginalDetectIntentRequest\x12\x12\n\nsession_id\x18\x04 \x01(\t\"\xc2\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\"W\n\x1bOriginalDetectIntentRequest\x12\x0e\n\x06source\x18\x01 \x01(\t\x12(\n\x07payload\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\xaa\x01\n#com.google.cloud.dialogflow.v2beta1B\x0cWebhookProtoP\x01ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1fGoogle.Cloud.Dialogflow.V2beta1b\x06proto3') + serialized_pb=_b('\n3google/cloud/dialogflow_v2beta1/proto/webhook.proto\x12\x1fgoogle.cloud.dialogflow.v2beta1\x1a\x1cgoogle/api/annotations.proto\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\x1cgoogle/protobuf/struct.proto\"\xe0\x01\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\x12\x64\n\x1eoriginal_detect_intent_request\x18\x03 \x01(\x0b\x32<.google.cloud.dialogflow.v2beta1.OriginalDetectIntentRequest\"\xc2\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\"W\n\x1bOriginalDetectIntentRequest\x12\x0e\n\x06source\x18\x01 \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_api_dot_annotations__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__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) @@ -39,33 +39,33 @@ containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='response_id', full_name='google.cloud.dialogflow.v2beta1.WebhookRequest.response_id', index=0, + name='session', full_name='google.cloud.dialogflow.v2beta1.WebhookRequest.session', index=0, + 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, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='response_id', full_name='google.cloud.dialogflow.v2beta1.WebhookRequest.response_id', index=1, 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='query_result', full_name='google.cloud.dialogflow.v2beta1.WebhookRequest.query_result', index=1, + name='query_result', full_name='google.cloud.dialogflow.v2beta1.WebhookRequest.query_result', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='original_detect_intent_request', full_name='google.cloud.dialogflow.v2beta1.WebhookRequest.original_detect_intent_request', index=2, + name='original_detect_intent_request', full_name='google.cloud.dialogflow.v2beta1.WebhookRequest.original_detect_intent_request', index=3, 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, - options=None), - _descriptor.FieldDescriptor( - name='session_id', full_name='google.cloud.dialogflow.v2beta1.WebhookRequest.session_id', index=3, - 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -79,7 +79,7 @@ oneofs=[ ], serialized_start=307, - serialized_end=534, + serialized_end=531, ) @@ -96,42 +96,42 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='fulfillment_messages', full_name='google.cloud.dialogflow.v2beta1.WebhookResponse.fulfillment_messages', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='source', full_name='google.cloud.dialogflow.v2beta1.WebhookResponse.source', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='payload', full_name='google.cloud.dialogflow.v2beta1.WebhookResponse.payload', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='output_contexts', full_name='google.cloud.dialogflow.v2beta1.WebhookResponse.output_contexts', 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='followup_event_input', full_name='google.cloud.dialogflow.v2beta1.WebhookResponse.followup_event_input', index=5, number=6, 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -144,8 +144,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=537, - serialized_end=859, + serialized_start=534, + serialized_end=856, ) @@ -162,14 +162,14 @@ 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, - options=None), + options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='payload', full_name='google.cloud.dialogflow.v2beta1.OriginalDetectIntentRequest.payload', 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, - options=None), + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -182,8 +182,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=861, - serialized_end=948, + serialized_start=858, + serialized_end=945, ) _WEBHOOKREQUEST.fields_by_name['query_result'].message_type = google_dot_cloud_dot_dialogflow__v2beta1_dot_proto_dot_session__pb2._QUERYRESULT @@ -200,12 +200,16 @@ WebhookRequest = _reflection.GeneratedProtocolMessageType('WebhookRequest', (_message.Message,), dict( DESCRIPTOR = _WEBHOOKREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.webhook_pb2' + __module__ = 'dialogflow_v2beta1.proto.webhook_pb2' , __doc__ = """The request message for a webhook call. Attributes: + session: + The unique identifier of detectIntent request session. Can be + used to identify end-user inside webhook implementation. + Format: ``projects//agent/sessions/``. response_id: The unique identifier of the response. Contains the same value as ``[Streaming]DetectIntentResponse.response_id``. @@ -216,9 +220,6 @@ original_detect_intent_request: Optional. The contents of the original request that was passed to ``[Streaming]DetectIntent`` call. - session_id: - The unique identifier of detectIntent request session. Can be - used to identify end-user inside webhook implementation. """, # @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.WebhookRequest) )) @@ -226,7 +227,7 @@ WebhookResponse = _reflection.GeneratedProtocolMessageType('WebhookResponse', (_message.Message,), dict( DESCRIPTOR = _WEBHOOKRESPONSE, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.webhook_pb2' + __module__ = 'dialogflow_v2beta1.proto.webhook_pb2' , __doc__ = """The response message for a webhook call. @@ -244,7 +245,18 @@ ``QueryResult.webhook_source``. payload: Optional. This value is passed directly to - ``QueryResult.webhook_payload``. + ``QueryResult.webhook_payload``. See the related + ``fulfillment_messages[i].payload field``, which may be used + as an alternative to this field. This field can be used for + Actions on Google responses. It should have a structure + similar to the JSON message shown here. For more information, + see `Actions on Google Webhook Format + `__ + .. raw:: html
{      "google": {
+          "expectUserResponse": true,        "richResponse": {
+          "items": [            {              "simpleResponse": {
+          "textToSpeech": "this is a simple response"              }
+          }          ]        }      }    }
output_contexts: Optional. The collection of output contexts. This value is passed directly to ``QueryResult.output_contexts``. @@ -259,16 +271,16 @@ OriginalDetectIntentRequest = _reflection.GeneratedProtocolMessageType('OriginalDetectIntentRequest', (_message.Message,), dict( DESCRIPTOR = _ORIGINALDETECTINTENTREQUEST, - __module__ = 'google.cloud.dialogflow_v2beta1.proto.webhook_pb2' + __module__ = 'dialogflow_v2beta1.proto.webhook_pb2' , - __doc__ = """Represents the contents of the original request that was passed to - ``[Streaming]DetectIntent call``. + __doc__ = """Represents the contents of the original request that was passed to the + ``[Streaming]DetectIntent`` call. Attributes: source: - The source of this request, e.g., Google, Facebook, Slack. It - is set by Dialogflow-owned servers. + The source of this request, e.g., ``google``, ``facebook``, + ``slack``. It is set by Dialogflow-owned servers. payload: Optional. This field is set to the value of ``QueryParameters.payload`` field passed in the request. @@ -280,14 +292,4 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n#com.google.cloud.dialogflow.v2beta1B\014WebhookProtoP\001ZIgoogle.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1')) -try: - # THESE ELEMENTS WILL BE DEPRECATED. - # Please use the generated *_pb2_grpc.py files instead. - import grpc - from grpc.beta import implementations as beta_implementations - from grpc.beta import interfaces as beta_interfaces - from grpc.framework.common import cardinality - from grpc.framework.interfaces.face import utilities as face_utilities -except ImportError: - pass # @@protoc_insertion_point(module_scope) diff --git a/packages/google-cloud-dialogflow/dialogflow_v2beta1/types.py b/packages/google-cloud-dialogflow/dialogflow_v2beta1/types.py index d41c7ec596e6..cdec595384f5 100644 --- a/packages/google-cloud-dialogflow/dialogflow_v2beta1/types.py +++ b/packages/google-cloud-dialogflow/dialogflow_v2beta1/types.py @@ -1,10 +1,10 @@ -# Copyright 2017, Google LLC +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -31,7 +31,6 @@ from google.protobuf import empty_pb2 from google.protobuf import field_mask_pb2 from google.protobuf import struct_pb2 -from google.protobuf import timestamp_pb2 from google.rpc import status_pb2 from google.type import latlng_pb2 @@ -51,11 +50,11 @@ empty_pb2, field_mask_pb2, struct_pb2, - timestamp_pb2, status_pb2, - latlng_pb2, ): + latlng_pb2, +): for name, message in get_messages(module).items(): - message.__module__ = 'google.cloud.dialogflow_v2beta1.types' + message.__module__ = 'dialogflow_v2beta1.types' setattr(sys.modules[__name__], name, message) names.append(name) diff --git a/packages/google-cloud-dialogflow/docs/conf.py b/packages/google-cloud-dialogflow/docs/conf.py index 012c9c50e6a3..e2cc378450c3 100644 --- a/packages/google-cloud-dialogflow/docs/conf.py +++ b/packages/google-cloud-dialogflow/docs/conf.py @@ -60,7 +60,7 @@ # General information about the project. project = u'dialogflow' -copyright = u'2017, Google' +copyright = u'2018 Google LLC' author = u'Google APIs' # The version info for the project you're documenting, acts as replacement for @@ -234,8 +234,8 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'dialogflow.tex', - u'dialogflow Documentation', author, 'manual'), + (master_doc, 'dialogflow.tex', u'dialogflow Documentation', author, + 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -262,8 +262,8 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [(master_doc, 'dialogflow', - u'dialogflow Documentation', [author], 1)] +man_pages = [(master_doc, 'dialogflow', u'dialogflow Documentation', + [author], 1)] # If true, show URL addresses after external links. #man_show_urls = False @@ -274,8 +274,7 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'dialogflow', - u'dialogflow Documentation', author, + (master_doc, 'dialogflow', u'dialogflow Documentation', author, 'dialogflow', 'GAPIC library for the {metadata.shortName} v2beta1 service', 'APIs'), ] diff --git a/packages/google-cloud-dialogflow/setup.py b/packages/google-cloud-dialogflow/setup.py index ff62740476c4..aa7348137d3f 100644 --- a/packages/google-cloud-dialogflow/setup.py +++ b/packages/google-cloud-dialogflow/setup.py @@ -9,10 +9,8 @@ import io install_requires = [ - 'google-api-core >= 0.1.1, < 0.2dev' - 'google-auth>=1.0.2, <2.0dev', + 'google-api-core[grpc]<2.0.0dev,>=0.1.4', 'googleapis-common-protos[grpc]>=1.5.2, <2.0dev', - 'requests>=2.18.4, <3.0dev', ] with io.open('README.rst', 'r', encoding='utf-8') as readme_file: diff --git a/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py b/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py index 3e500b233918..0500cd0a3197 100644 --- a/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py +++ b/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py @@ -1,10 +1,10 @@ -# Copyright 2017, Google LLC +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -196,11 +196,7 @@ def test_train_agent_exception(self): def test_export_agent(self): # Setup Expected Response agent_uri = 'agentUri-1700713166' - agent_content = b'63' - expected_response = { - 'agent_uri': agent_uri, - 'agent_content': agent_content - } + expected_response = {'agent_uri': agent_uri} expected_response = agent_pb2.ExportAgentResponse(**expected_response) operation = operations_pb2.Operation( name='operations/test_export_agent', done=True) diff --git a/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py b/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py index 7048a1f15c5a..b45eecf614f0 100644 --- a/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py +++ b/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py @@ -1,10 +1,10 @@ -# Copyright 2017, Google LLC +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_entity_types_client_v2beta1.py b/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_entity_types_client_v2beta1.py index 6de49e834b0f..911ee2aadd9b 100644 --- a/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_entity_types_client_v2beta1.py +++ b/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_entity_types_client_v2beta1.py @@ -1,10 +1,10 @@ -# Copyright 2017, Google LLC +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py b/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py index 876d0f6cbe3f..7ba40b96894f 100644 --- a/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py +++ b/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py @@ -1,10 +1,10 @@ -# Copyright 2017, Google LLC +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -107,9 +107,10 @@ def test_get_intent(self): # Setup Expected Response name_2 = 'name2-1052831874' display_name = 'displayName1615086568' - priority = -1165461084 + priority = 1165461084 is_fallback = False ml_enabled = False + ml_disabled = True action = 'action-1422950858' reset_contexts = True root_followup_intent_name = 'rootFollowupIntentName402253784' @@ -120,6 +121,7 @@ def test_get_intent(self): 'priority': priority, 'is_fallback': is_fallback, 'ml_enabled': ml_enabled, + 'ml_disabled': ml_disabled, 'action': action, 'reset_contexts': reset_contexts, 'root_followup_intent_name': root_followup_intent_name, @@ -157,9 +159,10 @@ def test_create_intent(self): # Setup Expected Response name = 'name3373707' display_name = 'displayName1615086568' - priority = -1165461084 + priority = 1165461084 is_fallback = False ml_enabled = False + ml_disabled = True action = 'action-1422950858' reset_contexts = True root_followup_intent_name = 'rootFollowupIntentName402253784' @@ -170,6 +173,7 @@ def test_create_intent(self): 'priority': priority, 'is_fallback': is_fallback, 'ml_enabled': ml_enabled, + 'ml_disabled': ml_disabled, 'action': action, 'reset_contexts': reset_contexts, 'root_followup_intent_name': root_followup_intent_name, @@ -210,9 +214,10 @@ def test_update_intent(self): # Setup Expected Response name = 'name3373707' display_name = 'displayName1615086568' - priority = -1165461084 + priority = 1165461084 is_fallback = False ml_enabled = False + ml_disabled = True action = 'action-1422950858' reset_contexts = True root_followup_intent_name = 'rootFollowupIntentName402253784' @@ -223,6 +228,7 @@ def test_update_intent(self): 'priority': priority, 'is_fallback': is_fallback, 'ml_enabled': ml_enabled, + 'ml_disabled': ml_disabled, 'action': action, 'reset_contexts': reset_contexts, 'root_followup_intent_name': root_followup_intent_name, @@ -343,7 +349,7 @@ def test_batch_delete_intents(self): client = dialogflow_v2beta1.IntentsClient(channel=channel) # Setup Request - parent = client.agent_path('[PROJECT]', '[AGENT]') + parent = client.project_path('[PROJECT]') intents = [] response = client.batch_delete_intents(parent, intents) @@ -368,7 +374,7 @@ def test_batch_delete_intents_exception(self): client = dialogflow_v2beta1.IntentsClient(channel=channel) # Setup Request - parent = client.agent_path('[PROJECT]', '[AGENT]') + parent = client.project_path('[PROJECT]') intents = [] response = client.batch_delete_intents(parent, intents) diff --git a/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_session_entity_types_client_v2beta1.py b/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_session_entity_types_client_v2beta1.py index 288bda035d1b..4b33dc05210e 100644 --- a/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_session_entity_types_client_v2beta1.py +++ b/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_session_entity_types_client_v2beta1.py @@ -1,10 +1,10 @@ -# Copyright 2017, Google LLC +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py b/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py index 96691bcded63..ca93c2b7147f 100644 --- a/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py +++ b/packages/google-cloud-dialogflow/tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py @@ -1,10 +1,10 @@ -# Copyright 2017, Google LLC +# Copyright 2018 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 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS,