<gh_stars>0
"""Generated client library for dialogflow version v2."""
# NOTE: This file is autogenerated and should not be edited by hand.
from apitools.base.py import base_api
from googlecloudsdk.third_party.apis.dialogflow.v2 import dialogflow_v2_messages as messages


class DialogflowV2(base_api.BaseApiClient):
  """Generated client library for service dialogflow version v2."""

  MESSAGES_MODULE = messages
  BASE_URL = u'https://dialogflow.googleapis.com/'

  _PACKAGE = u'dialogflow'
  _SCOPES = [u'https://www.googleapis.com/auth/cloud-platform', u'https://www.googleapis.com/auth/dialogflow']
  _VERSION = u'v2'
  _CLIENT_ID = '1042881264118.apps.googleusercontent.com'
  _CLIENT_SECRET = 'x_Tw5K8nnjoRAqULM9PFAC2b'
  _USER_AGENT = 'x_Tw5K8nnjoRAqULM9PFAC2b'
  _CLIENT_CLASS_NAME = u'DialogflowV2'
  _URL_VERSION = u'v2'
  _API_KEY = None

  def __init__(self, url='', credentials=None,
               get_credentials=True, http=None, model=None,
               log_request=False, log_response=False,
               credentials_args=None, default_global_params=None,
               additional_http_headers=None, response_encoding=None):
    """Create a new dialogflow handle."""
    url = url or self.BASE_URL
    super(DialogflowV2, self).__init__(
        url, credentials=credentials,
        get_credentials=get_credentials, http=http, model=model,
        log_request=log_request, log_response=log_response,
        credentials_args=credentials_args,
        default_global_params=default_global_params,
        additional_http_headers=additional_http_headers,
        response_encoding=response_encoding)
    self.projects_agent_entityTypes_entities = self.ProjectsAgentEntityTypesEntitiesService(self)
    self.projects_agent_entityTypes = self.ProjectsAgentEntityTypesService(self)
    self.projects_agent_intents = self.ProjectsAgentIntentsService(self)
    self.projects_agent_sessions_contexts = self.ProjectsAgentSessionsContextsService(self)
    self.projects_agent_sessions_entityTypes = self.ProjectsAgentSessionsEntityTypesService(self)
    self.projects_agent_sessions = self.ProjectsAgentSessionsService(self)
    self.projects_agent = self.ProjectsAgentService(self)
    self.projects_locations_operations = self.ProjectsLocationsOperationsService(self)
    self.projects_locations = self.ProjectsLocationsService(self)
    self.projects_operations = self.ProjectsOperationsService(self)
    self.projects = self.ProjectsService(self)

  class ProjectsAgentEntityTypesEntitiesService(base_api.BaseApiService):
    """Service class for the projects_agent_entityTypes_entities resource."""

    _NAME = u'projects_agent_entityTypes_entities'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentEntityTypesEntitiesService, self).__init__(client)
      self._upload_configs = {
          }

    def BatchCreate(self, request, global_params=None):
      r"""Creates multiple new entities in the specified entity type.

Operation <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentEntityTypesEntitiesBatchCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchCreate')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchCreate.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.entityTypes.entities.batchCreate',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/entities:batchCreate',
        request_field=u'googleCloudDialogflowV2BatchCreateEntitiesRequest',
        request_type_name=u'DialogflowProjectsAgentEntityTypesEntitiesBatchCreateRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def BatchDelete(self, request, global_params=None):
      r"""Deletes entities in the specified entity type.

Operation <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentEntityTypesEntitiesBatchDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchDelete')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchDelete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.entityTypes.entities.batchDelete',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/entities:batchDelete',
        request_field=u'googleCloudDialogflowV2BatchDeleteEntitiesRequest',
        request_type_name=u'DialogflowProjectsAgentEntityTypesEntitiesBatchDeleteRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def BatchUpdate(self, request, global_params=None):
      r"""Updates or creates multiple entities in the specified entity type. This.
method does not affect entities in the entity type that aren't explicitly
specified in the request.

Operation <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentEntityTypesEntitiesBatchUpdateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchUpdate')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchUpdate.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.entityTypes.entities.batchUpdate',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/entities:batchUpdate',
        request_field=u'googleCloudDialogflowV2BatchUpdateEntitiesRequest',
        request_type_name=u'DialogflowProjectsAgentEntityTypesEntitiesBatchUpdateRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

  class ProjectsAgentEntityTypesService(base_api.BaseApiService):
    """Service class for the projects_agent_entityTypes resource."""

    _NAME = u'projects_agent_entityTypes'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentEntityTypesService, self).__init__(client)
      self._upload_configs = {
          }

    def BatchDelete(self, request, global_params=None):
      r"""Deletes entity types in the specified agent.

Operation <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentEntityTypesBatchDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchDelete')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchDelete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes:batchDelete',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.entityTypes.batchDelete',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/entityTypes:batchDelete',
        request_field=u'googleCloudDialogflowV2BatchDeleteEntityTypesRequest',
        request_type_name=u'DialogflowProjectsAgentEntityTypesBatchDeleteRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def BatchUpdate(self, request, global_params=None):
      r"""Updates/Creates multiple entity types in the specified agent.

Operation <response: BatchUpdateEntityTypesResponse>

      Args:
        request: (DialogflowProjectsAgentEntityTypesBatchUpdateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchUpdate')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchUpdate.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes:batchUpdate',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.entityTypes.batchUpdate',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/entityTypes:batchUpdate',
        request_field=u'googleCloudDialogflowV2BatchUpdateEntityTypesRequest',
        request_type_name=u'DialogflowProjectsAgentEntityTypesBatchUpdateRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def Create(self, request, global_params=None):
      r"""Creates an entity type in the specified agent.

      Args:
        request: (DialogflowProjectsAgentEntityTypesCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2EntityType) The response message.
      """
      config = self.GetMethodConfig('Create')
      return self._RunMethod(
          config, request, global_params=global_params)

    Create.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.entityTypes.create',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'languageCode'],
        relative_path=u'v2/{+parent}/entityTypes',
        request_field=u'googleCloudDialogflowV2EntityType',
        request_type_name=u'DialogflowProjectsAgentEntityTypesCreateRequest',
        response_type_name=u'GoogleCloudDialogflowV2EntityType',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes the specified entity type.

      Args:
        request: (DialogflowProjectsAgentEntityTypesDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('Delete')
      return self._RunMethod(
          config, request, global_params=global_params)

    Delete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}',
        http_method=u'DELETE',
        method_id=u'dialogflow.projects.agent.entityTypes.delete',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentEntityTypesDeleteRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Retrieves the specified entity type.

      Args:
        request: (DialogflowProjectsAgentEntityTypesGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2EntityType) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.entityTypes.get',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'languageCode'],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentEntityTypesGetRequest',
        response_type_name=u'GoogleCloudDialogflowV2EntityType',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Returns the list of all entity types in the specified agent.

      Args:
        request: (DialogflowProjectsAgentEntityTypesListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2ListEntityTypesResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.entityTypes.list',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'languageCode', u'pageSize', u'pageToken'],
        relative_path=u'v2/{+parent}/entityTypes',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentEntityTypesListRequest',
        response_type_name=u'GoogleCloudDialogflowV2ListEntityTypesResponse',
        supports_download=False,
    )

    def Patch(self, request, global_params=None):
      r"""Updates the specified entity type.

      Args:
        request: (DialogflowProjectsAgentEntityTypesPatchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2EntityType) The response message.
      """
      config = self.GetMethodConfig('Patch')
      return self._RunMethod(
          config, request, global_params=global_params)

    Patch.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}',
        http_method=u'PATCH',
        method_id=u'dialogflow.projects.agent.entityTypes.patch',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'languageCode', u'updateMask'],
        relative_path=u'v2/{+name}',
        request_field=u'googleCloudDialogflowV2EntityType',
        request_type_name=u'DialogflowProjectsAgentEntityTypesPatchRequest',
        response_type_name=u'GoogleCloudDialogflowV2EntityType',
        supports_download=False,
    )

  class ProjectsAgentIntentsService(base_api.BaseApiService):
    """Service class for the projects_agent_intents resource."""

    _NAME = u'projects_agent_intents'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentIntentsService, self).__init__(client)
      self._upload_configs = {
          }

    def BatchDelete(self, request, global_params=None):
      r"""Deletes intents in the specified agent.

