"""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_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.

      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.

      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.

      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.

      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.

      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 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 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,
    )

  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 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,
    )