Operation <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentIntentsBatchDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchDelete')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchDelete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents:batchDelete',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.intents.batchDelete',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/intents:batchDelete',
        request_field=u'googleCloudDialogflowV2BatchDeleteIntentsRequest',
        request_type_name=u'DialogflowProjectsAgentIntentsBatchDeleteRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def BatchUpdate(self, request, global_params=None):
      r"""Updates/Creates multiple intents in the specified agent.

Operation <response: BatchUpdateIntentsResponse>

      Args:
        request: (DialogflowProjectsAgentIntentsBatchUpdateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchUpdate')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchUpdate.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents:batchUpdate',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.intents.batchUpdate',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/intents:batchUpdate',
        request_field=u'googleCloudDialogflowV2BatchUpdateIntentsRequest',
        request_type_name=u'DialogflowProjectsAgentIntentsBatchUpdateRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def Create(self, request, global_params=None):
      r"""Creates an intent in the specified agent.

      Args:
        request: (DialogflowProjectsAgentIntentsCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Intent) The response message.
      """
      config = self.GetMethodConfig('Create')
      return self._RunMethod(
          config, request, global_params=global_params)

    Create.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.intents.create',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'intentView', u'languageCode'],
        relative_path=u'v2/{+parent}/intents',
        request_field=u'googleCloudDialogflowV2Intent',
        request_type_name=u'DialogflowProjectsAgentIntentsCreateRequest',
        response_type_name=u'GoogleCloudDialogflowV2Intent',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes the specified intent and its direct or indirect followup intents.

      Args:
        request: (DialogflowProjectsAgentIntentsDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('Delete')
      return self._RunMethod(
          config, request, global_params=global_params)

    Delete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents/{intentsId}',
        http_method=u'DELETE',
        method_id=u'dialogflow.projects.agent.intents.delete',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentIntentsDeleteRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Retrieves the specified intent.

      Args:
        request: (DialogflowProjectsAgentIntentsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Intent) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents/{intentsId}',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.intents.get',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'intentView', u'languageCode'],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentIntentsGetRequest',
        response_type_name=u'GoogleCloudDialogflowV2Intent',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Returns the list of all intents in the specified agent.

      Args:
        request: (DialogflowProjectsAgentIntentsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2ListIntentsResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.intents.list',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'intentView', u'languageCode', u'pageSize', u'pageToken'],
        relative_path=u'v2/{+parent}/intents',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentIntentsListRequest',
        response_type_name=u'GoogleCloudDialogflowV2ListIntentsResponse',
        supports_download=False,
    )

    def Patch(self, request, global_params=None):
      r"""Updates the specified intent.

      Args:
        request: (DialogflowProjectsAgentIntentsPatchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Intent) The response message.
      """
      config = self.GetMethodConfig('Patch')
      return self._RunMethod(
          config, request, global_params=global_params)

    Patch.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents/{intentsId}',
        http_method=u'PATCH',
        method_id=u'dialogflow.projects.agent.intents.patch',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'intentView', u'languageCode', u'updateMask'],
        relative_path=u'v2/{+name}',
        request_field=u'googleCloudDialogflowV2Intent',
        request_type_name=u'DialogflowProjectsAgentIntentsPatchRequest',
        response_type_name=u'GoogleCloudDialogflowV2Intent',
        supports_download=False,
    )

  class ProjectsAgentSessionsContextsService(base_api.BaseApiService):
    """Service class for the projects_agent_sessions_contexts resource."""

    _NAME = u'projects_agent_sessions_contexts'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentSessionsContextsService, self).__init__(client)
      self._upload_configs = {
          }

    def Create(self, request, global_params=None):
      r"""Creates a context.

If the specified context already exists, overrides the context.

      Args:
        request: (DialogflowProjectsAgentSessionsContextsCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Context) The response message.
      """
      config = self.GetMethodConfig('Create')
      return self._RunMethod(
          config, request, global_params=global_params)

    Create.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.sessions.contexts.create',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/contexts',
        request_field=u'googleCloudDialogflowV2Context',
        request_type_name=u'DialogflowProjectsAgentSessionsContextsCreateRequest',
        response_type_name=u'GoogleCloudDialogflowV2Context',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes the specified context.

      Args:
        request: (DialogflowProjectsAgentSessionsContextsDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('Delete')
      return self._RunMethod(
          config, request, global_params=global_params)

    Delete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}',
        http_method=u'DELETE',
        method_id=u'dialogflow.projects.agent.sessions.contexts.delete',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsContextsDeleteRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Retrieves the specified context.

      Args:
        request: (DialogflowProjectsAgentSessionsContextsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Context) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.sessions.contexts.get',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsContextsGetRequest',
        response_type_name=u'GoogleCloudDialogflowV2Context',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Returns the list of all contexts in the specified session.

      Args:
        request: (DialogflowProjectsAgentSessionsContextsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2ListContextsResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.sessions.contexts.list',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'pageSize', u'pageToken'],
        relative_path=u'v2/{+parent}/contexts',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsContextsListRequest',
        response_type_name=u'GoogleCloudDialogflowV2ListContextsResponse',
        supports_download=False,
    )

    def Patch(self, request, global_params=None):
      r"""Updates the specified context.

      Args:
        request: (DialogflowProjectsAgentSessionsContextsPatchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Context) The response message.
      """
      config = self.GetMethodConfig('Patch')
      return self._RunMethod(
          config, request, global_params=global_params)

    Patch.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}',
        http_method=u'PATCH',
        method_id=u'dialogflow.projects.agent.sessions.contexts.patch',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'updateMask'],
        relative_path=u'v2/{+name}',
        request_field=u'googleCloudDialogflowV2Context',
        request_type_name=u'DialogflowProjectsAgentSessionsContextsPatchRequest',
        response_type_name=u'GoogleCloudDialogflowV2Context',
        supports_download=False,
    )

  class ProjectsAgentSessionsEntityTypesService(base_api.BaseApiService):
    """Service class for the projects_agent_sessions_entityTypes resource."""

    _NAME = u'projects_agent_sessions_entityTypes'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentSessionsEntityTypesService, self).__init__(client)
      self._upload_configs = {
          }

    def Create(self, request, global_params=None):
      r"""Creates a session entity type.

If the specified session entity type already exists, overrides the session
entity type.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

      Args:
        request: (DialogflowProjectsAgentSessionsEntityTypesCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2SessionEntityType) The response message.
      """
      config = self.GetMethodConfig('Create')
      return self._RunMethod(
          config, request, global_params=global_params)

    Create.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.sessions.entityTypes.create',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/entityTypes',
        request_field=u'googleCloudDialogflowV2SessionEntityType',
        request_type_name=u'DialogflowProjectsAgentSessionsEntityTypesCreateRequest',
        response_type_name=u'GoogleCloudDialogflowV2SessionEntityType',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes the specified session entity type.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

      Args:
        request: (DialogflowProjectsAgentSessionsEntityTypesDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('Delete')
      return self._RunMethod(
          config, request, global_params=global_params)

    Delete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}',
        http_method=u'DELETE',
        method_id=u'dialogflow.projects.agent.sessions.entityTypes.delete',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsEntityTypesDeleteRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Retrieves the specified session entity type.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

      Args:
        request: (DialogflowProjectsAgentSessionsEntityTypesGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2SessionEntityType) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.sessions.entityTypes.get',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsEntityTypesGetRequest',
        response_type_name=u'GoogleCloudDialogflowV2SessionEntityType',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Returns the list of all session entity types in the specified session.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

      Args:
        request: (DialogflowProjectsAgentSessionsEntityTypesListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2ListSessionEntityTypesResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.sessions.entityTypes.list',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'pageSize', u'pageToken'],
        relative_path=u'v2/{+parent}/entityTypes',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsEntityTypesListRequest',
        response_type_name=u'GoogleCloudDialogflowV2ListSessionEntityTypesResponse',
        supports_download=False,
    )

    def Patch(self, request, global_params=None):
      r"""Updates the specified session entity type.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

      Args:
        request: (DialogflowProjectsAgentSessionsEntityTypesPatchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2SessionEntityType) The response message.
      """
      config = self.GetMethodConfig('Patch')
      return self._RunMethod(
          config, request, global_params=global_params)

    Patch.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}',
        http_method=u'PATCH',
        method_id=u'dialogflow.projects.agent.sessions.entityTypes.patch',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'updateMask'],
        relative_path=u'v2/{+name}',
        request_field=u'googleCloudDialogflowV2SessionEntityType',
        request_type_name=u'DialogflowProjectsAgentSessionsEntityTypesPatchRequest',
        response_type_name=u'GoogleCloudDialogflowV2SessionEntityType',
        supports_download=False,
    )

  class ProjectsAgentSessionsService(base_api.BaseApiService):
    """Service class for the projects_agent_sessions resource."""

    _NAME = u'projects_agent_sessions'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentSessionsService, self).__init__(client)
      self._upload_configs = {
          }

    def DeleteContexts(self, request, global_params=None):
      r"""Deletes all active contexts in the specified session.

      Args:
        request: (DialogflowProjectsAgentSessionsDeleteContextsRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('DeleteContexts')
      return self._RunMethod(
          config, request, global_params=global_params)

    DeleteContexts.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts',
        http_method=u'DELETE',
        method_id=u'dialogflow.projects.agent.sessions.deleteContexts',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/contexts',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsDeleteContextsRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def DetectIntent(self, request, global_params=None):
      r"""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.

      Args:
        request: (DialogflowProjectsAgentSessionsDetectIntentRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2DetectIntentResponse) The response message.
      """
      config = self.GetMethodConfig('DetectIntent')
      return self._RunMethod(
          config, request, global_params=global_params)

    DetectIntent.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}:detectIntent',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.sessions.detectIntent',
        ordered_params=[u'session'],
        path_params=[u'session'],
        query_params=[],
        relative_path=u'v2/{+session}:detectIntent',
        request_field=u'googleCloudDialogflowV2DetectIntentRequest',
        request_type_name=u'DialogflowProjectsAgentSessionsDetectIntentRequest',
        response_type_name=u'GoogleCloudDialogflowV2DetectIntentResponse',
        supports_download=False,
    )

  class ProjectsAgentService(base_api.BaseApiService):
    """Service class for the projects_agent resource."""

    _NAME = u'projects_agent'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentService, self).__init__(client)
      self._upload_configs = {
          }

    def Export(self, request, global_params=None):
      r"""Exports the specified agent to a ZIP file.

Operation <response: ExportAgentResponse>

      Args:
        request: (DialogflowProjectsAgentExportRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('Export')
      return self._RunMethod(
          config, request, global_params=global_params)

    Export.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent:export',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.export',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/agent:export',
        request_field=u'googleCloudDialogflowV2ExportAgentRequest',
        request_type_name=u'DialogflowProjectsAgentExportRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def Import(self, request, global_params=None):
      r"""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 <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentImportRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('Import')
      return self._RunMethod(
          config, request, global_params=global_params)

    Import.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent:import',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.import',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/agent:import',
        request_field=u'googleCloudDialogflowV2ImportAgentRequest',
        request_type_name=u'DialogflowProjectsAgentImportRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def Restore(self, request, global_params=None):
      r"""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 <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentRestoreRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('Restore')
      return self._RunMethod(
          config, request, global_params=global_params)

    Restore.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent:restore',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.restore',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/agent:restore',
        request_field=u'googleCloudDialogflowV2RestoreAgentRequest',
        request_type_name=u'DialogflowProjectsAgentRestoreRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def Search(self, request, global_params=None):
      r"""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).

      Args:
        request: (DialogflowProjectsAgentSearchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2SearchAgentsResponse) The response message.
      """
      config = self.GetMethodConfig('Search')
      return self._RunMethod(
          config, request, global_params=global_params)

    Search.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent:search',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.search',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'pageSize', u'pageToken'],
        relative_path=u'v2/{+parent}/agent:search',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSearchRequest',
        response_type_name=u'GoogleCloudDialogflowV2SearchAgentsResponse',
        supports_download=False,
    )

    def Train(self, request, global_params=None):
      r"""Trains the specified agent.

Operation <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentTrainRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('Train')
      return self._RunMethod(
          config, request, global_params=global_params)

    Train.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent:train',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.train',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/agent:train',
        request_field=u'googleCloudDialogflowV2TrainAgentRequest',
        request_type_name=u'DialogflowProjectsAgentTrainRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

  class ProjectsLocationsOperationsService(base_api.BaseApiService):
    """Service class for the projects_locations_operations resource."""

    _NAME = u'projects_locations_operations'

    def __init__(self, client):
      super(DialogflowV2.ProjectsLocationsOperationsService, self).__init__(client)
      self._upload_configs = {
          }

    def Cancel(self, request, global_params=None):
      r"""Starts asynchronous cancellation on a long-running operation.  The server.
makes a best effort to cancel the operation, but success is not
guaranteed.  If the server doesn't support this method, it returns
`google.rpc.Code.UNIMPLEMENTED`.  Clients can use
Operations.GetOperation or
other methods to check whether the cancellation succeeded or whether the
operation completed despite cancellation. On successful cancellation,
the operation is not deleted; instead, it becomes an operation with
an Operation.error value with a google.rpc.Status.code of 1,
corresponding to `Code.CANCELLED`.

      Args:
        request: (DialogflowProjectsLocationsOperationsCancelRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('Cancel')
      return self._RunMethod(
          config, request, global_params=global_params)

    Cancel.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel',
        http_method=u'POST',
        method_id=u'dialogflow.projects.locations.operations.cancel',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}:cancel',
        request_field='',
        request_type_name=u'DialogflowProjectsLocationsOperationsCancelRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Gets the latest state of a long-running operation.  Clients can use this.
method to poll the operation result at intervals as recommended by the API
service.

      Args:
        request: (DialogflowProjectsLocationsOperationsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}',
        http_method=u'GET',
        method_id=u'dialogflow.projects.locations.operations.get',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsLocationsOperationsGetRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists operations that match the specified filter in the request. If the.
server doesn't support this method, it returns `UNIMPLEMENTED`.

NOTE: the `name` binding allows API services to override the binding
to use different resource name schemes, such as `users/*/operations`. To
override the binding, API services can add a binding such as
`"/v1/{name=users/*}/operations"` to their service configuration.
For backwards compatibility, the default name includes the operations
collection id, however overriding users must ensure the name binding
is the parent resource, without the operations collection id.

      Args:
        request: (DialogflowProjectsLocationsOperationsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningListOperationsResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/locations/{locationsId}/operations',
        http_method=u'GET',
        method_id=u'dialogflow.projects.locations.operations.list',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'filter', u'pageSize', u'pageToken'],
        relative_path=u'v2/{+name}/operations',
        request_field='',
        request_type_name=u'DialogflowProjectsLocationsOperationsListRequest',
        response_type_name=u'GoogleLongrunningListOperationsResponse',
        supports_download=False,
    )

  class ProjectsLocationsService(base_api.BaseApiService):
    """Service class for the projects_locations resource."""

    _NAME = u'projects_locations'

    def __init__(self, client):
      super(DialogflowV2.ProjectsLocationsService, self).__init__(client)
      self._upload_configs = {
          }

  class ProjectsOperationsService(base_api.BaseApiService):
    """Service class for the projects_operations resource."""

    _NAME = u'projects_operations'

    def __init__(self, client):
      super(DialogflowV2.ProjectsOperationsService, self).__init__(client)
      self._upload_configs = {
          }

    def Cancel(self, request, global_params=None):
      r"""Starts asynchronous cancellation on a long-running operation.  The server.
makes a best effort to cancel the operation, but success is not
guaranteed.  If the server doesn't support this method, it returns
`google.rpc.Code.UNIMPLEMENTED`.  Clients can use
Operations.GetOperation or
other methods to check whether the cancellation succeeded or whether the
operation completed despite cancellation. On successful cancellation,
the operation is not deleted; instead, it becomes an operation with
an Operation.error value with a google.rpc.Status.code of 1,
corresponding to `Code.CANCELLED`.

      Args:
        request: (DialogflowProjectsOperationsCancelRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('Cancel')
      return self._RunMethod(
          config, request, global_params=global_params)

    Cancel.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/operations/{operationsId}:cancel',
        http_method=u'POST',
        method_id=u'dialogflow.projects.operations.cancel',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}:cancel',
        request_field='',
        request_type_name=u'DialogflowProjectsOperationsCancelRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Gets the latest state of a long-running operation.  Clients can use this.
method to poll the operation result at intervals as recommended by the API
service.

      Args:
        request: (DialogflowProjectsOperationsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/operations/{operationsId}',
        http_method=u'GET',
        method_id=u'dialogflow.projects.operations.get',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsOperationsGetRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists operations that match the specified filter in the request. If the.
server doesn't support this method, it returns `UNIMPLEMENTED`.

NOTE: the `name` binding allows API services to override the binding
to use different resource name schemes, such as `users/*/operations`. To
override the binding, API services can add a binding such as
`"/v1/{name=users/*}/operations"` to their service configuration.
For backwards compatibility, the default name includes the operations
collection id, however overriding users must ensure the name binding
is the parent resource, without the operations collection id.

      Args:
        request: (DialogflowProjectsOperationsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningListOperationsResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/operations',
        http_method=u'GET',
        method_id=u'dialogflow.projects.operations.list',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'filter', u'pageSize', u'pageToken'],
        relative_path=u'v2/{+name}/operations',
        request_field='',
        request_type_name=u'DialogflowProjectsOperationsListRequest',
        response_type_name=u'GoogleLongrunningListOperationsResponse',
        supports_download=False,
    )

  class ProjectsService(base_api.BaseApiService):
    """Service class for the projects resource."""

    _NAME = u'projects'

    def __init__(self, client):
      super(DialogflowV2.ProjectsService, self).__init__(client)
      self._upload_configs = {
          }

    def Agent(self, request, global_params=None):
      r"""Creates/updates the specified agent.

      Args:
        request: (DialogflowProjectsAgentRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Agent) The response message.
      """
      config = self.GetMethodConfig('Agent')
      return self._RunMethod(
          config, request, global_params=global_params)

    Agent.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'updateMask'],
        relative_path=u'v2/{+parent}/agent',
        request_field=u'googleCloudDialogflowV2Agent',
        request_type_name=u'DialogflowProjectsAgentRequest',
        response_type_name=u'GoogleCloudDialogflowV2Agent',
        supports_download=False,
    )

    def DeleteAgent(self, request, global_params=None):
      r"""Deletes the specified agent.

      Args:
        request: (DialogflowProjectsDeleteAgentRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('DeleteAgent')
      return self._RunMethod(
          config, request, global_params=global_params)

    DeleteAgent.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent',
        http_method=u'DELETE',
        method_id=u'dialogflow.projects.deleteAgent',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/agent',
        request_field='',
        request_type_name=u'DialogflowProjectsDeleteAgentRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def GetAgent(self, request, global_params=None):
      r"""Retrieves the specified agent.

      Args:
        request: (DialogflowProjectsGetAgentRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Agent) The response message.
      """
      config = self.GetMethodConfig('GetAgent')
      return self._RunMethod(
          config, request, global_params=global_params)

    GetAgent.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent',
        http_method=u'GET',
        method_id=u'dialogflow.projects.getAgent',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/agent',
        request_field='',
        request_type_name=u'DialogflowProjectsGetAgentRequest',
        response_type_name=u'GoogleCloudDialogflowV2Agent',
        supports_download=False,
    )

"""Generated client library for dialogflow version v2."""
# NOTE: This file is autogenerated and should not be edited by hand.
from apitools.base.py import base_api
from googlecloudsdk.third_party.apis.dialogflow.v2 import dialogflow_v2_messages as messages


class DialogflowV2(base_api.BaseApiClient):
  """Generated client library for service dialogflow version v2."""

  MESSAGES_MODULE = messages
  BASE_URL = u'https://dialogflow.googleapis.com/'

  _PACKAGE = u'dialogflow'
  _SCOPES = [u'https://www.googleapis.com/auth/cloud-platform', u'https://www.googleapis.com/auth/dialogflow']
  _VERSION = u'v2'
  _CLIENT_ID = '1042881264118.apps.googleusercontent.com'
  _CLIENT_SECRET = 'x_Tw5K8nnjoRAqULM9PFAC2b'
  _USER_AGENT = 'x_Tw5K8nnjoRAqULM9PFAC2b'
  _CLIENT_CLASS_NAME = u'DialogflowV2'
  _URL_VERSION = u'v2'
  _API_KEY = None

  def __init__(self, url='', credentials=None,
               get_credentials=True, http=None, model=None,
               log_request=False, log_response=False,
               credentials_args=None, default_global_params=None,
               additional_http_headers=None, response_encoding=None):
    """Create a new dialogflow handle."""
    url = url or self.BASE_URL
    super(DialogflowV2, self).__init__(
        url, credentials=credentials,
        get_credentials=get_credentials, http=http, model=model,
        log_request=log_request, log_response=log_response,
        credentials_args=credentials_args,
        default_global_params=default_global_params,
        additional_http_headers=additional_http_headers,
        response_encoding=response_encoding)
    self.projects_agent_entityTypes_entities = self.ProjectsAgentEntityTypesEntitiesService(self)
    self.projects_agent_entityTypes = self.ProjectsAgentEntityTypesService(self)
    self.projects_agent_intents = self.ProjectsAgentIntentsService(self)
    self.projects_agent_sessions_contexts = self.ProjectsAgentSessionsContextsService(self)
    self.projects_agent_sessions_entityTypes = self.ProjectsAgentSessionsEntityTypesService(self)
    self.projects_agent_sessions = self.ProjectsAgentSessionsService(self)
    self.projects_agent = self.ProjectsAgentService(self)
    self.projects_locations_operations = self.ProjectsLocationsOperationsService(self)
    self.projects_locations = self.ProjectsLocationsService(self)
    self.projects_operations = self.ProjectsOperationsService(self)
    self.projects = self.ProjectsService(self)

  class ProjectsAgentEntityTypesEntitiesService(base_api.BaseApiService):
    """Service class for the projects_agent_entityTypes_entities resource."""

    _NAME = u'projects_agent_entityTypes_entities'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentEntityTypesEntitiesService, self).__init__(client)
      self._upload_configs = {
          }

    def BatchCreate(self, request, global_params=None):
      r"""Creates multiple new entities in the specified entity type.

Operation <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentEntityTypesEntitiesBatchCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchCreate')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchCreate.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.entityTypes.entities.batchCreate',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/entities:batchCreate',
        request_field=u'googleCloudDialogflowV2BatchCreateEntitiesRequest',
        request_type_name=u'DialogflowProjectsAgentEntityTypesEntitiesBatchCreateRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def BatchDelete(self, request, global_params=None):
      r"""Deletes entities in the specified entity type.

Operation <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentEntityTypesEntitiesBatchDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchDelete')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchDelete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.entityTypes.entities.batchDelete',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/entities:batchDelete',
        request_field=u'googleCloudDialogflowV2BatchDeleteEntitiesRequest',
        request_type_name=u'DialogflowProjectsAgentEntityTypesEntitiesBatchDeleteRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def BatchUpdate(self, request, global_params=None):
      r"""Updates or creates multiple entities in the specified entity type. This.
method does not affect entities in the entity type that aren't explicitly
specified in the request.

Operation <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentEntityTypesEntitiesBatchUpdateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchUpdate')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchUpdate.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.entityTypes.entities.batchUpdate',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/entities:batchUpdate',
        request_field=u'googleCloudDialogflowV2BatchUpdateEntitiesRequest',
        request_type_name=u'DialogflowProjectsAgentEntityTypesEntitiesBatchUpdateRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

  class ProjectsAgentEntityTypesService(base_api.BaseApiService):
    """Service class for the projects_agent_entityTypes resource."""

    _NAME = u'projects_agent_entityTypes'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentEntityTypesService, self).__init__(client)
      self._upload_configs = {
          }

    def BatchDelete(self, request, global_params=None):
      r"""Deletes entity types in the specified agent.

Operation <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentEntityTypesBatchDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchDelete')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchDelete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes:batchDelete',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.entityTypes.batchDelete',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/entityTypes:batchDelete',
        request_field=u'googleCloudDialogflowV2BatchDeleteEntityTypesRequest',
        request_type_name=u'DialogflowProjectsAgentEntityTypesBatchDeleteRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def BatchUpdate(self, request, global_params=None):
      r"""Updates/Creates multiple entity types in the specified agent.

Operation <response: BatchUpdateEntityTypesResponse>

      Args:
        request: (DialogflowProjectsAgentEntityTypesBatchUpdateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchUpdate')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchUpdate.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes:batchUpdate',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.entityTypes.batchUpdate',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/entityTypes:batchUpdate',
        request_field=u'googleCloudDialogflowV2BatchUpdateEntityTypesRequest',
        request_type_name=u'DialogflowProjectsAgentEntityTypesBatchUpdateRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def Create(self, request, global_params=None):
      r"""Creates an entity type in the specified agent.

      Args:
        request: (DialogflowProjectsAgentEntityTypesCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2EntityType) The response message.
      """
      config = self.GetMethodConfig('Create')
      return self._RunMethod(
          config, request, global_params=global_params)

    Create.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.entityTypes.create',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'languageCode'],
        relative_path=u'v2/{+parent}/entityTypes',
        request_field=u'googleCloudDialogflowV2EntityType',
        request_type_name=u'DialogflowProjectsAgentEntityTypesCreateRequest',
        response_type_name=u'GoogleCloudDialogflowV2EntityType',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes the specified entity type.

      Args:
        request: (DialogflowProjectsAgentEntityTypesDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('Delete')
      return self._RunMethod(
          config, request, global_params=global_params)

    Delete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}',
        http_method=u'DELETE',
        method_id=u'dialogflow.projects.agent.entityTypes.delete',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentEntityTypesDeleteRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Retrieves the specified entity type.

      Args:
        request: (DialogflowProjectsAgentEntityTypesGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2EntityType) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.entityTypes.get',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'languageCode'],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentEntityTypesGetRequest',
        response_type_name=u'GoogleCloudDialogflowV2EntityType',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Returns the list of all entity types in the specified agent.

      Args:
        request: (DialogflowProjectsAgentEntityTypesListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2ListEntityTypesResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.entityTypes.list',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'languageCode', u'pageSize', u'pageToken'],
        relative_path=u'v2/{+parent}/entityTypes',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentEntityTypesListRequest',
        response_type_name=u'GoogleCloudDialogflowV2ListEntityTypesResponse',
        supports_download=False,
    )

    def Patch(self, request, global_params=None):
      r"""Updates the specified entity type.

      Args:
        request: (DialogflowProjectsAgentEntityTypesPatchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2EntityType) The response message.
      """
      config = self.GetMethodConfig('Patch')
      return self._RunMethod(
          config, request, global_params=global_params)

    Patch.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/entityTypes/{entityTypesId}',
        http_method=u'PATCH',
        method_id=u'dialogflow.projects.agent.entityTypes.patch',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'languageCode', u'updateMask'],
        relative_path=u'v2/{+name}',
        request_field=u'googleCloudDialogflowV2EntityType',
        request_type_name=u'DialogflowProjectsAgentEntityTypesPatchRequest',
        response_type_name=u'GoogleCloudDialogflowV2EntityType',
        supports_download=False,
    )

  class ProjectsAgentIntentsService(base_api.BaseApiService):
    """Service class for the projects_agent_intents resource."""

    _NAME = u'projects_agent_intents'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentIntentsService, self).__init__(client)
      self._upload_configs = {
          }

    def BatchDelete(self, request, global_params=None):
      r"""Deletes intents in the specified agent.

Operation <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentIntentsBatchDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchDelete')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchDelete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents:batchDelete',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.intents.batchDelete',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/intents:batchDelete',
        request_field=u'googleCloudDialogflowV2BatchDeleteIntentsRequest',
        request_type_name=u'DialogflowProjectsAgentIntentsBatchDeleteRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def BatchUpdate(self, request, global_params=None):
      r"""Updates/Creates multiple intents in the specified agent.

Operation <response: BatchUpdateIntentsResponse>

      Args:
        request: (DialogflowProjectsAgentIntentsBatchUpdateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('BatchUpdate')
      return self._RunMethod(
          config, request, global_params=global_params)

    BatchUpdate.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents:batchUpdate',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.intents.batchUpdate',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/intents:batchUpdate',
        request_field=u'googleCloudDialogflowV2BatchUpdateIntentsRequest',
        request_type_name=u'DialogflowProjectsAgentIntentsBatchUpdateRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def Create(self, request, global_params=None):
      r"""Creates an intent in the specified agent.

      Args:
        request: (DialogflowProjectsAgentIntentsCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Intent) The response message.
      """
      config = self.GetMethodConfig('Create')
      return self._RunMethod(
          config, request, global_params=global_params)

    Create.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.intents.create',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'intentView', u'languageCode'],
        relative_path=u'v2/{+parent}/intents',
        request_field=u'googleCloudDialogflowV2Intent',
        request_type_name=u'DialogflowProjectsAgentIntentsCreateRequest',
        response_type_name=u'GoogleCloudDialogflowV2Intent',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes the specified intent and its direct or indirect followup intents.

      Args:
        request: (DialogflowProjectsAgentIntentsDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('Delete')
      return self._RunMethod(
          config, request, global_params=global_params)

    Delete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents/{intentsId}',
        http_method=u'DELETE',
        method_id=u'dialogflow.projects.agent.intents.delete',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentIntentsDeleteRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Retrieves the specified intent.

      Args:
        request: (DialogflowProjectsAgentIntentsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Intent) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents/{intentsId}',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.intents.get',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'intentView', u'languageCode'],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentIntentsGetRequest',
        response_type_name=u'GoogleCloudDialogflowV2Intent',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Returns the list of all intents in the specified agent.

      Args:
        request: (DialogflowProjectsAgentIntentsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2ListIntentsResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.intents.list',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'intentView', u'languageCode', u'pageSize', u'pageToken'],
        relative_path=u'v2/{+parent}/intents',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentIntentsListRequest',
        response_type_name=u'GoogleCloudDialogflowV2ListIntentsResponse',
        supports_download=False,
    )

    def Patch(self, request, global_params=None):
      r"""Updates the specified intent.

      Args:
        request: (DialogflowProjectsAgentIntentsPatchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Intent) The response message.
      """
      config = self.GetMethodConfig('Patch')
      return self._RunMethod(
          config, request, global_params=global_params)

    Patch.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/intents/{intentsId}',
        http_method=u'PATCH',
        method_id=u'dialogflow.projects.agent.intents.patch',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'intentView', u'languageCode', u'updateMask'],
        relative_path=u'v2/{+name}',
        request_field=u'googleCloudDialogflowV2Intent',
        request_type_name=u'DialogflowProjectsAgentIntentsPatchRequest',
        response_type_name=u'GoogleCloudDialogflowV2Intent',
        supports_download=False,
    )

  class ProjectsAgentSessionsContextsService(base_api.BaseApiService):
    """Service class for the projects_agent_sessions_contexts resource."""

    _NAME = u'projects_agent_sessions_contexts'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentSessionsContextsService, self).__init__(client)
      self._upload_configs = {
          }

    def Create(self, request, global_params=None):
      r"""Creates a context.

If the specified context already exists, overrides the context.

      Args:
        request: (DialogflowProjectsAgentSessionsContextsCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Context) The response message.
      """
      config = self.GetMethodConfig('Create')
      return self._RunMethod(
          config, request, global_params=global_params)

    Create.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.sessions.contexts.create',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/contexts',
        request_field=u'googleCloudDialogflowV2Context',
        request_type_name=u'DialogflowProjectsAgentSessionsContextsCreateRequest',
        response_type_name=u'GoogleCloudDialogflowV2Context',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes the specified context.

      Args:
        request: (DialogflowProjectsAgentSessionsContextsDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('Delete')
      return self._RunMethod(
          config, request, global_params=global_params)

    Delete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}',
        http_method=u'DELETE',
        method_id=u'dialogflow.projects.agent.sessions.contexts.delete',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsContextsDeleteRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Retrieves the specified context.

      Args:
        request: (DialogflowProjectsAgentSessionsContextsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Context) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.sessions.contexts.get',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsContextsGetRequest',
        response_type_name=u'GoogleCloudDialogflowV2Context',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Returns the list of all contexts in the specified session.

      Args:
        request: (DialogflowProjectsAgentSessionsContextsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2ListContextsResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.sessions.contexts.list',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'pageSize', u'pageToken'],
        relative_path=u'v2/{+parent}/contexts',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsContextsListRequest',
        response_type_name=u'GoogleCloudDialogflowV2ListContextsResponse',
        supports_download=False,
    )

    def Patch(self, request, global_params=None):
      r"""Updates the specified context.

      Args:
        request: (DialogflowProjectsAgentSessionsContextsPatchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Context) The response message.
      """
      config = self.GetMethodConfig('Patch')
      return self._RunMethod(
          config, request, global_params=global_params)

    Patch.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}',
        http_method=u'PATCH',
        method_id=u'dialogflow.projects.agent.sessions.contexts.patch',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'updateMask'],
        relative_path=u'v2/{+name}',
        request_field=u'googleCloudDialogflowV2Context',
        request_type_name=u'DialogflowProjectsAgentSessionsContextsPatchRequest',
        response_type_name=u'GoogleCloudDialogflowV2Context',
        supports_download=False,
    )

  class ProjectsAgentSessionsEntityTypesService(base_api.BaseApiService):
    """Service class for the projects_agent_sessions_entityTypes resource."""

    _NAME = u'projects_agent_sessions_entityTypes'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentSessionsEntityTypesService, self).__init__(client)
      self._upload_configs = {
          }

    def Create(self, request, global_params=None):
      r"""Creates a session entity type.

If the specified session entity type already exists, overrides the session
entity type.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

      Args:
        request: (DialogflowProjectsAgentSessionsEntityTypesCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2SessionEntityType) The response message.
      """
      config = self.GetMethodConfig('Create')
      return self._RunMethod(
          config, request, global_params=global_params)

    Create.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.sessions.entityTypes.create',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/entityTypes',
        request_field=u'googleCloudDialogflowV2SessionEntityType',
        request_type_name=u'DialogflowProjectsAgentSessionsEntityTypesCreateRequest',
        response_type_name=u'GoogleCloudDialogflowV2SessionEntityType',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes the specified session entity type.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

      Args:
        request: (DialogflowProjectsAgentSessionsEntityTypesDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('Delete')
      return self._RunMethod(
          config, request, global_params=global_params)

    Delete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}',
        http_method=u'DELETE',
        method_id=u'dialogflow.projects.agent.sessions.entityTypes.delete',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsEntityTypesDeleteRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Retrieves the specified session entity type.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

      Args:
        request: (DialogflowProjectsAgentSessionsEntityTypesGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2SessionEntityType) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.sessions.entityTypes.get',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsEntityTypesGetRequest',
        response_type_name=u'GoogleCloudDialogflowV2SessionEntityType',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Returns the list of all session entity types in the specified session.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

      Args:
        request: (DialogflowProjectsAgentSessionsEntityTypesListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2ListSessionEntityTypesResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.sessions.entityTypes.list',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'pageSize', u'pageToken'],
        relative_path=u'v2/{+parent}/entityTypes',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsEntityTypesListRequest',
        response_type_name=u'GoogleCloudDialogflowV2ListSessionEntityTypesResponse',
        supports_download=False,
    )

    def Patch(self, request, global_params=None):
      r"""Updates the specified session entity type.

This method doesn't work with Google Assistant integration.
Contact Dialogflow support if you need to use session entities
with Google Assistant integration.

      Args:
        request: (DialogflowProjectsAgentSessionsEntityTypesPatchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2SessionEntityType) The response message.
      """
      config = self.GetMethodConfig('Patch')
      return self._RunMethod(
          config, request, global_params=global_params)

    Patch.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}',
        http_method=u'PATCH',
        method_id=u'dialogflow.projects.agent.sessions.entityTypes.patch',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'updateMask'],
        relative_path=u'v2/{+name}',
        request_field=u'googleCloudDialogflowV2SessionEntityType',
        request_type_name=u'DialogflowProjectsAgentSessionsEntityTypesPatchRequest',
        response_type_name=u'GoogleCloudDialogflowV2SessionEntityType',
        supports_download=False,
    )

  class ProjectsAgentSessionsService(base_api.BaseApiService):
    """Service class for the projects_agent_sessions resource."""

    _NAME = u'projects_agent_sessions'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentSessionsService, self).__init__(client)
      self._upload_configs = {
          }

    def DeleteContexts(self, request, global_params=None):
      r"""Deletes all active contexts in the specified session.

      Args:
        request: (DialogflowProjectsAgentSessionsDeleteContextsRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('DeleteContexts')
      return self._RunMethod(
          config, request, global_params=global_params)

    DeleteContexts.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts',
        http_method=u'DELETE',
        method_id=u'dialogflow.projects.agent.sessions.deleteContexts',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/contexts',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSessionsDeleteContextsRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def DetectIntent(self, request, global_params=None):
      r"""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.

      Args:
        request: (DialogflowProjectsAgentSessionsDetectIntentRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2DetectIntentResponse) The response message.
      """
      config = self.GetMethodConfig('DetectIntent')
      return self._RunMethod(
          config, request, global_params=global_params)

    DetectIntent.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent/sessions/{sessionsId}:detectIntent',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.sessions.detectIntent',
        ordered_params=[u'session'],
        path_params=[u'session'],
        query_params=[],
        relative_path=u'v2/{+session}:detectIntent',
        request_field=u'googleCloudDialogflowV2DetectIntentRequest',
        request_type_name=u'DialogflowProjectsAgentSessionsDetectIntentRequest',
        response_type_name=u'GoogleCloudDialogflowV2DetectIntentResponse',
        supports_download=False,
    )

  class ProjectsAgentService(base_api.BaseApiService):
    """Service class for the projects_agent resource."""

    _NAME = u'projects_agent'

    def __init__(self, client):
      super(DialogflowV2.ProjectsAgentService, self).__init__(client)
      self._upload_configs = {
          }

    def Export(self, request, global_params=None):
      r"""Exports the specified agent to a ZIP file.

Operation <response: ExportAgentResponse>

      Args:
        request: (DialogflowProjectsAgentExportRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('Export')
      return self._RunMethod(
          config, request, global_params=global_params)

    Export.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent:export',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.export',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/agent:export',
        request_field=u'googleCloudDialogflowV2ExportAgentRequest',
        request_type_name=u'DialogflowProjectsAgentExportRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def Import(self, request, global_params=None):
      r"""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 <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentImportRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('Import')
      return self._RunMethod(
          config, request, global_params=global_params)

    Import.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent:import',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.import',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/agent:import',
        request_field=u'googleCloudDialogflowV2ImportAgentRequest',
        request_type_name=u'DialogflowProjectsAgentImportRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def Restore(self, request, global_params=None):
      r"""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 <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentRestoreRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('Restore')
      return self._RunMethod(
          config, request, global_params=global_params)

    Restore.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent:restore',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.restore',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/agent:restore',
        request_field=u'googleCloudDialogflowV2RestoreAgentRequest',
        request_type_name=u'DialogflowProjectsAgentRestoreRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def Search(self, request, global_params=None):
      r"""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).

      Args:
        request: (DialogflowProjectsAgentSearchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2SearchAgentsResponse) The response message.
      """
      config = self.GetMethodConfig('Search')
      return self._RunMethod(
          config, request, global_params=global_params)

    Search.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent:search',
        http_method=u'GET',
        method_id=u'dialogflow.projects.agent.search',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'pageSize', u'pageToken'],
        relative_path=u'v2/{+parent}/agent:search',
        request_field='',
        request_type_name=u'DialogflowProjectsAgentSearchRequest',
        response_type_name=u'GoogleCloudDialogflowV2SearchAgentsResponse',
        supports_download=False,
    )

    def Train(self, request, global_params=None):
      r"""Trains the specified agent.

Operation <response: google.protobuf.Empty>

      Args:
        request: (DialogflowProjectsAgentTrainRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('Train')
      return self._RunMethod(
          config, request, global_params=global_params)

    Train.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent:train',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent.train',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/agent:train',
        request_field=u'googleCloudDialogflowV2TrainAgentRequest',
        request_type_name=u'DialogflowProjectsAgentTrainRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

  class ProjectsLocationsOperationsService(base_api.BaseApiService):
    """Service class for the projects_locations_operations resource."""

    _NAME = u'projects_locations_operations'

    def __init__(self, client):
      super(DialogflowV2.ProjectsLocationsOperationsService, self).__init__(client)
      self._upload_configs = {
          }

    def Cancel(self, request, global_params=None):
      r"""Starts asynchronous cancellation on a long-running operation.  The server.
makes a best effort to cancel the operation, but success is not
guaranteed.  If the server doesn't support this method, it returns
`google.rpc.Code.UNIMPLEMENTED`.  Clients can use
Operations.GetOperation or
other methods to check whether the cancellation succeeded or whether the
operation completed despite cancellation. On successful cancellation,
the operation is not deleted; instead, it becomes an operation with
an Operation.error value with a google.rpc.Status.code of 1,
corresponding to `Code.CANCELLED`.

      Args:
        request: (DialogflowProjectsLocationsOperationsCancelRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('Cancel')
      return self._RunMethod(
          config, request, global_params=global_params)

    Cancel.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel',
        http_method=u'POST',
        method_id=u'dialogflow.projects.locations.operations.cancel',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}:cancel',
        request_field='',
        request_type_name=u'DialogflowProjectsLocationsOperationsCancelRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Gets the latest state of a long-running operation.  Clients can use this.
method to poll the operation result at intervals as recommended by the API
service.

      Args:
        request: (DialogflowProjectsLocationsOperationsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}',
        http_method=u'GET',
        method_id=u'dialogflow.projects.locations.operations.get',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsLocationsOperationsGetRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists operations that match the specified filter in the request. If the.
server doesn't support this method, it returns `UNIMPLEMENTED`.

NOTE: the `name` binding allows API services to override the binding
to use different resource name schemes, such as `users/*/operations`. To
override the binding, API services can add a binding such as
`"/v1/{name=users/*}/operations"` to their service configuration.
For backwards compatibility, the default name includes the operations
collection id, however overriding users must ensure the name binding
is the parent resource, without the operations collection id.

      Args:
        request: (DialogflowProjectsLocationsOperationsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningListOperationsResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/locations/{locationsId}/operations',
        http_method=u'GET',
        method_id=u'dialogflow.projects.locations.operations.list',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'filter', u'pageSize', u'pageToken'],
        relative_path=u'v2/{+name}/operations',
        request_field='',
        request_type_name=u'DialogflowProjectsLocationsOperationsListRequest',
        response_type_name=u'GoogleLongrunningListOperationsResponse',
        supports_download=False,
    )

  class ProjectsLocationsService(base_api.BaseApiService):
    """Service class for the projects_locations resource."""

    _NAME = u'projects_locations'

    def __init__(self, client):
      super(DialogflowV2.ProjectsLocationsService, self).__init__(client)
      self._upload_configs = {
          }

  class ProjectsOperationsService(base_api.BaseApiService):
    """Service class for the projects_operations resource."""

    _NAME = u'projects_operations'

    def __init__(self, client):
      super(DialogflowV2.ProjectsOperationsService, self).__init__(client)
      self._upload_configs = {
          }

    def Cancel(self, request, global_params=None):
      r"""Starts asynchronous cancellation on a long-running operation.  The server.
makes a best effort to cancel the operation, but success is not
guaranteed.  If the server doesn't support this method, it returns
`google.rpc.Code.UNIMPLEMENTED`.  Clients can use
Operations.GetOperation or
other methods to check whether the cancellation succeeded or whether the
operation completed despite cancellation. On successful cancellation,
the operation is not deleted; instead, it becomes an operation with
an Operation.error value with a google.rpc.Status.code of 1,
corresponding to `Code.CANCELLED`.

      Args:
        request: (DialogflowProjectsOperationsCancelRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('Cancel')
      return self._RunMethod(
          config, request, global_params=global_params)

    Cancel.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/operations/{operationsId}:cancel',
        http_method=u'POST',
        method_id=u'dialogflow.projects.operations.cancel',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}:cancel',
        request_field='',
        request_type_name=u'DialogflowProjectsOperationsCancelRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Gets the latest state of a long-running operation.  Clients can use this.
method to poll the operation result at intervals as recommended by the API
service.

      Args:
        request: (DialogflowProjectsOperationsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/operations/{operationsId}',
        http_method=u'GET',
        method_id=u'dialogflow.projects.operations.get',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[],
        relative_path=u'v2/{+name}',
        request_field='',
        request_type_name=u'DialogflowProjectsOperationsGetRequest',
        response_type_name=u'GoogleLongrunningOperation',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists operations that match the specified filter in the request. If the.
server doesn't support this method, it returns `UNIMPLEMENTED`.

NOTE: the `name` binding allows API services to override the binding
to use different resource name schemes, such as `users/*/operations`. To
override the binding, API services can add a binding such as
`"/v1/{name=users/*}/operations"` to their service configuration.
For backwards compatibility, the default name includes the operations
collection id, however overriding users must ensure the name binding
is the parent resource, without the operations collection id.

      Args:
        request: (DialogflowProjectsOperationsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningListOperationsResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/operations',
        http_method=u'GET',
        method_id=u'dialogflow.projects.operations.list',
        ordered_params=[u'name'],
        path_params=[u'name'],
        query_params=[u'filter', u'pageSize', u'pageToken'],
        relative_path=u'v2/{+name}/operations',
        request_field='',
        request_type_name=u'DialogflowProjectsOperationsListRequest',
        response_type_name=u'GoogleLongrunningListOperationsResponse',
        supports_download=False,
    )

  class ProjectsService(base_api.BaseApiService):
    """Service class for the projects resource."""

    _NAME = u'projects'

    def __init__(self, client):
      super(DialogflowV2.ProjectsService, self).__init__(client)
      self._upload_configs = {
          }

    def Agent(self, request, global_params=None):
      r"""Creates/updates the specified agent.

      Args:
        request: (DialogflowProjectsAgentRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Agent) The response message.
      """
      config = self.GetMethodConfig('Agent')
      return self._RunMethod(
          config, request, global_params=global_params)

    Agent.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent',
        http_method=u'POST',
        method_id=u'dialogflow.projects.agent',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[u'updateMask'],
        relative_path=u'v2/{+parent}/agent',
        request_field=u'googleCloudDialogflowV2Agent',
        request_type_name=u'DialogflowProjectsAgentRequest',
        response_type_name=u'GoogleCloudDialogflowV2Agent',
        supports_download=False,
    )

    def DeleteAgent(self, request, global_params=None):
      r"""Deletes the specified agent.

      Args:
        request: (DialogflowProjectsDeleteAgentRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      """
      config = self.GetMethodConfig('DeleteAgent')
      return self._RunMethod(
          config, request, global_params=global_params)

    DeleteAgent.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent',
        http_method=u'DELETE',
        method_id=u'dialogflow.projects.deleteAgent',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/agent',
        request_field='',
        request_type_name=u'DialogflowProjectsDeleteAgentRequest',
        response_type_name=u'GoogleProtobufEmpty',
        supports_download=False,
    )

    def GetAgent(self, request, global_params=None):
      r"""Retrieves the specified agent.

      Args:
        request: (DialogflowProjectsGetAgentRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDialogflowV2Agent) The response message.
      """
      config = self.GetMethodConfig('GetAgent')
      return self._RunMethod(
          config, request, global_params=global_params)

    GetAgent.method_config = lambda: base_api.ApiMethodInfo(
        flat_path=u'v2/projects/{projectsId}/agent',
        http_method=u'GET',
        method_id=u'dialogflow.projects.getAgent',
        ordered_params=[u'parent'],
        path_params=[u'parent'],
        query_params=[],
        relative_path=u'v2/{+parent}/agent',
        request_field='',
        request_type_name=u'DialogflowProjectsGetAgentRequest',
        response_type_name=u'GoogleCloudDialogflowV2Agent',
        supports_download=False,
    )
Generated client library for dialogflow version v2. # NOTE: This file is autogenerated and should not be edited by hand. Generated client library for service dialogflow version v2. Create a new dialogflow handle. Service class for the projects_agent_entityTypes_entities resource. Creates multiple new entities in the specified entity type.  Operation <response: google.protobuf.Empty>        Args:         request: (DialogflowProjectsAgentEntityTypesEntitiesBatchCreateRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningOperation) The response message. Deletes entities in the specified entity type.  Operation <response: google.protobuf.Empty>        Args:         request: (DialogflowProjectsAgentEntityTypesEntitiesBatchDeleteRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningOperation) The response message. Updates or creates multiple entities in the specified entity type. This. method does not affect entities in the entity type that aren't explicitly specified in the request.  Operation <response: google.protobuf.Empty>        Args:         request: (DialogflowProjectsAgentEntityTypesEntitiesBatchUpdateRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningOperation) The response message. Service class for the projects_agent_entityTypes resource. Deletes entity types in the specified agent.  Operation <response: google.protobuf.Empty>        Args:         request: (DialogflowProjectsAgentEntityTypesBatchDeleteRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningOperation) The response message. Updates/Creates multiple entity types in the specified agent.  Operation <response: BatchUpdateEntityTypesResponse>        Args:         request: (DialogflowProjectsAgentEntityTypesBatchUpdateRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningOperation) The response message. Creates an entity type in the specified agent.        Args:         request: (DialogflowProjectsAgentEntityTypesCreateRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2EntityType) The response message. Deletes the specified entity type.        Args:         request: (DialogflowProjectsAgentEntityTypesDeleteRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleProtobufEmpty) The response message. Retrieves the specified entity type.        Args:         request: (DialogflowProjectsAgentEntityTypesGetRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2EntityType) The response message. Returns the list of all entity types in the specified agent.        Args:         request: (DialogflowProjectsAgentEntityTypesListRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2ListEntityTypesResponse) The response message. Updates the specified entity type.        Args:         request: (DialogflowProjectsAgentEntityTypesPatchRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2EntityType) The response message. Service class for the projects_agent_intents resource. Deletes intents in the specified agent.  Operation <response: google.protobuf.Empty>        Args:         request: (DialogflowProjectsAgentIntentsBatchDeleteRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningOperation) The response message. Updates/Creates multiple intents in the specified agent.  Operation <response: BatchUpdateIntentsResponse>        Args:         request: (DialogflowProjectsAgentIntentsBatchUpdateRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningOperation) The response message. Creates an intent in the specified agent.        Args:         request: (DialogflowProjectsAgentIntentsCreateRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2Intent) The response message. Deletes the specified intent and its direct or indirect followup intents.        Args:         request: (DialogflowProjectsAgentIntentsDeleteRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleProtobufEmpty) The response message. Retrieves the specified intent.        Args:         request: (DialogflowProjectsAgentIntentsGetRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2Intent) The response message. Returns the list of all intents in the specified agent.        Args:         request: (DialogflowProjectsAgentIntentsListRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2ListIntentsResponse) The response message. Updates the specified intent.        Args:         request: (DialogflowProjectsAgentIntentsPatchRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2Intent) The response message. Service class for the projects_agent_sessions_contexts resource. Creates a context.  If the specified context already exists, overrides the context.        Args:         request: (DialogflowProjectsAgentSessionsContextsCreateRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2Context) The response message. Deletes the specified context.        Args:         request: (DialogflowProjectsAgentSessionsContextsDeleteRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleProtobufEmpty) The response message. Retrieves the specified context.        Args:         request: (DialogflowProjectsAgentSessionsContextsGetRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2Context) The response message. Returns the list of all contexts in the specified session.        Args:         request: (DialogflowProjectsAgentSessionsContextsListRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2ListContextsResponse) The response message. Updates the specified context.        Args:         request: (DialogflowProjectsAgentSessionsContextsPatchRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2Context) The response message. Service class for the projects_agent_sessions_entityTypes resource. Creates a session entity type.  If the specified session entity type already exists, overrides the session entity type.  This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.        Args:         request: (DialogflowProjectsAgentSessionsEntityTypesCreateRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2SessionEntityType) The response message. Deletes the specified session entity type.  This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.        Args:         request: (DialogflowProjectsAgentSessionsEntityTypesDeleteRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleProtobufEmpty) The response message. Retrieves the specified session entity type.  This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.        Args:         request: (DialogflowProjectsAgentSessionsEntityTypesGetRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2SessionEntityType) The response message. Returns the list of all session entity types in the specified session.  This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.        Args:         request: (DialogflowProjectsAgentSessionsEntityTypesListRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2ListSessionEntityTypesResponse) The response message. Updates the specified session entity type.  This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.        Args:         request: (DialogflowProjectsAgentSessionsEntityTypesPatchRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2SessionEntityType) The response message. Service class for the projects_agent_sessions resource. Deletes all active contexts in the specified session.        Args:         request: (DialogflowProjectsAgentSessionsDeleteContextsRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleProtobufEmpty) The response message. 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.        Args:         request: (DialogflowProjectsAgentSessionsDetectIntentRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2DetectIntentResponse) The response message. Service class for the projects_agent resource. Exports the specified agent to a ZIP file.  Operation <response: ExportAgentResponse>        Args:         request: (DialogflowProjectsAgentExportRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningOperation) The response message. 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 <response: google.protobuf.Empty>        Args:         request: (DialogflowProjectsAgentImportRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningOperation) The response message. 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 <response: google.protobuf.Empty>        Args:         request: (DialogflowProjectsAgentRestoreRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningOperation) The response message. 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).        Args:         request: (DialogflowProjectsAgentSearchRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2SearchAgentsResponse) The response message. Trains the specified agent.  Operation <response: google.protobuf.Empty>        Args:         request: (DialogflowProjectsAgentTrainRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningOperation) The response message. Service class for the projects_locations_operations resource. Starts asynchronous cancellation on a long-running operation.  The server. makes a best effort to cancel the operation, but success is not guaranteed.  If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.  Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.        Args:         request: (DialogflowProjectsLocationsOperationsCancelRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleProtobufEmpty) The response message. Gets the latest state of a long-running operation.  Clients can use this. method to poll the operation result at intervals as recommended by the API service.        Args:         request: (DialogflowProjectsLocationsOperationsGetRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningOperation) The response message. Lists operations that match the specified filter in the request. If the. server doesn't support this method, it returns `UNIMPLEMENTED`.  NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.        Args:         request: (DialogflowProjectsLocationsOperationsListRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningListOperationsResponse) The response message. Service class for the projects_locations resource. Service class for the projects_operations resource. Starts asynchronous cancellation on a long-running operation.  The server. makes a best effort to cancel the operation, but success is not guaranteed.  If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.  Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.        Args:         request: (DialogflowProjectsOperationsCancelRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleProtobufEmpty) The response message. Gets the latest state of a long-running operation.  Clients can use this. method to poll the operation result at intervals as recommended by the API service.        Args:         request: (DialogflowProjectsOperationsGetRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningOperation) The response message. Lists operations that match the specified filter in the request. If the. server doesn't support this method, it returns `UNIMPLEMENTED`.  NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.        Args:         request: (DialogflowProjectsOperationsListRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleLongrunningListOperationsResponse) The response message. Service class for the projects resource. Creates/updates the specified agent.        Args:         request: (DialogflowProjectsAgentRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2Agent) The response message. Deletes the specified agent.        Args:         request: (DialogflowProjectsDeleteAgentRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleProtobufEmpty) The response message. Retrieves the specified agent.        Args:         request: (DialogflowProjectsGetAgentRequest) input message         global_params: (StandardQueryParameters, default: None) global arguments       Returns:         (GoogleCloudDialogflowV2Agent) The response message.